Jump to content
  • 0

Warping a party to specified player through menu


tokisboy

Question


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  6
  • Reputation:   0
  • Joined:  01/22/19
  • Last Seen:  

Help can someone shared party warper npc script

example:

menu player name then warp to player

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

prontera,150,150,0	script	Party Warper	100,{
	if (!getcharid(1)) end;
	.@c = getcharid(0);
	getpartymember getcharid(1), 0;
	getpartymember getcharid(1), 1;
	getpartymember getcharid(1), 2;

	for (.@i = 0; .@i < $@partymembercount; .@i++)
		.@menu$ = .@menu$ + (strcharinfo(0) != $@partymembername$[.@i] ? $@partymembername$[.@i] : "") + ":";

	.@s = select(.@menu$) - 1;
	if (isloggedin($@partymemberaid[.@s], $@partymembercid[.@s])) {
		attachrid($@partymemberaid[.@s]);
		getmapxy .@map$, .@x, .@y;
		warp .@map$, .@x, .@y, .@c;
	}
	end;
}

 

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:  

Hello @Patskie Im just wondering if you could help me? I am currently using your script on my test server. It works perfectly but I am curious is it possible to add limitations to it? For example, if the party member is on mvp, woe or pvp, or any restricted maps, you will not be able to warp to that member. Also, is it possible to only display the names of the members who's online?

I did it this way but its not working. You still be able to warp to that party member even he is on restricted map.

prontera,156,182,0	script	Party Warper	100,{
	if (!getcharid(1)) end;
	.@c = getcharid(0);
	getpartymember getcharid(1), 0;
	getpartymember getcharid(1), 1;
	getpartymember getcharid(1), 2;

	for (.@i = 0; .@i < $@partymembercount; .@i++)
		.@menu$ = .@menu$ + (strcharinfo(0) != $@partymembername$[.@i] ? $@partymembername$[.@i] : "") + ":";

	.@s = select(.@menu$) - 1;
	if (isloggedin($@partymemberaid[.@s], $@partymembercid[.@s])) {
		attachrid($@partymemberaid[.@s]);
		getmapxy .@map$, .@x, .@y;
		if (@map$ == "aldebaran"){
			mes "I can't be teleport you to your friend's location!";
          		close;
       		}
		warp .@map$, .@x, .@y, .@c;
	}
	end;
}

Thank you in advance ?

Edited by kohjuliana
Added additional question
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...