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
Edwub
Wanderer


Joined: 21 Nov 2002
Posts: 85
Location: USA

PostPosted: Wed Dec 25, 2002 11:49 pm   

#additem and aliases
 
Trying to make myself an alias to unload a container i have of alchemy in my mud.

example:
A toadstool is lying here.

triggered to: take toadstool; put toadstool @alchemybag


I want to make an alias 'chemtransfer'
I don't understand the #additem feature well.

I have 50 ingrediant triggers.
I want to add a #additem transferlist to each of them
I want to know if its possible if it wont add the item twice to the list.

When i type chemtransfer blah, i want it to get all.toadstool @alchemybag; put all.toadstool blah
etc for each ingrediant.
And then to reset the list.

I use zmud 6.16. If anyone can give me an idea of how to do it for that one ingrediant, i can just copy/reword it, for everything.

Thank you!



Edwub the Mage
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Dec 26, 2002 4:43 am   
 
As the #ADDITEM helpfile says, "Duplicated values are not added using this command. To add a duplicate item to a list, use the %additem function." I don't know how much clearer it can be. #ADDITEM does NOT add duplicates. %additem DOES.

#TR {A toadstool is lying here.} {take toadstool;put toadstool @alchemybag;#ADDITEM transferlist toadstool}
#AL chemtransfer {#FORALL @transferlist {get all.%i @alchemybag;put all.%i %1};#VAR transferlist %null}

LightBulb
Senior Member
Reply with quote
Edwub
Wanderer


Joined: 21 Nov 2002
Posts: 85
Location: USA

PostPosted: Thu Dec 26, 2002 5:00 am   
 
Thanks!

Edwub the Mage
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