Puttin' on the jammies! (aka dressing for rollover)

Tirian

Member
As a newbie, I hardly need this for myself, but it was another fun exercise of the slot functionality. It will dress you in the optimal rollover outfit from the standpoint of maximizing the number of bonus adventures you will be given. Thankfully, it is a much more tractable problem than maximizing your moxie, since there are essentially only twelve equippable items at the moment.

This will check your base stats and only pull items out of storage if they will help you right now. It will favor the Time Trappings outfit if you happen to be able to equip the entire thing, and can take care of wielding dual time swords if you have the skill for it. In theory, it may equip the dead guy's watch even if you have one of the other watches, but only after checking every other option. I imagine that anyone who has one of the elite watches probably is also carrying the tiny plastic stuff as well, so it shouldn't come up except in extraordinary circumstances.

As I say, me testing this would be pretty much not worthwhile, so I am particularly at the mercy of you masters of the game. :eek:

Edit: version 1.1 of jammies is now up. Even if I didn't have much adventure equipment, yeesh, I could at least have checked for syntax errors. ::)

Edit2: Just updated to version 1.2, taking advantage of several sexay new ASH commands. Pretty much the same logic, though.

Edit 3: Another update, now doing the Bounty Hunter and Nash Crosby's Still along with getting dressed for bed. It's getting to be a nice last-thing-in-the-day script. I've also taken the functions that had been in TirianLib.ash and folded them back in here, so that the logic would be easier for language newbies to follow. I'm still doing exciting things with TirianLib and it'll turn into a new "release" as soon as I get all of the wrinkles ironed out of it.
 

Attachments

  • jammies.ash
    7.2 KB · Views: 457

arrggg

