Hola, alguien me podria ayudar como puedo modificar mi codigo para que la magic wall NO salga encima del fuego, energy o pox, por favor.
function onCreateMagicWall(creature, tile)
local magicWall
if Game.getWorldType() == WORLD_TYPE_NO_PVP then
magicWall = ITEM_MAGICWALL_SAFE
else
magicWall = ITEM_MAGICWALL
end
local item = Game.createItem(magicWall, 1, tile)
item:setDuration(20)
end
local combat = Combat()
combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onCreateMagicWall")
combat:setArea(createCombatArea(AREA_Terra))
local spell = Spell("rune")
function spell.onCastSpell(creature, variant, isHotkey)
return combat:execute(creature, variant)
end
function onCreateMagicWall(creature, tile)
local magicWall
if Game.getWorldType() == WORLD_TYPE_NO_PVP then
magicWall = ITEM_MAGICWALL_SAFE
else
magicWall = ITEM_MAGICWALL
end
local item = Game.createItem(magicWall, 1, tile)
item:setDuration(20)
end
local combat = Combat()
combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onCreateMagicWall")
combat:setArea(createCombatArea(AREA_Terra))
local spell = Spell("rune")
function spell.onCastSpell(creature, variant, isHotkey)
return combat:execute(creature, variant)
end







