• 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:

    completequests [optional /switch] questtype

    Example:

    completequests
    completequests daily
    completequests routine
    completequests title
    completequests rank
    completequests /type="Rebuild"
    completequests /query="all"

    CompleteQuests will automatically complete any quests that you have available to complete, and receive the awards that come from the quests. It can only be used in one city at any given time, you should not have multiple instances of the command running in others.

    You can accept any routine quests or daily quests (such as the free daily amulet) with completequests routine or completequests daily respectively. Using the /mode, /name, and /type switches will allow you to more specifically define what type of quest you'd like to accept. For example:

    •      completequests /mode=routine
           completequests routine        // same as above

    Some more examples by quest type:

    •      // complete any finished quests of "Rebuild" or "Promotion" types
           completequests /type=rebuild,promotion          // type is not case-sensitive
           completequests routine /type=Rebuild,Promotion  // same as above
           completequests /mode=routine Rebuild,Promotion  // same as above
           completequests routine Rebuild,Promotion        // same as above
      
           // use quotes to specify quest type with spaces
           completequests /type="Domain Expansion,Commodity Gathering"

    You can even specify the quest by name:

    •      // complete "Population Increase" quest if finished
           completequests /name="Population Increase"
           completequests routine /name="Population Increase"                     // same as above
      
           // complete "Farming" quest, if finished
           completequests /name=farming                                           // name is not case-sensitive
           completequests /mode=routine /name=farming /type="Commodity Gathering" // same as above (any order of switches is allowed)
           completequests routine /type="Commodity Gathering" farming             // same as above
           completequests routine "Commodity Gathering" farming                   // same as above

    Using completequests routine will force the bot to accept promotions that are pending. Please note that using the command in this way will accept the first promotion in the list, which would be major before baronet, or colonel before baron, etc. You will probably want to specify title, rank, office, or name parameters for completing promotion quests:

    •      // complete any finished title promotion(s)
           completequests title
           completequests /type=Promotion /name=Knight,Baronet,Baron,Viscount,Earl,Marquis,Duke,Furstin,Prinzessin    // same as above
      
           // complete any finished office (rank) promotion(s)
           completequests office
           completequests rank                                                              // same as above
           completequests /type=Promotion /name=Lieutenant,Captain,Major,Colonel,General    // same as above

    Global settings "General" tab now also has a dropdown menu to select automatic completion types:

    •      0 - No
           1 - Yes, except promotions
           2 - Yes
           3 - Yes, promote Title first

    The above options allow to you turn all automated quest completion off (option 0), turn it all on except promotions (option 1), turn it all on including promotions (option 2), or turn it on including promotions but doing title before rank (option 3). Most people will be best suited with option 3, this will accept Baronet before Major and so on. Note: completequests and completequests routine behavior via script command is currently NOT affected by Complete Quests mode value in Global Settings. This means if you set the menu to option 3 and then do completequests routine, you will still get Major before Baronet (or Colonel before Baron, or General before Viscount). You must use completequests title if you want them accepted in the most useful order.

    Beginning in NeatBot version 3511, there is also support for the /query switch. The available values for the /query switch are:

    •       "available" - return list of currently available (non-finished) quests in $result
            "finished"  - return list of finished (unclaimed) quests in $result
            "all"       - return list of all current quests in $result
      • If the /query switch is not specified, completequests works on claiming completed quests as before, except that it now additionally returns completed and claimed quests in $result. All existing parameters and filters are fully supported and can be combined with /query. The mode "routine" is assumed if /quest is the only supplied parameter.

    Here's an example of how to check if we have any finished quests of Rebuild type:

    •    // assuming quests auto-completion is disabled
         completequests /query=finished /type=Rebuild
         quests = $result
         if quests.length > 0 echo "We have completed, but unclaimed quests of Rebuild type"

    Here's an example to find names of not yet completed quests, and how to complete them:

    •    completequests /query=available
         quests = $result
         names = quests.map(CreateFunction("v,i,a","v.name"))
         if names.length > 0 echo "Available quests: " + names.join("\n")
      
         // complete quests
         // ...
         if names.indexOf("Chatting") >= 0 alliancechat "hi!"
         // ...

    Here's an advanced example to find target names needed to complete quests, and an example of how to complete:

    •    // define supporting functions
         canScout = CreateFunction("v,i,a","v.canScout")
         addFinishedTargets = CreateFunction("v,i,a","v.finished || targets.push(v.name)")
         checkTargets = CreateFunction("v,i,a","v.targetsArray.toArray().forEach(addFinishedTargets)")
      
         // check available quests
         completequests /query=available
         quests = $result
         targets = []
         quests.forEach(checkTargets)
         if targets.length > 0 echo "Available targets: " + targets.join("\n")
      
         // complete targets
         // ...
         if targets.indexOf("Scout city") >= 0 callfunc scout_city()
         // ...
      
         end
      
         function scout_city()
           dist = 10
           castle = CastlesInRectangle(city.x - dist, city.y - dist, city.x + dist, city.y + dist).filter(canScout).sort(city.compareByDistanceToCastle)[0]
           if castle execute "scout {castle.coords}"
           return


    ScriptAccount

    CompleteQuests (last edited 2017-05-28 02:30:25 by Inanna)