WTF Relay script collection

I have the Mayo, understand the problem, and jut have not found the time to get the fix in (or really play any KoL turns lately). This and Bale's / heeheehee's shop item materials table are still on my todo list.
 
Well, I bought a miracle whip some time ago, so it is no longer in my Mayo store, which makes this hard to debug until I ascend again. Can someone post the html of this section?
 
shop.php?whichshop=mayoclinic

HTML:
<body>
<centeR><table  width=95%  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>The Mayo Clinic</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td><center><table width=80%><tr><td valign=top><img src=/images/otherimages/../adventureimages/mayoclinic.gif width=100 height=100 alt="" title=""></td><td valign=top><center><b></b></center><p>You enter your workshed, and as your eyes adjust to the darkness you survey the various components of your Mayo Clinic.
<p>
A coffin-sized glass tank of translucent goo sits in one corner, next to one vending machine labeled "Prescription Mayonnaise Dispensary" and another labeled "Medical Device Rental."
<p>
A beam of blue light sweeps across your body from a complicated-looking device on a stainless steel table, and a few seconds later it beeps and says "Current blood mayonnaise concentration: 67 mayograms per deciliter" in a monotone voice.<form action=shop.php><input type=hidden name=action value=bacta><input type=hidden name=whichshop value=mayoclinic><input type=submit class=button value='Soak in the Mayo Tank (1/day)'></form></td></tr></table><form name=bigform action=shop.php method=post><input type=hidden name=pwd value=b2306707a32720a5e7c7155e80b51cd0><input type=hidden name=whichshop value="mayoclinic"><input type=hidden name=action value=buyitem><br><table cellspacing=2 cellpadding=0><tr><td></td><td colspan=2 align=center><b>Item:</b> (click for description)</td><td colspan=10 align=center><b>Price:</b></td></tr><tr><td colspan=14 height=1 bgcolor=black> </td></tr><tr><td colspan=14 align=center>— <b>Prescription-Strength Mayo</b> —</td></tr><tr><td colspan=14 height=1 bgcolor=black> </td></tr><tr rel="8261"><td valign=center></td><td><img src="/images/itemimages/mayo1.gif" class=hand onClick='javascript:descitem(342184917)'></td><td valign=center><a onClick='javascript:descitem(342184917)'><b>Mayonex</b> (0)    </a></td><td><img src=/images/itemimages/meat.gif width=30 height=30 alt="Meat" title="Meat"></td><td><b>950</b>  </td><td></td><td>  </td><td></td><td>  </td><td></td><td>  </td><td></td><td>  </td><td valign=center><input class="button doit multibuy "  type=button rel='shop.php?whichshop=mayoclinic&action=buyitem&quantity=1&whichrow=716&pwd=b2306707a32720a5e7c7155e80b51cd0' value='Buy'></td></tr><tr rel="8262"><td valign=center></td><td><img src="/images/itemimages/mayo2.gif" class=hand onClick='javascript:descitem(586340786)'></td><td valign=center><a onClick='javascript:descitem(586340786)'><b>Mayodiol</b> (0)    </a></td><td><img src=/images/itemimages/meat.gif width=30 height=30 alt="Meat" title="Meat"></td><td><b>950</b>  </td><td></td><td>  </td><td></td><td>  </td><td></td><td>  </td><td></td><td>  </td><td valign=center><input class="button doit multibuy "  type=button rel='shop.php?whichshop=mayoclinic&action=buyitem&quantity=1&whichrow=717&pwd=b2306707a32720a5e7c7155e80b51cd0' value='Buy'></td></tr><tr rel="8263"><td valign=center></td><td><img src="/images/itemimages/mayo3.gif" class=hand onClick='javascript:descitem(704639252)'></td><td valign=center><a onClick='javascript:descitem(704639252)'><b>Mayostat</b> (0)    </a></td><td><img src=/images/itemimages/meat.gif width=30 height=30 alt="Meat" title="Meat"></td><td><b>950</b>  </td><td></td><td>  </td><td></td><td>  </td><td></td><td>  </td><td></td><td>  </td><td valign=center><input class="button doit multibuy "  type=button rel='shop.php?whichshop=mayoclinic&action=buyitem&quantity=1&whichrow=718&pwd=b2306707a32720a5e7c7155e80b51cd0' value='Buy'></td></tr><tr rel="8264"><td valign=center></td><td><img src="/images/itemimages/mayo4.gif" class=hand onClick='javascript:descitem(277017070)'></td><td valign=center><a onClick='javascript:descitem(277017070)'><b>Mayozapine</b> (0)    </a></td><td><img src=/images/itemimages/meat.gif width=30 height=30 alt="Meat" title="Meat"></td><td><b>950</b>  </td><td></td><td>  </td><td></td><td>  </td><td></td><td>  </td><td></td><td>  </td><td valign=center><input class="button doit multibuy "  type=button rel='shop.php?whichshop=mayoclinic&action=buyitem&quantity=1&whichrow=719&pwd=b2306707a32720a5e7c7155e80b51cd0' value='Buy'></td></tr><tr rel="8265"><td valign=center></td><td><img src="/images/itemimages/mayo5.gif" class=hand onClick='javascript:descitem(818467537)'></td><td valign=center><a onClick='javascript:descitem(818467537)'><b>Mayoflex</b> (0)    </a></td><td><img src=/images/itemimages/meat.gif width=30 height=30 alt="Meat" title="Meat"></td><td><b>950</b>  </td><td></td><td>  </td><td></td><td>  </td><td></td><td>  </td><td></td><td>  </td><td valign=center><input class="button doit multibuy "  type=button rel='shop.php?whichshop=mayoclinic&action=buyitem&quantity=1&whichrow=720&pwd=b2306707a32720a5e7c7155e80b51cd0' value='Buy'></td></tr><tr rel="8285"><td valign=center></td><td><img src="/images/itemimages/mayominder.gif" class=hand onClick='javascript:descitem(243508620)'></td><td valign=center><a onClick='javascript:descitem(243508620)'><b class=questitem><b>Mayo Minder™</b></b> (0)    </a></td><td><img src=/images/itemimages/meat.gif width=30 height=30 alt="Meat" title="Meat"></td><td><b>94</b>  </td><td></td><td>  </td><td></td><td>  </td><td></td><td>  </td><td></td><td>  </td><td valign=center><input class="button doit  "  type=button rel='shop.php?whichshop=mayoclinic&action=buyitem&quantity=1&whichrow=725&pwd=b2306707a32720a5e7c7155e80b51cd0' value='Buy'></td></tr><tr><td colspan=14 height=1 bgcolor=black> </td></tr><tr><td colspan=14 align=center>— <b>Medical Supply Rental (1/day)</b> —</td></tr><tr><td colspan=14 height=1 bgcolor=black> </td></tr><tr rel="8267"><td valign=center></td><td><img src="/images/itemimages/mayocuff.gif" class=hand onClick='javascript:descitem(861428060)'></td><td valign=center><a onClick='javascript:descitem(861428060)'><b class=questitem><b>sphygmayomanometer</b></b> (0)    </a><br><small class=desc>Lasts Until Rollover, Stats +87%</small></td><td><img src=/images/itemimages/meat.gif width=30 height=30 alt="Meat" title="Meat"></td><td><b>2,375</b>  </td><td></td><td>  </td><td></td><td>  </td><td></td><td>  </td><td></td><td>  </td><td valign=center><input class="button doit  "  type=button rel='shop.php?whichshop=mayoclinic&action=buyitem&quantity=1&whichrow=722&pwd=b2306707a32720a5e7c7155e80b51cd0' value='Buy'></td></tr><tr rel="8268"><td valign=center></td><td><img src="/images/itemimages/mayohammer.gif" class=hand onClick='javascript:descitem(236443644)'></td><td valign=center><a onClick='javascript:descitem(236443644)'><b class=questitem><b>tomayohawk-style reflex hammer</b></b> (0)    </a><br><small class=desc>Lasts Until Rollover</small></td><td><img src=/images/itemimages/meat.gif width=30 height=30 alt="Meat" title="Meat"></td><td><b>2,375</b>  </td><td></td><td>  </td><td></td><td>  </td><td></td><td>  </td><td></td><td>  </td><td valign=center><input class="button doit  "  type=button rel='shop.php?whichshop=mayoclinic&action=buyitem&quantity=1&whichrow=723&pwd=b2306707a32720a5e7c7155e80b51cd0' value='Buy'></td></tr><tr rel="8269"><td valign=center></td><td><img src="/images/itemimages/mayolance.gif" class=hand onClick='javascript:descitem(740009343)'></td><td valign=center><a onClick='javascript:descitem(740009343)'><b class=questitem><b>mayo lance</b></b> (0)    </a><br><small class=desc>Lasts Until Rollover</small></td><td><img src=/images/itemimages/meat.gif width=30 height=30 alt="Meat" title="Meat"></td><td><b>2,375</b>  </td><td></td><td>  </td><td></td><td>  </td><td></td><td>  </td><td></td><td>  </td><td valign=center><input class="button doit  "  type=button rel='shop.php?whichshop=mayoclinic&action=buyitem&quantity=1&whichrow=724&pwd=b2306707a32720a5e7c7155e80b51cd0' value='Buy'></td></tr><tr rel="8266"><td valign=center></td><td><img src="/images/itemimages/mayowhip.gif" class=hand onClick='javascript:descitem(183199398)'></td><td valign=center><a onClick='javascript:descitem(183199398)'><b>miracle whip<font color=red size=-2><b>Only 1 left in stock!</b> (0)</font></b>    </a></td><td><img src=/images/itemimages/meat.gif width=30 height=30 alt="Meat" title="Meat"></td><td><b>9,500</b>  </td><td></td><td>  </td><td></td><td>  </td><td></td><td>  </td><td></td><td>  </td><td valign=center><input class="button doit  "  type=button rel='shop.php?whichshop=mayoclinic&action=buyitem&quantity=1&whichrow=721&pwd=b2306707a32720a5e7c7155e80b51cd0' value='Buy'></td></tr></table></form></form><div id="ass" style="font-size: .8em; text-align: center; width: 100%">*Right-Click to Multi-Buy</div><p><A href=campground.php>Back to your campsite</a></center></td></tr></table></center></td></tr><tr><td height=4></td></tr></table></center><script>
jQuery(function ($) {
	var ass = false;
	$('.doit').bind('contextmenu', function (e) {
		e.preventDefault();
		var l = $(this);
		pop_query(l, 'How Many?', 'Buy', function (num) {
			var url = l.attr('rel');
			url = url.replace(/quantity=1/, 'quantity=' + num);
			parent.mainpane.location=url;
		})
	}).each(function () {
		//$(this).val($(this).val() + '*');
		ass = true;
	}).click(function (e) {
		e.preventDefault();
		if (e.shiftKey) {
			var t= this;
			setTimeout(function () { $(t).trigger('contextmenu');}, 500);
			return;
		}
		var url = $(this).attr('rel');
		parent.mainpane.location=url;
	});

	if (!ass) { $('#ass').hide() }

});
</script>
</body>
 
