Create a new AA script
Moderator: Moderators
-
- Posts: 1395
- Joined: Tue Feb 12, 2008 1:22 pm
- Contact:
Create a new AA script
Contest starts now and runs 1 month, or until someone creates a script that can do these things:
It is past time for a new autoadventure script, one that is not cobbled together with snarky comments and geared only toward the maker's wishes and wants. Especially with FF4 recently released. Therefore, I am offering a 5 star bounty for a new script that includes at least the features below:
- Basic features of current script; ability to set HP/PP levels for the script to operate within, list of most common attack types, easy to modify for people who want to change attack style.
- Option to store encounter data for spaders.
- Most of all, easy to remove "clutter" features that individual users don't want, i.e. dataplate decrypting. These additions to the later scripts always annoyed me because I didn't need them and they just made the screen too "busy".
- Coded to automatically pick an option on choice adventures, able to be easily adjusted if someone wants a different default option, and should automatically pick the 4th option for Intermission (Cube UR) and Two Roads (Triassic semi-rare).
- Also, it should work on both www.twilightheroes.com and twilightheroes.com
It is past time for a new autoadventure script, one that is not cobbled together with snarky comments and geared only toward the maker's wishes and wants. Especially with FF4 recently released. Therefore, I am offering a 5 star bounty for a new script that includes at least the features below:
- Basic features of current script; ability to set HP/PP levels for the script to operate within, list of most common attack types, easy to modify for people who want to change attack style.
- Option to store encounter data for spaders.
- Most of all, easy to remove "clutter" features that individual users don't want, i.e. dataplate decrypting. These additions to the later scripts always annoyed me because I didn't need them and they just made the screen too "busy".
- Coded to automatically pick an option on choice adventures, able to be easily adjusted if someone wants a different default option, and should automatically pick the 4th option for Intermission (Cube UR) and Two Roads (Triassic semi-rare).
- Also, it should work on both www.twilightheroes.com and twilightheroes.com
- Cristiona
- Posts: 4966
- Joined: Sun Apr 08, 2007 1:01 am
- Location: the Conservatory with the lead pipe
- Contact:
Re: Create a new AA script and get rich! - starting 6/6
If you do this, it should also automatically pick an option on choice adventures, be able to be adjusted if someone wants a different default option, and should automatically pick the 4th option for Intermission (Cube UR) and Two Roads (Triassic semi-rare).
Also, it should work on both www.twilightheroes.com and twilightheroes.com
Also, it should work on both www.twilightheroes.com and twilightheroes.com

The churches are empty / The priest has gone home / And we are left standing / Together alone
--October Project: "Dark Time"
Re: Create a new AA script
Automatically gets the 77 habits at level 5, if you have the quest done obviously.

- Cristiona
- Posts: 4966
- Joined: Sun Apr 08, 2007 1:01 am
- Location: the Conservatory with the lead pipe
- Contact:
Re: Create a new AA script
Right now I'd settle for the existing one modified to work with FF5.
Stupid Firefox.
Stupid Firefox.

