@craigmabbit acho q a variavel tem que vim antes da funçao.
testa ae kalawalo.
local tcid = getCreatureTarget(cid)
local outfit = 167
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 27)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 5)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)
function onCastSpell(cid, var)
doSetCreatureOutfit(tcid, outfit.looktype, 200)
doCombat(cid, combat, var)
return true
end