Feature - Implemented Mr. Store should be a Coin Master

Veracity

Developer
Staff member
It's just like the other fourteen we already have: you trade non-Meat currency for items. Just like every one of the others, it has its own wrinkle: in Mr. Store, the inventory changes each month.

We already have a MrStoreRequest. This registers visits to (and purchases from) Mr. Store. It already parses the merchandise display when you visit in the Relay Browser and registers new items - including picking out the Mr. A cost (which it currently ignores).

I think the built-in merchandise for Mr. Store in coinmasters.txt could have only the stuff which is ALWAYS there, and when you "check", it visits and adds anything else - the current IOTM and the two current FOTYs. If we force the user to "check", we don't have to update the data every time an IOTM or FOTY is replaced. Although, considering that we DO submit support for new items as soon as we can after they're released, this could just be one more change to be included in the initial commit for the new items.

Given the massive refactoring of the Coinmaster implementation I just completed, this should be very easy.

Now, adding a "pull" button to take a Mr. A from Hagnk's, like Mr. Store has in the native interface, would be a little more work, but would be nice. That, too, would be a first: a different GUI element in a particular CoinMasterPanel.
 

Veracity

Developer
Staff member
I'm now thinking of not building anything into the data files and having it build the current list when you press the "visit" button. That will guarantee that what you see is exactly what is available right now.

If I'm not mistaken, isn't the CAF always displayed but sometimes enabled and sometimes disabled? *checks* Yes indeed.

Turns out, a "pull" button will not be hard, now that I've added a "skeeball" button to the Ticket Counter. Enabled if you have a Mr. A in storage and are either out of Ronin, in Hardcore, or have a pull left today in Softcore. I'll have to buy a Mr. A and ascend with it to put it in storage...
 

Bale

Minion
The current two IotMs.

There's the case of the April 1st, the late-and-overlapping, and the VIP double.

Alice's Army and the booster box were also a double IotM.

Also... You are forgetting the extremely rare TRIPLE Iotm. This past April 1 there were three items: The Clan Shower, VIP Key and tiny costume wardrobe.

Since there was once a triple IotM for a day, that means you need to be prepared for the possibility of any number. It would also be wise to be prepared for the idea that we might get a strange IotM that costs an unusual number of Mr. Accessories. After all, the clan items cost 3 MRAs. Someday we might see another item that has an unusual cost. Also, Jick was discussing dropping the price of the regular offerings to 1. So you'll need to make sure that prices are always checked as well.
 
Last edited:

Veracity

Developer
Staff member
Revision 9477 adds Mr. Store as a coin master. We have no initial idea of what is on offer there, but if you visit (in the Relay Browser or via the "visit" button on the Coin Master frame), we look at the stock and populate the item & price lists and the offerings magically appear on the Mr. Store tab of the Coin Master frame.

There is also a "pull" button which is disabled unless you have a Mr. A in storage. If you do, it is enabled, and it will pull a single Mr. A into inventory.

Considering that I have no Mr. As - either in storage or in inventory - at the moment, the actually pulling (and purchasing) is untested. When I free the king, I'll buy a couple of Mr.As and ascend with them and will test both of those things when the next IOTM rolls out.
 

morgad

Member
The 'pull' button was enabled, so I pressed it (I have a Mr A in storage)

Code:
class java.lang.IllegalAccessException: Class net.sourceforge.kolmafia.swingui.button.InvocationButton can not access a member of class net.sourceforge.kolmafia.swingui.CoinmastersFrame$MrStorePanel with modifiers "public"
java.lang.IllegalAccessException: Class net.sourceforge.kolmafia.swingui.button.InvocationButton can not access a member of class net.sourceforge.kolmafia.swingui.CoinmastersFrame$MrStorePanel with modifiers "public"
	at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
	at java.lang.reflect.Method.invoke(Method.java:588)
	at net.sourceforge.kolmafia.swingui.button.InvocationButton.run(InvocationButton.java:106)
	at net.sourceforge.kolmafia.swingui.button.ThreadedButton.actionPerformed(ThreadedButton.java:76)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
	at java.awt.Component.processMouseEvent(Component.java:6289)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
	at java.awt.Component.processEvent(Component.java:6054)
	at java.awt.Container.processEvent(Container.java:2041)
	at java.awt.Component.dispatchEventImpl(Component.java:4652)
	at java.awt.Container.dispatchEventImpl(Container.java:2099)
	at java.awt.Component.dispatchEvent(Component.java:4482)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
	at java.awt.Container.dispatchEventImpl(Container.java:2085)
	at java.awt.Window.dispatchEventImpl(Window.java:2478)
	at java.awt.Component.dispatchEvent(Component.java:4482)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
	at java.awt.EventQueue.access$000(EventQueue.java:85)
	at java.awt.EventQueue$1.run(EventQueue.java:603)
	at java.awt.EventQueue$1.run(EventQueue.java:601)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
	at java.awt.EventQueue$2.run(EventQueue.java:617)
	at java.awt.EventQueue$2.run(EventQueue.java:615)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
