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

Need help

Ninja Bodil

New Member
Joined
Mar 7, 2009
Messages
116
Reaction score
0
Well I've tried to search for this but i can't find it.

Well just and easy script each hour a tp apears and after 2 minutes it dissapears. Hope you can help.

Sry I no it's like 10 threads about this but i can't fins them :/
 
ok go to global events.xml
and paste this
Code:
<globalevent name="teleport" interval="3600" event="script" value="teleport.lua"/>

then go make a file called teleport.lua and paste this inside
Lua:
local tp = {x= 96, y= 123, z= 7} --place where tp be created
local tpto = {x= 94, y= 130, z= 7}  -- place where player will be teleported when enter tp
function onThink(interval, lastExecution, thinkInterval)
  doCreateTeleport(1387, tpto, tp)
  doBroadcastMessage("The teleport is created 2 min and will be removed.")
  addEvent(onRemove, 120 *1000)
return true
end
function onRemove()
     doRemoveItem(getTileItemById(tp, 1387).uid)
	 doSendMagicEffect(tp, CONST_ME_POFF)
	 doBroadcastMessage("The teleport was removed.")
   
return true
end

then restert your server
 
Last edited:
Back
Top