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

Tough request for pr0s - Demon Oak Quest movement tiles!

Hermes

dziwki kola gramy w lola
Joined
Nov 17, 2007
Messages
1,867
Reaction score
14
Location
Poland
Hi there.

I'm requesting kinda difficult script to write due to how this is complicated in real tibia.

Note. It'll be really hard to write (IMHO).

There are five tiles. Player needs to step on them in correct order.

Seems to be easy to write. Just adding to each tile one storage value (to know if player stepped in on a tile) and ofcourse setting "main" storage + 1. Sure. But order in which players need to step in changes in unknown way.

I think that it works in the following way:
- player steps on one of the tiles (for example on tile number 1);
- script takes random number (from 2 to 5 because player stepped on tile number 1) and then must check if player stepped on tile which was marked by taken number.
- if player steps on other tile than script expected, whole event breaks.
- if player steps on all five tiles (must be very lucky, it's less like 1% chance o_O) then he gets storage value.


I was a shooter at this quest before update, so I don't know how it is after update. Maybe you are more informed than me, so post there. I think many people need this script to their own OT, so I think it's hot for that rep+wantin' scripters :D


Thanks,
Hermes
 
WoW

If they step on the tile 1, he will have a random number to be checked by tile near dead tree?​
(RL Tibia: Other people think there is a sixth switch hidden somewhere around tibia, yet this is unconfirmed too.)
Tile 6 or sixth switch: Elsewhere.

And if the player receives this random number to log in?
 
Nope, that will be too complicated and noobish.

This sixth tile needs to be confirmed. It will be easy to make when we will have rest of the movement scripts. Just this 6th tile could be random chosen from ~10 already made.
 
Example:
Added Tile 1 uid: 12001
Added Tile 6 uid: 12006 (Near dead tree)

Code:
--- Credits by BinHo® ---

function onStepIn(cid, item, position, fromPosition)
    if item.uid == 12001 and isPlayer(cid) == TRUE then
        local number = math.random(1, 100) --- Very Hard! :D
        if number == 11 then
            setPlayerStorageValue(cid, 12000, 11)
        end
    end
        
    if item.uid == 12006 and isPlayer(cid) == TRUE then
        if getPlayerStorageValue(cid, 12000) == 11 then
            doTeleportThing(cid, {x=position.x, y=position.y+2, z=position.z})
            doSendMagicEffect(getCreaturePosition(cid), 10)
        else
            doTeleportThing(cid, {x=position.x, y=position.y-5, z=position.z})
            doSendMagicEffect(getCreaturePosition(cid), 10)
        end
    end
    
end
 
Last edited:
I added magic teleport with time to disappears.

Code:
--- Credits by BinHo® ---
local teleportPos = { x = 16437, y = 15709, z = 7, stackpos = 1} --- Setting magic teleport position.

function onStepIn(cid, item, position, fromPosition)
    if item.uid == 12001 and isPlayer(cid) == TRUE then --- Setting UniqueID 12001 on Tile by MapEditor/RME
        local number = math.random(1, 100) --- The choice of number, this is random.
        if number == 43 then --- Setting the number chosen, 43.
            setPlayerStorageValue(cid, 12000, 43) --- Setting the number chosen on storage value.
        end
    end
        
    if item.uid == 12006 and isPlayer(cid) == TRUE then --- Checking if the player have the number.
        if getPlayerStorageValue(cid, 12000) == 43 then --- If have...
            doTeleportThing(cid, {x=position.x, y=position.y+2, z=position.z}) --- The player will be teleported to inside the Demon Oak.
            doSendMagicEffect(getCreaturePosition(cid), 10)
            local exitPos = { x = 16442, y = 15707, z = 7} --- Setting exit position.
                teleport = doCreateTeleport(1387, exitPos, teleportPos) --- Magic teleport is created.
                addEvent(removeTeleport, 10 * 1000, a) --- Setting 10 seconds to magic teleport disappears.
        else
            doTeleportThing(cid, {x=position.x, y=position.y-5, z=position.z}) --- If the player not have the number chosen, can't pass.
            doSendMagicEffect(getCreaturePosition(cid), 10)
        end
    end
end

function removeTeleport(a) --- Function to remove magic teleport.
    teleport = getThingFromPos(teleportPos)
    doRemoveItem(teleport.uid, 1)
    return TRUE
end
 
Moderator Message: Please post in the correct section at this forum, if you need help with scripts like this, the "Request and Support" fits, also Open Tibia - Support section fit.
 
Back
Top