• 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

    This file, AutoRunScript.txt, is automatically read and loaded at bot startup. Anything in this file will be ran as a script in each city in the bot. The file must be located in the same folder as the bot executable file in order for it to run it.

    The -runscript Startup Parameter allows to specify a custom script name to run instead of AutoRunScript.txt.

    Your script contained in this file can be anything. Some common uses are to set map colors, tell NEATO you're connected, auto-use common items like amulets or holiday promo items, and to have alts report back to a main account their city and account status.

    Keep in mind this runs in EVERY city at startup. If you want to use items or perform account maintenance type stuff, you will probably want those things only running from 1 city. You can add something like this to your script at start...

    • if city.timeSlot != 0 goto allCities
      
      //put your stuff to perform here only in one city
      
      label allCities
      
      // put your stuff to perform here for all cities

    Another example is for editing the auto use items list via script and also using special/promo limited items. This one will only run in the oldest (city.timeSlot = 0) city...

    • label autorun
      
      if city.timeSlot != 0 return
      
      // the following line is for items you want it to use all of until it runs out
      // for example promo items you gain from npc farming attacks, amulets, etc.
      
      Settings.autoUseItems(["player.box.whatever", "player.item.whatever", "player.stuff.goes.here", "add.as.many.as.you.like"], [ ])
      
      
      // the following 2 lines are for adding 5x per day use items, like 50% upkeep buffs
      
      if ItemCount("player.item.chocolatecoin") item = "player.item.chocolatecoin" // 50% upkeep or similar item
      if ItemCount("player.item.chocolatecoin") gosub use5items
      
      return
      
      label use5items
      numberOfItems = ItemCount(item)
      if numberOfItems execute "useitem {item}"
      if numberOfItems execute "repeat {min(numberOfItems,5)}"
      return


    CategoryExtras

    AutoRunScript (last edited 2017-12-21 04:02:23 by Inanna)