Jump to content
  • 0

Register Room


MukkiesftKies

Question


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  123
  • Reputation:   7
  • Joined:  03/13/12
  • Last Seen:  

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
Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  123
  • Reputation:   7
  • Joined:  03/13/12
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

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

}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  123
  • Reputation:   7
  • Joined:  03/13/12
  • Last Seen:  

I can not find any indication to set the party_leader_id to a variable. So it is difficult for me to do it.

Btw thanks again GmOcean :D

Problem Slove . .

Edited by In-Line
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...