The churches are empty / The priest has gone home / And we are left standing / Together alone
--October Project: "Dark Time"
- Cristiona
- Posts: 4966
- Joined: Sun Apr 08, 2007 1:01 am
- Location: the Conservatory with the lead pipe
- Contact:
Re: Create a new AA script
Okay, seems 3.4 works with FF5. Off the top of my head, all that's missing are the Teeter and Yang non-combats and the new ones in the riot. I don't have Teeter and Yang on this computer, but here's the code for the riot, just add it with all the other non-combats (adjusting if you want different choices):
//nonComChoice["Holdin' Everything but the Caulfield"+"choice"] = "1"; //protester
//nonComChoice["Holdin' Everything but the Caulfield"+"choice"] = "2"; //officer
nonComChoice["Holdin' Everything but the Caulfield"+"choice"] = "3"; //free bonus
nonComChoice["Holdin' Everything but the Caulfield"+"submitvalue"] = "What do you do?";
//nonComChoice["Two Rioters Diverged in an Angry Protest"+"choice"] = "3"; //rioter
//nonComChoice["Two Rioters Diverged in an Angry Protest"+"choice"] = "5"; //dissident
nonComChoice["Two Rioters Diverged in an Angry Protest"+"choice"] = "6"; //free bonus
nonComChoice["Two Rioters Diverged in an Angry Protest"+"submitvalue"] = "What's your take?";
nonComChoice["An All-Encampassing Rage"+"choice"] = "1"; //student
//nonComChoice["An All-Encampassing Rage"+"choice"] = "2"; //raver
nonComChoice["An All-Encampassing Rage"+"submitvalue"] = "Go go hero defenses";
//nonComChoice["Holdin' Everything but the Caulfield"+"choice"] = "1"; //protester
//nonComChoice["Holdin' Everything but the Caulfield"+"choice"] = "2"; //officer
nonComChoice["Holdin' Everything but the Caulfield"+"choice"] = "3"; //free bonus
nonComChoice["Holdin' Everything but the Caulfield"+"submitvalue"] = "What do you do?";
//nonComChoice["Two Rioters Diverged in an Angry Protest"+"choice"] = "3"; //rioter
//nonComChoice["Two Rioters Diverged in an Angry Protest"+"choice"] = "5"; //dissident
nonComChoice["Two Rioters Diverged in an Angry Protest"+"choice"] = "6"; //free bonus
nonComChoice["Two Rioters Diverged in an Angry Protest"+"submitvalue"] = "What's your take?";
nonComChoice["An All-Encampassing Rage"+"choice"] = "1"; //student
//nonComChoice["An All-Encampassing Rage"+"choice"] = "2"; //raver
nonComChoice["An All-Encampassing Rage"+"submitvalue"] = "Go go hero defenses";

The churches are empty / The priest has gone home / And we are left standing / Together alone
--October Project: "Dark Time"
-
- Posts: 1395
- Joined: Tue Feb 12, 2008 1:22 pm
- Contact:
Re: Create a new AA script
A big thanks to Zillow for coming up with a new script. Still a bit in the works, but it's almost exactly what I was looking for.
-
- Posts: 107
- Joined: Thu Nov 13, 2008 11:54 am
- Contact:
Re: Create a new AA script
Harry Dresden wrote:A big thanks to Zillow for coming up with a new script. Still a bit in the works, but it's almost exactly what I was looking for.
OOOH, I can't wait to see it. Where can I steal this script from?

Re: Create a new AA script
You, sir, are a scholar and a gentleman. I am very much looking forward to playing around with this when it is finished.
- Corrupt Shadow
- Posts: 1234
- Joined: Mon Dec 17, 2007 8:24 pm
- Location: Baton Rouge, LA
- Contact:
Re: Create a new AA script
For some odd reason the AA scripts never work for me.
*pout*


I've won the 100k DD bet so many times, I should have the title "Mr. Luck"
Re: Create a new AA script
Here is your long awaited AA script:
http://userscripts.org/scripts/review/105495
There are 3 things you should change when you install it:
1. The options at the top for personalizing the script
2. The strategies for combat
3. The non-combat choices
Enjoy!
Edit: Questions/Comments/Concerns appreciated
http://userscripts.org/scripts/review/105495
There are 3 things you should change when you install it:
1. The options at the top for personalizing the script
2. The strategies for combat
3. The non-combat choices
Enjoy!

Edit: Questions/Comments/Concerns appreciated

- Cristiona
- Posts: 4966
- Joined: Sun Apr 08, 2007 1:01 am
- Location: the Conservatory with the lead pipe
- Contact:
Re: Create a new AA script
//used for the non-combat in Teeter Street
var username = 'Zillow';
What's this variable used for? I'll be using this script across multiple accounts.

The churches are empty / The priest has gone home / And we are left standing / Together alone
--October Project: "Dark Time"
Re: Create a new AA script
Well I didn't want to do the work to grab your username for that one non-combat in Teeter Street, but I guess I should...

