Jump to content

Question

Posted (edited)

How to fix this , i want put party register like Private MVP by AnnieRuru ?

Like a -

- If leader party has be register , another leader party cannot inside the map.

- If the group they die, they can not return.

prontera,143,178,4 script MVP Room 122,{
mes "[ ^FF0000My-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 kill Ifrit![ "+getmapusers("guild_vs3")+" Users ]")) {
Case 1:
if (getmapusers("guild_vs3") >=1) goto Lsorry;
// check if they are in a party
if (getcharid(1) == 0) {
 next;
 mes "[ ^FF0000My-Intensity GateKeeper^000000 ]";
 mes "You need to be in a party to continue.";
 close;
}
// check if they are party leader
if (getpartyleader(getcharid(1),2) != getcharid(0)) {
 next;
 mes "[ ^FF0000My-Intensity GateKeeper^000000 ]";
 mes "Only your party leader can warp your party.";
 close;
}

set .@AID, playerattached();  // save their AID (so we can reattach later)
getpartymember(getcharid(1),2);  // get party info
set .@count, $@partymembercount; // copy to scope variables
copyarray .@members_aid[0], $@partymemberaid[0], .@count;

// check how many party members
if (.@count < 1 || countitem(19901) < 1) {
 next;
 mes "[ ^FF0000My-Intensity GateKeeper^000000 ]";
 mes "You need at least 1 online party members to continue and 2 TGC Card.";
 close;
}

for( set .@i,0; .@i < .@count; set .@i,.@i+1 ) {
 if (attachrid(.@members_aid[.@i])) { // online check
  if (BaseJob > 6) { // check Base Job
// check for mounted classes (peco)
if (BaseJob == Job_Knight2)
 set .@job, Job_Knight;
else if (BaseJob == Job_Crusader2)
 set .@job, Job_Crusader;
else
 set .@job, BaseJob;

// check for duplicate classes in party
if (.@classes & pow(2,.@job)) {
 attachrid(.@AID);  // reattach to party leader
 mes "There can only be one of each base class.";
 close;
} else {
 set .@classes, .@classes | pow(2,.@job);
}
  } else {
attachrid(.@AID);  // reattach to party leader
next;
mes "[ ^FF0000My-Intensity GateKeeper^000000 ]";
mes "Novice, Swordman, Mage, Archer, Acolyte, Merchant, Thief are not allowed";
close;
  }
 } else {
  attachrid(.@AID);  // reattach to party leader
next;
  mes "[ ^FF0000My-Intensity GateKeeper^000000 ]";
  mes "All party members must be online";
  close;
 }
}

warpparty "guild_vs3",105,125, getcharid(1);
close;
Lsorry:
next;
mes "[ ^FF0000My-Intensity GateKeeper^000000 ]";
mes "Please Wait";
close;

}
}

Edited by ToastOfDoom
codeboxed

4 answers to this question

Recommended Posts

Posted

Well, first off you want to remove this line:

if (getmapusers("guild_vs3") >=1) goto Lsorry;

Since that will stop anyone from going to the room after 1 person entered.

Secondly you need to change this line:

if (.@count < 1 || countitem(19901) < 1) {

INTO

if (.@count < 1 || countitem(19901) < 2) {

Lastly, you need to set a variable to save the party's name/ID so you can cross check with the party tryign to use the NPC.

Most of the script was done for you, and your edits are not too far off. You should get there soon with some time.

Posted (edited)

sounds very difficult when using a variable. Hahaha.

I am still weak in the use of this variable. I need an example variable to save party's name / ID.

btw thanks GmOcean. I will try first.

Anyone can help me ? I still can't make it -.-"

Edited by In-Line
Posted

*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;

}

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