Display Case

Metraxis

Member
For some reason, the attached script has stopped working in the last few versions of KolMafia. Is this intentional?

Short explanation:
In preparation for a visit to Hagnk's, this script attemps to:
A: Use up the character's supply of certain items,
B: Put a number of items into the display case (this is the part that is failing), then
C: Autosell a number of items which are available for sale in NPC stores.
 

Attachments

  • Cleanup.ash
    3.3 KB · Views: 85
I'm not sure about anything being broken, but I do know that what I did here: http://kolmafia.us/index.php/topic,188.0.html still works, and will work faster than what you have, and is much kinder to the servers. It's a subscript, so the changes to your script in order to use it would be:

at the very top of the script:
Code:
import <displayarray.ash>;

The function put_museum
Code:
void put_museum(item candidate) {
	if(item_amount(candidate) > 0 ) {
		print(item_to_string(candidate));
		ItemAdd(candidate, 0);
	}
}

Then after all calls to put_museum add the command:
Code:
executedisplay();
Oh and be sure you D-L the script from the link above.

the reason for 0 instead of item_amount can be read about in the thread linked to above.
 

Metraxis

Member
Ah. I can see why yours works and mine doesn't. Since I defeated Her Naughtiness again just last night, I was able to try things out, and it appears that 'no-trade' items like the badass belt, Bonerdagon necklace, anything made of Stainless Steel, etc. won't go into the case via the GUI interface either (ie When you select the item in the Item Manager Tab/Window and hit 'display case', nothing constructive happens).

As for changing it to be server-friendlier, I'm thinking of constructing a list in a string and passing that via cli_execute(), unless there is a version of put_display() that will take a map (say int [item]) as a parameter.
 

macman104

Member
Here's a script, that I had written but was rewritten by Holatuwol to be more server-friendly exactly as you just described, by passing it to cli_execute.

I have a shelf for items I used against the naughty sorceress, so that's what the unequip and all are. But that's the general thing, and I have a template in there as well.
 

Attachments

  • DisplayAdd.ash
    5.2 KB · Views: 93

Metraxis

Member
Interesting. I was no aware of delete, though it shouldn't be neccssary given the autosegmenting capability. I've gone ahead an reworked my own for friendliness, and we'll see in a couple days if the 'problem' items will go ino the case properly.
 

Attachments

  • Cleanup.ash
    3.1 KB · Views: 87
Top