-
- Posts: 4
- Joined: Sun Feb 06, 2011 1:57 am
- Contact:
Re: Create a new AA script
nonComChoice[username + " and the Chocolate Factory"+"choice"] = "1511"; //sour coating
//nonComChoice[username + " and the Chocolate Factory"+"choice"] = "1512"; //candy shell
//nonComChoice[username + " and the Chocolate Factory"+"choice"] = "1513"; //chocolate "chip"
//nonComChoice[username + " and the Chocolate Factory"+"choice"] = "870"; //razzberry sticker
nonComChoice[username + " and the Chocolate Factory"+"submitvalue"] = "Pick your prize";
Blame the Teeter Street non-combat.
EDIT: Ninja`d.

Re: Create a new AA script
So, I just found out that I broke the hp checking in the script right before giving it to y'all. The fixed version is now up and it also has the update for the non-combat in Teeter Street so it will work for all characters using the script.

- Cristiona
- Posts: 4966
- Joined: Sun Apr 08, 2007 1:01 am
- Location: the Conservatory with the lead pipe
- Contact:
Re: Create a new AA script
Now I gotta re-edit!

The churches are empty / The priest has gone home / And we are left standing / Together alone
--October Project: "Dark Time"
- Cristiona
- Posts: 4966
- Joined: Sun Apr 08, 2007 1:01 am
- Location: the Conservatory with the lead pipe
- Contact:
Re: Create a new AA script
New AA script (at least, version 3.5.1) is now confirmed to make the right choice for The Best Memory.
Nyah.
Nyah.

The churches are empty / The priest has gone home / And we are left standing / Together alone
--October Project: "Dark Time"
-
- Posts: 1395
- Joined: Tue Feb 12, 2008 1:22 pm
- Contact:
Re: Create a new AA script
I thought I paid Zillow to not let you get any cool stuff. I want my stars back!
- Cristiona
- Posts: 4966
- Joined: Sun Apr 08, 2007 1:01 am
- Location: the Conservatory with the lead pipe
- Contact:
Re: Create a new AA script
Hey, considering how long it took, I earned it!
You sell:
1445 deterministic coins
1484 royal crowns
999 decorated jerkins
1408 snug breeches
1430 poofy skirts
1469 sturdy boots
1489 truepenny blades
1009 prabble crossbows
993 bodices
496 sleeping draughts
797 lover's locket, right halves
950 Scottish necklaces
138 fall's staves
... for a total profit of 1,642,150 chips.

The churches are empty / The priest has gone home / And we are left standing / Together alone
--October Project: "Dark Time"
Re: Create a new AA script
Might want to add this as well to handle the Rooftops over WoDo noncombat 

Code: Select all
//nonComChoice["What's That Over There?"+"choice"] = "1"; //hamock
nonComChoice["What's That Over There?"+"choice"] = "2"; //box with talismans
//nonComChoice["What's That Over There?"+"choice"] = "3"; //mat
nonComChoice["What's That Over There?"+"submitvalue"] = "Choose";
-
- Posts: 1395
- Joined: Tue Feb 12, 2008 1:22 pm
- Contact:
Re: Create a new AA script
Something seems to be screwing with the autoadventure script. On both my computers, it will run a turn but then at the end of the turn the script boxes disappear until I manually initiate the next turn. They're still there if I only set it to run a single turn, as painful as that is.
Happening with several of my combat options: just attacking, using throwing stars and then attacking, and using TNT then attacking.
Happening with several of my combat options: just attacking, using throwing stars and then attacking, and using TNT then attacking.
-
- Posts: 1395
- Joined: Tue Feb 12, 2008 1:22 pm
- Contact:
Re: Create a new AA script
The problem is caused by the latest version of Greasemonkey. You can either load up the older version, or the newest beta version (under Download Channel on the greasemonkey site) to solve the issue. Or wait until a newer version is released, which should be soon since so many people are having issues with add-ons since the new version came out.
- Cristiona
- Posts: 4966
- Joined: Sun Apr 08, 2007 1:01 am
- Location: the Conservatory with the lead pipe
- Contact:
Re: Create a new AA script
Or just tell Firefox that its autoupdates can go soak their head. Rawr.

The churches are empty / The priest has gone home / And we are left standing / Together alone
--October Project: "Dark Time"
Re: Create a new AA script
Currently the script can't handle the axe hero guitar options go/stay, is it possible to work it into the script?
here's an example of a page with the option:
here's an example of a page with the option:
Spoiler: show
Re: Create a new AA script
I'm considering making a new alternative to the current AA script, which will be a bit more robust. As such it'll probably be a Java program like KoLMafia so we can have platform and browser independence, and overall more features. My main focus will be on a spading feature and a quest run mode, which haven't been included in the AA scripts because it's somewhat infeasible. No real ETA, as I'm also just starting graduate classes next week, but I'm hoping to get a beta up in 2 months. I'll make a new thread if I need alpha testers later on.
Leader of PFE league. If you wish to worship me, ask me about joining my secondary league Cult of Satan (the largest league in the game!).
- Cristiona
- Posts: 4966
- Joined: Sun Apr 08, 2007 1:01 am
- Location: the Conservatory with the lead pipe
- Contact:
Re: Create a new AA script
If you can still find it, you could probably use the old Mechapinata script as a base. For a CLI script, it worked pretty well.

The churches are empty / The priest has gone home / And we are left standing / Together alone
--October Project: "Dark Time"
Re: Create a new AA script
I thought Mechapinata was the Java GUI version bamse made after the perlbot? I no longer have the source code for that one though, need to start from scratch >.>
Leader of PFE league. If you wish to worship me, ask me about joining my secondary league Cult of Satan (the largest league in the game!).
-
- Posts: 1395
- Joined: Tue Feb 12, 2008 1:22 pm
- Contact:
Re: Create a new AA script
Anyone know what's going on with Greasemonkey? It keeps telling me scripts have to be signed with such and such, and then a few days later all my scripts are reset to some old version and I have to go in and update them again.
Re: Create a new AA script
I've had that same thing happening. Think it's just a bug.
Leader of PFE league. If you wish to worship me, ask me about joining my secondary league Cult of Satan (the largest league in the game!).
Re: Create a new AA script
Satan wrote:I thought Mechapinata was the Java GUI version bamse made after the perlbot? I no longer have the source code for that one though, need to start from scratch >.>
I didn't come up with the name, but Mechapiñata was indeed the Java GUI version. I don't think I ever got very far with that one though, except for some convenience utility classes to handle web requests and parsing html (with regex *shudder*).
The Perl bot was internally called PFEBot, and though it mostly got its job done, it was jam-packed with poor coding practices, and is not something I would use as the basis for something more robust.
I still think it would be pretty neat to have something similar to KOL Mafia though, and I think it should be fairly easy to make with Python and GTK+. I still love Perl (and I'm much better at it now than I was then), but the reason I want to use Python is because I'm getting involved in an open-source project that will also use Python and GTK+. Plus, I also use Python almost daily in my current job.
Re: Create a new AA script
This is by no means finished, but since I haven't had the time or energy to work on it since before the summer, I thought I'd share it in case anyone else wants to contribute:
https://github.com/fleskesvor/th-bot
My goal with this was to make something that can be as usable and flexible as KoLmafia, but since there will probably never be as many people contributing to this project, I needed to find another way to achieve that goal. I think that can be achieved by building a framework around easy to write user scripts with functions that are triggered by subscribing to certain pre-defined events. Here's a working example of a script that logs into and prints messages from chat:
Since I didn't want to create and parse a whole new custom language, this is just Python, but that also mean you're free to utilize everything that language has to offer. Plus you're free to create and call your own functions, meaning you can set up a function to start an adventure when the user is logged in, handle the result of an adventure in another function, and then write code to either call that first function to go on a new adventure, or do stuff like heal, depending on the outcome. That functionality is sorely lacking at the moment though, but there is code in place for it, and it's my next item on the TODO list, if I ever get around to it.
Another thing that's high up on the list is a module that loads configuration data from either a JSON file or another Python script and saves data back afterwards, so that you can add things like new choice encounters to it in code, and have that be available the next time you run the script. A longer term goal is to add a graphical front-end to it using GTK and Glade, and making standalone executables with py2exe for Windows and py2app for macOS. I'm on Linux, but I think the script would be much more usable to more people if using it was as simple as adding user scripts to a scripts/ folder, and then just choosing which script to load from an application, which also saved things like logins and displayed info about stats and loot.
So that's my combined pitch and lament over not being able to spend more time on this project. I don't want to see it die just yet though, so if anyone reading this is willing to help, either with code, inspiration or ideas, I'd be happy to help get you started.
EDIT: I should emphasize that I have prioritized usability over best practices, so there are several things in here you shouldn't do in your own project. If I can figure out a good way around it, I want to spare having the user load any modules. For chat and messages, I might solve that by starting their pollers if their respective receive events are subscribed to, which would mean that second function in my example wouldn't be necessary. Calling login() shouldn't be necessary either, since the credentials can be loaded from the config.py script or eventually be passed in as command line options or through a login window.
https://github.com/fleskesvor/th-bot
My goal with this was to make something that can be as usable and flexible as KoLmafia, but since there will probably never be as many people contributing to this project, I needed to find another way to achieve that goal. I think that can be achieved by building a framework around easy to write user scripts with functions that are triggered by subscribing to certain pre-defined events. Here's a working example of a script that logs into and prints messages from chat:
Code: Select all
@receive_event("script.started")
def main():
login(USER, PASS)
@receive_event("login.success")
def logged_in(message):
chat = Chat()
chat.run()
@receive_event("chat.receive")
def pretty_print(message, _type, text, channel, user, link):
if _type in ["normal", "em"]:
print "[%-8s] %s (#%s): %s" % (channel, user, link, text)
elif _type == "note":
print "! %s" % text
elif _type == "pm":
print "[~private] %s (#%s): %s" % (user, link, text)
Since I didn't want to create and parse a whole new custom language, this is just Python, but that also mean you're free to utilize everything that language has to offer. Plus you're free to create and call your own functions, meaning you can set up a function to start an adventure when the user is logged in, handle the result of an adventure in another function, and then write code to either call that first function to go on a new adventure, or do stuff like heal, depending on the outcome. That functionality is sorely lacking at the moment though, but there is code in place for it, and it's my next item on the TODO list, if I ever get around to it.
Another thing that's high up on the list is a module that loads configuration data from either a JSON file or another Python script and saves data back afterwards, so that you can add things like new choice encounters to it in code, and have that be available the next time you run the script. A longer term goal is to add a graphical front-end to it using GTK and Glade, and making standalone executables with py2exe for Windows and py2app for macOS. I'm on Linux, but I think the script would be much more usable to more people if using it was as simple as adding user scripts to a scripts/ folder, and then just choosing which script to load from an application, which also saved things like logins and displayed info about stats and loot.
So that's my combined pitch and lament over not being able to spend more time on this project. I don't want to see it die just yet though, so if anyone reading this is willing to help, either with code, inspiration or ideas, I'd be happy to help get you started.
EDIT: I should emphasize that I have prioritized usability over best practices, so there are several things in here you shouldn't do in your own project. If I can figure out a good way around it, I want to spare having the user load any modules. For chat and messages, I might solve that by starting their pollers if their respective receive events are subscribed to, which would mean that second function in my example wouldn't be necessary. Calling login() shouldn't be necessary either, since the credentials can be loaded from the config.py script or eventually be passed in as command line options or through a login window.
Who is online
Users browsing this forum: No registered users and 1 guest