• 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

    The Config.sol file is not actually an extra file you can create to use with your bot, but one that the bot creates automatically. This file is stored in your flash storage folder and contains information about your bot and account. For example, the email, password, and server information are stored in Config.sol.

    You can view information in Config.sol through the bot using Config.whatever. All of the startup parameters settings can be viewed this way. Some of, but not all, of the information you can access here is:

    • Config.username
      Config.password
      Config.server
      Config.proxy
      Config.maintenance
      etc.
      
      ...
      
      echo "My password that I keep forgetting is {Config.password}!"

    Note that the C in Config is capitalized. This is required. For a full list of startup parameters see here: StartupParameters

    Now for the really neat bit of Config.sol... you can also store custom information in here using startup parameters and then retrieve it later. For example:

    • -owner Bob

    You could enter the above in the Director custom profile parameters or custom parameters box and it would setup an entry "owner" with the value "Bob" in the Config.sol file. You could later access this in the bot as Config.owner.

    • ...
      if (city.enemyArmies[0].king == Config.owner) return // go back to wherever we were and let our owner attack us
      execute "alliancechat Help! Help! I'm under attack from someone other than {Config.owner}!!"  // we didn't return above, so yell for help
      return
      ...


    CategoryExtras

    Config.sol (last edited 2015-09-07 00:08:11 by Inanna)