Jump to content
  • 0

Access to map with level restrictions


Question

Posted

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 .@map$,.@x,.@y,0;
		if ( .@map$ == "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 .@map$,.@x,.@y,0;
		if ( .@map$ == "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

 

4 answers to this question

Recommended Posts

  • 0
Posted
17 hours ago, botka4aet said:

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

 

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

  • 0
Posted
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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...