Need Help with VIP ROOM script

Miud00

New member
Messages
7
Points
0
i dont know how to use this forum, i'm apologize for my english and  if i making something wrong!!

i need help with this script

after i set the account to vip, the player can't get in the vip room!! even having all the vip commands and the group_id in sql  is set to 1 ( group vip in my server)

(it was tested reloaded account)

please someone help and again, so sorry for my english :(

tks you all

View attachment sistema_vip.txt

 
This script could use a few updates on syntax and modern scripting conventions. As always try referring to the /doc/ and doc/sample directories in Hercules for best practices, examples, and script command documentation.

Try Replacing this:  

if (getgmlevel() >= $minlvgm)
set .@menu$,select("- Entrar na sala VIP","- Administrar VIPs","","- Nada");
else
set .@menu$,select("- Entrar na sala VIP","","- Dias restantes de VIP","- Nada");
switch(.@menu$){




With This:

if (getgmlevel() >= $minlvgm)
.@menu = select("- Entrar na sala VIP","- Administrar VIPs","","- Nada");
else
.@menu = select("- Entrar na sala VIP","","- Dias restantes de VIP","- Nada");
switch (.@menu) {


Note that the select() script command will return an INTEGER value corresponding to the menu option selected, not a string. Furthermore, switch() will not accept a string as an argument.

Let me know if that fixes your problem. I have not reviewed the entire script.

 
Last edited by a moderator:
Just change "getgmlevel" to '"getgroupid" .
I was just coming back to edit my post with regard to this!

@Miud00 

note that getgmlevel() returns the Level of the group to which the player is assigned. (See level below)

getgroupid() returns the group ID of the group to which the player is assigned. (See id below)

As defined in conf/groups.conf

Code:
{
	id: 1
	name: "Group"
	inherit: ( "" )
	level: 0
	...
 
Last edited by a moderator:
Tank you all guys, 

thank you very much !!


it works perfect you guys are awesome, 

i just change "getgmlevel" to '"getgroupid" 

prontera,156,196,5    script    Porteiro VIP    965,{
if (getgroupid() < $levelvip){
mes $namenpc$;

thanks @Dangerous @Luciar

 
Back
Top