Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
gatorsss
Newbie


Joined: 07 Sep 2004
Posts: 7

PostPosted: 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
Reply with quote
geniusclown
Magician


Joined: 23 Apr 2003
Posts: 358
Location: USA

PostPosted: 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
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: 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.
Reply with quote
gatorsss
Newbie


Joined: 07 Sep 2004
Posts: 7

PostPosted: Wed Sep 08, 2004 3:10 am   
 
thanks!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net