• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.X+ error in "cointains" tfs 1.5

bpm91

Intermediate OT User
Joined
May 23, 2019
Messages
882
Solutions
7
Reaction score
123
Location
Brazil
YouTube
caruniawikibr
Hi, does anyone know how I can fix this error?

Lua:
function rune.onCastSpell(creature, variant)
    local position = variant:getPosition()
    local tile = Tile(position)
    local field = tile and tile:getItemByType(ITEM_TYPE_MAGICFIELD)
    if field and table.contains(Fields, field:getId()) then
        field:remove()
        position:sendMagicEffect(CONST_ME_POFF)
        return true
    end

    creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
    creature:getPosition():sendMagicEffect(CONST_ME_POFF)
    return false
end

1653019327133.png
 
could you say why the magic wall and exevo grav vita of druid can't fall on top of fields that don't decay?
Post automatically merged:

Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_MAGICWALL)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, true)

local rune = Spell(SPELL_RUNE)

function rune.onCastSpell(creature, variant)
    if variant.pos then
        local tile = Tile(variant.pos)
        if tile:hasProperty(CONST_PROP_BLOCKSOLID) then
            creature:sendTextMessage(MESSAGE_STATUS_SMALL, Game.getReturnMessage(RETURNVALUE_NOTENOUGHROOM))
            return false
        end
    end
    return combat:execute(creature, variant)
end
 
Back
Top