local config =
{
-- you can write here a town's name or town's id
"I Town", "II Town", "III Town", 4
}
function onDeath(cid, corpse, deathList)
local town = config[math.random(0, #config)]
if (type(town) == "string") then
town = getTownId(town)
end
doPlayerSetTown(cid, town)
return true
end