Jump to content
  • 0
ItsRas

Access to map with level restrictions

Question

Hello, can anyone help me fix this script? I'm trying to improve this script which I got from SOURCE by adding base level limits. For example, only players within level 85-115 are allowed to enter the map. A player who doesn't meet the requirement will be warp to his save points. 

Thanks in advance

Original:

-	script	Sample	-1,{
	OnPCLoadMapEvent:
		getmapxy [email protected]$,[email protected],[email protected],0;
		if ( [email protected]$ == "guild_vs1" && BaseLevel != 99 ) {
			dispbottom "You cannot enter this map unless you are level 99";
			sleep2 3000;
			warp "SavePoint",0,0;
		}
		end;
}
guild_vs1	mapflag	loadevent

Edited:

-	script	Sample	-1,{
	OnPCLoadMapEvent:
		getmapxy [email protected]$,[email protected],[email protected],0;
		if ( [email protected]$ == "guild_vs1" && BaseLevel < 85  || BaseLevel > 115 ) {
			dispbottom "Sorry but you must be within level [85-115] to enter.";
			sleep2 3000;
			warp "SavePoint",0,0;
		}
		end;
}
guild_vs1	mapflag	loadevent

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0
17 hours ago, botka4aet said:
if ( . @ map $ == "guild_vs1" && (BaseLevel <85 || BaseLevel> 115)) {

 

Thanks for the reply but I am getting error for this.

Link to comment
Share on other sites

  • 0
On 1/31/2021 at 6:26 PM, Mastagoon said:

try this:

if ( .@map$ == "guild_vs1" && (BaseLevel < 85  || BaseLevel > 115) )

 

its working but after  you enter the pvp you cant get back and then the script spam savepoint warp

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...

Important Information

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