Forging (script): Difference between revisions

The official GemStone IV encyclopedia.
Jump to navigation Jump to search
(Added something.)
m (7 revisions: Krakiipedia Import)
 
(4 intermediate revisions by one other user not shown)
Line 6: Line 6:
<pre>
<pre>
BEGIN:
BEGIN:
if_2 goto V-%1%
echo Variables are 1-Hilt/Head etc. 2-Handle material. 3-Bar/slab/block 4-Weapon type. 5-Trash or stow?
if_1 goto PRE-INFORM
echo 6- Blade metal 7- Blade bar 8- Finished weapon 9- Container for high quality components.
echo The script only works for OHE weapon forging, however, if Hammers is entered in variable 1, it'll craft hammers.
echo One can enter "setup" and "unsetup" in variable one to wear or remove an apron.
echo Your armor must be defined under the ARMOR variable to use these.
If_9 setvariable FORGEBP %9
if_8 setvariable W_FINISH %8
if_7 setvariable BAR %7
if_6 setvariable METAL %6
if_5 SetVariable TRASH %5
if_4 SetVariable W_TYPE %4
if_3 SetVariable BLOCK %3
if_2 setvariable WOOD %2

if_1 echo Making a %W_TYPE %1 made from a %METAL %BAR with a %WOOD %BLOCK handle to %TRASH%.
if_1 pause 2
if_1 goto %1

echo Making a %W_TYPE made from a %METAL %BAR with a %WOOD %BLOCK handle to %TRASH%.
echo Making a %W_TYPE made from a %METAL %BAR with a %WOOD %BLOCK handle to %TRASH%.
pause 2
pause 2
goto HILT

PRE-INFORM:
ECHO [Making a %W_TYPE%. Starting tag will be: %1%. The finished product will be a %W_FINISH%.]
ECHO [The %BLADE% will be made from %METAL% (a %BAR%). The %HILT% will be made from %WOOD% (a %BLOCK%).]
ECHO [Production type will be %TRASH%. If set to "stow" best pieces will be kept in your %FORGEBP%.]
ECHO [To change these settings, end the script and enter the item to change followed by the value.]
ECHO [To retain these settings, enter the command, YES. For a list of options, type NOTE.]
match %1 A good positive attitude never hurts.
match HELP How about B flat?
matchwait

HELP:
ECHO [There are many, many variables that this script requires to run properly...]
EXIT

V-W_TYPE:
V-W_FINISH:
V-BLADE:
V-HILT:
V-METAL:
V-BAR:
V-WOOD:
V-BLOCK:
V-TRASH:
setvariable %1 %2%
goto PRE-INFORM




Line 58: Line 69:


HIL_ETCH:
HIL_ETCH:
put stare hilt-glyph
put stare %HILT%-glyph
match NO_APRON You realize that you really should put on an apron before proceeding.
match NO_APRON You realize that you really should put on an apron before proceeding.
match HIL_GRIND pattern onto the surface of the
match HIL_GRIND pattern onto the surface of the
Line 72: Line 83:
pause
pause
put turn grinder
put turn grinder
# match HIL_GRIND ...wait
# match HIL_GRINDING You set your right foot against the already moving rocker pedal
# matchwait

HIL_GRINDING:
match HIL_TOOTHPICK In the blink of an eye the %WOOD %BLOCK is ground to almost nothing.
match HIL_TOOTHPICK In the blink of an eye the %WOOD %BLOCK is ground to almost nothing.
Match HIL_%TRASH finish your work and stand up
Match HIL_%TRASH finish your work and stand up
Line 90: Line 106:
HIL_BEST_TRASH:
HIL_BEST_TRASH:
HIL_STOW:
HIL_STOW:
put stow my %W_TYPE%-hilt
put stow my %W_TYPE%-%HILT%
put stow my %WOOD %BLOCK
put stow my %WOOD %BLOCK
goto BLADE
goto BLADE


HIL_TRASH:
HIL_TRASH:
put put my %W_TYPE%-hilt in bin
put put my %W_TYPE%-%HILT% in bin
goto HILT
goto HILT


Line 235: Line 251:


FB_START:
FB_START:
put stare blade-glyph
put stare %BLADE%-glyph
match FB_DETECT Your material is marked with a pattern, next you'll need to shape it somehow.
match FB_DETECT Your material is marked with a pattern, next you'll need to shape it somehow.
match FB_START_TRASH onto the surface of the bronze. Before the design is complete you reach an edge of the
match FB_START_TRASH onto the surface of the bronze. Before the design is complete you reach an edge of the
Line 257: Line 273:
match FB_START You decide the safest thing to do now is to re-scribe the
match FB_START You decide the safest thing to do now is to re-scribe the
match FB_EXPIRED The tongs don't budge! Most likely the rent on this workshop has expired.
match FB_EXPIRED The tongs don't budge! Most likely the rent on this workshop has expired.
match FB_%TRASH Turning the %METAL %W_TYPE%-blade you nod, satisfied with your work.
match FB_%TRASH Turning the %METAL %W_TYPE%-%BLADE% you nod, satisfied with your work.
match FB_GET_BAR With a single, faulty blow of your hammer, you've totally shattered your
match FB_GET_BAR With a single, faulty blow of your hammer, you've totally shattered your
match FB_BEST_%TRASH A moment of close inspection is all you need to tell that you have done your best work this time.
match FB_BEST_%TRASH A moment of close inspection is all you need to tell that you have done your best work this time.
Line 276: Line 292:
FB_TRASH:
FB_TRASH:
move go door
move go door
put put my %W_TYPE%-blade in bin
put put my %W_TYPE%-%BLADE% in bin
move go door
move go door
goto F_BLADE
goto F_BLADE
Line 284: Line 300:
POL_BOTH:
POL_BOTH:
put glance
put glance
match POL_BLADE You glance down to see nothing in your right hand and a rough %METAL %W_TYPE%-blade in your left hand.
match POL_BLADE You glance down to see nothing in your right hand and a rough %METAL %W_TYPE%-%BLADE% in your left hand.
match POL_BLADE_SWAP You glance down to see a rough %METAL %W_TYPE%-blade in your right hand and nothing in your left hand.
match POL_BLADE_SWAP You glance down to see a rough %METAL %W_TYPE%-%BLADE% in your right hand and nothing in your left hand.
match POL_HILT You glance down to see nothing in your right hand and a rough %WOOD %W_TYPE%-hilt in your left hand.
match POL_HILT You glance down to see nothing in your right hand and a rough %WOOD %W_TYPE%-%HILT% in your left hand.
match POL_GET You glance down at your empty hands.
match POL_GET You glance down at your empty hands.
match POL_STOW_BLADE You glance down to see nothing in your right hand and a finished %METAL %W_TYPE%-blade in your left hand.
match POL_STOW_BLADE You glance down to see nothing in your right hand and a finished %METAL %W_TYPE%-%BLADE% in your left hand.
match VISE You glance down to see nothing in your right hand and a finished %WOOD %W_TYPE%-hilt in your left hand.
match VISE You glance down to see nothing in your right hand and a finished %WOOD %W_TYPE%-%HILT% in your left hand.
matchwait
matchwait


POL_GET:
POL_GET:
put get my %W_TYPE%-blade from my %container
put get my %W_TYPE%-%BLADE% from my %container
POL_BLADE_SWAP:
POL_BLADE_SWAP:
put swap
put swap
Line 309: Line 325:
POL_STOW_BLADE:
POL_STOW_BLADE:
pause
pause
put stow %W_TYPE%-blade
put stow %W_TYPE%-%BLADE%
POL_GET_2:
POL_GET_2:
put get my %W_TYPE%-hilt from my %container
put get my %W_TYPE%-%HILT% from my %container
put swap
put swap


Line 331: Line 347:
put glance
put glance
match BH_POLISH_HILT The item in your right hand is not ready for assembly.
match BH_POLISH_HILT The item in your right hand is not ready for assembly.
match BH_GET_HILT You glance down to see nothing in your right hand and a finished %METAL %W_TYPE%-blade in your left hand.
match BH_GET_HILT You glance down to see nothing in your right hand and a finished %METAL %W_TYPE%-%BLADE% in your left hand.
match BH_USE_VISE see a finished %METAL %W_TYPE%-blade in your right hand and a finished %WOOD %W_TYPE%-hilt in your left
match BH_USE_VISE see a finished %METAL %W_TYPE%-%BLADE% in your right hand and a finished %WOOD %W_TYPE%-%HILT% in your left
match BH_GET_BLADE You glance down to see nothing in your right hand and a finished %WOOD %W_TYPE%-hilt in your left hand.
match BH_GET_BLADE You glance down to see nothing in your right hand and a finished %WOOD %W_TYPE%-%HILT% in your left hand.
matchwait
matchwait


Line 342: Line 358:


BH_GET_HILT:
BH_GET_HILT:
put get %WOOD %W_TYPE%-hilt
put get %WOOD %W_TYPE%-%HILT%
goto BH_USE_VISE
goto BH_USE_VISE
BH_GET_BLADE:
BH_GET_BLADE:
put get %METAL %W_TYPE%-blade
put get %METAL %W_TYPE%-%BLADE%
goto BH_USE_VISE
goto BH_USE_VISE


Line 378: Line 394:


BH_POLISH_HILT:
BH_POLISH_HILT:
put stow %W_TYPE%-blade
put stow %W_TYPE%-%BLADE%
put swap
put swap
put lean polisher
put lean polisher
Line 397: Line 413:
matchre HHE_ETCH /see nothing in your right hand and a[ \t\n\r\f\v]*[a-zA-Z0-9_]* %METAL %BAR in your left hand./
matchre HHE_ETCH /see nothing in your right hand and a[ \t\n\r\f\v]*[a-zA-Z0-9_]* %METAL %BAR in your left hand./
matchwait
matchwait

HHE_TOOTHPICK:
put put toothpick in bin
goto HHA_BB_EMPTY


HHE_BB_EMPTY:
HHE_BB_EMPTY:
Line 440: Line 460:


HHE_GRIND:
HHE_GRIND:
pause
put turn grinder
put turn grinder
# match HHE_GRIND ...wait
# match HHE_GRINDING You set your right foot against the already moving rocker pedal
# matchwait
HHE_GRINDING:
Match HHE_GROUND You nod, satisfied with the piece you've created.
Match HHE_GROUND You nod, satisfied with the piece you've created.
match HHE_ETCH You decide the safest thing to do now is to re-scribe the %METAL %BAR with the glyph and try again.
match HHE_ETCH You decide the safest thing to do now is to re-scribe the %METAL %BAR with the glyph and try again.
match HHE_BEST You smile as you realize that this piece is the very best that you can create.
match HHE_BEST You smile as you realize that this piece is the very best that you can create.
match HHE_TOOTHPICK In the blink of an eye the %WOOD %BLOCK is ground to almost nothing.
match HHE_WORKSHOP_GRIND The grinding wheel doesn't budge! Most likely the rent on this workshop has expired.
matchwait
matchwait


Line 463: Line 491:
setvariable BESTHHEAD True
setvariable BESTHHEAD True
goto H_HEAD
goto H_HEAD

HHE_WORKSHOP_GRIND:
move out
move go workshop
goto HHE_GRIND


NO_APRON:
NO_APRON:
Line 468: Line 501:
exit
exit


