• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua How to check

Sigoles

Discord: @sigoles
Joined
Nov 20, 2015
Messages
1,209
Solutions
2
Reaction score
154
How to check if the attack is physical or magical?

tfs 1.2
 
assuming you're checking through onHealthChange/onManaChange, you check if primaryType or secondaryType is COMBAT_PHYSICALDAMAGE or COMBAT_FIREDAMAGE, COMBAT_EARTHDAMAGE, etc
physical = physical damage
elements = magical damage
 
assuming you're checking through onHealthChange/onManaChange, you check if primaryType or secondaryType is COMBAT_PHYSICALDAMAGE or COMBAT_FIREDAMAGE, COMBAT_EARTHDAMAGE, etc
physical = physical damage
elements = magical damage

Ok, thanks!
and how to check how much damage it does? (I need create another thread)?
 
Back
Top