Jump to content
  • 0

Get number of dead players in a map


tofubeng

Question


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   0
  • Joined:  05/13/16
  • Last Seen:  

Hi all,

 

First of all apologies if this topic was duplicated.

 

I am currently working on PeoplePerson49's Monster Hunter Script, on the specific part below:

 

OnPCDieEvent:
OnPCLogoutEvent:
if(strcharinfo(3)!="pvp_n_1-3") { end; }
announce "A member of the party has been killed! The event is over!",bc_map;
killmonster "pvp_n_1-3","Neilay::OnMonsterKill";
killmonster "pvp_n_1-3","Neilay::OnMonsterBossKill";
if(getmapusers("pvp_n_1-3")>0) { MapRespawnGuildID "pvp_n_1-3",.HereForGiggles,7; }
set .MHStatus,0;
set .MHPartyID,0;
end;
 
The script ends and the event warps out all members if one member dies/log out.
I want to make it to only end when all members are dead. Couldn't find a keyword for that.
 
Is there something like count(OnPCDieEvent) == PartySize { then warp out } kind of of logic?
 
Your advice is much appreciated.
Thank you.
Edited by Emistry
codebox
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

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

you can just use the mapwarp script command to warp out everyone when one of the member died and triggered the OnPCDieEvent

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   0
  • Joined:  05/13/16
  • Last Seen:  

Hi Emistry,

 

Thanks for your reply.

I did not post the upper half of the script, but the script already handles the warp out part.

 

My question is how do i ONLY warp out if only ALL the party member dies?

As I know, OnPCDieEvent triggers when one person died, which is not my intention.

 

Thank you for your time.

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