Jump to content
  • 0

GM and VIP Account filters, can u fix my script?


iraciz

Question


  • Group:  Members
  • Topic Count:  140
  • Topics Per Day:  0.03
  • Content Count:  562
  • Reputation:   107
  • Joined:  10/05/12
  • Last Seen:  

I need help to let only vip accounts and game masters lvl 99 stay in the script map "vip".

Is difficult for me because I have to apply 3 filters and I'm not good scripter.

//-----VIP MAP FILTER ACCES-----
-	script	VIPFILTER	-1,{
	
	OnPCLoadMapEvent:
	if (getgmlevel()>=99)
	showscript strcharinfo(0)+" : Admin Level Account Confirmed!.";
	
	if (vip_status(VIP_STATUS_ACTIVE)){
	showscript strcharinfo(0)+" : VIP Account Confirmed!.";
	}else{
	showscript strcharinfo(0)+" : Your account is not VIP! or i'ts time has expired! Defaulting Save Point.";
	sleep2 2000;
	specialeffect2 18;
	savepoint "new_1-1",47,63;
	sleep2 2000;
	warp "new_1-1",47,63;
	end;
	}
}

//------Enable map OnPCLoadMapEvent-------------------
vip	mapflag	loadevent

Non VIP accounts and Not GM's, who enter "vip" map will have their save point defaulted and also be warped to that spot,

GMs and vip will have the allowance message! and can stay there, I tried my best but i can't get it work as expected, could you lend me a hand? upvote spolier. /heh

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  215
  • Reputation:   45
  • Joined:  05/03/13
  • Last Seen:  

Hello,

I think you just need to add an else to make it work the way you want:

if (getgmlevel()>=99)
	showscript strcharinfo(0)+" : Admin Level Account Confirmed!.";
	
else if (vip_status(VIP_STATUS_ACTIVE)){

if a gm => admin level
else if a vip => vip confirmed
else => (not a gm nor a vip) => kick

Edited by Kreustoo
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  140
  • Topics Per Day:  0.03
  • Content Count:  562
  • Reputation:   107
  • Joined:  10/05/12
  • Last Seen:  

13 minutes ago, Kreustoo said:

Hello,

I think you just need to add an else to make it work they wya you want:


if (getgmlevel()>=99)
	showscript strcharinfo(0)+" : Admin Level Account Confirmed!.";
	
else if (vip_status(VIP_STATUS_ACTIVE)){

if a gm => admin level
else if a vip => vip confirmed
else => (not a gm nor a vip) => kick

 

Thank you, that was just the scripting lesson I needed! Now is woking fine... This will prevent GM's recalling normal users to enjoy the vip features map..

by the way, I noticed that the VIP status will be updated on player relog , if the vip timer expires in an account, she/he will still vip until reloggin.

Edited by iraciz
Link to comment
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.   Paste as plain text instead

  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.

×
×
  • Create New...