MuseumStockUp v1.95

Alright, I have completely rewritten this script to use Maps.

The result is a faster, and more server friendly item manager.

There are a handfull of user defined functions at the top.

havemuseum() You will want to set this to true if you want the script to place items in your display case. [default false]
havestore() You will want to set this to true if you want the script to place any excess items in your store. [default false]
museumquant() The minimum* amount of any given item you want in your DC. [default 1]
closetquant() The minimum* amount of any given item you want in your closet. [default 10]
storeprice() The price you want to put all of your excess items into your shop for. [default is 0 - NOTE: On tests this put items that were not already in the store in the shop at 999999999. I would hope that if you already have items in your shop at another price that it would add them in at that price... But it might change them to 999999999]
storelimit() The limit you want to set on all items that you put into your store with this script. [default 0]

*I say minimum, because the script will not remove any items from DC or closet. If you have more than the specified quantity in there, it will not add more.


Now, mafia detects if the DC hasn't been opened and does so as necessary. I still recommend trying to remember to open the DC first, instead of having the script interupted to do so. So far everything works fine either way... But who knows what the future may bring? ;)

When run, the script will display a few lines. It is advisable to run it with the Graphical CLI window open.

Under normal operation there should be four lines at the beginning:

Code:
Building lists... (1)
Building lists... (1000)
Building lists... (2000)
Building lists... (3000)

This is normal, and you can ignore the numbers in parenthesis. They are for debugging purposes.

Then you will see variable lines depending on how you have configured the script, and what you have in your inventory at the time.

But, if it is trying to put items in your DC, you should see one or more lines of the following:
Code:
Displaying items... (some number)

The number in parenthesis is for debugging purposes, but it should count down by 11 each time if you get more than one line.

Then if there are items for your closet:
Code:
Closeting items... (some number)
Treat it like the DC lines.

And same for the store:
Code:
Putting items in your store... (some number)


And that should do it.

My plans for the near future are to add in two functions to check if an item is a quest item and if an item is a gift item. So that something appropriate can be done with them... Although I have no idea what.
 

Attachments

  • MuseumStockUpASH.ash
    4.4 KB · Views: 118
Holatuwol clarified the built in museum management functions here: http://kolmafia.us/index.php/topic,188.msg1057.html#msg1057 the way he set it up the need for directly running links for the museum is not needed. this fact will allow kolmafia's item database to stay up to date. Their are a lot of plusses to using the built in feature you can easily build the list and execute the whole thing in 1 call to kolmafia. kolmafia will split it up for you. I just haven't updated my script to reflect this new knowledge.
 
Yes, Holatuwol did clarify the management functions.

But if you read my post at the end of your referenced thread, you will see that I am still waiting to hear if there is a way to implicitly state how many of a given item are sent to the museum.

As it stands, all of a listed item get sent.

Which leaves me with two basic choices.

1) Leave the script as is

-OR-

2) Reverse the order (or at least move the museum part to the end) and rethink all of my logic... Which still leaves me in the quandary as what to do with gift items that do not belong anywhere else. (As it stands, all extra gift items would be sent to the DC, as opposed to sitting in your inventory to decide what to do with.)


Of course, I could have missed something in Holatuwol's post, and I will go and reread it.
 
Top