New Content - Implemented New Hangk's and Closet Interface

Hangk's and your Closet are now very similar to your Inventory in how they're displayed. This may make handling the new interfaces easy, or hard, depending on what work KoLmafia has to do to parse them.
 

Fuzz Monkey

New member
The new update seems to have broken Mafias item manager. I can't select any food, use milk or such from the menu. And when I tried to drink it que'd but didn't actually do anything in the cli. Also having trouble with the gear changer.

I'm guessing the urls have changed just enough to throw things off.
 

slyz

Developer
This is what I have gathered so far:

Moving one item from inventory to closet:
Code:
inventory.php?action=closetpush&whichitem=6&qty=1
closet.php?action=closetpush&whichitem=6&qty=1

Moving one item from closet to inventory:
Code:
closet.php?action=closetpull&whichitem=6&qty=1

I couldn't find how to move several items at once.

EDIT:
putting 100 meat in closet:
Code:
closet.php?addtake=add&action=addtakeclosetmeat&quantity=100

taking 100 meat from closet:
Code:
closet.php?addtake=take&action=addtakeclosetmeat&quantity=100

EDIT2: huh... when I have a ravioli hat in my closet and visit this url in the mini browser or with a visit_url(), it says "You don't have any of those in your closet.".
Code:
"closet.php?action=closetpull&whichitem=6&qty=1&pwd="+my_hash()
Clicking on the "Take [one]" link when I'm in the closet in the mini-browser also gives this message.

When I visit the same link through the relay browser, this is the URL requested (seen in the debug log):
Code:
-----From Browser-----
GET /closet.php?action=closetpull&whichitem=6&qty=1&pwd=*redacted*&ajax=1&_=*redacted* HTTP/1.1
 
Last edited:

Ferdawoon

Member
The Hermit messing up my Breakfast

r9246
Tried to log in today and found that for some reason the Hermit is giving me trouble with my breakfast..
Meat is not a problem so it is not because I ran out of Meat and cant buy more gums or hermit permits.

Code:
Validating login server (www.kingdomofloathing.com)...
Redirected to www3.kingdomofloathing.com...
465 players online.
Sending login request...
Initializing session for ferdawoon...
Refreshing session data...
Loading character status...
Synchronizing moon data...
Retrieving character data...
Refreshing closet...
Updating inventory...
Retrieving familiar data...
Familiar data retrieved.
Retrieving campground data...
Session data refreshed.
Refreshing stash contents...
Stash list retrieved.
Oyster Egg Day today, Muscle bonus today and yesterday.
Using 1 cheap toaster...
You acquire an item: toast
Finished using 1 cheap toaster.
Using 1 cheap toaster...
You acquire an item: toast
Finished using 1 cheap toaster.
Using 1 cheap toaster...
You acquire an item: toast
Finished using 1 cheap toaster.
Visiting Mr. Klaw "Skill" Crane Game in clan rumpus room
Visiting Mr. Klaw "Skill" Crane Game in clan rumpus room
Visiting Mr. Klaw "Skill" Crane Game in clan rumpus room
Visiting Potted Meat Tree in clan rumpus room
You gain 1,031 Meat
Visiting Deluxe Mr. Klaw "Skill" Crane Game in clan VIP lounge
You acquire an item: stuffed treasure chest
Visiting Deluxe Mr. Klaw "Skill" Crane Game in clan VIP lounge
Visiting Deluxe Mr. Klaw "Skill" Crane Game in clan VIP lounge
Using 1 set of jacks...
You gain 25 Smarm
Finished using 1 set of jacks.
Using 1 Chester's bag of candy...
You acquire an item: Angry Farmer candy
You acquire Tasty Fun Good rice candy (2)
You acquire Yummy Tummy bean (2)
Finished using 1 Chester's bag of candy.
Using 1 burrowgrub hive...
Finished using 1 burrowgrub hive.
Searching for "chewing gum on a string"...
Search complete.
Putting on Travoltan trousers...
Equipment changed.
Purchasing chewing gum on a string (1 @ 47)...
You acquire an item: chewing gum on a string
You spent 47 Meat
Purchases complete.
Using 1 chewing gum on a string...
You acquire an item: worthless gewgaw
Finished using 1 chewing gum on a string.
Robbing the hermit...
Searching for "hermit permit"...
Search complete.
Purchasing hermit permit (1 @ 95)...
You acquire an item: hermit permit
You spent 95 Meat
Purchases complete.
Robbing the hermit...
Searching for "chewing gum on a string"...
Search complete.
Purchasing chewing gum on a string (3 @ 47)...
You acquire chewing gum on a string (3)
You spent 141 Meat
Purchases complete.
Placing items into closet...
Transfer failed for worthless gewgaw
Unable to acquire 4 worthless items.

