Results 1 to 10 of 10

Thread: Request for help scripting combat in batfellow

  1. #1

    Default Request for help scripting combat in batfellow

    I'm working on a script to at least partially automate batfellow, but I'm not sure how to deal with combat. I'm better at repurposing existing code than writing my own, but I haven't seen any batfellow scripts to rip things off from.
    Any suggestions how to get mafia to use a kickball when I am in combat?

    I tried a mafia ccs (both "skill kickball" and "skill 7261"), but those just seem to twiddle my thumbs.
    Going to account.php, I was able to pick "kickball" from the Auto Attack dropdown, but it doesn't fire, even with the checkbox to fire auto attack vs bosses and special monsters.
    Viewing the frame source while in a fight, I don't see any obvious visit_urls. I saw fight.php in the source so I tried visit_url("fight.php?action=macro&macrotext=" + url_encode("skill kickball")) and some variations on that based on some cc_ascend fight.php calls, but that just twiddled my thumbs.

  2. #2
    Developer
    Join Date
    Aug 2009
    Posts
    2,712

    Default

    iirc, visit_url doesn't let you visit fight.php if Mafia doesn't think you're in a fight; the same issue cropped up in scripting Skid Row combat.

  3. #3

    Default

    While not elegant, thanks to /clan, I now have the following:
    Code:
    chat_macro("/goto fight.php?action=skill&whichskill=7261");
    Edit: spoke too soon. That macro works in chat, but putting that line in my ash script just results in the cli just saying "Loading "fight.php?action=skill&whichskill=7261"." and not actually doing anything. Same if I change chat_macro to cli_execute.

    Double edit: ok, visit_url is working now.
    Code:
    visit_url("fight.php?action=skill&whichskill=7261");
    Looks like it's up and running.
    Last edited by ungawa; 04-07-2016 at 11:52 PM.

  4. #4
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,168

    Default

    I don't understand why normal combat scripts wouldn't just work. I've been putting off playing Batfellow games for a while, but I can't see any obvious reasons they would be like any other fight; you adventure in an adventure.php location and get send into fight.php. From a session log at the end of February:

    Code:
    {4 h. 6 m.} Gotpork Foundry
    Encounter: high-level mook
    Round 0: Batfellow wins initiative!
    Round 1: Batfellow uses KICKBALL!
    Round 2: Batfellow wins the fight!
    Sure looks like we are treating it like any other fight.

    In which case, I don't see why adventure() in a location with your CCS set up as desired wouldn't just fire. Or why you couldn't just use run_combat() to run the fight using your CCS.

    Seems like you found a solution, but I don't understand why you should have to explicitly call visit_url on fight.php to submit actions, rather than just use( $item[kickball] ), for example.

    I'll investigate, by and by. Probably when I finish this AWOL run and the next - which will be my 15th HC AWOL run - and will leave me time to simply Not Ascend for quite a while, we hope.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  5. #5

    Default

    Hi ungawa,

    I am still getting the "twiddle your thumbs" response. Would you mind posting your script for the combat?

    Thanks!

  6. #6
    Senior Member Pazleysox's Avatar
    Join Date
    Feb 2009
    Posts
    261

    Default

    I'm working on a script to at least partially automate batfellow, but I'm not sure how to deal with combat. I'm better at repurposing existing code than writing my own, but I haven't seen any batfellow scripts to rip things off from.
    Originally Posted by ungawa View Post
    I'm pretty sure Cheesecookie has a script available.

    http://alliancefromhell.com/viewtopi...ilit=batfellow

    check that forum, there's an SVN to download the script.

  7. #7

    Default

    Thanks!

  8. #8
    Senior Member zarqon's Avatar
    Join Date
    Nov 2007
    Location
    Seoul, Korea
    Posts
    3,491

    Default

    BatBrain also correctly uses and tracks all the Batfellow skills, so a BatBrain-powered script would also be an option. You could do something like:

    Code:
    act(page);
    enqueue($skill[kickball]);   // this will do nothing if you don't have a kickball
    enqueue($skill[bat-punch]);  // if the kickball successfully enqueued above, BatBrain thinks the combat is over and this will do nothing
    enqueue($skill[bat-kick]);   // same here
    macro();    // this will submit the macro of everything you've queued up so far
    However, there is a lot of strategy regarding item use in Batfellow (mostly regarding jutes, kickballs, and reserving bat-o-mite for bosses) which would be rather tricky to automate, which is one reason I've held off scripting Batfellow combat for SS. The main reason, though, is that there are some important things BatBrain doesn't know:

    • The strength of your punches/kicks. Is this accessible in batmanStats? Probably?
    • The damage the monsters will do to you. I have an outstanding feature request about this.
    • When your next NC is coming (which could affect whether you wish to use a jute). I also have a feature request about this.

    All this to say that BatBrain may be a decent framework for you to use, as it has done a lot of the work already, though not all of it.
    Sig by JakAtk
    My scripts: Prefref Plus | One-Click Wossname | Om******t (??) | Psychose-a-Matic | RandBot
    Combat suite: Best Between Battle | Mer********d (?!) | SmartStasis | BatMan | BatMan RE
    For script authors: ASH Wiki | ZLib | BatBrain | CLI Links | CanAdv | Script Registry | Map Manager | About Bats
    If you appreciate my work, help me become BAT KING OF THE WORLD! Thanks to all donators!

  9. #9

    Default

    When your next NC is coming (which could affect whether you wish to use a jute). I also have a feature request about this.
    Originally Posted by zarqon View Post
    I guess I didn't actually do anything about appearance_rates(), but I did reset turns_spent, which is enough for a script to sort that out.

  10. #10

    Default

    I am just trying to burn through the runs to get my weekly comic and beat the bosses for the trophy. When I want the jokester stuff I will play it by hand

Posting Permissions

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