View Full Version : Pickup script wanted
Sylvan Dreams
09-01-2005, 04:22 PM
Does anyone have a script that will pick up multiple items and store them in a container? I already have a script that will pick up a single item but I want to be able to tell it to pick up multiple when I run it.
Drew2
09-01-2005, 04:27 PM
The one I wrote without the game open is crap. This one works.
Noticed some type ahead problems. Corrected.
I'll improve it later tonight, but it doesn't account for full bags, nor misspellings of the item you're picking up.
#get.Cmd
put get %1
waitfor You
put stow my %1
waitfor You
if_1 goto loop
exit
loop:
shift
if_1 goto loop2
exit
loop2:
put get %1
match stow You
match exit USAGE
match exit I could not find
matchwait
stow:
put stow my %1
waitfor You put
goto loop
exit:
exit
[Edited on 9-1-2005 by Tayre]
[Edited on 9-1-2005 by Tayre]
[Edited on 9-1-2005 by Tayre]
Raine
09-01-2005, 04:55 PM
Is that for Wizard or Stormfront? How would you convert it to the other?
Latrinsorm
09-01-2005, 05:49 PM
#A non-sucky version
if_1
goto main
goto suxx0r
suxx0r:
echo SUXX0R PUT AN ITEM
exit
shift:
shift
main:
put get %1
match got You pick up
match got You remove
match lard You struggle
match no Get what?
matchwait
got:
put stow my %1
match trouble won't fit
match no You put
matchwait
trouble:
echo ### Container full, aborting. ###
exit
lard:
echo ### Carrying too much, aborting. ###
exit
no:
if_2
goto shift
exit
**This is the end of the script**
Usage is .get rose pearl "star ruby" socks
To convert this to Stormfront I'm pretty sure all you have to do is change %1 to %1% after get and stow. I don't know for sure if Stormfront uses the same "if" syntax.
edited to add a too-encumbered check
[Edited on 9-1-2005 by Latrinsorm]
Sylvan Dreams
09-01-2005, 07:18 PM
Tayre's script worked alright. Latrinsorm's would pick up all the items, then do another 'get' and hang, whereas Tayre's ended after the last input variable.
Shaelun
09-01-2005, 07:24 PM
Don't you think it's a little bit ungrateful to be criticizing people who were trying to help you...?
... whatever.
Sylvan Dreams
09-01-2005, 07:37 PM
Originally posted by Shaelun
Don't you think it's a little bit ungrateful to be criticizing people who were trying to help you...?
... whatever.
No, I had assumed that since Tayre said he was going to work on it later, that he might use Latrinsorm's in whole or in part and would find the information useful.
Sorry if it came off as being ungrateful, Tayre & Latrinsorm.
Latrinsorm
09-01-2005, 08:23 PM
Originally posted by Sylvan Dreams
Latrinsorm's would pick up all the items, then do another 'get' and hangIt would do a "get blah" and that was it? That's very odd. Do me a favor and post a log? :D
I didn't think you were being ungrateful, btw.
Sylvan Dreams
09-01-2005, 08:35 PM
I used some random junk I found lying around for this test. Here's the log:
You also see a copper lockpick, a short sword and a pair of forest green shoes.
Obvious exits: west
>.get lock sword shoes
[Script get is running, Esc to cancel, Shift-Esc to pause]
>get lock
You pick up a copper lockpick.
>stow my lock
You put a copper lockpick in your large sack.
>get sword
You pick up a short sword.
>stow my sword
You put a short sword in your large sack.
>get shoes
You pick up a pair of forest green shoes.
>stow my shoes
You put a pair of forest green shoes in your large sack.
>get
USAGE: GET [{number of} MY {description}] {ITEM} [location]
Examples:
GET BROADSWORD
GET 12 OF MY WOODEN ARROWS IN MY QUIVER
>
[script aborted] <- I hit ESC to end it.
>
Latrinsorm
09-01-2005, 08:46 PM
I must be messing up the if syntax.
Change:
if_1
goto main
goto suxx0r
to
if_1 goto main
goto suxx0r
and
no:
if_2
goto shift
exit
to
no:
if_2 goto shift
exit
Sylvan Dreams
09-01-2005, 09:45 PM
Latrinsorm,
Your changes fixed it!
>.get lockp sword shoes
[Script get is running, Esc to cancel, Shift-Esc to pause]
>get lockp
You pick up a copper lockpick.
>stow my lockp
You put a copper lockpick in your large sack.
>get sword
You pick up a short sword.
>stow my sword
You put a short sword in your large sack.
>get shoes
You pick up a pair of forest green shoes.
>stow my shoes
You put a pair of forest green shoes in your large sack.
[script done]
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.