Jump to content
  • 0

only party leader can click


Question

Posted

Hi want help about this script

i only want when they entered the room, only the party leader can click the NPC

prt_are_in,76,87,3 script Helper#party  67,4,4,{

if($arn_partywait == 0)
{
 set $arn_partywait,1;
 emotion e_gasp,0;

 mes "[Helper Iriff]";
 mes "Good day, challengers!";
 mes "You are in the party arena waiting room.";
 next;
 mes "[Helper Iriff]";
 mes "Only one person at a time is allowed to stay in this waiting room.";
 mes "Would you like to start a battle now?";
 next;
 switch( select( "No","Yes" ) )
 {
  case 1:
   set $arn_partywait,0;
   mes "[Helper Iriff]";
   mes "I see.";
   mes "However, please remember you have only a limited amount of time.";
   close;

  case 2:
   mes "[Helper Iriff]";
   mes "Thank you, let me start a battle.";
   mes "A warp portal leading to the arena room will be open.";
   mes "I hope you will survive until the end of the battle and engrave your name on the list of honor...";
   close2;
   donpcevent "toarena#party::OnEnter";
   donpcevent "Helper#party::OnStop";
   donpcevent "arena_p::OnStart";
   end;
 }
}
else end;

4 answers to this question

Recommended Posts

Posted

Details for command getpartyleader:

* getpartyleader <party id>{,<type>};

This function returns some information about the given party-id's leader. When type is ommitted,

the default information retrieved is Character name of the party leader. Possible types are:

1: Leader account id

2: Leader character id

3: Leader's class

4: Leader's current map name

5: Leader's current level as stored on the party structure (may not be

current level if leader leveled up recently).

If retrieval fails (leader not found or party does not exists), "null" is returned instead of character name,

and -1 is returned for the other types.

Posted

try add this into the npc

if( !getcharid(1) || getcharid(3) != getpartyleader( getcharid(1),1 ) ){
mes "Only Party Leader can click me.";
close;
}

  • Upvote 1

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