Jump to content
  • 0

R> map level and stat restriction


Pink Guy

Question


  • Group:  Members
  • Topic Count:  131
  • Topics Per Day:  0.03
  • Content Count:  371
  • Reputation:   3
  • Joined:  11/14/11
  • Last Seen:  

Hello, can someone help me get a hold of a script that kicks people off a certain map if any of their stats is higher than 99 and if their lvl is higher than 99? Also, a text that tells them why they got kicked would also be nice. Thanks to whoever can help me.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  161
  • Reputation:   31
  • Joined:  12/06/11
  • Last Seen:  

Here's a sample.

-	script	LevelRestriction	-1,{
OnPCLoadMapEvent:
	if(.map$ == strcharinfo(3) && (BaseLevel >= .levelRestriction || readparam(bStr) >= .statRestriction || readparam(bAgi) >= .statRestriction || readparam(bVit) >= .statRestriction || readparam(bInt) >= .statRestriction || readparam(bDex) >= .statRestriction || readparam(bLuk) >= .statRestriction)) // Condition
	{
		dispbottom "You cannot warp to this map while your Base Level is over " + .levelRestriction - 1 + " or base stats are over " + .statRestriction -1;
		warp "SavePoint",0,0; // Warps player back to their savepoint
	}
	end;
	
OnInit:
	.map$ = "Prontera";// Map you wish to block
	.levelRestriction = 100; // Level 100 and above
	.statRestriction = 100; // 100 stat and above
	// Load event
	setmapflag .map$,mf_loadevent;
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  131
  • Topics Per Day:  0.03
  • Content Count:  371
  • Reputation:   3
  • Joined:  11/14/11
  • Last Seen:  

Thank you! I'll try it later and give you feedback.

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