• My Pages
  • Comments
  • Add Link
  • Subscribe
  • Subscribe User
  • Edit (GUI)
  • Edit (Text)
  • Rename Page
  • Copy Page
  • Load Page
  • Save Page
  • Delete Page
  • Attachments
  • Check Spelling
  • Diffs
  • Info
  • Revert to this revision
  • XML
  • Render as Docbook
  • Print View
  • Raw Text
  • Delete Cache
  • Like Pages
  • Local Site Map
  • Remove Spam
  • Package Pages
  • Sync Pages
    • Diff for "AbandonAllValleys"
    Differences between revisions 5 and 6
    Revision 5 as of 2014-10-14 21:25:38
    Size: 242
    Editor: Romulus
    Comment:
    Revision 6 as of 2014-10-15 14:14:18
    Size: 604
    Editor: Inanna
    Comment:
    Deletions are marked like this. Additions are marked like this.
    Line 1: Line 1:
    == AbandonAllValleys ==
    Script to drop all valleys
    == Abandon all valleys ==
    Script to drop all valleys in one city
    Line 12: Line 12:

    == 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"
    }}}

    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)