Results 1 to 3 of 3

Thread: counterScript Trigger

  1. #1
    Senior Member
    Join Date
    Apr 2018
    Posts
    319

    Default counterScript Trigger

    I recently started writing my own counterScript, and I’ve noticed a serious issue: It doesn’t seem to trigger reliably when running certain scripts (for example, Ezandora’s FantasyRealm script). I imagine this is related to the specific functions these scripts use, so I’d like to know exactly what triggers a counterScript to run.

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

    Default

    Without having seen that particular script, I would guess it has to do with some scripts using adventure() vs visit_url(). The former includes a lot of configurable automation (moods, mana burning, before/afterBattle scripts, counterScripts, hp/mp recovery, combat/choiceadv handling), whereas the latter includes none of that. Replicating all of KoLmafia's adventure() automation when using visit_url() is possible, but it's recreating the wheel and script authors inevitably leave steps out.

    Of course, that may not be what's going on here, in which case ignore this; but if it is, hopefully that helps.
    Sig by JakAtk
    My scripts: Prefref Plus | Skillref Plus | One-Click Wossna | Om*****st (??) | Psychose-a-Matic | RandBot
    Combat suite: Best Between Battle | Mercenary Mood | SmartStasis | BatMan | BatMan RE
    For script authors: ASH Wiki | ZLib | BatBrain | CLI Links | Drag-n-Drop Inventories | CanAdv | Script Registry | Map Manager
    If you appreciate my work, help me become BAT KING OF THE WORLD! Thanks to all donators!

  3. #3
    Senior Member Crowther's Avatar
    Join Date
    Nov 2006
    Posts
    1,487

    Default

    Replicating all of KoLmafia's adventure() automation when using visit_url() is possible, but it's recreating the wheel and script authors inevitably leave steps out.
    Originally Posted by zarqon View Post
    It would be nice if there was a good way to do this, run KoLmafia's preadventure code without actually adventuring. I've taking to telling KoLmafia to go adventure some place it can't, but also can't know that.

Posting Permissions

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