FrogComposband Automatic Shop Shuffler

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • scrarth
    Scout
    • Nov 2019
    • 43

    FrogComposband Automatic Shop Shuffler

    I recently wrote a couple of Python scripts to automate shuffling shops in FrogComposband for wild weapons and other things I was interested in, attached here in the zip file.
    Disclaimer: I am not a programmer.

    To run:
    1. Install Python 3.10.7.
    2. Download the attached .zip and extract to your preferred folder. It doesn't matter where as long as both files in the .zip live in the same place.
    3. In frogAutoShop.py, edit the path in the frogDir variable to point to your FrogComposband directory.
    4. Edit the regString variable to look for whatever it is you're shuffling for. The script uses regular expressions to look through the shop inventory text. If you're adding new items to the regex remember to use the | character to separate items.
      You can check to see if your regex will work here: https://pythex.org/
      As an example, I was using the regular expression:
      \(\dd[2-9]\d\)
      Broken down, this looks for:
      • \( - An opening parenthesis
      • \d - Any digit
      • d - The character 'd'
      • [2-9] - A digit from 2 to 9
      • \d - Any digit
      • \) - A closing parenthesis

      The result of which is a regex that matches wild weapons from 1d20 to 1d99.
    5. Open up a character in game and create a new macro (press @ then 4) on F11 that presses:
      \x1d
      and append it to a file (press 2 from the macro menu). This step is very important, this macro takes a "screenshot" and saves it as a .txt file under the lib/user directory.
      If you don't want it on F11 you'll have to edit the key being pressed in the screenshot function in frogAutoShop.py.
    6. At this point you should be good to go, just enter a shop then run the script. When you run it you have 3 seconds to click onto the game window before it starts shuffling.If the script finds a match it will pause and wait for the user to press Enter on the console window, at which point it will wait 2 seconds then continue. You can adjust the timings by changing the values of the time.sleep() calls in the main function.
      If you drop below 200k gold, or don't have enough gold to shuffle it will also stop. You can change that by editing the regex in the goldRegex variable.


    A final word of warning, because the script is pressing keys very quickly, it can be a real pain to close. I'd recommend positioning the console window such that you can close it with your mouse even with the game windows in focus.
    Attached Files
Working...
😀
😂
🥰
😘
🤢
😎
😞
😡
👍
👎