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

Solved Teleport to trainers

FLE

Member
Joined
Oct 5, 2008
Messages
422
Reaction score
24
Location
Vancouver Canada
What it's supposed too do -
It will be a teleport too trainers,
I want it too check the trainers sqm,
and if its full to put the player to the next empty trainers sqm.

Code:
local location = {
{x=480, y=463, z=8},
{x=484, y=463, z=8},
{x=488, y=463, z=8},
{x=492, y=463, z=8},
{x=496, y=463, z=8},
{x=500, y=463, z=8},
{x=480, y=469, z=8},
{x=484, y=469, z=8},
{x=488, y=469, z=8},
{x=492, y=469, z=8},
{x=496, y=469, z=8},
{x=500, y=469, z=8},
{x=480, y=473, z=8},
{x=484, y=473, z=8},
{x=488, y=473, z=8},
{x=492, y=473, z=8},
{x=496, y=473, z=8},
{x=500, y=473, z=8},
{x=480, y=479, z=8},
{x=484, y=479, z=8},
{x=488, y=479, z=8},
{x=492, y=479, z=8},
{x=496, y=479, z=8},
{x=500, y=479, z=8}
}
function onStepIn(cid, item, pos)
for i = 1, #location do
if getTopCreature(location[i]).uid > 0 then
playerteleported = 1
else
doTeleportThing(cid,location[i])
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Welcome to the training monks! Step in the portal to leave. (Made by TheTobbe)")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "Do not macro train, you will get banned!")
playerteleported = 0
break
end
end
if playerteleported > 0 then
doTeleportThing(cid, {x=469, y=471, z=8})
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "There was no empty training spot.")
end
return TRUE
end

Thanks!,
-Martin
 
Last edited:
Back
Top