Jump to content
  • 0
Sign in to follow this  
OmarAcero

Warper NPC: Create Job Restriction

Question

 

Friends,  How can I enable access for only trans classes?

I want create a restrict access to all jobs other than Jobs Trans.

My Idea : Warper

Spoiler

function Restrict {
//	if ((getarg(0) == "RE" && !RENEWAL) || (getarg(0) == "Pre-RE" && RENEWAL)) {
//	if ((getarg(0) == BaseLevel > 89) || (getarg(0) == BaseLevel < 90)) {
	if ((getarg(0) == Upper > 3 ) || (getarg(0) == Upper < 3 )) {
		if (getarg(1,0)) {
			@warp_block = 0;
			for (.@i = 1; .@i < getargcount(); .@i++)
				@warp_block = @warp_block | (1<<getarg(.@i));
		} else {
//			message strcharinfo(PC_NAME),"This map is not enabled in "+(RENEWAL?"":"Pre-")+"Renewal.";
			message strcharinfo(PC_NAME),"This map only is enabled for Jobs Trans.";
			end;
		}
	}
	return;
}

 

 

Edited by OmarAcero

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0
Well, I think I found the solution, if someone has a better idea, I would appreciate it if you mention it.
Spoiler

function Restrict {
	if ( Upper == 0	&&	Upper == 2 )	goto	warp_block;
	if ( Upper == 1 )	goto	warp_enabled;
warp_block:
		message strcharinfo(PC_NAME),"This map only is enabled for Trans Jobs.";
	close;
warp_enabled:
		message strcharinfo(PC_NAME),"Enjoy your Trip.";
	return;
}

 

Note1: Warper with Jobs Restriction.txt

Note2:  Explained the Upper parameter of jobchange

 

Edited by OmarAcero

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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