Restarting the Breakfast gave me this.
Code:
> breakfast

Robbing the hermit...
Visiting Potted Meat Tree in clan rumpus room
Robbing the hermit...
Robbing the hermit...
Using 1 set of jacks...
Robbing the hermit...
Robbing the hermit...
Finished using 1 set of jacks.
Using 1 Chester's bag of candy...
Robbing the hermit...
Robbing the hermit...
Finished using 1 Chester's bag of candy.
(usable quantity of burrowgrub hive is limited to 0 by daily limit)
Robbing the hermit...
Robbing the hermit...
Placing items into closet...
Robbing the hermit...
Robbing the hermit...
Transfer failed for worthless gewgaw
Robbing the hermit...
Using 3 chewing gum on a string...
Robbing the hermit...
Robbing the hermit...
You acquire an item: worthless trinket
You acquire an item: worthless knick-knack
You acquire an item: pasta spoon
Robbing the hermit...
Finished using 3 chewing gum on a string.
Unable to acquire 4 worthless items.

Harvesting your garden
Robbing the hermit...
You acquire an item: pumpkin
Robbing the hermit...
Casting Advanced Cocktailcrafting 5 times...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
You acquire an item: little paper umbrella
You acquire an item: little paper umbrella
Robbing the hermit...
You acquire an item: little paper umbrella
You acquire an item: little paper umbrella
You acquire an item: coconut shell
Robbing the hermit...
Advanced Cocktailcrafting was successfully cast.
Robbing the hermit...
Robbing the hermit...
Casting Advanced Saucecrafting 5 times...
Robbing the hermit...
You acquire scrumptious reagent (5)
Robbing the hermit...
Advanced Saucecrafting was successfully cast.
Robbing the hermit...
Casting Pastamastery 5 times...
Robbing the hermit...
You acquire dry noodles (5)
Robbing the hermit...
Robbing the hermit...
Pastamastery was successfully cast.
Robbing the hermit...
Casting Summon Crimbo Candy 1 times...
Robbing the hermit...
You acquire an item: Crimbo fudge
You acquire an item: Crimbo peppermint bark
You acquire an item: Crimbo peppermint bark
Robbing the hermit...
Summon Crimbo Candy was successfully cast.
Robbing the hermit...
Casting Lunch Break 1 times...
Robbing the hermit...
Robbing the hermit...
You acquire an item: sack lunch
Robbing the hermit...
Lunch Break was successfully cast.
Robbing the hermit...
Casting Summon Sugar Sheets 3 times...
Robbing the hermit...
Robbing the hermit...
You acquire sugar sheet (3)
Summon Sugar Sheets was successfully cast.
Robbing the hermit...
Casting Summon Hilarious Objects 1 times...
Robbing the hermit...
You acquire an item: defective skull
You acquire an item: magical ice cube with a fly in it
You acquire an item: rubber emo roe
Robbing the hermit...
Summon Hilarious Objects was successfully cast.
Robbing the hermit...
Robbing the hermit...
Casting Summon Tasteful Items 1 times...
Robbing the hermit...
You acquire an item: blue plasma ball
You acquire an item: Loudmouth Larry Lamprey
You acquire an item: cheap studded belt
You acquire an item: foam dart
You acquire an item: personal massager
Robbing the hermit...
Summon Tasteful Items was successfully cast.
Robbing the hermit...
Casting Summon Alice's Army Cards 1 times...
Robbing the hermit...
You acquire an item: Pack of Alice's Army Cards
You acquire an item: Ye Wizard's Shack snack voucher
Robbing the hermit...
Summon Alice's Army Cards was successfully cast.
Robbing the hermit...
Casting Summon Party Favor 11 times...
Robbing the hermit...
Robbing the hermit...
You acquire an item: divine noisemaker
You acquire an item: divine champagne flute
You acquire an item: divine noisemaker
You acquire an item: divine noisemaker
You acquire an item: divine cracker
You acquire an item: divine blowout
You acquire an item: divine noisemaker
You acquire an item: divine champagne flute
You acquire an item: divine noisemaker
You acquire an item: divine can of silly string
You acquire an item: divine noisemaker
Robbing the hermit...
Robbing the hermit...
Summon Party Favor was successfully cast.
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...

