Jump to content
  • 0

OnPCDieEvent: - Monster Only?


Total

Question


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

Hello,

 

I'm creating a system where if a player dies, they are auto hidden and must find the spot they died on to carry on.

 

World of Warcraft Style.

 

Is it possible to determine how you have been killed?

 

I only want this to trigger if killed by a monster and not trigger if they was killed by another player in PvP, BG, WoE etc

 

OnPCDieEvent:
 
This is for any death isn't it? if their another trigger to use?
 
i was thinking of using something like;
 
OnPCDieEvent:
            if map="pvp1,pvp2,woe1,woe2" end;
            <else script here>
 
Would this work?
 
Thanks in advanced.
Edited by Total
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

Just adding to @Nitrous's answer here...

-	script	Mob Death	-1,{
OnPCDieEvent:
	if( killerrid > 100000000 ) {
		getunitdata( killerrid, .@killerrid );
		if( getarraysize(.@killerrid) == 49 )
			dispbottom "You were killed by "+getmonsterinfo( .@killerrid[13], MOB_NAME )+".";
	}
}

 

Edited by Skorm
Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  141
  • Reputation:   45
  • Joined:  08/14/12
  • Last Seen:  

With OnPCDieEvent: you could check the killerrid and see if it is a monster, although it might require some extra script commands.

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