Jump to content
  • 0

Warp for guild


skipjack94

Question


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.00
  • Content Count:  44
  • Reputation:   0
  • Joined:  08/27/12
  • Last Seen:  

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

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  205
  • Reputation:   19
  • Joined:  10/12/12
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.00
  • Content Count:  44
  • Reputation:   0
  • Joined:  08/27/12
  • Last Seen:  

thx sir

but changing .@gid variable?

i not understand

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

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