just curious how would you make it work- passing one argument to onTargetCreature
onTargetCreature will execute for every target it hits
console output is just nil
onTargetCreature will execute for every target it hits
Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, 12)
combat:setArea(createCombatArea(AREA_SQUAREWAVE5))
function onTargetCreature(cid, var, message)
print(message)
return true
end
function onCastSpell(cid, var)
local message = "hello world"
return combat:execute(cid, var, message)
end
console output is just nil