FLE
Member
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.
Thanks!,
-Martin
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: