Jump to content
  • 0

Access to map with level restrictions


ItsRas

Question


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  30
  • Reputation:   0
  • Joined:  03/08/15
  • Last Seen:  

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

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  63
  • Reputation:   35
  • Joined:  07/04/19
  • Last Seen:  

try this:

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

 

Link to comment
Share on other sites

  • 1

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  211
  • Reputation:   17
  • Joined:  12/23/11
  • Last Seen:  

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

 

Edited by botka4aet
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  30
  • Reputation:   0
  • Joined:  03/08/15
  • Last Seen:  

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

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.02
  • Content Count:  65
  • Reputation:   0
  • Joined:  10/21/19
  • Last Seen:  

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