A complete restart of Mafia at least made it keep on going and triggered my Login script, but still no luck with the clovers.

Code:
Validating login server (www2.kingdomofloathing.com)...
Redirected to www6.kingdomofloathing.com...
466 players online.
Sending login request...
Initializing session for ferdawoon...
Refreshing session data...
Loading character status...
Synchronizing moon data...
Retrieving character data...
Refreshing closet...
Updating inventory...
Retrieving familiar data...
Familiar data retrieved.
Retrieving campground data...
Session data refreshed.
Refreshing stash contents...
Stash list retrieved.
Oyster Egg Day today, Muscle bonus today and yesterday.
Visiting Potted Meat Tree in clan rumpus room
Using 1 set of jacks...
Finished using 1 set of jacks.
Using 1 Chester's bag of candy...
Finished using 1 Chester's bag of candy.
(usable quantity of burrowgrub hive is limited to 0 by daily limit)
Robbing the hermit...
Searching for "chewing gum on a string"...
Search complete.
Purchasing chewing gum on a string (1 @ 47)...
You acquire an item: chewing gum on a string
You spent 47 Meat
Purchases complete.
Placing items into closet...
Transfer failed for worthless trinket
Transfer failed for worthless gewgaw
Transfer failed for worthless knick-knack
Unable to acquire 4 worthless items.
769 prices updated from http://kolmafia.us/scripts/updateprices.php?action=getmap
 
Last edited:

Bale

Minion
The problem is that KoL just broke mafia.

If you take a look at the announcements on the main page you'll see that there was some inventory changes. Mafia is trying to closet items for more efficient hermiting and it isn't working well. Hopefully mafia will be updated soon.

It is still possible to get clovers, but only 1 at a time. In the CLI type: hermit 1 clover
Repeat this until you get them all. It will then operate properly. It's an troublesome work-around, but so be it.
 
Last edited:

Darzil

Developer
Actually, doing it once is all you need, as it's only an issue as there are 4 clovers today, so Mafia normally closets one. Just get a clover, then log out and in again for breakfast to get the other three without closetting, or do /use 3 chewing and then revisit hermit for the last.
 

lopey

New member
Closet change breaks inventory move to closet

The method for adding stuff to the closet has changed with CDMoyer's revamp of the inventory.

I *think* the change can be incorporated by making these changes in ClosetRequest.java:

Line 81 : super( "fillcloset.php", attachments );
Line 98: this.addFormField( "action", "closetpush" );

However, I'm a bit afraid of checking out to see if that'd work.
 

slyz

Developer
The major issue is that you can't move several different items in one request anymore, so the whole handling of "attachments" needs to be changed =/

EDIT: ooh, "fillcloset" works now! I guess that yet another way of moving items to the closet:
Code:
inventory.php?action=closetpush&whichitem=6&qty=1
closet.php?action=closetpush&whichitem=6&qty=1
fillcloset.php?action=closetpush&whichitem=6&qty=1
 
