Jump to content
  • 0
Sign in to follow this  
Miud00

Need Help with VIP ROOM script

Question

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

 

sistema_vip.txt

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 1

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.

Share this post


Link to post
Share on other sites
  • 1
15 minutes ago, Dangerous said:

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

{
	id: 1
	name: "Group"
	inherit: ( "" )
	level: 0
	...

 

Share this post


Link to post
Share on other sites
  • 0

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.