####### HAMMER-HANDLE GRINDING #######
HANDLE:
HANDLE:
H-HANDLE:
H-HANDLE:
put glance
put glance
match HHA_GRIND You glance down to see nothing in your right hand and a scribed %WOOD% %BLOCK% in your left hand.
match HHA_BB_EMPTY You glance down at your empty hands.
match HHA_BB_EMPTY You glance down at your empty hands.
match HHA_BB_SWAP You glance down to see a %WOOD %BLOCK in your right hand and nothing in your left hand.
match HHA_BB_SWAP You glance down to see a %WOOD% %BLOCK% in your right hand and nothing in your left hand.
match HHA_BB_SWAP You glance down to see a leftover %WOOD %BLOCK in your right hand and nothing in your left hand.
match HHA_BB_SWAP You glance down to see a leftover %WOOD% %BLOCK% in your right hand and nothing in your left hand.
match HHA_ETCH You glance down to see nothing in your right hand and a %WOOD %BLOCK in your left hand.
match HHA_ETCH You glance down to see nothing in your right hand and a %WOOD% %BLOCK% in your left hand.
match HHA_ETCH You glance down to see nothing in your right hand and a leftover %WOOD %BLOCK in your left hand.
match HHA_ETCH You glance down to see nothing in your right hand and a leftover %WOOD% %BLOCK% in your left hand.
match HHA_ETCH You glance down to see nothing in your right hand and a ground %WOOD %BLOCK in your left hand.
match HHA_ETCH You glance down to see nothing in your right hand and a ground %WOOD% %BLOCK% in your left hand.
matchwait
matchwait

HHA_TOOTHPICK:
put put toothpick in bin
goto HHA_BB_EMPTY


HHA_BB_EMPTY:
HHA_BB_EMPTY:
Line 486: Line 525:


HHA_BB_MATERIALS_STEEL:
HHA_BB_MATERIALS_STEEL:
echo *** GO BUY MORE SHIT! ***
echo [Forge: Purchasing more steel.]
move out
move out
put order 4
put order 4
Line 495: Line 534:
goto HHA_BB_SWAP
goto HHA_BB_SWAP


