local config = {
toTown = true, -- teleport them to their town temple?
position = {x = 100, y = 100, z = 7} -- IF ABOVE IS FALSE, then teleport here
}
function onThink(cid, interval)
for _, pid in ipairs(getPlayersOnline())
if(getCreatureStorage(pid, storage) > 0) then -- You can change this "if statement" to whatever you want to do.
doTeleportThing(pid, config.toTown and getTownTemplePosition(getPlayerTown(pid)) or config.position)
end
end
return true
end