• 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 Please help with levers and walkable levers Dog racing mini game.

Nyarl666

Member
Joined
Sep 25, 2022
Messages
63
Reaction score
8
Hi. I wanted to do a Dog Racing like in the original Tibia. But I don't do well with these coal basins. That when the dog steps on the walkable lever, the coal basin lights up, and when it comes out of it, it goes out. I also have a problem with the levers. They work but I had to use two levers because I can't make the stalagmites disappear on one.
Please help.
I use TFS 1.4.
For walkable levers I dont have script.
This is script for levers and stalagmites:

Lua:
local config = {
    wall_id = (386),
    pos_wall = Position(948, 1009, 9),
}

 
function onUse(player, item, fromPosition, itemEx, toPosition, isHotkey)
    local tile = Tile(config.pos_wall)
    if tile then
        local stone = tile:getItemById(config.wall_id)
        if stone then
        stone:remove()
        config.pos_wall:sendMagicEffect(CONST_ME_POFF)
        player:sendTextMessage(MESSAGE_INFO_DESCR, "START!!!")
        Item(item.uid):transform(1946)
    else
        Game.createItem(config.wall_id, 1, config.pos_wall)
        config.pos_wall:sendMagicEffect(CONST_ME_TELEPORT)
        player:sendTextMessage(MESSAGE_INFO_DESCR, "CLOSED CAGE...")
        Item(item.uid):transform(1945)
        end
    end
    return true
end
 
Last edited:
Back
Top Bottom