Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 23

Thread: Add Choice Adv control for Reflection of a map

  1. #1
    Developer
    Join Date
    Apr 2006
    Posts
    912

    Default Add Choice Adv control for Reflection of a map

    Specifically a setting to automatically run chess solve when on choiceadv443 as I can't seem to manually set that setting to something to automatically solve the chess board.
    Better Basement Automation - Version 1.??? Someone else is maintaining this
    Get an effect from a buffbot
    - Version 1.4

  2. #2
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default

    Well... if you were doing this as part of a script, then you can use the cli command:
    chess solve
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


  3. #3
    Developer
    Join Date
    Apr 2006
    Posts
    912

    Default

    I can't call use(1, $item[reflection of a map]) from a script without mafia aborting because of an unrecognized choice adventure. I have already set the initial choice to select the chessboard, but as far as I can tell there aren't any relevant settings for the chessboard choice besides 'walk away' which is worse then aborting because I'd just waste a map, and because the script would abort (or I guess I could have it show in browser but for all purposes that's the same as aborting as far as a script is concerned) it would never call 'chess solve'. So basically what I was doing earlier was calling use(1, $item[reflection of a map]) from the cli then when mafia aborted I calling 'chess solve'. That's not an ideal solution.

    You and I both know I could manually script this out with two visit_url and a cli_execute, but that doesn't help anyone without scripting ability who would want to acquire a queen cookie automatically.

    If there's a choice adventure setting to solve (2 maybe? I didn't think about checking until after my character overdrank) sure I could use that. A drop down setting would still be nice.
    Last edited by Rinn; 04-08-2010 at 03:11 AM.
    Better Basement Automation - Version 1.??? Someone else is maintaining this
    Get an effect from a buffbot
    - Version 1.4

  4. #4
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default

    You and I both know I could manually script this out with two visit_url and a cli_execute, but that doesn't help anyone without scripting ability who would want to acquire a queen cookie automatically.
    Originally Posted by Rinn View Post
    Dang, I was just about to suggest that. Yeah, you're right. Mafia should be able to do this.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


  5. #5
    Junior Member
    Join Date
    Nov 2008
    Posts
    28

    Default

    Posted the same thing (basically) in the KOL forums a few days back- seems to have gotten lost in the shuffle:

    Quick feature request- apologies if it's been posted before.
    Under the items tab (in the choice adv) menu, it would be nice if DRINK ME potions had a drop down menu. I'm going for queen cookies, and each time it's a series of three or four clicks (including a refresh of the browser to show the menu) plus a CLI input (chess solve). Be nice if I could just set it like a llama gong to always follow a particular action- solve the chessboard, hit the field of strawberries, whatever...
    Thanks for everything, as always.

    Hopefully it'll make it into a future build.

  6. #6
    Junior Member
    Join Date
    Aug 2009
    Posts
    3

    Default

    I support Cheese Loaf's idea. The unsupported noncombat is troublesome and, attempting to get queen cookies, I ran a self-made script, but can't seem to get around Mafia aborting after using the reflection of a map. Any tips on this? Or is a Features Add the only way?


    This is what I would try to start (please excuse the messy code).
    PHP Code:
    cli_execute("use reflection of a map");

    visit_url("choice.php?pwd&whichchoice=442&option=5&choiceform5=The+Great+Big+Chessboard");
    cli_execute("chess solve");

    cli_execute("inv queen cookie");
    cli_execute("inv reflection of a map");
    print(
    ""); 
    After cli_execute("use reflection of a map"), it would say "unsupported choice adventure (number)" and abort.


    I ended up doing this (basically reverse, after using map):

    PHP Code:
    visit_url("choice.php?pwd&whichchoice=442&option=5&choiceform5=The+Great+Big+Chessboard");
    cli_execute("chess solve");


    cli_execute("inv queen cookie");
    cli_execute("inv reflection of a map");
    print(
    "");

    print(
    "GET READY! GET READY! GET READY! GET READY! GET READY! GET READY! GET READY!");

    cli_execute("use reflection of a map");
    print(
    "Ready!"); 
    Last edited by Tath; 05-17-2010 at 03:35 AM. Reason: added code

  7. #7
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default

    You can prevent mafia from aborting like this:

    PHP Code:
    if(cli_execute("use reflection of a map")) {}

    visit_url("choice.php?pwd&whichchoice=442&option=5&choiceform5=The+Great+Big+Chessboard");
    cli_execute("chess solve");

    cli_execute("inv queen cookie");
    cli_execute("inv reflection of a map");
    print(
    ""); 
    What that does is to capture the error condition. There are several other ways to do it:

    PHP Code:
    (! cli_execute("use reflection of a map"));
    boolean test cli_execute("use reflection of a map"); 
    The important thing is that if you make use of the return value, mafia does not abort.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


  8. #8
    Junior Member
    Join Date
    Aug 2009
    Posts
    3

    Default

    Thanks, Bale.

    However, I tried both of those samples and they didn't work; earlier when I said 'it would say "unsupported choice adventure (number)" and abort', I meant it would simply say "unsupported choice adventure" and then stop, no actual phrase "abort" in the log. Again, it's still saying the choice adventure is unsupported even after using the boolean test~, the (! cli_execute~, and the if(cli_execute~, separately, and also with (! cli_execute~, and boolean test~ together (as in your second code box). If I understand correctly (which could be the error), using those lines would be "making use of the return value", but it doesn't seem to stop it from stopping dead in its tracks after the reflection is used.

    It's...slightly possible that it might be my version of Mafia, though I updated it just last week-I'll try again tomorrow after updating and post any changes.

  9. #9
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default

    I guess that is a case where the error state cannot be trapped. My bad.

    PS. Don't use (! cli_execute~, and boolean test~ together! That's silly since if it worked, it would use the reflection twice. I intended those as two separate examples -- I just didn't want to create two entirely separate code boxes.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


  10. #10
    Senior Member halfvoid's Avatar
    Join Date
    Jun 2009
    Location
    London, UK
    Posts
    265

    Default

    Wondering if this was ever decided on, or if anyone else found a viable non-aborting workaround. I'm working on a script that would benefit greatly from not aborting at this point. Willing to share it once its completed and tested with whoever has a workaround.

Similar Threads

  1. Replies: 0
    Last Post: 02-13-2015, 12:32 PM
  2. Replies: 3
    Last Post: 04-12-2013, 07:03 AM
  3. Replies: 0
    Last Post: 10-01-2011, 03:00 PM
  4. Bug - Fixed Manual control not giving volcano map choice
    By anOtherGrendel in forum Bug Reports
    Replies: 3
    Last Post: 03-10-2010, 09:38 PM
  5. Replies: 2
    Last Post: 02-21-2010, 05:20 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
  •