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

MoveEvent Snake Event TFS 1.3 ~ Revscript ~ EventCallback

Running it in 8.6 tfs 1.3 nekiros and got it running but player does not receive items, as stated above I tried to replace the inbox since 8.6 doesnt have it but I'm not really good at scripting and player just doesnt receive items. This is what I changed in the Winner section
Lua:
function SnakeEvent.win(winner)
        local bag = Game.createItem(SnakeEvent.reward.bagId, 1)
        if bag then
            for _, it in pairs(SnakeEvent.reward.items) do
                if it.chance >= math.random(1, 100) then
                    bag:addItem(it.itemId, it.count)
                end
            end
            winner:addItem(bag) -- Pretty much just replaced this line
            winner:sendTextMessage(MESSAGE_INFO_DESCR, string.format("You reward: %s.\nCheck your inbox!", bag:getContentDescription()))
        end
If someone could help out it would be greatly appreciated

Try this, it work for me on tfs 1.5
Code:
function SnakeEvent.win(winner)
        local bag = winner:addItem(SnakeEvent.reward.bagId, 1)
        if bag then
            for _, it in pairs(SnakeEvent.reward.items) do
                if it.chance >= math.random(1, 100) then
                    bag:addItem(it.itemId, it.count)
                end
            end
            winner:sendTextMessage(MESSAGE_INFO_DESCR, string.format("You reward: %s.\nCheck your inbox!", bag:getContentDescription()))
        end
        if SnakeEvent.debug then
            print(string.format("[SnakeEvent/Debug] %s is the winner.", winner:getName()))
        end
    end
 
Oke i read whole this theard, checked comits and so on. But for me it doesnt work, command /snake doesnt effect, console is empty, nothing shows.
But if i type /snake, its like not appearing words on screen, seems like its trying to execute command. but failing... I GUESS...

I use 10.98+ 1.4
any ideas what can be wrong ?
Is there a limit for snake ROOM size ? cuz maybe i made it gigantic and it aint working ?

Edit:
On script timer, the event tryed to start, but it didint made teleport in map.
Shoud make an tp in rme with the actionid or ?
 
Last edited:
Use: Ctrl + Arrrows

Hey, i havent tested yet, but how about mobile clients ?
If player on mobile, joins the event, how he move ?
Didin't tested yet tho, fixing my mobile client with is broken atm ;( ,...


Aswell theoretical question about the script:
If my map size is of event is 200x/200x sqm size, and there players 20x people for 10 min with super long snakes etc, the event will take lots or resources from the server ? it can lag the server ?
 
Hello, I got "attempt to call field 'createMonsterType' (a nil value)" what should I do? TFS 1.2
 
Hello!
I'm using TFS 1.5 - 7.72 downgrade.

Seems you can't enter the portal when it opens with the same character name? (login using same account with same character, multiclient)
"There is not enough space." from the tibia client text while trying to enter doing as explained above.
Would be really awesome if this would be possible!

And also something else unexpected error happened,
Code:
Lua Script Error: [Main Interface]
in a timer event called from:
(Unknown scriptfile)
...ktop\TFS-1.5-Downgrades-7.72\data\scripts\snakeevent.lua:166: bad argument #1 to 'pairs' (table expected, got nil)
stack traceback:
        [C]: at 0x7ff7cec13160
        [C]: in function 'pairs'
        ...ktop\TFS-1.5-Downgrades-7.72\data\scripts\snakeevent.lua:166: in function 'step'
        ...ktop\TFS-1.5-Downgrades-7.72\data\scripts\snakeevent.lua:202: in function <...ktop\TFS-1.5-Downgrades-7.72\data\scripts\snakeevent.lua:200>

I could just walk around in the area with my character while the other characters was stuck when this error occurred.
 
Last edited:
Back
Top