Hello,
I'm searching for an script for random map and find that, but i dont understand certain what the thread said and I need a help.
The script is:
How I do to configure more three towns? How the script need be?
I'm searching for an script for random map and find that, but i dont understand certain what the thread said and I need a help.
The script is:
PHP:
local config, new = { minTownId = 1, maxTownId = 4 }, 0 function onThink(interval, lastExecution)
for _, pid in ipairs(getPlayersOnline()) do local town = getPlayerTown(pid)
new = town < config.maxTownId and town + 1 or config.minTownId
doPlayerSetTown(pid, new) doTeleportThing(pid, getTownTemplePosition(new)) end
db.executeQuery("UPDATE players SET town_id = ".. new ..", posx = 0, posy = 0, posz = 0;")
return true
end
How I do to configure more three towns? How the script need be?