• 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!

Lua Working "Hookshot"-script?

Rallelele

Member
Joined
Jun 11, 2017
Messages
66
Reaction score
8
Hey. Is there any working hookshot scripts right now? For TFS 1.3.

For example, having an Onyx Flail and using it on a pillar will make you teleport to the pillar even tho it's water or such inbetween.

Cheers.
 
Copy a fishing rod script actually. You need allowfaruse flag (actions.xml) and player:teleportTo(toPos)
 
like nautilus Q? nice idea :D
Exactly. :)

Copy a fishing rod script actually. You need allowfaruse flag (actions.xml) and player:teleportTo(toPos)
Hmm.. I'll see what I can do. Thanks!
Post automatically merged:

Can't seem to get it to work. My character doesnt get teleported. Do you see the mistakes? Used script made from Molinero but it's been a long time ago. Made some changes as the original one didnt work for me either. ID 1549 is the pillar I wanna be able to jump to.

Lua:
local reqActnId = 8927 -- Action id the hookshot will work on
local maxDstnce = 15 -- Max hookshot stretch lenght (in SQ)
function grappleAnim(parameters)
    if (parameters.counter == 10) then
        local fromPosition = getCreaturePosition(parameters.cid)
        doTeleportThing(parameters.cid, parameters.toPosition, FALSE)
        doSendMagicEffect(fromPosition, CONST_ME_POFF)
        return TRUE
    end
    parameters.counter = parameters.counter + 1
    doSendDistanceShoot(getCreaturePosition(parameters.cid), parameters.toPosition, CONST_ANI_THROWINGSTAR)
    doSendDistanceShoot(getCreaturePosition(parameters.cid), parameters.toPosition, CONST_ANI_ARROW)
    doSendDistanceShoot(getCreaturePosition(parameters.cid), parameters.toPosition, CONST_ANI_SMALLSTONE)
    addEvent(grappleAnim, 100, parameters)
end
local useWorms = FALSE
local waterIds = {1549}
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if isInArray(waterIds, itemEx.itemid) == TRUE then
        if itemEx.itemid ~= 1549 then
            if useWorms == FALSE or useWorms == TRUE and doPlayerRemoveItem(cid, ITEM_WORM, 1) == TRUE then
                if math.random(1, (100 + (getPlayerSkill(cid, SKILL_FISHING) / 10))) <= getPlayerSkill(cid, SKILL_FISHING) then
                    player:teleportTo(toPos)
                end
                doPlayerAddSkillTry(cid, SKILL_FISHING, 1)
            end
        end
        doSendMagicEffect(toPosition, CONST_ME_LOSEENERGY)
        return TRUE
    end
    if (itemEx.actionid == reqActnId and getDistanceBetween(getCreaturePosition(cid), toPosition) <= maxDstnce) then
        doSendDistanceShoot(fromPosition, toPosition, CONST_ANI_HUNTINGSPEAR)
        doSendMagicEffect(toPosition, CONST_ME_BLOCKHIT)
        doTeleportThing(parameters.cid, parameters.toPosition, FALSE)
        local parameters = {cid = cid, toPosition = toPosition, counter = 0}
        addEvent(grappleAnim, 100, parameters)
    else
        doPlayerSendCancel(cid, "Nothing to hook to in range.")
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
    end
    return TRUE
end
 
Last edited:
Lua:
local reqActnId = 8927 -- Action id the hookshot will work on
You have put the ID of dark trinity mace instead of the action ID. Choose an ID like 12304 and put the same action ID on the pillars you want to teleport to in RMERE. Tested a script and it works just fine. This script seems to not have anything to do with item ID it only operates on action ID (I may be wrong).
 
Back
Top