• 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 0.X Event that lasts 10 minutes

Yan18

Member
Joined
Jun 14, 2014
Messages
104
Solutions
3
Reaction score
17
I need a script that the player stay in a tile and after 10 minutes the event finish.
 
Yeah.. buddy..
You're going to need to provide a bit more effort in this post.

Sorry. I want any event that when the player stay on one tile, He will go to the specific pos, and after 10 min the event will end.
 
Code:
local position = Position(1269, 802, 7) -- where you want the player to be teleported on stepping in the tile
local temple = Position(1000, 1000, 7) -- this is the temple position
local time = 10 * 60 -- this is 10 minutes
    function onStepIn(creature, item, position, fromPosition)
            if creature:isPlayer() then
               creature:teleportTo(position, false)
    addEvent(function()
        creature:teleportTo(temple, false)
        creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
        end, config.time*1000)
            end
        return true
    end
should work as you explained
 
Back
Top