PDA

View Full Version : Forging Hammers Hangups



vamosj
09-07-2011, 10:59 PM
Creating a script just to forge hammers and can't tell why it hangs up sometimes and sometimes it doesn't....

The two main places it does is after a grind or when the piece is too small....




ECHO **********THIS SCRIPT IS USED TO CRAFT FORGING HAMMERS***********
echo ****ENSURE YOU HAVE SILVERS ON YOU TO PURCHASE TIME AND MATS*****
echo ******************START OUTSIDE THE WORKSHOP******************
echo ********MAKE SURE YOUR STOW BAG HAS ROOM TO PUT ITEMS IN********
echo *******YOUR HANDS MUST BE EMPTY FOR THIS TO START CORRECTLY!******
echo ****************NOD TO CONTINUE, HIT ESC TO EXIT*****************
match START You nod.
matchwait

START:
echo ****START:
put get bar
match MATSHANDLE Get what?
match begin bronze bar
match GETSOME You already have that.
matchwait

begin:
echo ****begin:
put swap
put go work
goto handleglyph

MATSHANDLE:
echo ****MATSHANDLE:
put put bar in bin
put out
put order 2
put buy
put swap
put go workshop
goto handleglyph:

handleglyph:
echo ****handleglyph
put stare handle-glyph
waitfor you
goto handlegrinder

handlegrinder:
echo ****handlegrinder:
put turn grinder
match timeup rent
match handleglyph Resignedly, you get to your feet.
match handlepolish You finish your work and stand up
match handlegrinder ...wait
match handlegrinder is using the grinder right now.
match toosmall1 The material you intend to shape has not been scribed with a pattern to work from.
match toothpick1 You mutter a few choice words as you get to your feet.
matchwait

handlepolish:
echo ****handlepolish
put drop bar
put lean polisher
match timeup rent
match P1 You set your right foot
matchwait

P1:
echo ****P1:
waitfor You straighten up from working at the polishing wheel and run your fingers over the smooth surface of your
put drop hammer-handle
waitfor you
put get bar
match MATSHEAD Get what?
match prephead You pick up
matchwait

toothpick1:
echo ****toothpick1:
put swear
waitfor you
put put toothpick in bin
waitfor you
Goto MATSHANDLE


toosmall1:
echo ****toosmall1:
pause 6
put lick my bar
goto MATSHANDLE







MATSHEAD:
echo ****MATSHEAD:
put out
put order 2
put buy
put swap
put go workshop
goto headglyph:

prephead:
echo ****prephead:
put swap
goto headglyph

headglyph:
echo ****headglyph
put stare head-glyph
waitfor you
goto headgrinder

headgrinder:
echo ****headgrinder:
put turn grinder
match timeup rent
match headglyph Resignedly, you get to your feet.
match headpolish You finish your work and stand up
match headgrinder ...wait
match headgrinder is using the grinder right now.
match toothpick2 You mutter a few choice words as you get to your feet.
matchwait

headpolish:
echo ****headpolish:
put drop bar
put lean polisher
match timeup rent
match P2 You set your right foot
matchwait

P2:
echo ****P2:
waitfor You straighten up from working at the polishing wheel and run your fingers over the smooth surface of your
pause 3
goto prepvise

toothpick2:
echo ****toothpick2:
put swear
waitfor you
put put toothpick in bin
waitfor you
Goto MATSHEAD

toosmall2:
echo ****toosmall2:
pause 6
put bark at bin
goto MATSHEAD




prepvise:
echo ****prepvise
put get hammer-handle
waitfor you
goto vise


vise:
echo ****vise
put turn vise
visecont:
match vise You decide the safest thing to do now is to re-set the
match madehammer You finish your work and step back, turning the
match visecont ...wait
matchwait


madehammer:
echo ****madehammer:
pause 4
put put forg in bin
goto START

timeup:
echo ****timeup
put drop bar
put drop ham
waitfor You
put out
goto START

GETSOME:
echo ***************************************
echo ***************************************
echo ***************************************
echo *******Your Hands are Full! Read Much?******
echo ***************************************
echo ***************************************
echo ***************************************

exit

Donquix
09-07-2011, 11:03 PM
Problem #1: This isn't a lich script.

vamosj
09-08-2011, 01:00 AM
Problem #1: This isn't a lich script.

Problem 2, I haven't learned Ruby yet... Still working on that...

Now back to the original question.

Donquix
09-08-2011, 01:49 AM
That was the best answer I can give you. No amount of time invested in getting a stormfront script to work is as useful as learning very basic ruby/lich scripting.

Why does it hang? Because it's a shitty scripting engine with very limited capabilities by design. No matter how much you fine tune it, that will happen periodically. Such is the life of stormfront scripts.

Gravebane525
09-08-2011, 06:00 AM
I know from doing my own scripting before if your pauses are not longer then the actual round time sometimes the commands go in early.

also depending on the account a wizard/stormfront script needs (or used to need) a pause every 2-3 commands.

toss in a pause at the begining of every section, a pause after every 2-3 puts. and a match to repeat the section with the trigger being what ever shows up when you try and put in a command and your still in rt... thats bout all I can think of

vamosj
09-09-2011, 12:59 PM
Put in some pauses as you suggested and it's working better... Still not a lich script but it's my own script and it's running long enough for me to be happy with it.... Now I can start learning ruby while it's running...

Gravebane525
09-09-2011, 01:19 PM
yea I have no idea if stormfront works like wizard but I know my old scripts would hang up randomly. and it mostly had to do with putting to many put commands in a row and having to many type ahead lines or the game lagging slightly and the script thinking the RT was over when it wasn't

Gibreficul
09-10-2011, 08:08 AM
Problem #1: This isn't a lich script.

That was the best answer I can give you. No amount of time invested in getting a stormfront script to work is as useful as learning very basic ruby/lich scripting.


Seconded.


Problem 2, I haven't learned Ruby yet... Still working on that...

Don't lie to me, you're not working on learning Ruby, you're working on a shitty SF script to make a forging hammer...
:club: