Feature - Implemented Track limited AT song casts when making recordings

Limited use AT song uses are tracked in two different places, but neither get updated when recording a song at Puttin' on the Wax.

The current tracking was added as part of this feature request: http://kolmafia.us/showthread.php?9...dailylimit-and-timescast&highlight=dailylimit
The skill proxy records have "dailyuses" which shows uses remaining.
Also there are preferences which give the number of times the skill has been cast today.
Code:
_benettonsCasts
_companionshipCasts
_donhosCasts
_elronsCasts
_precisionCasts
_thingfinderCasts

It'd be cool if the existing tracking could take account of recordings (or if someone could tell me that it does track them and I'm just doing it wrong). :)
 

Darzil

Developer
The wiki lists messages like "You acquire some recordings of The Ballad of Richie Thingfinder". Is some replaced by the number actually received, or would we have to parse the source to get the list of things you can still create and reverse engineer it? If the latter, can someone post the source html ?
 

Veracity

Developer
Staff member
Taking the choice to go to the fireplace:

choice.php?pwd&whichchoice=418&option=3

Gives this response:

Code:
<body><Center><centeR><table  width=95%  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>Puttin' on the Wax</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td><center><img src="http://images.kingdomofloathing.com/adventureimages/gramophone.gif" width=100 height=100></center><p>You return to the fireplace and poke around for a bit, but you don't find anything interesting, at least until you accidentally knock over the bust of Mozart, which turns out to have a little chain running from the bottom of it down through a hole in the mantlepiece. When you tug on it, there's a loud <i>clunk</i> and the fireplace rotates ninety degrees, creating a passageway into a hidden room.<p>You duck through, and find that it's not really much more than a large closet; there's an antique (but high-quality) gramophone, which has been wired up to some hidden speakers in the walls. I guess the bandits like to pipe in some music on those evenings of relaxation.<p>On closer examination, it turns out the gramophone is even nicer than you thought -- it's got an etching cartridge you can replace the regular needle with, so you can record your own albums. And in fact, there's a large stack of blank wax disks sitting nearby. Convenient!<p>If you're going to record something, though, you figure it had better be one of your best numbers. This isn't an opportunity you can waste on something like Cletus's Canticle of Celerity. <p><script type="text/javascript">function doChoice()  ;</script><center><form action="choice.php" method="post">Play: <select name="whicheffect"><option value="-1">-- Choose a Song --</option><option value="530" >The Ballad of Richie Thingfinder (0/10)</option><option value="531" >Benetton's Medley of Diversity (0/10)</option><option value="614" >Donho's Bubbly Ballad (0/50)</option></select> <input type="text" size="3" value="1" name="times" /> times <input type=hidden name=pwd value='35de18c449372747ba9e42df5229dc39'><input type=hidden name=whichchoice value=440><input type=hidden name=option value=1><input class=button type=submit value="Put it on Wax"></form></center><center><form name=choiceform2 action=choice.php method=post><input type=hidden name=pwd value='35de18c449372747ba9e42df5229dc39'><input type=hidden name=whichchoice value=440><input type=hidden name=option value=2><input class=button type=submit value="Come Back Later"></form></center></td></tr></table></center></td></tr><tr><td height=4></td></tr></table></center></body>
Notice that there are two forms:

Code:
<form action="choice.php" method="post">Play: <select name="whicheffect"><option value="-1">-- Choose a Song --</option><option value="530" >The Ballad of Richie Thingfinder (0/10)</option><option value="531" >Benetton's Medley of Diversity (0/10)</option><option value="614" >Donho's Bubbly Ballad (0/50)</option></select> <input type="text" size="3" value="1" name="times" /> times <input type=hidden name=pwd value='35de18c449372747ba9e42df5229dc39'><input type=hidden name=whichchoice value=440><input type=hidden name=option value=1><input class=button type=submit value="Put it on Wax"></form></center><center><form name=choiceform2 action=choice.php method=post><input type=hidden name=pwd value='35de18c449372747ba9e42df5229dc39'><input type=hidden name=whichchoice value=440><input type=hidden name=option value=2><input class=button type=submit value="Come Back Later"></form>
Making three recordings of The Ballad of Richie Thingfinder:

choice.php?whicheffect=530&times=3&pwd&whichchoice=440&option=1

Gives this response:

You acquire <b>3 recordings of The Ballad of Richie Thingfinder</b>

Code:
<div id="results"><table  width=95%  cellspacing=0 cellpadding=0><tr><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><span class='guts'>You record a wonderful rendition of The Ballad of Richie Thingfinder.<center><Table><tr><td><img src="http://images.kingdomofloathing.com/itemimages/mp.gif" height=30 width=30></td><td valign=center class=effect>You lose 150 Mojo Points.</td></tr></table></center><center><table class="item" style="float: none" rel="id=4497&s=78&q=0&d=1&g=0&t=1&n=3&m=1&p=0&u=u"><tr><td><img src="http://images.kingdomofloathing.com/itemimages/record.gif" alt="recording of The Ballad of Richie Thingfinder" title="recording of The Ballad of Richie Thingfinder" class=hand onClick='descitem(997530659)'></td><td valign=center class=effect>You acquire <b>3 recordings of The Ballad of Richie Thingfinder</b></td></tr></table></center></span></td></tr></table></center></td></tr><tr><td height=4></td></tr></table></div>

and updates the forms:

Code:
<form action="choice.php" method="post">Play: <select name="whicheffect"><option value="-1">-- Choose a Song --</option><option value="530" selected="selected">The Ballad of Richie Thingfinder (3/10)</option><option value="531" >Benetton's Medley of Diversity (0/10)</option><option value="614" >Donho's Bubbly Ballad (0/50)</option></select> <input type="text" size="3" value="1" name="times" /> times <input type=hidden name=pwd value='35de18c449372747ba9e42df5229dc39'><input type=hidden name=whichchoice value=440><input type=hidden name=option value=1><input class=button type=submit value="Put it on Wax"></form></center><center><form name=choiceform1 action=choice.php method=post><input type=hidden name=pwd value='35de18c449372747ba9e42df5229dc39'><input type=hidden name=whichchoice value=440><input type=hidden name=option value=1><input class=button type=submit value="Put it on Wax"></form><form name=choiceform2 action=choice.php method=post><input type=hidden name=pwd value='35de18c449372747ba9e42df5229dc39'><input type=hidden name=whichchoice value=440><input type=hidden name=option value=2><input class=button type=submit value="Come Back Later"></form>
Notice that there are now THREE forms: the one with the dropdown, a count, and a Put it on Wax button, a lone "Put it on Wax" button with no "whicheffect" or "times" controls, and a "Come Back Later" button.

I clicked on the lone "Put it on Wax" button and it brought me to the Fireplace just as if it was the first visit. Seems sort of pointless, but, whatever.

When I tried casting 8 more Ballad of Richie Thingfinder, I was told:

You can only cast that 7 more times today.

So, basically, if the response includes "You acquire", we can either parse the acquisition or the submitted URL to see what song we recorded and how many. If we get "You can only cast that X more times today", we can parse that and correct the daily limit for the song that we can extract from the URL.

One more thing - when I cast 7 more Ballad of Richie Thingfinder, it no longer appears in the dropdown.
 
Top