Member
Are you Tirian (#773334)
Level 11
Sub-Apprentice Accordion Thief?

if so I got something to send you.
 

Tirian

Member
That's me, although by the time you read this I might be a level 6 Thyme Wizard. :)

Edited to add: Ooh, a tiny plastic uncommon gear collecter is me!  I ran through the script and it properly equipped a chrome weapon, two tiny plastic things, and a dead guy's watch.  I'm not in ronin, but it's a promising result all the same.  I bumped up to version 1.1 of the script at the top of the thread.



Please do not double post. instead use the modify link



I just bumped up to version 1.2 of this script, which is much more readable than the previous version because of new ASH functions like can_equip() and pulls_remaining(). It's slightly more error-tolerant, but not necessarily worth downloading unless you want to see cleaner code samples.
 

gergith

New member
sorry, correct me if im wrong, but isnt this for nightly use? or is it for asscensions? cause clockwork clothing gives extra moves per day when worn together
 

Tirian

Member
It's the Time Trappings outfit that adds rollover adventures. Yes, if you've got that whole outfit then it will wear it for you. In fact, since the time sword is one-handed, the script will even wield two of them if you have the dual-wielding skill.

But the script is useful even if you don't, since it can manage other +adv stuff like chrome weapons, stainless steel solitaires, and dead guy's watches.

ETA: I've updated this script to cover a few more nice night-time activities, like dealing with the Bounty Hunter and finishing off the still. Enjoy!
 

arrggg

Member
Tirian, love you scripts! Can you put all your updated scripts into one post!


p.s. got some goodies I'm k-mailing you.
 

gergith

New member
as some ideas for future scripts how bout a series of these

+adventure script (this one)
+meat script (would just equip everything that + #% meat, like the rabbits foot)
+items
+food

so it just equips the best for thoe things
 

arrggg

Member
Tirian, please update this script to also eat(?) Your splean full if I have Twinkley Wads and splean left....
(probably one at a time, sence there is no real splean counter....)
 

macman104

Member
[quote author=arrggg link=topic=139.msg1707#msg1707 date=1154034628]
Tirian, would you consider updating this script to also eat(?) Your splean full if I have Twinkley Wads and splean left?
(probably one at a time, sence there is no real splean counter....)
[/quote]Fix'd, phrasing things as requests instead of "demands" is always a better way to get a response out of someone. If it wasn't meant as a demand, well, there wasn't really a question it was more just a statement of "do this please", instead of "would you do this?".
 

Tirian

Member
[quote author=arrggg link=topic=139.msg1707#msg1707 date=1154034628]
Tirian, please update this script to also eat(?) Your splean full if I have Twinkley Wads and splean left....
(probably one at a time, sence there is no real splean counter....)
[/quote]

Well, I'll tell you how to put it in your scripts, but I think you want to be careful with it because the price of the wads could easily rise above what you can make from a round of peak farming. I don't know if that's going to happen tomorrow or next week or not for another six months, but the world's inventory of unused enchanted equipment is going to dry up like an overtapped oil field, and you know what's going to happen then....

So, with that in mind, stick this line somewhere in your script and let me know:

Code:
while (cli_execute("use twinkly wad")) {}

I'll give it a shot when one of my characters gets out of ronin.
 

arrggg

Member
[quote author=macman104 link=topic=139.msg1709#msg1709 date=1154043614]
Fix'd, phrasing things as requests instead of "demands" is always a better way to get a response out of someone.  If it wasn't meant as a demand, well, there wasn't really a question it was more just a statement of "do this please", instead of "would you do this?".
[/quote]

Reading it now, it does sound like a demand... but it was ment as a request.
and for the record I do try to send things to Tirian(i.e. TP Crimbo Reindeer, Astral Mushrooms, etc...) to show my appreciation.


[quote author=Tirian link=topic=139.msg1710#msg1710 date=1154046143]
Well, I'll tell you how to put it in your scripts, but I think you want to be careful with it because the price of the wads could easily rise above what you can make from a round of peak farming.

Code:
while (cli_execute("use twinkly wad")) {}

I'll give it a shot when one of my characters gets out of ronin.
[/quote]

I'm sorry for not being clear...

(1) If I am a muscle sign (and have pulverise skill)
-- make all my twinkly powders into twinkly nuggets
-- make all my twinkly nuggets into twinkly wads

(2) If I have twinkly wad in my inv. then I would like to use it.
 

macman104

Member
[quote author=GhettoTrucker link=topic=139.msg1714#msg1714 date=1154112730]So thier is a way to script the "pulverizing" action?[/quote]I wasn't aware of any way to do that yet, however, if you have powders or nuggest, using the create command may utilize the malaus, although I can't say that will happen for sure.
 

Tirian

Member
A pulverize command was added to CLI. Y'all do know that the scripting manual referenced at the top of this and every page is back and fabulous, right?

I tested out the use command that I illustrated earlier, and the downside is that the use function doesn't return false if your spleen is full, so it would be unpleasant to hack around that. I submitted it as a bug report, and Holatuwol has addressed it, so it will be in the next release. In fact, it will be even better -- my understanding is that you'll be able to just use( 15, $item[ twinkly wad ]) and KoLmafia will take it upon itself to use them until you run out. So that's even easier to code than what I had once it goes live.
 

ewall

New member
Tirian, just wanted to say that this is still a spiffy script.

I just tweaked my copy to add the meatspout staff and the tiny plastic skeletal reindeer, no problem.

I wish I had more of this kind of script (or I should make them)... wouldn't it be handy to have one that looks through your inventory and equips you for fighting a specific element, or equips a specific stat to the max? The more I get into the scripting, the more I think I wanna do that, heh... but of course, you're already workin' on em!
 

dangerpin

Member
Very nice script. It forgot about one sword though. I added...

Code:
item prep_sword = $item[sword behind inappropriate prepositions];

and

Code:
if (wear_if_can_and_have(prep_sword, false)) return true;

To add in the "sword behind inappropriate prepositions", which is superior to the chrome sword as it gives +5 adv's at rollover, but is still two-handed.

In fact, I went ahead and added all the missing elements that I could think of, slapped an "a" after your version number, tested it out and here it is.

I'm pretty newbish but I don't think your setup left much room for messing things up too badly.
 
Top