*Note - Heavey use of data fetching, because i was too lazy to set the party_leader_id to a variable lol.*
prontera,143,178,4 script MVP Room 122,{
mes "[^FF0000 My-Intensity GateKeeper ^000000]";
mes "Hi. I'm glad to be of service. I will open the PvP fight square for you!";
switch(select("I want to kill Ifrit! [ "+getmapusers("guild_vs3")+" Users ]")) {
Case 1:
if(.reg_party && .reg_party != getcharid(1)){mes "Sorry you must be apart of: "+getpartyname(.reg_party)+" party to enter."; close;}
if(!getcharid(1) || getpartyleader(getcharid(1),2) != getcharid(0)){mes "You are either not in a party OR not the party leader."; close;}
getpartymember(getcharid(1),2);
for(set .@i,0; .@i<$@partymembercount; set .@i,.@i+1)
{if(isloggedin($@partymemberaid[0])){set .@online,.@online+1;}}
if(.@online < $@partymembercount || countitem(19901) < 2)
{next; mes "You need at least 1 online party member and 2 TGC Card to continue."; mes "Also all party members must be online."; close;}
while(.@j < $@partymemberaid)
{if(attachrid($@partymemberaid[.@j]))
{if(!Upper){attachrid(getpartyleader(getcharid(1),1)); mes "Novice, Swordsman, Mage, Archer, Acolyte, Merchant and Thief are not allowed."; close;}
set .@job[.@j],BaseClas;
for(set .@i,0; .@i<getarraysize(.@job); set .@i,.@i+1){if (.@job[.@i] == Class){attachrid(getpartyleader(getcharid(1),1)); mes "There can only be 1 of each base class"; close;}}}
set .@j,.@j+1;}
attachrid( getpartyleader(getcharid(1),1) );
set .reg_party,getcharid(1);
warpparty "guild_vs3",105,125,getcharid(1);
close;}
Lsorry:
next;
mes "[^FF0000 My-Intensity GateKeeper ^000000]";
mes "Please wait";
close;
}