• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Tile that Kicks player after X amount of time.

Jaed Le Raep

★Gaeming★
Joined
Sep 3, 2007
Messages
1,298
Reaction score
446
This may be sad, considering how well I used to script, but I've been gone for two years and now I'm like, struggling to re-learn. Anyway, would like a script that, a player walks onto the tile, or is teleported onto the tile, and after x amount of time (like 30 minutes), they're teleported off the tile. Quite simple and would really, really appreciate this script.
 
I still can't clearly get what you are asking, but maybe this will help you:
LUA:
function onStepIn(cid, item, frompos, item2, topos) 
        addEvent(doCreatureSetNoMove, 30 * 60 * 1000, cid, true)
        addEvent(doRemoveCreature, 30 * 60 * 1000, cid)
return TRUE
end
 
LUA:
local delay = 30 * 60
local newpos = {x = 0, y = 0, z = 0}

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
	if(isPlayer(cid)) then
		doCreatureSetNoMove(cid, true)
		addEvent(function(cid, block, newpos)
			if(isPlayer(cid)) then
				doCreatureSetNoMove(cid, block)
				doTeleportThing(cid, newpos)
			end
		end, delay * 1000, cid, false, newpos)
	end

	return true
end
 
Last edited:
LUA:
local delay = 30 * 60
local newpos = {x = 0, y = 0, z = 0}

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
    if(isPlayer(cid)) then
        doCreatureSetNoMove(cid, true)
        addEvent(function(cid, block, newpos)
            if(isPlayer(cid)) then
                doCreatureSetNoMove(cid, block)
                doTeleportThing(cid, newpos)
            end
        end, delay * 1000, cid, false, newpos)
    end

    return true
end

Wow, thank you very much, it works :D *huggles*
 
Hey guys, could someone update this for TFS 1.0? I tried to, and failed. My attempt is below.

Code:
local delay = 5 * 60
local newpos = {x = 1068, y = 1047, z = 7}

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
    if (isPlayer(cid)) then
      
        addEvent(function(cid, block, newpos)
    if (isPlayer(cid)) then
      
        doTeleportThing(cid, newpos)
    end
    end, delay * 1000, cid, false, newpos)
    end
return true
end

Edit: Ignore my plea, it actually works. :)
 
Last edited:
Back
Top