How to know if the player is in combat?

Host32

New member
Messages
22
Points
0
Age
32
Location
Brazil
Github
Host32
Emulator
Is there any way to know if the player is fighting a monster?
 
For example, I am creating a plugin that adds a delay between the exchange of equipments, however the delay would be applied only during a combat, if the player is not fighting it should be ignored, how can I do this validation?
 
Thanks in advance
default_smile.png

 
You can try count time from last attack from or to player.

 
Code:
(!battle_config.prevent_logout || DIFF_TICK(timer->gettick(), sd->canlog_tick) > battle_config.prevent_logout) ) 
 
Back
Top