Page 3 of 40 FirstFirst 1 2 3 4 5 13 ... LastLast
Results 21 to 30 of 391

Thread: Nemesis quest script

  1. #21
    Senior Member Winterbay's Avatar
    Join Date
    Feb 2010
    Posts
    5,033

    Default

    It appears that that is what my line 1153 is saying.

    Thank you for the URLs you posted, but the one I needed is missing (the one that is submitted when you hit the "Fight!" button to make the fight happen in the Barracks).
    I didn't notice any "Fight!"-buttons in the Barracks. I either went directly from clicking on something to search or got an attack while trying to sneak in.

  2. #22
    Developer
    Join Date
    Nov 2008
    Location
    Paris, France
    Posts
    4,511

    Default

    I guess I need to see the HTML of the pages myself to be able to test things then. Regarding the 'Fight!' button, you can see what I mean on the kolwiki page of any of the Barrack locations.

    I uploaded the latest local copy to the first post, with a few tweaks.
    Try the Nemesis Quest Script or the FamiliarFeeder interface.
    *shakes KoLMafia tech support magic 8-ball* Update mafia to the latest daily .JAR!
    NEW Dad ASCENSION STARTED 20120730
    ------------------------------
    Welcome to Parenthood, Noob

  3. #23
    Senior Member Winterbay's Avatar
    Join Date
    Feb 2010
    Posts
    5,033

    Default

    I guess I need to see the HTML of the pages myself to be able to test things then. Regarding the 'Fight!' button, you can see what I mean on the kolwiki page of any of the Barrack locations.

    I uploaded the latest local copy to the first post, with a few tweaks.
    Originally Posted by slyz View Post
    Hmm... I never saw that button and I got several fights... I wonder if Mafia silently managed to click it for me or if something else was going on...

  4. #24
    Developer
    Join Date
    Nov 2008
    Location
    Paris, France
    Posts
    4,511

    Default

    Were you playing through the Relay Browser?
    Try the Nemesis Quest Script or the FamiliarFeeder interface.
    *shakes KoLMafia tech support magic 8-ball* Update mafia to the latest daily .JAR!
    NEW Dad ASCENSION STARTED 20120730
    ------------------------------
    Welcome to Parenthood, Noob

  5. #25
    Senior Member Winterbay's Avatar
    Join Date
    Feb 2010
    Posts
    5,033

    Default

    Nope. I did the entire thing through the mini-browser hunting for the URLs.

  6. #26
    Developer
    Join Date
    Nov 2008
    Location
    Paris, France
    Posts
    4,511

    Default

    Maybe that explains it then. Oh, and I just now realized that what I was doing to view the HTML of pages actually changed the HTML... (I was using HTML Tidy in notepad++). I removed extra quotes in the function that parses the HTML to find out which choice adventure you are on - get_current_adv().

    I'm ascending AT now, but if anyone else wants to give it a twirl before I do, please post what happens after redownloading the script.
    Try the Nemesis Quest Script or the FamiliarFeeder interface.
    *shakes KoLMafia tech support magic 8-ball* Update mafia to the latest daily .JAR!
    NEW Dad ASCENSION STARTED 20120730
    ------------------------------
    Welcome to Parenthood, Noob

  7. #27
    Developer
    Join Date
    Nov 2008
    Location
    Paris, France
    Posts
    4,511

    Default

    I finally managed to get the AT part right.
    • There was no need to submit anything to start a fight with Mariachis found in the Barracks: simply using run_combat() instead of trying to use the 'Fight' button worked.
    • If, like me, you paste the HTML of a page in notepad++ and use TextFX HTML Tidy, know that it will add quotes around values. The RegEx for parsing which choice adventure you are currently in now works.
    • I tweaked the logic a little bit. Each room in the Barrack has 3 locations: one with an item, one with a Mariachi, and a special one (with a hint or a key). The script visits locations in a room until the special location is found. If two locations have been visited, the third one is deduced.
    • According to the KoLWiki: "Four of the keys can be obtained through exploring The Island Barracks, but one key must be acquired by pickpocketing mariachis.". I added logic for this, tracking the number of keys obtained in special locations, but it is untested.
    • If you have a Bandersnatch and Ode to Booze permed, the script will use them. Apparently, when running combats with visit_url() and run_combat(), Bander runaways aren't tracked by Mafia, so the script will keep casting Ode even if you can't get any more free runaways.


    It was fun scripting this. I'm genuinely happy with my naviguate_barrack() function =)

    It did all the nessecary steps and then swam back to shore, followed by 1 failed attempt at a correct solution and 5 where it went 1 step and then swam back. No idea what was up with that.
    Originally Posted by Winterbay View Post
    This happened to me too. I was counting on the return value of cli_execute() to check if the maze was solved successfully, but apparently it doesn't always work. I'm going to execute "volcano solve" just once and let the user deal with the result (which is not hard with the 'Solve' button).

    I'll probably manage a Pastamancer ascension before ascending DB for Crimbo, I'll add Mr Purple's code.
    Last edited by slyz; 11-20-2010 at 09:26 AM.
    Try the Nemesis Quest Script or the FamiliarFeeder interface.
    *shakes KoLMafia tech support magic 8-ball* Update mafia to the latest daily .JAR!
    NEW Dad ASCENSION STARTED 20120730
    ------------------------------
    Welcome to Parenthood, Noob

  8. #28
    Developer
    Join Date
    Nov 2008
    Location
    Paris, France
    Posts
    4,511

    Default

    oops, double post.
    Last edited by slyz; 11-20-2010 at 11:30 AM. Reason: postcount +1!
    Try the Nemesis Quest Script or the FamiliarFeeder interface.
    *shakes KoLMafia tech support magic 8-ball* Update mafia to the latest daily .JAR!
    NEW Dad ASCENSION STARTED 20120730
    ------------------------------
    Welcome to Parenthood, Noob

  9. #29
    Senior Member Fluxxdog's Avatar
    Join Date
    Nov 2009
    Posts
    1,501

    Default

    This happened to me too. I was counting on the return value of cli_execute() to check if the maze was solved successfully, but apparently it doesn't always work. I'm going to execute "volcano solve" just once and let the user deal with the result (which is not hard with the 'Solve' button).
    Originally Posted by slyz View Post
    Yeah, there's no way to really use information from cli_execute. It only returns true/false. Learned that the hard way in my early scripting lessons. When I tried the Volcano puzzle in my own scripts, it kept trying to solve the volcano over and over. This is what it current looks like:
    PHP Code:
    while(!possess_item("Seeger's Unstoppable Banjo")){
        while(
    last_encounter()!="The Spirit of New Wave"){
            
    go_hunting_in("The Nemesis' Lair");}}
    equip($item[Shagadelic Disco Banjo]);
        
    # cli_execute( "volcano solve" ))
        
    xprint("Prepare yourself...","green",1); 
    --
    The worst crime you can commit against another human being is to make them think.

  10. #30
    Developer
    Join Date
    Nov 2008
    Location
    Paris, France
    Posts
    4,511

    Default

    Yeah, there's no way to really use information from cli_execute. It only returns true/false.
    Originally Posted by Fluxxdog View Post
    I thought the return value was false if the command ended with Mafia being in a state other than CONTINUE_STATE, but apparently the return value also depends on KoLmafia.hadPendingState (which I don't know much about).

    I'm not familiar enough with the code to find out what is set when in the Volcano Maze manager, or even earlier in the execution of an ASH script. I was counting on the return value being false only when no solution was found (lines 686-690 of VolcanoMazeManager.java), but I guess something else is setting KoLmafia.continuationState or KoLmafia.hadPendingState.

    It's not really important though: if that one scripted tentative doesn't work, it's still really easy to get through the Maze manually in the Relay Browser.
    Try the Nemesis Quest Script or the FamiliarFeeder interface.
    *shakes KoLMafia tech support magic 8-ball* Update mafia to the latest daily .JAR!
    NEW Dad ASCENSION STARTED 20120730
    ------------------------------
    Welcome to Parenthood, Noob

Similar Threads

  1. New Content - Implemented Nemesis Quest Revamp
    By heeheehee in forum Bug Reports
    Replies: 22
    Last Post: 07-04-2015, 03:03 PM
  2. Bug - Cannot Reproduce Nemesis quest big door password inop
    By nworbetan in forum Bug Reports
    Replies: 13
    Last Post: 07-17-2012, 04:14 AM
  3. 8343: Add some nemesis quest goals
    By RSS Bot in forum Latest SVN Changes
    Replies: 0
    Last Post: 03-30-2010, 04:30 PM
  4. Replies: 0
    Last Post: 02-20-2010, 02:30 PM
  5. 7554 - aInitial suport for new Nemesis quest
    By RSS Bot in forum Latest SVN Changes
    Replies: 0
    Last Post: 08-19-2009, 05:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •