PDA

View Full Version : first attempt



Volstock
06-19-2004, 10:17 AM
my first attempt at making a script so I made a little bundle script. But I was wondering if there's anyway I could make this script better. Please help


#bundle.Cmd

firststep:
echo *** TO START SCRIPT TYPE .Bundle "<name of herb>" <Container> ***
echo *** FOR EXAMPLE .BUNDLE "ACANTHA LEAF" BACKPACK ***
ECHO *** WOULD BUNDLE THE ACANTHA LEAF ***
ECHO *** AND PLACE IT INSIDE YOUR BACKPACK ***
ECHO *** ***
ECHO *** ***
ECHO *** ***
echo **** To start the script, type 'proceed' ***
echo **** [type 'proceed' to continue the script] ***
echo **** ***
waitfor proceed

secondstep:
put get %1
pause 1
put glance
match goahead in your right hand and nothing in your left hand
match goahead in your left hand
match alldone I could not find
match oops You remove
matchwait
goahead:
wait
put get %1
put bund %1
match stop1 Maybe you should start a new bundle
match oops You remove
match alldone I could not find
MATCH STOP2 You do not have anything to bundle!
match goahead Carefully, you combine all your
match full won't fit in the
matchwait

alldone:
echo *********************************
echo *** ***
echo *** Choose another herb !! ***
echo *** ***
echo *********************************
exit

stop1:
echo *********************************
echo *** ***
echo *** HERB FULL ***
echo *** ***
echo *********************************

put put other %1 in my %2
goto goahead

STOP2:
echo *********************************
echo *** ***
echo *** NO MORE HERB TO BUNDLE ***
echo *** ***
echo *********************************

PUT PUT %1 IN MY %2
EXIT

oops:
echo *********************************
echo *** ***
echo *** NO MORE HERB TO BUNDLE ***
echo *** ***
echo *********************************
put put put other %1 in my %2
exit


full:
echo *** Your %2 is all full! ***
exit

Artha
06-19-2004, 10:21 AM
put put put other %1 in my %2

Take a put out.


For the transition from firststep to secondstep, I think you need to do a match rather than a waitfor. So, for example
match secondstep proceed
matchwait

Bobmuhthol
06-19-2004, 10:24 AM
Waitfor Proceed works. You *might* (I doubt it) need a goto secondstep.

Volstock
06-19-2004, 10:30 AM
Originally posted by Bobmuhthol
Waitfor Proceed works. You *might* (I doubt it) need a goto secondstep.


what do you mean waitfor proceed Bob can you elaborate please ?

Artha
06-19-2004, 10:31 AM
firststep:
echo *** TO START SCRIPT TYPE .Bundle "<name of herb>" <Container> ***
echo *** FOR EXAMPLE .BUNDLE "ACANTHA LEAF" BACKPACK ***
ECHO *** WOULD BUNDLE THE ACANTHA LEAF ***
ECHO *** AND PLACE IT INSIDE YOUR BACKPACK ***
ECHO *** ***
ECHO *** ***
ECHO *** ***
echo **** To start the script, type 'proceed' ***
echo **** [type 'proceed' to continue the script] ***
echo **** ***
waitfor proceed

Anebriated
06-19-2004, 11:39 AM
You shouldn't need the goto Secondstep. By default the script will jump to Secondstep as it is the next block of code because it was given nowhere else to go and there is no pausing command in the script there.

Volstock
06-19-2004, 11:56 AM
oh that I want people to read and know how to use the script before they start it that's why the waitfor proceed is there

Bobmuhthol
06-19-2004, 12:15 PM
An easier way to do it would be..

IF_2 GOTO SECONDSTEP
ELSE
echo *** TO START SCRIPT TYPE .Bundle "<name of herb>" <Container> ***
echo *** FOR EXAMPLE .BUNDLE "ACANTHA LEAF" BACKPACK ***
ECHO *** WOULD BUNDLE THE ACANTHA LEAF ***
ECHO *** AND PLACE IT INSIDE YOUR BACKPACK ***
ECHO *** ***
ECHO *** ***
ECHO *** ***
exit