best regards
Dave
 

Veracity

Developer
Staff member
Ah ha. Well, I know exactly what the problem is. I had the same issue with the "skeeball" button. Thanks!
Revision 9478.
 

morgad

Member
r9479: it no longer crashes :)
I am in HC, I pressed 'visit' then 'pull'

Visiting Mr Store
Mr. Store successfully looted!
Pulling items from storage...
Requests complete.

the Mr A has stayed in storage

Dave
 

Veracity

Developer
Staff member
(He's in Hardcore.) It says "That action would exceed your item limit. I think you should only take 0."

Apparently, using a standard "pull" from storage doesn't work. Fortunately, your debug log includes the Mr. Store page and I see that there is a special URL for pulling a Mr. A from Storage.

mrstore.php?action=pullmras&pwd

I'll see what I can do.
 

Veracity

Developer
Staff member
OK, Revision 9480 supposedly supports mrstore.php?action=pullmras and uses that for the "pull" button in the Mr. Store panel of the Coin Master frame.

I wonder if that works for Softcore, too? As I understand it, you can still pull a Mr. A from storage in Mr. Store in Softcore, but it actually consumes a daily pull.
 
I thought the only reason Mr. Store let you pull a Mr. A from storage was to actually use it to purchase something from Mr. Store. The Mr. A never actually enters your inventory during the transaction, iirc.
 

Veracity

Developer
Staff member
That IS how the Traveling trader treats twinkly wads: you can buy stuff with them using wads in storage and doing so deducts them right from storage, but Mr. Store is different: they go into inventory. If you are in Hardcore, Mr. Store tells you:

You are in Hardcore mode, and you have at least one Mr. Accessory in Hagnk's Ancestral Mini-Storage. Click here to pull one of your Mr. Accessories out of storage. You won't be able to equip them, but you'll be able to spend them in Mr. Store.
I don't know what it says in Softcore, as I am only now, for the first time in many years, doing a series of Softcore runs, and I have none in storage at the moment. But I do know that you can pull a Mr. A, just like in Hardcore, but because you CAN equip it, it counts as one of your daily pulls, if you are in Ronin.

Hmm. Traveling Trader, eh? He's another "Event" Coin Master - with the added wrinkle that not only is his inventory different each time, but he CAN have a different currency each time. I wish I had a saved debug log of visiting him.

Oh, looky here: TravelingTraderRequest has comments with everything I need to know - and already parses out the item he's trading for and the price (in that item) of each offering.

I could make that into another Coin Master easily enough, I think - although I have no idea when I'd be able to test it. :)
 

morgad

Member
r9480, pull button works in HC :) Thank Veracity

(Did not test the 'buy' button - nothing in the store I want till next month)

Dave
Q: add a 'buy Mr A.' button linking to the 'donate' link in the relay browser?
 

lostcalpolydude

Developer
Staff member
Using 9480, I just bought a mysterious chest with a Mr. A using coinmasters, so that works.

During a softcore run, Mr. Store says nothing about pulling any Mr. As that you happen to have in storage.

Q: add a 'buy Mr A.' button linking to the 'donate' link in the relay browser?
If that does get added, I think it should say 'donate for Mr. A' to make it clear what the button does, though I guess the worst case is closing a harmless browser window. Otherwise some people might worry that it will buy one from the mall and avoid it.
 
Top