local t = { prize = 2157, name = "gold nugget", amount = 5, temple = {x=1000, y=1000, z=7}, } function onStepIn(cid, item, position, fromPosition) if getGlobalStorageValue(cid, 80050) ~= 5 then doPlayerAddItem(cid, t.prize, t.amount) doPlayerSendTextMessage(cid, 19, "Congratulations! Youve won "..t.amount.." "..t.name.."!") local name = getCreatureName(cid) doBroadcastMessage(name.." won the race!") setGlobalStorageValue(cid, 80050, 5) doTeleportThing(cid, t.temple) else doPlayerSendTextMessage(cid, 19, "Sorry you lost the race.") doTeleportThing(cid, t.temple) end return true end