• Vote in May Mapping Competition to select a winner!
  • 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
Best answers
0
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
 

Anciaveus

Member
Joined
Mar 24, 2020
Messages
40
Best answers
2
Reaction score
9
Location
Sweden☤
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
 
OP
Ns Sparkz

Ns Sparkz

Just a Normal Ns King
Joined
Mar 6, 2011
Messages
466
Best answers
0
Reaction score
25
Location
Egypt
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:
 
OP
Ns Sparkz

Ns Sparkz

Just a Normal Ns King
Joined
Mar 6, 2011
Messages
466
Best answers
0
Reaction score
25
Location
Egypt
anyone, just give me a hint :p
 
Top