New Content - Implemented Sept 13: Stocking your Mall store from Hagnk's

Veracity

Developer
September 13
The Mall store management interface has been redone, and you can now stock your store from Hagnk's.
When I go to "manage my store", on the Add Stock page, the dropdown includes items both in inventory and in Hagnk's

7-Foot Dwarven mattock (2)
7-Foot Dwarven mattock (13 in hagnk's)

The first is option "362" (the item number.
The second is option "h362"

Code:
<option value="362" rel="mattock,979636979,180,2">7-Foot Dwarven mattock (2)</option><option value="h362" rel="mattock,979636979,180,13">7-Foot Dwarven mattock (13 in hagnk's)</option>

I added one of the mattocks from Hagnk's. This URL was submitted:

Code:
http://www.kingdomofloathing.com/backoffice.php?itemid=h362&price=180&quantity=1&limit=&pwd&action=additem&ajax=1&_=1380989819462
The Results said:

(1) 7-Foot Dwarven mattock stocked for 180 meat each.

with this responseText:
Code:
<td style="color: white;" align=center bgcolor=blue><b>Results:</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td>(1) 7-Foot Dwarven mattock stocked for 180 meat each.<!-- ...lotsa stuff...--></td>
I now see the mattock in my store inventory, complete with "update", "prices", "take1", and so on.

If I remove it, it submits this URL:

http://www.kingdomofloathing.com/backoffice.php?qty=1&pwd&action=removeitem&itemid=362&ajax=1&_=1380990316296

I see the following in the Relay Browser:

You acquire an item: 7-Foot Dwarven mattock [outfit]

However, when I look in the DEBUG log, I see:

Code:
You acquire an item: <b>7-Foot Dwarven mattock</b> (stored in Hagnk's Ancestral Mini-Storage)

KoLmafia put it into my inventory, rather than in storage.
 

Veracity

Developer
Does this work whenever you have something in storage, even if you are out of Hardcore/Ronin?

- Add "place in mall" button (just like inventory tabs) to storage tabs (and "closet item" should be "put in closet" to agree with inventory tabs)
- Store Manager/Additions currently shows only inventory. Need way to show either inventory or storage. In the latter case, no "autosell" button,
- Store Manager/Removals should include a comment "to Hagnk's" if in Hardcore or Ronin
- Recognize movement between mall store and inventory or storage in Relay Browser. Log the same way. Handle lists identically.
 

Veracity

Developer
Does this work whenever you have something in storage, even if you are out of Hardcore/Ronin?
Yes it does. I freed the king and went to manage my store and the dropdown to select items to stock it had both inventory and Hagnk's items.

Which is as it should be; why should you be forced to move things out of storage, even when you are not pull-limited? But it was worth checking.

Now, I assume that you cannot put things back into Hagnk's when you are out of Hardcore/Ronin; removing from the store will go into inventory, same as it always did, whether or not you originally pulled from Hagnk's to put it there; there is no "memory" about where the item originally came from.
 
Last edited:

Veracity

Developer
Revision 12887 should handle removing items from the mall that go into inventory or into Hagnk's.

Strangely enough, we do not handle putting items into your store from Hagnk's, yet, since there is a brand new message when you do that:

(1000) bottles of "DRINK ME" potion stocked for 999,999,999 meat each.
It's not "1000 bottles of "DRINK ME" potion" or ""DRINK ME" potion (1000)" - and the item is not bold text. This is brand new.

Later.
 

Veracity

Developer
Revision 12893 should handle putting items into the mall via backoffice.php. It recognizes whether the item comes from inventory or storage and whether you are specifying a quantity, price, or limit. It should keep inventory, storage, and your mall store up-to-date based on what you just did.

I still need to log transfers in and out of your mall store via backoffice.php reasonably in the session log, rather than just dumping the URL there.

And, all the GUI changes to allow stocking your store from Hagnk's storage that I mentioned above.
 

Veracity

Developer
So, I was curious to see that the new page to stock your store is backoffice.php, whereas the one that AutoMallRequest uses is managestore.php.

backoffice.php lets you stock a single item from either inventory or storage.
managestore.php lets you stock up to 11 items from inventory.

I don't see any indication that KoL exposes managestore.php to you anywhere, currently - but it still works.

I experimented to see if it had been updated to allow stocking from storage in the same way as backoffice.php: instead of itemid=1234, use itemid=h1234. No joy, unfortunately; it tells me that nothing I submitted could be put into the store.

I also noticed that managestore.php can be used with ajax=1, which does not give you your entire store inventory in the result. Much smaller result and much faster parsing for us, however. So, I modified AutoMall.php to submit with ajax and had it update KoLmafia's idea of your store contents based on what it put in with the request, rather than refreshing the whole thing. Obviously, you still need to actually refresh the store to see what the whole contents are - but that's always true; things can sell out from under you at any time. Revision 12901 does this.

Unfortunately, with backoffice.php's one item at a time limitation, the GUI for moving items from storage to your store will have to make one request per item, rather than batching them 11 per request, like managestore.php allows.
 

Veracity

Developer
Revision 12902 adds "place in mall" buttons to the various storage panels of the Item Manager.

I think the only thing left to be done is looking at the Additions and Removals panel of the Store Manager. For the former, add the ability to look at your storage and mallsell things from there. For the latter, perhaps just note that removed items will go back to Hagnk's if you are in Hardcore or Ronin.
 

Veracity

Developer
Revision 12904 splits the Additions tab into its own tabbed pane, with Inventory and Storage. The Storage tab has an "automall" button but no "autosell" button and uses backoffice.php to stock your store from Hagnk's, one item at a time, since that's how it works, unfortunately.

I think this completes support for this New Content.
 
Top