Jump to content
  • 0

Party warper with map restrictions and online party member display


Question

Posted

Hello, Can anyone help me with this party warper script? I got a party warper script from https://rathena.org/board/topic/123333-warping-a-party-to-specified-player-through-menu/ . The script allows you to warp wherever your party member is andI want to improve it somehow by adding some restrictions and displaying only the name of the members who are online to it but I fail it make it work.

Restricstions in example, mvp map, woe, or pvp area.

 

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 :")

2 answers to this question

Recommended Posts

  • 0
Posted

Try this

prontera,156,182,0	script	Party Warper	100,{
	.@pid = getcharid(1);
	.@cid = getcharid(0);
	.@name$ = strcharinfo(0);
	if (!.@pid) end;
	getpartymember .@pid, 0;
	getpartymember .@pid, 1;
	getpartymember .@pid, 2;

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

	.@s = select(.@menu$) - 1;
	.@target$ = $@partymembername$[.@s];
	
	if (isloggedin($@partymemberaid[.@s], $@partymembercid[.@s])) {
		getmapxy .@map$, .@x, .@y, BL_PC, .@target$;
		if (inarray(.restricted_map$, .@map$) != -1)
			message .@name$,"This is a restricted map.";
		else
			warp .@map$, .@x, .@y, .@cid;
	} else 
		message .@name$, .@target$ + " is not online.";
	
	end;

	OnInit:
		setarray .restricted_map$[0], "payon", "geffen";
		end;
}

 

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