PDA

View Full Version : Puttin' on the jammies! (aka dressing for rollover)



Tirian
05-04-2006, 05:27 AM
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. :o

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.

arrggg
05-04-2006, 01:58 PM
Are you Tirian (#773334)
Level 11
Sub-Apprentice Accordion Thief?

if so I got something to send you.

Tirian
05-04-2006, 02:37 PM
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.

[hr]
Please do not double post. instead use the modify link
[hr]

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
07-13-2006, 11:03 AM
does this work with clockwork clothing?

Tirian
07-13-2006, 12:00 PM
Why would you want to wear clockwork clothing for rollover?

edit: testing

gergith
07-13-2006, 01:06 PM
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
07-13-2006, 01:17 PM
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
07-19-2006, 06:21 PM
Tirian, love you scripts! Can you put all your updated scripts into one post!


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

GhettoTrucker
07-19-2006, 06:45 PM
Nobody likes my scripts? lol..I'm getting better!

GhettoTrucker
07-19-2006, 07:52 PM
yeah i know. just play'n around!

gergith
07-20-2006, 04:59 AM
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
07-27-2006, 09:10 PM
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
07-27-2006, 11:40 PM
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....)
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
07-28-2006, 12:22 AM
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....)


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:


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

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

arrggg
07-28-2006, 04:34 PM
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?".


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.




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.


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

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


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.

GhettoTrucker
07-28-2006, 06:52 PM
So thier is a way to script the "pulverizing" action?

macman104
07-29-2006, 03:43 AM
So thier is a way to script the "pulverizing" action?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
07-29-2006, 04:18 AM
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
01-05-2007, 04:15 PM
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
01-25-2007, 12:24 AM
Very nice script. It forgot about one sword though. I added...


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

and


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.
[hr]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.

dangerpin
06-03-2007, 03:23 PM
Help! I love this script and need help keeping it alive.

Right now, when I try to use it, I get this:

Undefined reference 'current_equipment' (jammiesa.ash, line 25)

This references this line:

if (current_equipment(sl)==it) return true;

I've tried searching through the change logs and was unable to find where this was changed but it happened several daily builds ago. Any push would be appreciated.

[edit]
Ok I found this, which explains it http://kolmafia.us/index.php/topic,938.0.html

I changed the script to conform to the new function names and took out the wonderfully useful (and much missed on my part) trapper functions and it seems to work fine.

I attached the file so anyone new to this script can see the final details.

ewall
05-06-2008, 03:45 AM
(Necro!)

Thanks for the tip, dangerpin. I just realized I had deleted my old jammies.ash script, and needed to find another copy.

BTW, here's a tweak of this script--instead of dressing for adventures, you can get your farmer suit on (i.e. dress for increased item drops). YMMV.

Paragon
05-09-2008, 04:23 AM
@ewall:
Just so you know, I have a script called maximize.ash, maybe you should check it out if you like this script. Maximize.ash Will let you put on the best suit for just about anything that kolmafia's item file has information on. +Adv, +item, +meat, +moxie/muscle/myst, +resistance, +damage, etc. etc. Plus It has additional functionallity of allowing you to choose specific items to ommit (if you need to merge it with a particular outfit or somesuch.) All the items are choosen while giving thought toward intrinsic effects, outfit bonuses and all that jazz.