function onStepIn(cid, item, pos)
local location = {
{x=480, y=463, z=8, stackpos=253}, -- Location 1
{x=484, y=463, z=8, stackpos=253}, -- Location 2
{x=488, y=463, z=8, stackpos=253}, -- Location 3
{x=492, y=463, z=8, stackpos=253}, -- Location 4
{x=496, y=463, z=8, stackpos=253},
{x=500, y=463, z=8, stackpos=253},
{x=480, y=469, z=8, stackpos=253},
{x=484, y=469, z=8, stackpos=253},
{x=488, y=469, z=8, stackpos=253},
{x=492, y=469, z=8, stackpos=253},
{x=496, y=469, z=8, stackpos=253},
{x=500, y=469, z=8, stackpos=253},
{x=480, y=473, z=8, stackpos=253},
{x=484, y=473, z=8, stackpos=253},
{x=488, y=473, z=8, stackpos=253},
{x=492, y=473, z=8, stackpos=253},
{x=496, y=473, z=8, stackpos=253},
{x=500, y=473, z=8, stackpos=253},
{x=480, y=479, z=8, stackpos=253},
{x=484, y=479, z=8, stackpos=253},
{x=488, y=479, z=8, stackpos=253},
{x=492, y=479, z=8, stackpos=253},
{x=496, y=479, z=8, stackpos=253},
{x=500, y=479, z=8, stackpos=253} -- Last Location. Add more locations above if needed or remove. Keep this line as last one.
}
for i=1,#location do
getplayer = getThingfromPos(location[i])
if getplayer.itemid > 0 then
playerteleported = 1
else
doTeleportThing(cid,location[i])
doPlayerSendTextMessage(cid,22,"Welcome to the training monks! Step in the portal to leave. (Made by TheTobbe)")
doPlayerSendTextMessage(cid,21,"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,22,"There was no empty training spot.")
end
end