function doChangeMap(clean, save)
map.set()
for _, pid in ipairs(getPlayersOnline()) do
if getPlayerAccess(pid) < 3 then
local temple = map.towns[map.get()][2][playerTeam.get(cid)]
local oldPosition = getCreaturePosition(pid)
doPlayerSetTown(pid, temple)
doTeleportThing(pid, getTownTemplePosition(temple))
doSendMagicEffect(getCreaturePosition(pid), 37)
doSendMagicEffect(oldPosition, 2)
doCreatureAddHealth(pid, getCreatureMaxHealth(pid))
doCreatureAddMana(pid, (getCreatureMaxMana(pid) - getCreatureMana(pid)))
doRemoveConditions(pid, FALSE)
end
end