RecordSongs.ash: Automatically record profitable songs
Here's my first full script. I wasn't sure which forum it would best fit under, so if this is wrong, just move it.
After an Accordion Thief has completed the Nemesis quest, they have the opportunity to record limited-cast songs as items. The purpose of this script is to automate this process. It first changes your gear and restores MP. Then it goes to that special page and checks what songs you have available for casting. For each of these, it calculates if it's actually worthwhile to record it. If yes, it records as many as possible, leaving and returning if necessary.
Some notes:
1. You have to be an AT who finished the Nemesis quest to use the script. It determines this by checking if you have The Trickster's Trikitixa.
2. It uses the UR's _meatpermp if available but otherwise assumes you have MMJ access for purposes of the cost calculations
3. It prompts you about actually automating the process. If you say no, it'll just calculate the profitability of your available songs but won't actually record anything.
4. It tries to get both effects that reduce MP costs and those that increase max MP, strongly weighted by the MP costs. I do this with "maximize -1000 mana cost, 1 mp". I actually have no idea how the maximize command really works, so this is mostly a guess. A correction here would be most welcome.
5. It aborts if you try the automation but have no adventures left or are drunk. You can still see the summary, though.
6. It aborts if you don't have 100 MP. That's what's needed to ensure all songs are recordable.
7. If you haven't yet explored the fireplace, it'll use an adventure to get the normal adventure there. Then it'll proceed as normal.
8. It turns out I don't actually need variables for how many of the daily casts have already been used, since that information is all on the recording page. The used-up songs will be listed in the summary for non-automation, though.
Any feedback, advice, or testing is appreciated. As I said, this is my first full script, so I might be doing it all wrong.
Here's my first full script. I wasn't sure which forum it would best fit under, so if this is wrong, just move it.
After an Accordion Thief has completed the Nemesis quest, they have the opportunity to record limited-cast songs as items. The purpose of this script is to automate this process. It first changes your gear and restores MP. Then it goes to that special page and checks what songs you have available for casting. For each of these, it calculates if it's actually worthwhile to record it. If yes, it records as many as possible, leaving and returning if necessary.
Some notes:
1. You have to be an AT who finished the Nemesis quest to use the script. It determines this by checking if you have The Trickster's Trikitixa.
2. It uses the UR's _meatpermp if available but otherwise assumes you have MMJ access for purposes of the cost calculations
3. It prompts you about actually automating the process. If you say no, it'll just calculate the profitability of your available songs but won't actually record anything.
4. It tries to get both effects that reduce MP costs and those that increase max MP, strongly weighted by the MP costs. I do this with "maximize -1000 mana cost, 1 mp". I actually have no idea how the maximize command really works, so this is mostly a guess. A correction here would be most welcome.
5. It aborts if you try the automation but have no adventures left or are drunk. You can still see the summary, though.
6. It aborts if you don't have 100 MP. That's what's needed to ensure all songs are recordable.
7. If you haven't yet explored the fireplace, it'll use an adventure to get the normal adventure there. Then it'll proceed as normal.
8. It turns out I don't actually need variables for how many of the daily casts have already been used, since that information is all on the recording page. The used-up songs will be listed in the summary for non-automation, though.
Any feedback, advice, or testing is appreciated. As I said, this is my first full script, so I might be doing it all wrong.
Attachments
Last edited: