 |
gatorsss Newbie
Joined: 07 Sep 2004 Posts: 7
|
Posted: Tue Sep 07, 2004 10:41 pm
Get All |
I'm looking for an alias/script to pick up everything in the room when I check the room inventory.
The MUD is Achaea, and the command would be IH. It would show:
3297h, 5241m cexkdb-ih
"sigil6760" a monolith sigil
"trout297632" a trout
"shortsword335561" a steel shortsword
"shield132873" a Shield of Absorption
"weed341348" a sprig of cactus weed
Number of objects: 5
I want it to try to pick up every object in the room. The main use for this would be corpses or herbs when people die and drop a bunch of stuff. Does anybody have any ideas on how I could set up a script so I could just do the alias GETALL or something and have it try to pick up every object in the room? Thanks |
|
|
|
 |
geniusclown Magician

Joined: 23 Apr 2003 Posts: 358 Location: USA
|
Posted: Wed Sep 08, 2004 2:33 am |
I'm a bit wierd in that I really like multistate triggers, but here's how I would do it (untested):
| Quote: |
#TR getall {ih} {
getlist=""
#TEMP {^Number of objects} {#STATE getall;#FORALL @getlist {get %i}}
} "" {input}
#COND {^~"(%w)%d~"} {#ADDITEM getlist %1} {loop|param=99} |
This will fire whenever you use the ih command. |
|
_________________ .geniusclown |
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed Sep 08, 2004 2:45 am |
| Code: |
#AL getall {#T+ ga;ih}
#TR ga {~"%w(%d)} {get %1} {} {disable}
#TR {Number of objects} {#T- ga}
|
|
|
_________________ LightBulb
Senior member
Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious. |
|
|
 |
gatorsss Newbie
Joined: 07 Sep 2004 Posts: 7
|
Posted: Wed Sep 08, 2004 3:10 am |
thanks!
|
|
|
|
 |
|
|
|