<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>AbandonAllValleys</title><revhistory><revision><revnumber>6</revnumber><date>2014-10-15 14:14:18</date><authorinitials>Inanna</authorinitials></revision><revision><revnumber>5</revnumber><date>2014-10-14 21:25:38</date><authorinitials>Romulus</authorinitials></revision><revision><revnumber>4</revnumber><date>2013-11-23 23:52:14</date><authorinitials>Inanna</authorinitials></revision><revision><revnumber>3</revnumber><date>2013-08-03 06:35:54</date><authorinitials>tech</authorinitials></revision><revision><revnumber>2</revnumber><date>2013-08-03 06:34:57</date><authorinitials>tech</authorinitials></revision><revision><revnumber>1</revnumber><date>2013-08-03 06:31:58</date><authorinitials>tech</authorinitials></revision></revhistory></articleinfo><section><title>Abandon all valleys</title><para>Script to drop all valleys in one city </para><screen><![CDATA[label abandonAllValleys
if city.fields.length = 0 goto done
execute "abandon " + city.fields[0].coords
if !$error goto abandonAllValleys
]]><![CDATA[
label done]]></screen></section><section><title>Abandon all valleys in all cities</title><para>Script to drop all valleys in all cities </para><screen><![CDATA[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"]]></screen><!--rule (<hr>) is not applicable to DocBook--><para> <ulink url="http://guide.neatportal.com/wiki/AbandonAllValleys/wiki/ScriptExamples#">ScriptExamples</ulink> </para></section></article>