Adding items to favorites...

Paragon

Member
First, does kolmafia handle this in anyway already? I wasn't able to find anything to do it, so I tried going the pretty standard route of visit_url...
So... as far as i can tell the relevent url would be : inventory.php?action=faveit&whichitem=<itemId> (Scraped from inventory.php (roughly line 83))

So I have six ridiculously huge sword, item id 762459396 (found from desc_item, whichitem)

So far that sounds correct right? Anyway, visiting that url returns "You don't have any of those, how do you know it's a favorite?"
Anyone have any thoughts on why this might be happening? I also attempted visist_url("inventory.php?ajax=1&action=faveit&whichitem=762459396&pwd="+my_has()) with the same results.
 

Veracity

Developer
Staff member
762459396 is the "descid" for item #586. The descid is used ONLY for calling desc_id.php. The other number is the itemid, which is used every single other place that KoL wants to specify an item.

Try "ash to_int( $item[ridiculously huge sword ] )" to see the itemid.
Try "ash $item[ridiculously huge sword ].descid" to see the descid, although that is generally not what you want.
 

Paragon

Member
Thanks, that works. I kind of thought about that, but it was the same param name in that and desc_item so I thought it refered to the same value... thanks though
 
Top