I just got the third and final outfit piece to drop from the Barrelmech and when I clicked on the "outfit" link in the relay browser the following displayed in the gCLI:

Code:
Inventory WTF: item "<b class=itnotrade>Cooper's Couture</b>" not found.
 
FWIW, I just gave clan_viplounge.ash a look-over and it didn't look too tricky, so I added the following code. It works quite nicely. Though I'm not sure if it is up to your standards.

PHP:
	if (contains_text(page,"You check the readout on the Floundry's fabrication unit:")) {
		foreach dk in $strings[carpe, codpiece, troutsers, bass clarinet, fish hatchet, tunac] {
			page.replace_string(">"+dk+"</b>", ">"+dk+"</b><br><small class=desc>"+ParseMods(string_modifier(to_item(dk), "Evaluated Modifiers"))+"</small>");
		}
	}
 
Last edited:
I noticed there were a lot of gaps in my familiars' descriptions from WTF Familiars. As a familiar collector, it was bugging me. So, I took the liberty of filling these in. I'm sure there's a better way of sorting them. I leave that up to whoever wants to take the time to do so. :p

Code:
                        if ($familiars[Reconstituted Crow, Reassembled Blackbird] contains fam) { faminfo += "<span class=famnot> MAP </span>"; }
			if ($familiars[Disembodied Hand] contains fam) { faminfo += "<span class=famnot> WEAPONS </span>"; }
			if ($familiars[Fancypants Scarecrow] contains fam) { faminfo += "<span class=famnot> PANTS </span>"; }
			if ($familiars[Mad Hatrack] contains fam) { faminfo += "<span class=famnot> HATS </span>"; }
			if ($familiars[Intergnat] contains fam) { faminfo += "<span class=famspleen> BACON </span>"; }
			if ($familiars[Mini-Crimbot, Crimbo Shrub, Mini-Adventurer] contains fam) { faminfo += "<span class=famnot> CONFIG </span>"; }
			if ($familiars[Doppelshifter, Comma Chameleon] contains fam) { faminfo += "<span class=famnot> IMITATE </span>"; }
			if ($familiars[O.A.F.] contains fam) { faminfo += "<span class=famnot> OPTIMAL </span>"; }
			if ($familiars[Stab Bat, Scary Death Orb] contains fam) { faminfo += "<span class=famhp> TRAITOR </span>"; }
			if ($familiars[Exotic Parrot] contains fam) { faminfo += "<span class=famblock> ELEM RES </span>"; }
			if ($familiars[Teddy Bear, Evil Teddy Bear, Teddy Borg, Origami Towel Crane] contains fam) { faminfo += "<span class=famblock> BLOCK </span>"; }
			if ($familiars[Oily Woim] contains fam) { faminfo += "<span class=famstat> +INIT </span>"; }
			if ($familiars[Purse Rat] contains fam) { faminfo += "<span class=famnot> +ML </span>"; }
			if ($familiars[Fuzzy Dice] contains fam) { faminfo += "<span class=famnot> 2-12 </span>"; }
			if ($familiars[Robot Reindeer, El Vibrato Megadrone] contains fam) { faminfo += "<span class=famnot> PROGRAM </span>"; }
			if ($familiars[Wild Hare, Squamous Gibberer, Temporal Riftlet] contains fam) { faminfo += "<span class=famdrop> +ADV </span>"; }
			if ($familiars[Nosy Nose] contains fam) { faminfo += "<span class=famdev> SNIFF </span>"; }
 
It's not a big thing, but shopwtf complains about the skills not being items when I go into the mutation shop in Nuclear Autumn. I fix it with this very simple hack, at the top of ShopWTF()

Code:
buffer ShopWTF(buffer page) {
	// Don't attempt to describe skills in Nuclear Autumn's mutation shop
	if(page.contains_text("Fiddling With Your Genes"))
		return page;
 
I have not yet entered Nuclear Autumn, and I am on vacation next week, but I'll add his to my list. Hopefully by the time I am back I can include a skill description function for ShopWTF()
 
That would be wonderful! I knew that would be the correct solution, but I didn't have the energy to figure it out so I settled for removing the error messages.
 
ShopWTF has been updated to handle the skills. At least, it does not throw an error, and add descriptions for things mafia knows about (buffs and passive skills).
 
When playing Batfellow without ShopWTF installed, it is possible to buy more than one of each item at the Bat-Fab in the Bat-Cavern, or in Downtown Gotpork at the Gotpork Orphanage, ChemiCorp, or Gotpork P.D., provided you have enough items to trade in. The button is grayed out when you need more items.
When playing Batfellow with ShopWTF, the button to buy more of each item disappears entirely when you visit the shop with one of that item in inventory. The button reappears if you use the item and have zero of it in your inventory.

Steps to reproduce (bat-fab):
1) Use a Batfellow comic to play Batfellow
2) After clicking through a choice, you should end up in the Bat-Cavern. Click on the Bat-Fab image. (shop.php?whichshop=batman_cave)

Expected Result: Each of the buttons to build bat items should be grayed out (since you don't have enough materials to do them)

Actual Result: The buttons to build bat items are missing entirely.

Similar results can be found in the orphanage, Chemicorp, and Gotpork P.D:

Steps to reproduce (Orphanage):
1) Use a Batfellow comic to play Batfellow
2) In the bat-cavern, Click on Bat R&D terminal.
3) Click on Bat-sedan upgrades
4) Click on the "Orphan Scoop" upgrade to buy it.
5) Back to Main R&D Menu -> Stop Researching and Developing
6) Click on Bat Sedan
7) Click on Downtown. You should collect more than one orphan along the way.
8) If you don't have more than one orphan, travel back to the bat cavern, then back to Downtown to get more.
9) Click on Gotpork orphanage.
10) Acquire an exploding kickball.
11) Click Back to Downtown Gotpork.
12) Click on Gotpork orphanage.

Expected result: Acquire button for exploding kickball is still clickable (since you have at least 1 kidnapped orphan in inventory)

Actual result: Acquire button for exploding kickball doesn't exist.

You can see similar results when buying the "ultracoagulator" at Chemicorp for dangerous chemicals or the "fingerprint dusting kit" at Gotpork P.D. for incriminating evidence.

I can kmail a batfellow comic for testing if needed. As long as you finish without defeating a boss, (by ejecting from the bat sedan screen) you should get another batfellow comic for further testing.
 
This is what I did to my shop.ash to circumvent this:
Code:
import <shopwtf.ash>;

void main()
{
        //print("This is a STORE!","green");
        buffer page;
        page.append(visit_url());
        if (limit_mode() == "batman") {
                page.write();
                return;
        }
        ShopWTF(page).write();
}
 
I don't have that problem because I've long since commented out line 25 in my copy.

Code:
	# if (it.quest && available_amount(it)>0) { return true; }

Quite frankly, if I was to advise the writer of this script... I'm not sure why you think that is always a good idea, but I think it would be better to hardcode the list of items for which you could get more than 1, but don't ever want more. (Which items are they?) Jick is adding more and more items as quest items, not because they are linked to a quest, but just because he wants them to go away at ascension.
 
ok, loooong ago when I originally wrote the script, part of the motivation was to make sure I never accidentally bough 2 of the same Hero keys by mistake (inspired by doing that once and ruining a run). Now that there are quest items everywhere in this game, I agree it would be better to have a hardcoded list.

You can tell this is old because it still checks for only needing 1 star weapon and a star hat :-)

the new list is this:
  • The Big Book of Pirate Insults,
  • Massive Manual of Marauder Mockery,
  • Boris's key,
  • Jarlsberg's key,
  • Sneaky Pete's key,
  • Richard's star key,
  • digital key,
  • UV-resistant compass,


Anything else that should be added that you will only ever need 1 of in a run?
 
Last edited:
Back
Top