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

NPC teleports player On 24 hours to the island

kite28

Member
Joined
May 15, 2012
Messages
69
Reaction score
5
Hi is looking for a script as in the topic on the teleport of the player through the NPC position x for how much for 24 hours after 24 hours the player will again have to have item x to enter there. Thank you very much for your help.
 
npc
-> gives storage (os.time() + 24 hours in seconds)
-> teleports

Then you can make an onThink event, or a looping addEvent for every 1 minute / 30 seconds

In whichever function you decide, you just check to see if the current time is greater then the players storage, at which point you teleport them back off the island to the npc.

In case the player logs out (manual/death), add a onLogin, which starts the onThink/addEvent again for the player.

If the player wants to leave early, reset their storage.. and teleport them out.

or allow them access to the area for the whole 24 hours in/out.. but only teleport them away from the island, if they are currently on it, when the timer elapses. (so do a position check, against the area.)
 
Back
Top