Abandon all valleys

Script to drop all valleys in one city

label abandonAllValleys
if city.fields.length = 0 goto done
execute "abandon " + city.fields[0].coords
if !$error goto abandonAllValleys

label done

Abandon all valleys in all cities

Script to drop all valleys in all cities

cs = cities.concat()
label nextcity
c = cs.shift()
if c fs = c.cityManager.fields.toArray()
label nextfield
if c f = fs.shift()
if c if f execute "abandon " + f.coords
if c if f if !$error goto nextfield
if c goto nextcity
echo "Finished"


ScriptExamples

AbandonAllValleys (last edited 2014-10-15 14:14:18 by Inanna)