function onLogin(cid)
if isPlayer(cid) == TRUE then
if getPlayerStorageValue(cid, 654654) == -1 then
addEvent(changeTown, 2 * 1000, cid=cid)
setPlayerStorageValue(cid, 654654, 1)
end
end
return TRUE
end
function changeTown(cid)
local townPos = {x=111, y=222, z=7}
local townId = 2
doTeleportThing(cid, townPos, 1)
doPlayerSetTown(cid, townId)
return TRUE
end