function onStepIn(cid, item, pos)
if cid > 0 then
if item.actionid == 30001 then
if(item.itemid == 5024) then
local location = {
{x=480, y=463, z=8, stackpos=253},
{x=484, y=463, z=8, stackpos=253},
{x=488, y=463, z=8, stackpos=253},
{x=492, y=463, z=8, stackpos=253},
{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}
}
playerposition = {x=470, y=471, z=8, stackpos=253}
i2 = 0
local playerteleported = 1
for i=0,23 do
i2 = i2 +1
getplayer = getThingfromPos(location[i2])
if getplayer.itemid > 0 then
playerteleported = 1
else
doTeleportThing(cid,location[i2])
doPlayerSendTextMessage(cid,22,"Welcome to the training monks! To get out go in to the blue teleport. (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
end
end
end