Results from use()

dcorrin

New member
It seems that the boolean use(int, item) command has no provisions to return the results of the command.

For example use on the evilometer or on the dwarvish documents returns html which could theoretically be captured and analyzed by scripts.

Is there any way to get this output?

I was working on a dwarvish mines script and the inability to post forms also caused a problem (not being able to load a hopper) but I worked around this by just asking for the user to fill each hopper before running the script, but then couldn't read the documents. I have since seen that the prefs file / properties seems to maintain information that are the results of the operations behind the scenes.
 
In order to put ore into the hoppers you need to use "visit_url()" with a construct like the following:
Code:
For putting ore in: dwarfcontraption.php?action=hopper0&action=dohopper0&howmany=1&whichore=asbestos
For pressing the red button: dwarfcontraption.php?action=panelright&action=doredbutton

The hoppers are numbered from 0-3.

I'm not sure how to read the documents but there is a script around that does similar things that you could look at I guess.
 
Okay thanks. I had tried a

Code:
visit_url("dwarfcontraption.php?action=hopper0&howmany=1&whichore=asbestos");

but that didn't work... I guess I was missing the second action command.

The
Code:
visit_url("inv_use.php?which=3&pwd&whichitem=3214");
I just tried worked great. (and got a bunch of inventory stuff I wasn't expecting).
 
Back
Top