Jump to content
  • 0

how to make this to party leader only


Question

Posted (edited)


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

2 answers to this question

Recommended Posts

Posted (edited)

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

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