Jump to content
  • 0

Request PvP Warper


mR L

Question


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  177
  • Reputation:   25
  • Joined:  12/24/14
  • Last Seen:  

hello, I want to request simple pvp warper

but with the following requirement

can enter if you have party with 4 members inside and online so you can warp at the map

but if you don't have party or you have party with 6 members but 4 member online & 2 member offline you still can't warp at the map
(so you must have 4 members inside & must be online too)

only player has party with 4 members online inside the party can warp

Thank you for helping ? 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

// Disclaimer :
// Yes this code is from example 2 of script_commands.txt

prontera,150,180,0	script	PvP Party Warper	100,{
	.@pvpmap$ = "guild_vs1"; // Pvp map
	.@register_num = 45; // How many party members are required?
	
	getpartymember getcharid(1), 1;
	getpartymember getcharid(1), 2;

	if ( !getcharid(1) || $@partymembercount != .@register_num ) {
		mes "Please form a party of " + .@register_num + " to continue";
		close;
	}
	for ( .@i = 0; .@i < $@partymembercount; .@i++ )
		if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) )
			.@count_online++;
	if ( .@count_online != .@register_num ) {
		mes "All your party members must be online to continue";
		close;
	}
	copyarray .@partymembercid, $@partymembercid, .@register_num;
	mes "Are you ready ?";
	next; 
	select("Yes");
	getpartymember getcharid(1), 1;
	if ( $@partymembercount != .@register_num ) {
		mes "You've made changes to your party !";
		close;
	}
	for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
		if ( .@partymembercid[.@i] != $@partymembercid[.@i] ) {
			mes "You've made changes to your party !";
			close;
		}
	}
	warpparty .@pvpmap$, 0,0, getcharid(1);
	end;
}

 

  • Like 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  177
  • Reputation:   25
  • Joined:  12/24/14
  • Last Seen:  

9 hours ago, pajodex said:

// Disclaimer :
// Yes this code is from example 2 of script_commands.txt

prontera,150,180,0	script	PvP Party Warper	100,{
	.@pvpmap$ = "guild_vs1"; // Pvp map
	.@register_num = 45; // How many party members are required?
	
	getpartymember getcharid(1), 1;
	getpartymember getcharid(1), 2;

	if ( !getcharid(1) || $@partymembercount != .@register_num ) {
		mes "Please form a party of " + .@register_num + " to continue";
		close;
	}
	for ( .@i = 0; .@i < $@partymembercount; .@i++ )
		if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) )
			.@count_online++;
	if ( .@count_online != .@register_num ) {
		mes "All your party members must be online to continue";
		close;
	}
	copyarray .@partymembercid, $@partymembercid, .@register_num;
	mes "Are you ready ?";
	next; 
	select("Yes");
	getpartymember getcharid(1), 1;
	if ( $@partymembercount != .@register_num ) {
		mes "You've made changes to your party !";
		close;
	}
	for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
		if ( .@partymembercid[.@i] != $@partymembercid[.@i] ) {
			mes "You've made changes to your party !";
			close;
		}
	}
	warpparty .@pvpmap$, 0,0, getcharid(1);
	end;
}

 

Thank you so much @pajodex

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