PDA

View Full Version : Forging - Crafting Script



Dintarl
11-12-2008, 01:14 PM
This script is completely untested, I just finished writing it up, but it should run from the Teller, the workshop, or the supply stall in Wehnimer's Landing, and should continue until manually stopped, as it will run you to get more silver (in an amount specified by the user) in the case you run out. Comments and suggestions are more than welcome.

*EDIT* Added in a skill check, so it will stop when you reach mastery. Also adjusted so that it should not hang up any more when you use an entire bar for a crafting attempt.

SCRIPT:


echo
echo
echo Variables:
echo 1 - Container for bars
echo 2 - How much silver you want to withdraw to keep going
echo
echo
echo Can start from the Supply Stall, the Teller,
echo or the Workshops in Wehnimer's Landing
echo
echo Ensure that you are wearing an apron upon starting
echo in any place, and have your bars purchased and stowed
echo if starting in the Supply Stall or the Workshop.
echo The script will withdraw silver and purchase your bars
echo for you if you are starting in the bank.
echo
echo

BEGIN:
echo Type YES to start or NO to abort.
match START YES
match ABORT NO
matchwait

ABORT:
exit

START:
put stow all
put look
match BANKSTART Teller
match STALLSTART Supply Stall
match WORKSTART Workshop]
matchwait

BANKSTART:
put withdraw %2 silver
put go arch
move out
move e
move e
move e
move e
move n
move e
move n
put go gate
move n
move n
move n
put order 3 of 2
put buy
pause 1
put open my package
put empty my package in my %1
pause 2
put throw my package
goto STALLSTART

STALLSTART:
put go workshop
match NEEDSILVER1 You don't have enough silver, rentals
match WORKSTART the clerk collects 300 silvers
match WORKSTART the clerk directs you to your rented
matchwait

WORKSTART:
put take bar from my %1
match GOTBAR You remove
match NEEDBAR Get what?
matchwait

GOTBAR:
put swap
goto GLYPH

GLYPH:
pause 2
match GLYPH2 You rub your chin
match GLYPH2 In the skill of forging - crafting, you are a novice
match GLYPH2 In the skill of forging - crafting, you are an apprentice
match GLYPH2 In the skill of forging - crafting, you are a journeyman
match GLYPH2 In the skill of forging - crafting, you are a skilled
match GLYPH2 In the skill of forging - crafting, you are a highly skilled
match MASTER In the skill of forging - crafting, you are a master
put artisan skill
put think
matchwait

GLYPH2:
match GLYPH3 bronze bar
match WORKSTART You glance down at your empty hands.
put glance
matchwait

GLYPH3:
put stare head-glyph
match TOOSMALL Before the design is complete
match GRINDER Your material is marked with a pattern,
matchwait

TOOSMALL:
pause 2
put put my bar in bin
goto WORKSTART

GRINDER:
pause 2
put turn grinder
match TIMESUP The grinding wheel doesn't
match GLYPH You decide the safest
match TOOTHPICK You mutter a few choice
match HAMMER You finish your work and
matchwait

TIMESUP:
move out
put go workshop
MATCH NEEDSILVER1 You don't have enough silver, rentals
MATCH GRINDER the clerk collects 300 silvers
matchwait

TOOTHPICK:
pause 2
put put my tooth in bin
goto WORKSTART

HAMMER:
pause 2
put put my hammer in bin
put swap
goto GLYPH

NEEDBAR:
move out
put order 3 of 2
put buy
match NEEDSILVER2 But you do not have enough silver!
match BACKIN I've placed your purchases in this
matchwait

BACKIN:
pause 1
put open my package
put empty my package in my %1
pause 2
put throw my package
put go workshop
match NEEDSILVER1 You don't have enough silver, rentals are
match WORKSTART the clerk directs you to your rented
match WORKSTART the clerk collects 300 silvers
matchwait

NEEDSILVER1:
put stow all
move s
move s
move s
move out
move s
move w
move s
move w
move w
move w
move w
put go bank
put go arch
put withdraw %2 silver
goto GOBACK

GOBACK:
pause 1
put go arch
move out
move e
move e
move e
move e
move n
move e
move n
put go gate
move n
move n
move n
goto STALLSTART

NEEDSILVER2:
put stow all
move s
move s
move s
move out
move s
move w
move s
move w
move w
move w
move w
put go bank
put go arch
pause 1
goto BANKSTART

MASTER:
go out
echo
echo Congratulations! You have mastered crafting!
echo
exit

Martaigne
11-12-2008, 01:28 PM
Thanks! I'll test this out later. If it works I'll convert it for Citrus.

Amber
11-12-2008, 02:29 PM
Doesn't work. Specifically, there's no shopstart and workstart, for whatever reason, doesn't start. I'll try it again when my time is up.

Dintarl
11-12-2008, 02:36 PM
What part doesn't work? Does it hang up, or just not start at all? Are you using Stormfront? (Not sure if it will work in WFE, I made it for SF)

Thank you.

Dintarl
11-12-2008, 02:41 PM
I just saw a problem with the skill check to make it stop when you master - I don't have the message for when you have no skill at all - will fix that in just a moment.


EDIT:

Fixed the mislabel and added in a key so it does not hang up on someone with no skill in forging - crafting.

The edited script above *should* work now.

Amber
11-12-2008, 02:51 PM
I'm using stormfront. When I enter the workshop, I just stand there until I do everything manually.

Dintarl
11-12-2008, 02:52 PM
Had a mixed up label there, try with what I edited again to see if it works now?

Seems to be working for my test character now.

Amber
11-12-2008, 02:57 PM
I figured it out. I was entering the workshop with time remaining. Deleted the shopstart and added this

STALLSTART:
put go workshop
match NEEDSILVER1 You don't have enough silver, rentals
match WORKSTART the clerk collects 300 silvers
match workstart realizing
matchwait

and it's working fine now. Thanks for the script!

Dintarl
11-12-2008, 02:59 PM
Ah, will have to add that little line in, didn't think about someone starting the script outside with time remaining. Thank you!


That little bit has been added in above, thanks again.

One more little thing - left out a word in the line to throw out bars that are too small, fixed now.

Grenklin
11-21-2008, 03:58 PM
has been getting stuck for me when i use up the whole bar to craft my hammer-head

here is what i see:
************************************************** **************
As you place a rough bronze hammer-head into a wooden bin you feel pleased with yourself at having cleaned up the surrounding area.
>
You don't have anything to swap!
>artisan skill
>glance
In the skill of forging - crafting, you are an apprentice with 160 ranks.
>
You glance down at your empty hands.
>stare head-glyph
Your left hand is empty! Have you even touched the glyph that you're concentrating on?
************************************************** ************
stops there and just does nothing and i copied the recent script

thanks

Eddge
01-19-2009, 09:09 PM
how do you copy scripts into SF?

Shimmerhands
01-20-2009, 11:05 AM
I have not done it in a while but I think it is crtl. V.

Dintarl
05-15-2009, 07:41 PM
Sorry it took so long for me to get to this - was on a hiatus for a few months. Fixed the hangup caused by using an entire bar in a forging attempt.

If you run into any other problems, let me know, I'll keep an eye out on this.

Dintarl
05-17-2009, 10:09 PM
One more slight tweak to fix another hangup.