PDA

View Full Version : Pickup Script



Caluss
11-14-2003, 12:19 PM
Hi, I wrote this script but it doesn't seem to work properly. All I want it to do is to pickup items off the ground.
I believe I just plagerized this from one of Kranar's scripts. I was hoping someone could help me fix it


#pickup.Cmd


put look
goto checktre

checktre:
match getwand wand
match gethyac hyacinth
match getring gold ring
match getcoral coral
match getgarnet garnet
match gettopaz shell
match getsap sapphire
match getlap lapis
match getpearl pearl
match getruby ruby
match getopal opal
match getdiamond diamond
match getemerald emerald
match getgem gem
match getglimmaerstone glimaerstone
match getmoonstone moonstone
match getblazestar blazestar
match gettrunk trunk
match getbox box
match getstrong strongbox
match getcoffer coffer
match getchest chest
match getsilver silver
match aftertreasure Obvious paths:
match aftertreasure Obvious exits:
matchwait

getcoral:
save coral
goto gettreasure

getring:
save ring
goto gettreasure

getwand:
save wand
goto gettreasure

getpearl:
save pearl
goto gettreasure

getgarnet:
save garnet
goto gettreasure

gettopaz:
save topaz
goto gettreasure

getsap:
save sapphire
goto gettreasure

gethyac:
save hyacinth
goto gettreasure

getlap:
save lapis
goto gettreasure

getruby:
save ruby
goto gettreasure

getdiamond:
save diamond
goto gettreasure

getemerald:
save emerald
goto gettreasure

getgem:
save gem
goto gettreasure

getglimaerstone:
save glimaerstone
goto gettreasure

getmoonstone:
save moonstone
goto gettreasure

getwand:
save wand
goto gettreasure

getring:
save ring
goto gettreasure

getblazestar:
save blazestar
goto gettreasure

getsilver:
save silver
goto gettreasure

getbox:
save box
goto gettreasure

getstrong:
save strong
goto gettreasure

getcoffer:
save coffer
goto gettreasure

getchest:
save chest
goto gettreasure

gettrunk:
save trunk
goto gettreasure

gettreasure:
put get %s
match continuetre You pick up
matchwait

continuetre:
put open my pack
waitfor You open
put put %s in my pack
waitfor You put
put close my pack
match treasurefinal You close

treasurefinal:
put look
goto checktre

aftertreasure:
echo ***done****

Here is what happens

>look

The road takes a brief northern jog, rising slightly as it does so. The reeds, cattails and bulrushes still press in against the road, but the ground seems parched and dry, as if there hasn't been a rain in a good while. The surrounding vegetation is stiff and brown, easily breaking off at the touch of a hand. The sheer thickness of it, though, prevents any digression from the road. An errant spark would quickly turn this area into a raging inferno. You also see a rough slab of silver, a rough slab of silver, a golden beryl gem, a moonglae opal, a rough slab of silver, a rough slab of silver, a rough slab of silver and a rough slab of silver.
Obvious paths: southeast, southwest


running the script

.pickup

[Press the ESCape key to abort script.]
look
[Gyldemar Road]
The road takes a brief northern jog, rising slightly as it does so. The reeds, cattails and bulrushes still press in against the road, but the ground seems parched and dry, as if there hasn't been a rain in a good while. The surrounding vegetation is stiff and brown, easily breaking off at the touch of a hand. The sheer thickness of it, though, prevents any digression from the road. An errant spark would quickly turn this area into a raging inferno.

GOTO label not found!

You also see a rough slab of silver, a rough slab of silver, a golden beryl gem, a moonglae opal, a rough slab of silver, a rough slab of silver, a rough slab of silver and a rough slab of silver.
Obvious paths: southeast, southwest


Thanks for any help in advance

Reyek
11-14-2003, 01:06 PM
YOu were missing opal and spelled glimarstone wrong in your submatch.

#pickup.Cmd


put look
goto checktre

checktre:
match getwand wand
match gethyac hyacinth
match getring gold ring
match getcoral coral
match getgarnet garnet
match gettopaz shell
match getsap sapphire
match getlap lapis
match getpearl pearl
match getruby ruby
match getopal opal
match getdiamond diamond
match getemerald emerald
match getgem gem
match getglimmaerstone glimaerstone
match getmoonstone moonstone
match getblazestar blazestar
match gettrunk trunk
match getbox box
match getstrong strongbox
match getcoffer coffer
match getchest chest
match getsilver silver
match aftertreasure Obvious paths:
match aftertreasure Obvious exits:
matchwait

getcoral:
save coral
goto gettreasure

getring:
save ring
goto gettreasure

getwand:
save wand
goto gettreasure

getpearl:
save pearl
goto gettreasure

getgarnet:
save garnet
goto gettreasure

gettopaz:
save topaz
goto gettreasure

getsap:
save sapphire
goto gettreasure

gethyac:
save hyacinth
goto gettreasure

getlap:
save lapis
goto gettreasure

getruby:
save ruby
goto gettreasure

getdiamond:
save diamond
goto gettreasure

getemerald:
save emerald
goto gettreasure

getgem:
save gem
goto gettreasure

getglimmaerstone:
save glimaerstone
goto gettreasure

getmoonstone:
save moonstone
goto gettreasure

getwand:
save wand
goto gettreasure

getring:
save ring
goto gettreasure

getblazestar:
save blazestar
goto gettreasure

getsilver:
save silver
goto gettreasure

getbox:
save box
goto gettreasure

getstrong:
save strong
goto gettreasure

getcoffer:
save coffer
goto gettreasure

getchest:
save chest
goto gettreasure

gettrunk:
save trunk
goto gettreasure

getopal:
save opal
goto gettreasure

gettreasure:
put get %s
match continuetre You pick up
matchwait

continuetre:
put open my pack
waitfor You open
put put %s in my pack
waitfor You put
put close my pack
match treasurefinal You close
matchwait

treasurefinal:
put look
goto checktre

aftertreasure:
echo ***done****

Adhara
11-14-2003, 01:14 PM
Your continuetre was missing the matchwait (corrected in Reyek's post) and this line:

match gettopaz shell

should be, of course:

match gettopaz topaz

Reyek
11-14-2003, 01:16 PM
heh i missed that ::ducks::