• 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+ Exeta res not working tfs 1.3x downgraded by Nekiro.

Ns Sparkz

Just a Normal Ns King
Joined
Mar 6, 2011
Messages
466
Reaction score
25
Location
Egypt
Exeta res not working · Issue #49 · nekiro/forgottenserver (https://github.com/nekiro/forgottenserver/issues/49)
there is an issue thread already opened,, but i couldn't wait and i was thinking what can i do? since there is no error in console i didn't know what to do, so can someone explain to me what could be done in these cases, will a source edit be needed?

Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setArea(createCombatArea(AREA_SQUARE1X1))

function onTargetCreature(creature, target)
    return doChallengeCreature(creature, target)
end

combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature")

function onCastSpell(creature, variant)
    return combat:execute(creature, variant)
end
 
Try this

maybe i did understand wrong the thread dont know, correct me then. 😅🤟

Lua:
function onCastSpell(creature, variant)
    local position = creature:getPosition()
    position:sendMagicEffect(CONST_ME_POFF)

    local tile = Tile(position)
    if table.contains(ropeSpots, tile:getGround():getId()) or tile:getItemById(14435) then
        tile = Tile(position:moveUpstairs())
        if tile then
            creature:teleportTo(position, false)
            position:sendMagicEffect(CONST_ME_TELEPORT)
        else
            creature:sendCancelMessage(RETURNVALUE_NOTENOUGHROOM)
        end
    else
        creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
    end
    return true
end
Post automatically merged:

Exeta res not working · Issue #49 · nekiro/forgottenserver (https://github.com/nekiro/forgottenserver/issues/49)
there is an issue thread already opened,, but i couldn't wait and i was thinking what can i do? since there is no error in console i didn't know what to do, so can someone explain to me what could be done in these cases, will a source edit be needed?

Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setArea(createCombatArea(AREA_SQUARE1X1))

function onTargetCreature(creature, target)
    return doChallengeCreature(creature, target)
end

combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature")

function onCastSpell(creature, variant)
    return combat:execute(creature, variant)
end
 
from looking at the script i think you understood wrong, exeta res the spell is not working.
Try this

maybe i did understand wrong the thread dont know, correct me then. 😅🤟

Lua:
function onCastSpell(creature, variant)
    local position = creature:getPosition()
    position:sendMagicEffect(CONST_ME_POFF)

    local tile = Tile(position)
    if table.contains(ropeSpots, tile:getGround():getId()) or tile:getItemById(14435) then
        tile = Tile(position:moveUpstairs())
        if tile then
            creature:teleportTo(position, false)
            position:sendMagicEffect(CONST_ME_TELEPORT)
        else
            creature:sendCancelMessage(RETURNVALUE_NOTENOUGHROOM)
        end
    else
        creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
    end
    return true
end
Post automatically merged:
 
Back
Top