Hey guys,
I trying to make this work. Can someone help me?
creaturescripts.xml
crit.lua
login.lua
There is no any errors in console and still is no work.
I trying to make this work. Can someone help me?
creaturescripts.xml
XML:
<event type="healthchange" name="crit" script="crit.lua" />
crit.lua
Lua:
function onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)
attacker:sendTextMessage(MESSAGE_EVENT_ORANGE, "Attacker: " .. attacker:getName() .. "\n")
attacker:sendTextMessage(MESSAGE_EVENT_ORANGE, "Victim: " .. creature:getName() .. "\n")
return primaryDamage, primaryType, secondaryDamage, secondaryType
end
login.lua
Lua:
player:registerEvent("crit")
There is no any errors in console and still is no work.