function onStepIn(cid, item, position, fromPosition)
local useTeleport = true
local position = {x=1000,y=1000,z=7} -- Teleport position if true
local message = "You have already stepped on this tile"
local storage = 1337
if getPlayerStorageValue(cid, storage) == 1 and useTeleport == true then
doTeleportThing(cid, position)
doPlayerSendTextMessage(cid, 25, message)
elseif getPlayerStorageValue(cid, storage) == 1 and useTeleport == false then
doPlayerSendTextMessage(cid, 25, message)
end
if getPlayerStorageValue(cid, storage) == -1 then
local min = 500
local max = 1000
local r = math.random(min, max)
doPlayerAddExperience(cid, r)
setPlayerStorageValue(cid, storage, 1)
doPlayerSendTextMessage(cid,25,"Congratulations you have received ".. r .." experience!")
end
return true
end