Jump to content
  • 0

Question

Posted

can someone help me?

i want make a warp for guild like warp 1 just for guild "triplex"

warp 2 for guild "ransu"

warp 3 for guild "ksiw"

warp 4 for guid "Acsow"

can someone help me to make a script? /thx

3 answers to this question

Recommended Posts

Posted (edited)

1 warp:

<map>,<x>,<y>,<z>	script	warp_1	45,2,2,{

OnTouch:
set .@gid, <value>; //ID of the guild named "triplex";
if( getcharid(2) == .@gid )
	warp <to_map>, <to_x>, <to_y>;
end;
}

The other warps are the same, changing the .@gid variable.

Also, you can make the same warp portal warping players in different maps based on their curret guild, without creating more warps.

<map>,<x>,<y>,<z>	script	warp_1	45,2,2,{

OnTouch:
if( getcharid(2) == <triplex ID> )
	warp <to_map>, <to_x>, <to_y>;
else if( getcharid(2) == <ransu ID> )
	warp <to_map>, <to_x>, <to_y>;

// else if( [...] )

end;
}

Or, more functional:

<map>,<x>,<y>,<z>	script	warp_1	45,2,2,{

OnTouch:
   for( .@i = 0; .@i < getarraysize(.gid); .@i++ ) {
	if( getcharid(3) == .gid[.@i] ) {
		warp .to_map$[.@i], .to_x[.@i], .to_y[.@i];
		break;
	}
}
end;

OnInit:
   setarray .gid, <triplex ID>, <ransu ID>, <ksiw ID>, <Acsow ID>;
setarray .to_map$, "<map 1>", "<map 2>", "<map 3>", "<map 4>";
setarray .to_x, <x 1>, <x 2>, <x 3>, <x 4>;
setarray .to_y, <y 1>, <y 2>, <y 3>, <y 4>;
}

Edited by Ryokem

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