• 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

    Usage:

    gosub label

    Example:

    gosub medalfarm

    Allows you to jump to a subroutine, perform the actions there, and then return to continue to the next scripted line.

    In the following example, the bot will read line 1, jump to label medalfarm, perform the attack there, return to the original place and read line 2, jump to label trainarch, queue up the archers, return to the original place and read line 3, jump to label upgradecot, upgrade the cottage twice, return to the original place and read line 4, sleep 30 seconds, and then loop back to line 1 where it will begin the process again with label medalfarm.

    • gosub medalfarm
      gosub trainarch
      gosub upgradecot
      sleep 30
      loop 0
      
      label medalfarm
      attack 123,300 !Bubba,!Xavier,any t:400,b:400
      return
      
      label upgradecot
      upgrade house
      repeat 2
      return
      
      label trainarch
      train arch:2500 Hero
      return

    Do not forget to add the Return at the end of each subroutine to avoid errors.



    ScriptControlStructures

    Gosub (last edited 2012-10-24 20:31:07 by Romulus)