What's new
  • Visit Rebornbuddy
  • Visit Resources
  • Visit API Documentation
  • Visit Downloads
  • Visit Portal
  • Visit Panda Profiles
  • Visit LLamamMagic

How to detect, if you get attacked?

Status
Not open for further replies.

tictoc

Member
Joined
Sep 21, 2012
Messages
380
Reaction score
5
Hi,

what is the best way to detect, if i am get attacked? And is this different between players attacking you/mobs attacking you?

Can i simply use me.inFight? Or shall i better check my hpp? Or something else?

I would like to react fast on players trying to gank me while traderunning or fishing.

Greetings,
tictoc
 
use me.inFight to determine if you are in combat combined with getAggroMobs to figure out what is attacking you.

I am uncertain if it covers playing hitting you tho. If it doesnt, then youd have to use getcreatures and check for player with Player.pkmode true near you (and possibly targeting you)
 
Status
Not open for further replies.
Back
Top