PDA

View Full Version : Forging, OHE script



Gammit
05-25-2007, 10:08 PM
Here's a simple script to forge dagger-blades of bronze. It'll go get money when you run out, and all that great stuff. It doesn't currently buy new glyphs, but that's an easy fix. If you want it to forge something else, the relevant parts should be easy enough to find (the amount withdrawn, the order #, etc). Enjoy.

Note: Not Wizard-FE-compatible, since it uses the wait functionality of SF to pass RT. Works only in the Landing. Have your forging-hammer either in your hands or on your belt, and make sure you have a belt slot to wear it with (or else it'll hang when cutting bars). Don't have random crap in your hands (bars or the hammer should work, anything else is no go). Start in the forge (when I'm not lazy, I'll allow it to be started from the stall or the workshop).



counter set 0

glance:
match trashblade dagger-blade in your left
match gethammer nothing in your right hand
match gethammer down at your empty hands
match getbar and nothing in your left hand.
match stare and a bronze bar in your left hand.
match stare and a flattened bronze bar in your left
match swap bronze bar in your right
match swap forging-hammer in your left
match 1sttongs scribed bronze bar in your left hand.
match 2ndtongs hammered bronze bar in your left hand.
match glance wait...
put glance
matchwait

gethammer:
match nohammer Remove what?
match nohammer You aren't wearing that
match glance forging-hammer from your belt
put remove forging-hammer
matchwait
goto error

getbar:

match getbucket you see a cork plug.
match nogetbucket and some water.
match pullplug you see
put look in trough
matchwait

pullplug:
put pull plug
waitfor You pull the drain plug
put drop oil
goto getbucket

getbucket:
put get bucket
nogetbucket:
wait
match getmorebars Get what?
match glance You remove a
match nogetbucket ...wait
put get bronze bar from back
matchwait
goto error

swap:
put swap
match swap ...wait
match glance You swap a
matchwait
goto error

stare:
put artisan skills
wait
match trashbar Before the design is complete
match 1sttongs Your material is marked with
match stare ...wait
put stare blade-glyph
matchwait
goto error

1sttongs:
wait
match 1sttongs ...wait
match 2ndtongs You finish this round
match rentexpire The tongs don't budge!
put get tongs
matchwait
goto error

2ndtongs:
wait
match 2ndtongs ...wait
match glance You sigh, then return the
match glance With a satisfying * HISS
match glance The steady ring of hammer on bronze ends abruptly
match rentexpire The tongs don't budge!
put get tongs
matchwait
goto error

error:
echo funky shit
end:
exit

getmorebars:
move go door
move out
getmorebarsstall:
put order 2
wait
match rentexpiregetbars But you do not have enough silver!
match getmorebars2 Samilla exclaims, "Sold for 90 silvers!"
put buy
matchwait

getmorebars2:
match rentexpire You don't have enough silver
match barcutting Realizing you still have some time remaining,
match barcutting the clerk collects 300 silvers from you
put put my bar in my backpack
wait
put go workshop
matchwait
goto end

nohammer:
echo Wear your forging-hammer before starting
goto end

rentexpire:
put put bar in my back
move go door
move out
rentexpireoutside:
move south
move south
move south
move out
move south
move west
move south
move west
move west
move west
move west
move go bank
move go arch
put deposit all
wait
put withdraw 400
put check balance
wait
move go arch
move out
move east
move east
move east
move east
move north
move east
move north
move go gate
move north
move north
move north
move go workshop
insideworkshop:
move go door
goto glance
goto error

trashblade:
move go door
put put dagger-blade in bin
move go door
goto glance

trashbar:
move go door
put put bar in bin
move go door
goto glance

rentexpiregetbars:
move south
move south
move south
move out
move south
move west
move south
move west
move west
move west
move west
move go bank
move go arch
put deposit all
wait
put withdraw 400
put check balance
wait
move go arch
move out
move east
move east
move east
move east
move north
move east
move north
move go gate
move north
move north
move north
goto getmorebarsstall

barcutting:
counter set 15
put wear forging-hammer
wait

put get bar from my backpack
pokecutter:
put swap
wait
#match pullcutterlast 3lb. piece and a 3lb. piece
match pullcutterlast 3lb. piece and a 4lb. piece
match pullcutterlast 3lb. piece and a 5lb. piece
match pullcutter 3lb. piece and a
match pushcutter lb. piece and a
match error 2lb. piece
match slabweight%c You've just reset the slab-cutter
put poke slab-cutter
matchwait

pullcutter:
put pull slab-cutter
wait
put put my second bar in my backpack
counter subtract 3
goto pokecutter

slabweight6:
pullcutterlast:
put pull slab-cutter
wait
put put my bar in my backpack
put put my bar in my backpack
goto insideworkshop

slabweight15:
slabweight14:
slabweight13:
slabweight12:
slabweight11:
slabweight10:
slabweight9:
slabweight8:
slabweight7:
pushcutter:
match pullcutterlast 3lb. piece and a 3lb. piece
match pullcutterlast 3lb. piece and a 4lb. piece
match pullcutterlast 3lb. piece and a 5lb. piece
match pullcutter 3lb. piece and a
match pushcutter lb. piece and a
match error 2lb. piece
put push slab-cutter
matchwait

slabweight5:
slabweight4:
slabweight3:
slabweight2:
slabweight1:
echo fm: Error cutting bar
exit
################################################## #######

Gammit
05-25-2007, 10:09 PM
Note that I haven't exhaustively tested this yet, so it might hang on things. The fixes should be easy enough to figure out; I doubt I severely screwed anything up.

Gammit
05-25-2007, 10:12 PM
Ok, scratch that, I forgot to put in the bar-cutting code. I'll add that now.

Gammit
05-25-2007, 10:36 PM
Done.

Gammit
05-25-2007, 10:58 PM
Added a line of code to prevent it from hanging when there's a scribed bar in the hand, rent expires, and the new forge has an empty trough.

FinisWolf
05-25-2007, 11:14 PM
Not slamming you, or your code, but how the hell does SF read that huge block of text? I thought it had to be broke down to single command per line in SF?

Finis

Gammit
05-26-2007, 01:06 AM
One more tiny change for a case that I'm way too drunk to explain, and that you'll probably never see.

Gammit
05-26-2007, 03:46 PM
Not slamming you, or your code, but how the hell does SF read that huge block of text? I thought it had to be broke down to single command per line in SF?

Not entirely sure I understand the question. Perhaps you're confusing a macro with a script?

TheEschaton
05-26-2007, 05:18 PM
How is this not compatible with Wizard FE? There's a wait function in that scripting language too.

Bobmuhthol
05-26-2007, 05:21 PM
<<Not slamming you, or your code, but how the hell does SF read that huge block of text?>>

<<Not entirely sure I understand the question.>>

Allow me to rephrase this for you.

WHAT THE FUCK ARE YOU TALKING ABOUT?

Gammit
05-26-2007, 06:45 PM
How is this not compatible with Wizard FE? There's a wait function in that scripting language too.

Well, let me revise by saying that I've done nothing to make it compatible with Wizard. I was under the impression that the wait functionality in Wizard didn't wait for the end of Roundtime the way that SF did. That was the case four years ago when I last used the Wizard, anyway.

FinisWolf
05-26-2007, 10:40 PM
I am talking about this BLOCK of text.



Code:
counter set 0 glance: match trashblade dagger-blade in your left match gethammer nothing in your right hand match gethammer down at your empty hands match getbar and nothing in your left hand. match stare and a bronze bar in your left hand. match stare and a flattened bronze bar in your left match swap bronze bar in your right match swap forging-hammer in your left match 1sttongs scribed bronze bar in your left hand. match 2ndtongs hammered bronze bar in your left hand. match glance wait... put glance matchwait gethammer: match nohammer Remove what? match nohammer You aren't wearing that match glance forging-hammer from your belt put remove forging-hammer matchwait goto error getbar: match getbucket you see a cork plug. match nogetbucket and some water. match pullplug you see put look in trough matchwait pullplug: put pull plug waitfor You pull the drain plug put drop oil goto getbucket getbucket: put get bucket nogetbucket: wait match getmorebars Get what? match glance You remove a match nogetbucket ...wait put get bronze bar from back matchwait goto error swap: put swap match swap ...wait match glance You swap a matchwait goto error stare: put artisan skills wait match trashbar Before the design is complete match 1sttongs Your material is marked with match stare ...wait put stare blade-glyph matchwait goto error 1sttongs: wait match 1sttongs ...wait match 2ndtongs You finish this round match rentexpire The tongs don't budge! put get tongs matchwait goto error 2ndtongs: wait match 2ndtongs ...wait match glance You sigh, then return the match glance With a satisfying * HISS match glance The steady ring of hammer on bronze ends abruptly match rentexpire The tongs don't budge! put get tongs matchwait goto error error: echo funky shit end: exit getmorebars: move go door move out getmorebarsstall: put order 2 wait match rentexpiregetbars But you do not have enough silver! match getmorebars2 Samilla exclaims, "Sold for 90 silvers!" put buy matchwait getmorebars2: match rentexpire You don't have enough silver match barcutting Realizing you still have some time remaining, match barcutting the clerk collects 300 silvers from you put put my bar in my backpack wait put go workshop matchwait goto end nohammer: echo Wear your forging-hammer before starting goto end rentexpire: put put bar in my back move go door move out rentexpireoutside: move south move south move south move out move south move west move south move west move west move west move west move go bank move go arch put deposit all wait put withdraw 400 put check balance wait move go arch move out move east move east move east move east move north move east move north move go gate move north move north move north move go workshop insideworkshop: move go door goto glance goto error trashblade: move go door put put dagger-blade in bin move go door goto glance trashbar: move go door put put bar in bin move go door goto glance rentexpiregetbars: move south move south move south move out move south move west move south move west move west move west move west move go bank move go arch put deposit all wait put withdraw 400 put check balance wait move go arch move out move east move east move east move east move north move east move north move go gate move north move north move north goto getmorebarsstall barcutting: counter set 15 put wear forging-hammer wait put get bar from my backpack pokecutter: put swap wait #match pullcutterlast 3lb. piece and a 3lb. piece match pullcutterlast 3lb. piece and a 4lb. piece match pullcutterlast 3lb. piece and a 5lb. piece match pullcutter 3lb. piece and a match pushcutter lb. piece and a match error 2lb. piece match slabweight%c You've just reset the slab-cutter put poke slab-cutter matchwait pullcutter: put pull slab-cutter wait put put my second bar in my backpack counter subtract 3 goto pokecutter slabweight6: pullcutterlast: put pull slab-cutter wait put put my bar in my backpack put put my bar in my backpack goto insideworkshop slabweight15: slabweight14: slabweight13: slabweight12: slabweight11: slabweight10: slabweight9: slabweight8: slabweight7: pushcutter: match pullcutterlast 3lb. piece and a 3lb. piece match pullcutterlast 3lb. piece and a 4lb. piece match pullcutterlast 3lb. piece and a 5lb. piece match pullcutter 3lb. piece and a match pushcutter lb. piece and a match error 2lb. piece put push slab-cutter matchwait slabweight5: slabweight4: slabweight3: slabweight2: slabweight1: echo fm: Error cutting bar exit ################################################## #######




Script to me looks like this:

Put blah blah
move blah
goto blah

NOT like:

put blah blah move blah goto blah

Now do you understand the question?

And Bob, grow up.

Finis

Bobmuhthol
05-26-2007, 10:45 PM
I'm not even going to bother pointing out why you're retarded; instead, I'll just tell you to fuck yourself and lol @ you.

Gammit
05-26-2007, 10:49 PM
I believe your browser isn't displaying properly. It's in code brackets for me, putting it in it's own box with a scroll bar. I'll attach it in a text file.

FinisWolf
05-27-2007, 02:20 AM
I believe your browser isn't displaying properly. It's in code brackets for me, putting it in it's own box with a scroll bar. I'll attach it in a text file.

Thanks Gammit. Yea, that's weird, all the other script threads are displaying correctly, but for some reason yours is just a chunk of text (in this thread).

:shrug:

Makes more sense now, and thanks for taking the time to attach the file. :)

Finis

AndrewSquared
11-28-2012, 01:01 PM
5 years after created I came looking for this, and it is working, so thanks to you if you're still around!