Jump to content
  • 0

only party leader can click


Mr BrycE

Question


  • Group:  Members
  • Topic Count:  125
  • Topics Per Day:  0.03
  • Content Count:  595
  • Reputation:   23
  • Joined:  02/23/12
  • Last Seen:  

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;

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Forum Manager
  • Topic Count:  282
  • Topics Per Day:  0.06
  • Content Count:  3128
  • Reputation:   1617
  • Joined:  03/26/12
  • Last Seen:  

Have a look at https://rathena.svn.sourceforge.net/svnroot/rathena/trunk/doc/script_commands.txt and search for *getpartyname(<party id>) - theres a few commands under that one that might help ;)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  154
  • Reputation:   8
  • Joined:  05/31/12
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2351
  • Joined:  10/28/11
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  125
  • Topics Per Day:  0.03
  • Content Count:  595
  • Reputation:   23
  • Joined:  02/23/12
  • Last Seen:  

@Emistry

Thanks

Edited by Mr BrycE
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...