HHA_BB_MATERIALS_HAON:
HHA_BB_MATERIALS_MONIR:
HHA_BB_MATERIALS_MODWIR:
HHA_BB_MATERIALS_MAORAL:
HHA_BB_MATERIALS_MAORAL:
put out
echo *** GO BUY MORE SHIT! ***
match HHA_BB_MATERIALS_HAON_SAVE [Ta'Illistim Forging Supply Shop]
move out
match HHA_BB_MATERIALS_MAORAL_SAVE [Wehnimer's Landing Forging Supply Shop]
put order 3
match HHA_BB_MATERIALS_MODWIR_SAVE [Icemule Trace Forging Supply Shop]
put buy
match HHA_BB_MATERIALS_MAPLE_SAVE [Kharam Dzu Forging Supply Shop]
match HHA_BB_MATERIALS_HICKORY_SAVE [Solhaven Forging Supply Shop]
matchwait
HHA_BB_MATERIALS_HAON_SAVE:
echo [Forge: Purchasing more haon, if you're in Ta'Illistim.]
SetVariable WOOD haon
SetVariable BLOCK block
goto HHA_BB_MATERIALS_BUY
HHA_BB_MATERIALS_MAORAL_SAVE:
echo [Forge: Purchasing more maoral, if you're in The Landing.]
SetVariable WOOD maoral
SetVariable WOOD maoral
SetVariable BLOCK block
SetVariable BLOCK block
move go workshop
goto HHA_BB_SWAP
goto HHA_BB_SWAP


HHA_BB_MATERIALS_MODWIR_SAVE:
HHA_BB_MATERIALS_MODWIR:
echo *** Buying. This assumes you're in Teras. ***
echo [Forge: Purchasing more modwir, if you're in Teras.]
move out
put order 3
put buy
SetVariable WOOD modwir
SetVariable WOOD modwir
SetVariable BLOCK block
SetVariable BLOCK block
goto HHA_BB_SWAP
HHA_BB_MATERIALS_MAPLE_SAVE:
echo [Forge: Purchasing more maple, if you're in Icemule.]
SetVariable WOOD monir
SetVariable BLOCK block
goto HHA_BB_SWAP

HHA_BB_MATERIALS_HICKORY_SAVE:
echo [Forge: Purchasing more hickory, if you're in Solhaven.]
SetVariable WOOD hickory
SetVariable BLOCK block
goto HHA_BB_SWAP


HHA_BB_MATERIALS_BUY:
put order 3
put buy
move go workshop
move go workshop
goto HHA_BB_SWAP
goto HHA_BB_SWAP


HHA_BB_MATERIALS_MONIR:
echo [Forge: This script doesn't support buying things in Icemule, yet.]
exit


HHA_BB_MATERIALS_STEEL:
HHA_BB_MATERIALS_STEEL:
echo *** GO BUY MORE SHIT! ***
echo [Forge: Purchasing a bronze bar.]
move out
move out
put order 2
put order 2
Line 541: Line 607:


HHA_TOO_SMALL:
HHA_TOO_SMALL:
put put my %BLOCK in bin
put put my %BLOCK% in bin
goto HHA_BB_EMPTY
goto HHA_BB_EMPTY


HHA_GRIND:
HHA_GRIND:
pause
put turn grinder
put turn grinder
# match HHA_GRIND ...wait
# match HHA_GRINDING You set your right foot against the already moving rocker
# matchwait
HHA_GRINDING:
# ECHO [FORGING: Waiting...]
Match HHA_GROUND_%TRASH You nod, satisfied with the piece you've created.
Match HHA_GROUND_%TRASH You nod, satisfied with the piece you've created.
match HHA_BEST_%TRASH You smile as you realize that this piece is the very best that you can create.
match HHA_BEST_%TRASH You smile as you realize that this piece is the very best that you can create.
match HHA_ETCH You decide the safest thing to do now is to re-scribe the %WOOD %BLOCK with the glyph and try again.
match HHA_ETCH You decide the safest thing to do now is to re-scribe the %WOOD %BLOCK with the glyph and try again.
match HHA_TOOTHPICK In the blink of an eye the %WOOD %BLOCK is ground to almost nothing.
match HHA_WORKSHOP_GRIND The grinding wheel doesn't budge! Most likely the rent on this workshop has expired.
matchwait
matchwait


HHA_BEST_STOW:
HHA_BEST:
pause
pause
put stow my %BLOCK
put stow my %BLOCK%
put lean polisher
put lean polisher
match HHA_STOW_%TRASH the polishing wheel and run your fingers over the smooth surface of your %WOOD hammer-handle.
match HHA_STOW_BEST the polishing wheel and run your fingers over the smooth surface of your %WOOD hammer-handle.
matchwait
matchwait


HHA_BEST_TRASH:
HHA_GROUND_TRASH:
HHA_GROUND_TRASH:
pause
HHA_GROUND_BEST_TRASH:
put put my hammer-handle in bin
put put my hammer-handle in bin
goto HANDLE
goto HANDLE


HHA_GROUND_STOW:
HHA_GROUND_BEST_STOW:
pause
pause
put stow my %BLOCK
put stow my %BLOCK
put lean polisher
put lean polisher
match HHA_STOW the polishing wheel and run your fingers over the smooth surface of your %WOOD hammer-handle.
match HHA_STOW_NORMAL the polishing wheel and run your fingers over the smooth surface of your %WOOD hammer-handle.
matchwait
matchwait


HHA_STOW_NORMAL:
HHA_STOW:
HHA_STOW_TRASH:
put stow my hammer-handle
put stow my hammer-handle
goto H-COMBINE
goto H-COMBINE


HHA_STOW_BEST:
HHA_STOW_STOW:
put put my hammer-handle in my %FORGEBP
put put my hammer-handle in my %FORGEBP%
echo [Made a superior part.]
echo [Forge: Made a superior part.]
setvariable BESTHHANDLE True
setvariable BESTHHANDLE True
goto H-HANDLE
goto H-HANDLE


HHA_WORKSHOP_GRIND:
move out
move go workshop
goto HHA_GRIND

####### FORGING-HAMMER VISE #######
H-COMBINE:
H-COMBINE:
put glance
put glance
Line 652: Line 733:
put wear my %ARMOR
put wear my %ARMOR
exit
exit
LABELERROR:
echo [There was an error.]
exit
</pre>
</pre>

Latest revision as of 12:44, 31 December 2014

Title:Forging script
Author:Andy
Compatibility:Wrayth Only
BEGIN:
 if_2 goto V-%1%
 if_1 goto PRE-INFORM
 echo Making a %W_TYPE made from a %METAL %BAR with a %WOOD %BLOCK handle to %TRASH%.
 pause 2
 goto HILT

PRE-INFORM:
 ECHO [Making a %W_TYPE%. Starting tag will be: %1%.  The finished product will be a %W_FINISH%.]
 ECHO [The %BLADE% will be made from %METAL% (a %BAR%).  The %HILT% will be made from %WOOD% (a %BLOCK%).]
 ECHO [Production type will be %TRASH%.  If set to "stow" best pieces will be kept in your %FORGEBP%.]
 ECHO [To change these settings, end the script and enter the item to change followed by the value.]
 ECHO [To retain these settings, enter the command, YES. For a list of options, type NOTE.]
  match %1 A good positive attitude never hurts.
  match HELP How about B flat?
  matchwait

HELP:
 ECHO [There are many, many variables that this script requires to run properly...]
 EXIT

V-W_TYPE:
V-W_FINISH:
V-BLADE:
V-HILT:
V-METAL:
V-BAR:
V-WOOD:
V-BLOCK:
V-TRASH:
 setvariable %1 %2%
 goto PRE-INFORM


####### HILT #######
HILT:
 put glance
  match HIL_BB_EMPTY You glance down at your empty hands.
  match HIL_BB_SWAP You glance down to see a %WOOD %BLOCK in your right hand and nothing in your left hand.
  match HIL_BB_SWAP You glance down to see a leftover %WOOD %BLOCK in your right hand and nothing in your left hand.
  match HIL_BB_SWAP You glance down to see a ground %WOOD %BLOCK in your right hand and nothing in your left hand.
  match HIL_ETCH You glance down to see nothing in your right hand and a %WOOD %BLOCK in your left hand.
  match HIL_ETCH You glance down to see nothing in your right hand and a leftover %WOOD %BLOCK in your left hand.
  match HIL_ETCH You glance down to see nothing in your right hand and a ground %WOOD %BLOCK in your left hand.
  match HIL_GRIND You glance down to see nothing in your right hand and a scribed maoral block in your left hand.
  matchwait


HIL_TOOTHPICK:
 put put toothpick in bin

HIL_BB_EMPTY:
 pause
 put get my %WOOD %BLOCK
  match HIL_BB_SWAP You remove
  match HIL_NEED_MATERIAL Get what?
  match HIL_BB_SWAP You already have that.
  matchwait

HIL_BB_SWAP:
 put swap
 goto HIL_ETCH

HIL_ETCH:
 put stare %HILT%-glyph
  match NO_APRON You realize that you really should put on an apron before proceeding.
  match HIL_GRIND pattern onto the surface of the
  match HIL_TOO_SMALL Before the design is complete you reach an edge of the
  matchwait

HIL_TOO_SMALL:
 pause
 put put my %BLOCK in bin
 goto HIL_BB_EMPTY

HIL_GRIND:
 pause
 put turn grinder
#  match HIL_GRIND ...wait
#  match HIL_GRINDING You set your right foot against the already moving rocker pedal
#  matchwait

HIL_GRINDING:
  match HIL_TOOTHPICK In the blink of an eye the %WOOD %BLOCK is ground to almost nothing.
  Match HIL_%TRASH finish your work and stand up
  match HIL_ETCH You decide the safest thing to do now is to re-scribe the %WOOD %BLOCK with the glyph and try again.
  match HIL_BEST_%TRASH You smile as you realize that this piece is the very best that you can create.
  match HIL_WORKSHOP_GRIND The grinding wheel doesn't budge!  Most likely the rent on this workshop has expired.
  matchwait

HIL_BEST_STOW:
# pause
# put stow my %BLOCK
# put lean polisher
#  match HIL_STOW at the polishing wheel and run your fingers over the smooth surface of your %WOOD hammer-head.
#  matchwait
 echo BEST!
 exit

HIL_BEST_TRASH:
HIL_STOW:
 put stow my %W_TYPE%-%HILT%
 put stow my %WOOD %BLOCK
 goto BLADE

HIL_TRASH:
 put put my %W_TYPE%-%HILT% in bin
 goto HILT

HIL_NEED_MATERIAL:
 echo *** GO BUY MORE SHIT! ***
 move out
 put order 3
 put buy
 move go workshop
 goto HIL_BB_EMPTY

HIL_WORKSHOP_GRIND:
 move out
 move go workshop
 goto HIL_GRIND






####### BLADE #######
BLADE:
 pause
 put look
  match F_BLADE Forge]
  match F_GO Workshop]
  matchwait

F_GO:
 move go door
F_BLADE:
 put look in trough
  match FB_WATER_%METAL In the trough you see a cork plug and some water.
  match FB_BUCKET_%METAL In the trough you see a cork plug.
  match FB_OIL_%METAL In the trough you see a cork plug and some oil.
  matchwait

FB_TROUGH_BRONZE:
 put stow %BAR
FB_BUCKET_BRONZE:
 put get bucket
  pause
 goto FB_DETECT

FB_TROUGH_STEEL:
 put stow %BAR
FB_WATER_STEEL:
 put pull plug
FB_BUCKET_STEEL:
 put get my tempering oil
  match FB_BUCKET_STEEL_POUR You remove a
  match FB_TEMPERING_OIL_GET Get what?
  match FB_BUCKET_STEEL_POUR You already have that.
  matchwait

FB_BUCKET_STEEL_POUR:
 put pour oil in trough
  pause
 goto FB_DETECT

FB_TEMPERING_OIL_GET:
 echo *** More Materials!
 move go door
 move out
 put order 5
 put buy
 SetVariable METAL steel
 SetVariable BAR slab
 move go workshop
 move go door
 goto FB_BUCKET_STEEL_POUR

FB_WATER_BRONZE:
FB_OIL_BRONZE:
FB_OIL_STEEL:
FB_DETECT:
 put glance
  match   FB_EMPTY        You glance down at your empty hands.
  match   FB_GET_HAMMER_2 You glance down to see nothing in your right hand and a flattened %METAL %BAR in your left hand
  match   FB_GET_BAR      forging-hammer in your right hand and nothing in your left hand.
  match   FB_TONG         forging-hammer in your right hand and a scribed %METAL %BAR in your left hand.
  match   FB_TONG         forging-hammer in your right hand and a hammered %METAL %BAR in your left hand.
  matchre FB_GET_HAMMER   /see nothing in your right hand and a[ \t\n\r\f\v]*[a-zA-Z0-9_]* %METAL %BAR in your left hand./
  matchre FB_START        /forging-hammer in your right hand and a[ \t\n\r\f\v]*[a-zA-Z0-9_]* %METAL %BAR in your left hand./
  matchre FB_SWAP         /see a[ \t\n\r\f\v]*[a-zA-Z0-9_]* %METAL %BAR in your right hand and nothing in your left hand./
  matchwait

FB_START_TRASH:
 move go door
 put put %BAR in bin
 move go door
 put get my %METAL %BAR
 goto FB_START

FB_GET_BAR:
 put get my %METAL %BAR
  match FB_DETECT You remove
  match FB_MORE_%METAL Get what?
  matchwait

FB_EMPTY:
 put get my %METAL %BAR
  match FB_SWAP You remove
  match FB_MORE_%METAL Get what?
  matchwait

FB_MORE_BRONZE:
 echo *** More Materials!
 move go door
 move out
 put order 2
 put buy
 SetVariable METAL bronze
 SetVariable BAR bar
 move go workshop
 move go door
 goto FB_DETECT

FB_MORE_STEEL:
 echo *** More Materials!
 move go door
 move out
 put order 4
 put buy
 SetVariable METAL steel
 SetVariable BAR slab
 move go workshop
 move go door
 goto FB_DETECT

FB_SWAP:
 put swap
 goto FB_DETECT

FB_GET_HAMMER:
 put remove forging-hammer
 goto FB_DETECT

FB_START:
 put stare %BLADE%-glyph
  match FB_DETECT Your material is marked with a pattern, next you'll need to shape it somehow.
  match FB_START_TRASH onto the surface of the bronze.  Before the design is complete you reach an edge of the
  matchwait

FB_EXPIRED:
 pause
 move go door
 move out
 move go workshop
 move go door
 goto FB_TONG
 
FB_GET_HAMMER_2:
 put remove forging-hammer
FB_TONG:
 pause
 put get tong
  match FB_TONG You finish this round of work on your %METAL %BAR and set the tongs on the anvil, realizing that there's
  match FB_TROUGH_%METAL The tempering trough is empty!
  match FB_START You decide the safest thing to do now is to re-scribe the
  match FB_EXPIRED The tongs don't budge!  Most likely the rent on this workshop has expired.
  match FB_%TRASH Turning the %METAL %W_TYPE%-%BLADE% you nod, satisfied with your work.
  match FB_GET_BAR With a single, faulty blow of your hammer, you've totally shattered your
  match FB_BEST_%TRASH A moment of close inspection is all you need to tell that you have done your best work this time.
  matchwait

FB_STOW:
 put wear forging
 move go door
 goto POL_BOTH

FB_BEST_STOW:
 echo [ BEST! ]
 put put my left in my %FORGEBP
 setvariable %BESTBLADE TRUE
 goto BLADE

FB_BEST_TRASH:
FB_TRASH:
 move go door
 put put my %W_TYPE%-%BLADE% in bin
 move go door
 goto F_BLADE

####### POLISHING #######
POLISH:
POL_BOTH:
 put glance
  match POL_BLADE      You glance down to see nothing in your right hand and a rough %METAL %W_TYPE%-%BLADE% in your left hand.
  match POL_BLADE_SWAP You glance down to see a rough %METAL %W_TYPE%-%BLADE% in your right hand and nothing in your left hand.
  match POL_HILT       You glance down to see nothing in your right hand and a rough %WOOD %W_TYPE%-%HILT% in your left hand.
  match POL_GET        You glance down at your empty hands.
  match POL_STOW_BLADE You glance down to see nothing in your right hand and a finished %METAL %W_TYPE%-%BLADE% in your left hand.
  match VISE           You glance down to see nothing in your right hand and a finished %WOOD %W_TYPE%-%HILT% in your left hand.
  matchwait

POL_GET:
 put get my %W_TYPE%-%BLADE% from my %container
POL_BLADE_SWAP:
 put swap
POL_BLADE:
 put lean polisher
  match POL_STOW_BLADE run your fingers over the smooth surface of your
  match POL_BLADE_TIME The polishing wheel doesn't budge!  Most likely the rent on this workshop has expired.
  matchwait

POL_BLADE_TIME:
 move out
 move go workshop
 goto POL_BLADE

POL_STOW_BLADE:
 pause
 put stow %W_TYPE%-%BLADE%
POL_GET_2:
 put get my %W_TYPE%-%HILT% from my %container
 put swap

POL_HILT:
 put lean polisher
  match BH_VISE run your fingers over the smooth surface of your
  match POL_HILT_TIME The polishing wheel doesn't budge!  Most likely the rent on this workshop has expired.
  matchwait

POL_HILT_TIME:
 move out
 move go workshop
 goto POL_HILT

####### BLADE-HILT VISE #######
VISE:
BH_VISE:
 pause
 put glance
  match BH_POLISH_HILT The item in your right hand is not ready for assembly.
  match BH_GET_HILT You glance down to see nothing in your right hand and a finished %METAL %W_TYPE%-%BLADE% in your left hand.
  match BH_USE_VISE see a finished %METAL %W_TYPE%-%BLADE% in your right hand and a finished %WOOD %W_TYPE%-%HILT% in your left 
  match BH_GET_BLADE You glance down to see nothing in your right hand and a finished %WOOD %W_TYPE%-%HILT% in your left hand.
  matchwait

BH_WORKSHOP:
 move out
 move go workshop
 goto BH_USE_VISE

BH_GET_HILT:
 put get %WOOD %W_TYPE%-%HILT%
 goto BH_USE_VISE
BH_GET_BLADE:
 put get %METAL %W_TYPE%-%BLADE%
 goto BH_USE_VISE

BH_USE_VISE_SWAP:
 put swap
BH_USE_VISE:
 pause
 put turn vise
  match BH_USE_VISE_SWAP You need to be holding the blade or head part in your left hand in order to use the vise successfully.
  match BH_USE_VISE tighten it snugly, and take another try at it.
  match BH_%TRASH You nod, satisfied with the piece you've created.
  match BH_TRASH You remove the assembled item from the vise and look it over with some apprehension.
  match BH_WORKSHOP The vise doesn't budge!  Most likely the rent on this workshop has expired.
  match BH_BEST_%TRASH You smile as you realize that this piece is probably the best that you can create.
  match BH_POLISH_HILT The item in your right hand is not ready for assembly.
  matchwait

BH_STOW:
 echo *** Seems you're done. ***
 put stow right
 put stow left
 goto HILT

BH_BEST_STOW:
 echo *** BEST! ***
 exit

BH_BEST_TRASH:
BH_TRASH:
 put put %W_FINISH in bin
 goto HILT

BH_POLISH_HILT:
 put stow %W_TYPE%-%BLADE%
 put swap
 put lean polisher
  waitfor run your fingers over the smooth surface of your
 goto BH_VISE




####### HAMMER #######
HAMMER:
H-HEAD:
 put glance
  match   HHE_BB_EMPTY   You glance down at your empty hands.
  match   HHE_BB_SWAP    You glance down to see a %METAL %BAR in your right hand and nothing in your left hand.
  match   HHE_BB_SWAP    You glance down to see a leftover %METAL %BAR in your right hand and nothing in your left hand.
  match   HHE_ETCH       see nothing in your right hand and a scribed %METAL %BAR in your left hand.
  matchre HHE_ETCH       /see nothing in your right hand and a[ \t\n\r\f\v]*[a-zA-Z0-9_]* %METAL %BAR in your left hand./
  matchwait

HHE_TOOTHPICK:
 put put toothpick in bin
 goto HHA_BB_EMPTY

HHE_BB_EMPTY:
 put get my %METAL %BAR
  match   HHE_BB_MATERIALS_%METAL Get what?
  matchre HHE_BB_SWAP /You (get|remove)/
 matchwait
  
HHE_BB_MATERIALS_BRONZE:
 echo *** GO BUY MORE SHIT! ***
 move out
 put order 2
 put buy
 SetVariable METAL bronze
 SetVariable BAR bar
 move go workshop
 goto HHE_BB_SWAP

HHE_BB_MATERIALS_STEEL:
 echo *** GO BUY MORE SHIT! ***
 move out
 put order 4
 put buy
 SetVariable METAL steel
 SetVariable BAR slab
 move go workshop
 goto HHE_BB_SWAP
 
HHE_BB_SWAP:
 put swap
 goto HHE_ETCH

HHE_ETCH:
 put stare forging-hammer head-glyph
  match NO_APRON You realize that you really should put on an apron before proceeding.
  match HHE_GRIND You carefully trace the forging-hammer pattern onto the surface of the %METAL in your hand.
  match HHE_TOO_SMALL Before the design is complete you reach an edge of the %BAR and realize it is too small.
  matchwait

HHE_TOO_SMALL:
 put put my %METAL %BAR in bin
 goto HHE_BB_EMPTY

HHE_GRIND:
 pause
 put turn grinder
#  match HHE_GRIND ...wait
#  match HHE_GRINDING You set your right foot against the already moving rocker pedal
# matchwait
 
HHE_GRINDING:
  Match HHE_GROUND You nod, satisfied with the piece you've created.
  match HHE_ETCH You decide the safest thing to do now is to re-scribe the %METAL %BAR with the glyph and try again.
  match HHE_BEST You smile as you realize that this piece is the very best that you can create.
  match HHE_TOOTHPICK In the blink of an eye the %WOOD %BLOCK is ground to almost nothing.
  match HHE_WORKSHOP_GRIND The grinding wheel doesn't budge!  Most likely the rent on this workshop has expired.
  matchwait

HHE_BEST:
HHE_GROUND:
 pause
 put stow my %METAL %BAR
 put lean polisher
  match HHE_STOW_%TRASH at the polishing wheel and run your fingers over the smooth surface of your %METAL hammer-head.
  matchwait

HHE_STOW_TRASH:
 put stow my hammer-head
 goto H-HANDLE
 
HHE_STOW_BEST:
 put put my hammer-head in my %FORGEBP
 echo [Created a superior piece]
 setvariable BESTHHEAD True
 goto H_HEAD

HHE_WORKSHOP_GRIND:
 move out
 move go workshop
 goto HHE_GRIND

NO_APRON:
 echo *** You heard the man. ***
 exit

####### HAMMER-HANDLE GRINDING #######
HANDLE:
H-HANDLE:
 put glance
  match HHA_GRIND You glance down to see nothing in your right hand and a scribed %WOOD% %BLOCK% in your left hand.
  match HHA_BB_EMPTY You glance down at your empty hands.
  match HHA_BB_SWAP You glance down to see a %WOOD% %BLOCK% in your right hand and nothing in your left hand.
  match HHA_BB_SWAP You glance down to see a leftover %WOOD% %BLOCK% in your right hand and nothing in your left hand.
  match HHA_ETCH You glance down to see nothing in your right hand and a %WOOD% %BLOCK% in your left hand.
  match HHA_ETCH You glance down to see nothing in your right hand and a leftover %WOOD% %BLOCK% in your left hand.
  match HHA_ETCH You glance down to see nothing in your right hand and a ground %WOOD% %BLOCK% in your left hand.
  matchwait

HHA_TOOTHPICK:
 put put toothpick in bin
 goto HHA_BB_EMPTY

HHA_BB_EMPTY:
 put get my %WOOD %BLOCK
  match HHA_BB_MATERIALS_%WOOD Get what?
  matchre HHA_BB_SWAP /You (get|remove)/
  matchwait

HHA_BB_MATERIALS_STEEL:
 echo [Forge: Purchasing more steel.]
 move out
 put order 4
 put buy
 SetVariable WOOD steel
 SetVariable BLOCK slab
 move go workshop
 goto HHA_BB_SWAP

HHA_BB_MATERIALS_HAON:
HHA_BB_MATERIALS_MONIR:
HHA_BB_MATERIALS_MODWIR:
HHA_BB_MATERIALS_MAORAL:
 put out
  match HHA_BB_MATERIALS_HAON_SAVE [Ta'Illistim Forging Supply Shop]
  match HHA_BB_MATERIALS_MAORAL_SAVE [Wehnimer's Landing Forging Supply Shop]
  match HHA_BB_MATERIALS_MODWIR_SAVE [Icemule Trace Forging Supply Shop]
  match HHA_BB_MATERIALS_MAPLE_SAVE [Kharam Dzu Forging Supply Shop]
  match HHA_BB_MATERIALS_HICKORY_SAVE [Solhaven Forging Supply Shop]
  matchwait
  
HHA_BB_MATERIALS_HAON_SAVE:
 echo [Forge: Purchasing more haon, if you're in Ta'Illistim.]
 SetVariable WOOD haon
 SetVariable BLOCK block
 goto HHA_BB_MATERIALS_BUY
 
HHA_BB_MATERIALS_MAORAL_SAVE:
 echo [Forge: Purchasing more maoral, if you're in The Landing.]
 SetVariable WOOD maoral
 SetVariable BLOCK block
 goto HHA_BB_SWAP

HHA_BB_MATERIALS_MODWIR_SAVE:
 echo [Forge: Purchasing more modwir, if you're in Teras.]
 SetVariable WOOD modwir
 SetVariable BLOCK block
 goto HHA_BB_SWAP
 
HHA_BB_MATERIALS_MAPLE_SAVE:
 echo [Forge: Purchasing more maple, if you're in Icemule.]
 SetVariable WOOD monir
 SetVariable BLOCK block
 goto HHA_BB_SWAP

HHA_BB_MATERIALS_HICKORY_SAVE:
 echo [Forge: Purchasing more hickory, if you're in Solhaven.]
 SetVariable WOOD hickory
 SetVariable BLOCK block
 goto HHA_BB_SWAP


HHA_BB_MATERIALS_BUY:
 put order 3
 put buy
 move go workshop
 goto HHA_BB_SWAP
 


HHA_BB_MATERIALS_STEEL:
 echo [Forge: Purchasing a bronze bar.]
 move out
 put order 2
 put buy
 SetVariable WOOD bronze
 SetVariable BLOCK bar
 move go workshop
 goto HHA_BB_SWAP

HHA_BB_SWAP:
 put swap
 goto HHA_ETCH

HHA_ETCH:
 put stare forging-hammer handle-glyph
  match NO_APRON You realize that you really should put on an apron before proceeding.
  match HHA_GRIND You carefully trace the forging-hammer pattern onto the surface of the %WOOD in your hand.
  match HHA_TOO_SMALL Before the design is complete you reach an edge of the %BLOCK and realize it is too small.
  matchwait

HHA_TOO_SMALL:
 put put my %BLOCK% in bin
 goto HHA_BB_EMPTY

HHA_GRIND:
 pause
 put turn grinder
#  match HHA_GRIND ...wait
#  match HHA_GRINDING You set your right foot against the already moving rocker
# matchwait
  
HHA_GRINDING:
# ECHO [FORGING: Waiting...]
  Match HHA_GROUND_%TRASH You nod, satisfied with the piece you've created.
  match HHA_BEST_%TRASH You smile as you realize that this piece is the very best that you can create.
  match HHA_ETCH You decide the safest thing to do now is to re-scribe the %WOOD %BLOCK with the glyph and try again.
  match HHA_TOOTHPICK In the blink of an eye the %WOOD %BLOCK is ground to almost nothing.
  match HHA_WORKSHOP_GRIND The grinding wheel doesn't budge!  Most likely the rent on this workshop has expired.
  matchwait

HHA_BEST_STOW:
 pause
 put stow my %BLOCK%
 put lean polisher
  match HHA_STOW_BEST the polishing wheel and run your fingers over the smooth surface of your %WOOD hammer-handle.
  matchwait

HHA_BEST_TRASH:
HHA_GROUND_TRASH:
 pause
 put put my hammer-handle in bin
 goto HANDLE

HHA_GROUND_STOW:
 pause
 put stow my %BLOCK
 put lean polisher
  match HHA_STOW_NORMAL the polishing wheel and run your fingers over the smooth surface of your %WOOD hammer-handle.
  matchwait

HHA_STOW_NORMAL:
 put stow my hammer-handle
 goto H-COMBINE

HHA_STOW_BEST:
 put put my hammer-handle in my %FORGEBP%
 echo [Forge: Made a superior part.]
 setvariable BESTHHANDLE True
 goto H-HANDLE

HHA_WORKSHOP_GRIND:
 move out
 move go workshop
 goto HHA_GRIND

####### FORGING-HAMMER VISE #######
H-COMBINE:
 put glance
 match HC_VISE down to see a finished %WOOD hammer-handle in your right hand and a finished %METAL hammer-head in your left hand.
 match HC_VISE down to see a finished %METAL hammer-head in your right hand and a finished %WOOD hammer-handle in your left hand.
 match HC_GET_HEAD You glance down to see a finished %WOOD hammer-handle in your right hand and nothing in your left hand.
 match HC_GET_HANDLE_SWAP You glance down to see a finished %METAL hammer-head in your right hand and nothing in your left hand.
 match HC_GET_HANDLE You glance down to see nothing in your right hand and a finished %METAL hammer-head in your left hand.
 match HC_GET_HEAD_SWAP You glance down to see nothing in your right hand and a finished %WOOD hammer-handle in your left hand.
 match HC_GET You glance down at your empty hands.
 matchwait

HC_GET:
 put get my hammer-handle from my %container
HC_GET_HEAD:
 put get hammer-head from my %container
 goto HC_VISE
HC_GET_HANDLE_SWAP:
 put get hammer-handle
 put swap
 goto HC_VISE
HC_GET_HANDLE:
 put get hammer-handle
 goto HC_VISE
HC_GET_HEAD_SWAP:
 put get hammer-head
 put swap
 goto HC_VISE

HC_VISE:
 pause
 put turn vise
  match HC_VISE You decide the safest thing to do now is to re-set the hammer-head in the vise
  match HC_VISE is using the vise right now.  You'll have to wait until he has finished.
  match HC_%TRASH You nod, satisfied with the piece you've created.
  match HC_BEST_%TRASH You smile as you realize that this piece is probably the best that you can create.
  matchwait

HC_STOW:
  echo ***DONE!  Next job?***
  exit

HC_TRASH:
HC_BEST_TRASH:
 put forging-hammer in bin
 goto HAMMER
 
HC_BEST_STOW:
 echo [Forge: A good hammer, we hope.]
 exit
 
SETUP:
 put remove %ARMOR
 put stow %ARMOR
  pause
 put get apron
 put wear apron
  pause
 put get forging-hammer
 put wear forging-hammer
 exit
 
UNSETUP:
 put remove apron
 put put apron in my %FORGEBP
  pause
 put remove forging-hammer
 put put forging-hammer in my %FORGEBP
  pause
 put get my %ARMOR
 put wear my %ARMOR
 exit
 
 LABELERROR:
  echo [There was an error.]
  exit