Jump to content
  • 0

how to make this to party leader only


daen

Question


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  25
  • Reputation:   0
  • Joined:  11/08/13
  • Last Seen:  


OnTimer10500:

instance_announce 0,"You'll soon know. Mine is the face of death!",bc_map,"0x00ffcc";

stopnpctimer;

monster "6@tower",156,147,"Nacht Sieger",1956,1,instance_npcname("#4th Beeper", instance_id())+"::OnMyMobDead";

end;

OnMyMobDead:

getpartymember getcharid(1),1;

getpartymember getcharid(1),2;

for( set .@i,0; .@i<$@partymembercount; set .@i,.@i+1 )

{

if( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) )

{

attachrid $@partymemberaid[.@i];

getitem 501,1, $@partymemberaid[.@i]; // -- Get Red Potions per party member, change your item id

detachrid;

}

}

donpcevent instance_npcname("Lost Soul#102", instance_id())+"::OnEnable";

end;

Edited by Patskie
Code
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  


if ( getpartyleader( getcharid(1), 2 ) != getcharid(0) ) end;// not the party leader

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

OnTimer10500:

instance_announce 0,"You'll soon know. Mine is the face of death!",bc_map,"0x00ffcc";

stopnpctimer;

monster "6@tower",156,147,"Nacht Sieger",1956,1,instance_npcname("#4th Beeper", instance_id())+"::OnMyMobDead";

end;

OnMyMobDead:

.@partyleaderaid = getpartyleader( getcharid(1), 1 );

if ( isloggedin( .@partyleaderaid, getpartyleader( getcharid(1), 2 ) ) ) // if the party leader is log in

getitem 501,1, .@partyleaderaid; // gives the item to the party leader

else // or if the party leader is currently not login WHILE the monster has killed

getitem 501,1; // gives the item to the player who land the last kill, or dealed most damage, depends on mob_npc_event_type: inside conf\battle\monster.conf

donpcevent instance_npcname("Lost Soul#102", instance_id())+"::OnEnable";

end;

Edited by AnnieRuru
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...