Helliot1
Owner of Empire Online
- Joined
- Jul 26, 2017
- Messages
- 315
- Solutions
- 1
- Reaction score
- 60
Hello, im creatinga spells, that only can cast when you are attacking a target
What I'm doing wrong?
What I'm doing wrong?
LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 4)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -20, -1, -30, 5, 5, 1, 1)
local area = createCombatArea(AREA_SQUARE1X1)
setCombatArea(combat, area)
function Creature.isMonster(self)
return doCombat(cid, combat, var)
end
else
doPlayerSendCancel(cid, "You need a target to cast this spell.")
end
end
Last edited: