Feature Track which fruit is in Professor Jacking's machine

zarqon

Well-known member
I've recently been adding support for this quest to an omnibus script I'm working on, and adding said support would be much easier if mafia tracked which fruit is currently in Professor Jacking's pneumatic tube machine, for instance in a property called jackingFruit. To make this task easier, I've grabbed the relevant HTML below.

First of all, when you visit the machine (at inv_use.php?whichitem=4560&place=tubes&pwd) and there is a fruit in it:

Code:
<blockquote>In the center of the Professor's lab sits an elaborate machine riddled with pneumatic tubes.  The purposes of these tubes (and knobs and levers) are mostly inscrutable, but one tube, labeled "Fruit Intake Subsystem" gives you the impression that maybe you're supposed to stick fruit into it.<p><center><form action=inv_use.php method=post><input type=hidden name=action value=addfruit><input type=hidden name=pwd value=swordfish><input type=hidden name=whichitem value=4560><p>You can currently see a strawberry bouncing around inside the machine.<p>Fruits: <select name=whichfruit><option value=0>(select a fruit)</option><option value=242>orange (168)</option>

When the machine is empty, the "You can currently see" line is missing, as follows:

Code:
<blockquote>In the center of the Professor's lab sits an elaborate machine riddled with pneumatic tubes.  The purposes of these tubes (and knobs and levers) are mostly inscrutable, but one tube, labeled "Fruit Intake Subsystem" gives you the impression that maybe you're supposed to stick fruit into it.<p><center><form action=inv_use.php method=post><input type=hidden name=action value=addfruit><input type=hidden name=pwd value=swordfish><input type=hidden name=whichitem value=4560>Fruits: <select name=whichfruit><option value=0>(select a fruit)</option><option value=242>orange (168)</option>

Here's what adding fruit to the machine looks like:

Code:
<blockquote>The strawberry disappears into the tube and begins bouncing around noisily inside the machine.<p>You pull the map out and follow it to Professor Jacking's secret underground laboratory.<p><p><center><map name=jacking><area shape=rect coords="144,44,216,143" href="inv_use.php?whichitem=4560&place=tubes&pwd=swordfish" alt="Pneumatic Tube Interface" title="Pneumatic Tube Interface"><area shape=rect coords="27,99,138,201" href="adventure.php?snarfblat=227" alt="Small-O-Fier (1)" title="Small-O-Fier (1)"><area shape=rect coords="219,88,325,195" href="adventure.php?snarfblat=228" alt="Huge-A-Ma-Tron (1)" title="Huge-A-Ma-Tron (1)"><area shape=rect coords="233,204,300,303" href="inv_use.php?whichitem=4560&place=mirror&pwd=swordfish" alt="Jacking's Mirror (5)" title="Jacking's Mirror (5)"></map><img src="/images/otherimages/maps/jackinglab_open.gif" width=350 height=395 border=0 usemap=#jacking></center></blockquote>

Note that when I inserted cranberries, the message was "The cranberries disappears into the tube", and clicking the machine again said "You can currently see a cranberries bouncing around..." so looks like no need to special case the matcher for plurals.

Last thing for the machine. Here's what replacing an existing fruit looks like:

Code:
<blockquote>The tomato is sucked into the tube, displacing the cranberries that was bouncing around in the machine.  You wonder where it went.<p>You pull the map out and follow it to Professor Jacking's secret underground laboratory.<p><p><center><map name=jacking><area shape=rect coords="144,44,216,143" href="inv_use.php?whichitem=4560&place=tubes&pwd=swordfish" alt="Pneumatic Tube Interface" title="Pneumatic Tube Interface"><area shape=rect coords="27,99,138,201" href="adventure.php?snarfblat=227" alt="Small-O-Fier (1)" title="Small-O-Fier (1)"><area shape=rect coords="219,88,325,195" href="adventure.php?snarfblat=228" alt="Huge-A-Ma-Tron (1)" title="Huge-A-Ma-Tron (1)"><area shape=rect coords="233,204,300,303" href="inv_use.php?whichitem=4560&place=mirror&pwd=swordfish" alt="Jacking's Mirror (5)" title="Jacking's Mirror (5)"></map><img src="/images/otherimages/maps/jackinglab_open.gif" width=350 height=395 border=0 usemap=#jacking></center></blockquote>

There are three actions outside the machine which can empty the machine of whatever fruit is in it.

1) When you defeat the loose coalition of yetis, snowmen, and goats in combat (with Hurricane Force active and an appropriate fruit in the machine):

Code:
<!--WINWINWIN--><p>You beat down the group of creatures, and reach down to claim your prehistoric meteorite prize.<p>The swirling winds around you dislodge the meteorite from the mountain, but you don't manage to catch it as it flies past you toward the ocean.  Fortunately (and confusingly,) a massive strawberry, just as big as the meteorite, arcs through the air out of nowhere, hitting it and bouncing it into your pocket.<center><table class="item" style="float: none" rel="id=4569&s=66&q=0&d=1&g=0&t=0&n=1&m=0&p=0&u=e"><tr><td><img src="/images/itemimages/marble2.gif" alt="tiny frozen prehistoric meteorite jawbreaker" title="tiny frozen prehistoric meteorite jawbreaker" class=hand onClick='descitem(889717914)' ></td><td valign=center class=effect>You acquire an item: <b>tiny frozen prehistoric meteorite jawbreaker</b> <font size=1>[<a href="javascript:singleUse('inv_eat.php','which=1&whichitem=4569&pwd=swordfish&ajax=1');void(0);">eat</a>]</font></td></tr></table></center>

b) When you Look for the Spider in choiceAdventure 452 and successfully kill it (following this choice with non-spider-killing fruit in the machine does not remove the fruit):

Code:
<table><tr><td><span class='guts'>You poke around the web, looking for the spider.  Just as you ask yourself why you're looking for a carnivorous, fanged creature that is now several times bigger than you, you find it!<p>Well, to be more accurate, <i>it</i> finds <i>you</i>.  It rears up, mandibles twitching, dripping venom, and leaps to strike!<p>Fortunately, a raisin comes flying out of one of the pneumatic tubes, sending the spider flying and taking its place in the web.</span></td></tr></table>

and III) When you choose the Escape option at the same choiceadv:

Code:
<table><tr><td><span class='guts'>You disentangle yourself from the web and look around.<p>Stuck to a nearby strand of web, you find 3 pieces of fruit -- huh.  That machine must've shrunk and duplicated the fruit you put in it, somehow.  You snag them.<center><table class="item" style="float: none" rel="id=3558&s=400&q=0&d=1&g=0&t=1&n=3&m=0&p=0&u=e"><tr><td><img src="/images/itemimages/lychee.gif" alt="sea lychee" title="sea lychee" class=hand onClick='descitem(231916006)' ></td><td valign=center class=effect>You acquire <b>3 sea lychees</b> <font size=1>[<a href="javascript:singleUse('inv_eat.php','which=1&whichitem=3558&pwd=swordfish&ajax=1');void(0);">eat</a>]</font></td></tr></table>

This last option will always result in an empty machine, no matter its original state.

Hopefully, armed with this detailed information, adding this tracking would be extremely not-annoying, and possibly even fun!

Thanks!
 
Top