Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT)
combat:setArea(createCombatArea({
{1},
{1},
{1},
{3},
}))
function spellCallback(param)
local tile = Tile(Position(param.pos))
if tile then
if tile:getTopCreature() and tile:getTopCreature():isMonster() then
if tile:getTopCreature():getName():lower() == "demon" then
tile:getTopCreature():remove()
tile.createItem(6500,1,Position(33856,31860,7))
end
end
end
end
function onTargetTile(cid, pos)
local param = {}
param.cid = cid
param.pos = pos
param.count = 0
spellCallback(param)
end
setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
function onCastSpell(creature, var)
return combat:execute(creature, var)
end
I'm having problems with this magic what I'm trying to do is when the wave hits the monster demon it is removed and the item appears in place but it is bringing down the server