Last edited:

Fuzz Monkey

New member
Strange. Today the item manager is working fine for food and booze. No changes beyond quitting Mafia again then playing several hours later.
 

Winterbay

Active member
As long as your items are in your inventory there is no reason why it should have problems. The only problems likely to occur is if you have items in hagnks or the closet that you want to use.
 

fianor

Member
Closet issues

So whatever they did in the last few days makes put_closet () not work. My cleanup script has for a long time put choice items in my closet with this:

Code:
batch_open();
foreach keepsake in $items[baseball, meat vortex, sonar-in-a-biscuit, leftovers of indeterminate origin, barbed-wire fence, black pepper, bronzed locust, disease, fancy bath salts, frigid ninja stars, hair spray, Knob Goblin firecracker, mariachi G-string, NG, photoprotoneutron torpedo, powdered organs, pygmy blowgun, razor-sharp can lid, spider web, stick of dynamite, tropical orchid, gremlin juice, wussiness potion, Yummy Tummy bean, picture of a dead guy's girlfriend, pygmy pygment, super-spiky hair gel, adder bladder, Black No. 2, handsomeness potion, Meleegra, pickle-flavored chewing gum, marzipan skull, tamarind-flavored chewing gum, lime-and-chile-flavored chewing gum, Angry Farmer candy, marzipan skull, Tasty Fun Good rice candy, Yummy Tummy bean, stick of "gum", Daffy Taffy, bubbly potion, cloudy potion, dark potion, effervescent potion, fizzy potion, milky potion, murky potion, smoky potion, swirly potion, club necklace, diamond necklace, heart necklace, spade necklace, pack of KWE trading card, rubber WWBD? bracelet, rubber WWJD? bracelet, rubber WWSPD? bracelet, rubber WWtNSD? bracelet, stuffed angry cow, stuffed astral badger, stuffed baby gravy fairy, stuffed Cheshire bitten, stuffed cocoabo, stuffed flaming gravy fairy, stuffed frozen gravy fairy, stuffed hand turkey, stuffed MagiMechTech MicroMechaMech, stuffed mind flayer, stuffed scary death orb, stuffed sleazy gravy fairy, stuffed snowy owl, stuffed spooky gravy fairy, stuffed stinky gravy fairy, stuffed undead elbow macaroni, stuffed treasure chest, stuffed key, stuffed Baron von Ratsworth, stuffed crazy bastard sword, stuffed martini, stuffed meat, stuffed mink, stuffed monocle, stuffed teddy butler, stuffed tin of caviar, bejeweled cufflinks, designer handbag, jazz soap, fake fake vomit, yellow snowcone, bag of airline peanuts, clown hammer, fake hand, rubber emo roe, whoopie cushion, joybuzzer, pet rock "snooty" disguise, explosion-flavored chewing gum, magical ice cube with a fly in it, wind-up chattering teeth, brick, pet rock "Groucho" disguise, defective skull, amulet of yendor, x-ray specs, encoder ring, mood ring, cymbal syrup, black candy heart, Crimbo Candy Cookbook, Jack-in-the-box, peanut brittle shield, red-and-green sweater, Red Rover BB Gun]
	if ( item_amount( keepsake ) > 0 ) put_closet( item_amount( keepsake ) , keepsake );
batch_close();

I now get:
Code:
Placing items into closet...
Transfer failed for stuffed Baron von Ratsworth
Transfer failed for stuffed tin of caviar
Transfer failed for jazz soap
Transfer failed for fake hand
Transfer failed for whoopie cushion
Transfer failed for explosion-flavored chewing gum
Transfer failed for Amulet of Yendor
Transfer failed for x-ray specs
Transfer failed for Red Rover BB gun

when it gets to that part of the script.

changing to this:

if ( item_amount( keepsake ) > 0 ) cli_execute ("/closet "+keepsake);

seems to have put the items in my closet, but I don't think it will put multiples of an item in, and also later in the script I got:

Code:
Sorry, I can't figure out which item you mean. Please try and enunciate. ("stuffed Baron von Ratsworth")
Sorry, I can't figure out which item you mean. Please try and enunciate. ("stuffed tin of caviar")
Sorry, I can't figure out which item you mean. Please try and enunciate. ("jazz soap")
Sorry, I can't figure out which item you mean. Please try and enunciate. ("fake hand")
Sorry, I can't figure out which item you mean. Please try and enunciate. ("whoopie cushion")
Sorry, I can't figure out which item you mean. Please try and enunciate. ("explosion-flavored chewing gum")
Sorry, I can't figure out which item you mean. Please try and enunciate. ("Amulet of Yendor")
Sorry, I can't figure out which item you mean. Please try and enunciate. ("x-ray specs")
Sorry, I can't figure out which item you mean. Please try and enunciate. ("Red Rover BB gun")

I don't really know why it would be going back to that at all. Not sure but I think the script ran twice and that was the 2nd run response.

Any ideas?
 

Bale

Minion
Well known problem. It is being discussed in the Bug Reports Forum.

There really isn't anything else to say since we're waiting on an update for KoLmafia and we don't really need more threads to discuss that issue so I'll merge this.
 
Last edited:

slyz

Developer
Ever since r8932.
By looking up this release note, I also discovered there is a chat_macro( string ) ASH function (rather than use a cli_execute() ).

EDIT: you might want to do an inventory refresh once you are done closeting items with chat commands, because Mafia isn't tracking items that are moved from your inventory to the closet.
 
Last edited:

Veracity

Developer
Staff member
Revision 9247 supports the new Closet. I think.

I was putting off working on this because I hoped somebody else would do it, since KoL rolled out the feature about an hour before I needed to go to bed, since I was getting up at 4:30 AM the next morning to catch a plane and I wasn't going to have time to work on it. And since I am on vacation, I don't really have time to put in more than a "band aid".

Except that this "band aid" took more than 6 hours of coding. It turned out to be incredibly complicated.

- You have fetch the closet in 3 pages, just as we used to have to fetch the inventory, before we started using the "inventory" option of api.php. I think I need to ask CDM to make "closet" and "storage" options to api.php, so we can go back to doing one fast page load to get those, again, rather than 3 each.
- You can pull stuff from the closet from closet.php and put stuff in with fillcloset.php - and those are what you get if you are in the Relay Browser manipulating your closet - but you can also do either of those from inventpry.php - and that is what chat commands give you.
- You can only transfer 1 kind of item at a time. So much for doing up to 11 at a time.
- And the kicker, which cost me multiple hours to figure out - you have to submit transfers to or from the closet via GET.

Having done all of the above, I suspect that Storage will be straight forward. But, I do not have any characters with anything in Storage. I will ascend one of them on Tuesday - but into Hardcore (of course!), which means I'll be able to figure out how to browse Storage at that time, but won't be able to actually pull anything for another 4 or 5 days.

I cannot afford to spend any more time on this for the duration of this vacation/visit.
 

Bale

Minion
Veracity, thank you for this. We love you for spending so much time fixing this much. Enjoy your vacation.
 

Winterbay

Active member
Having done all of the above, I suspect that Storage will be straight forward. But, I do not have any characters with anything in Storage. I will ascend one of them on Tuesday - but into Hardcore (of course!), which means I'll be able to figure out how to browse Storage at that time, but won't be able to actually pull anything for another 4 or 5 days.

I cannot afford to spend any more time on this for the duration of this vacation/visit.

I thank you very much for this update. I did take a look at the code in an attempt to come up with a solution but it was way over my head in terms of coding and knowing now that it was hard for you as well makes me very happy I didn't try poking at it...

Also, I guess you can at least test for free pulls which might at least get you an indication on how things work.
 
Top