 |
Edwub Wanderer
Joined: 21 Nov 2002 Posts: 85 Location: USA
|
Posted: 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 |
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: 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 |
|
|
 |
Edwub Wanderer
Joined: 21 Nov 2002 Posts: 85 Location: USA
|
Posted: Thu Dec 26, 2002 5:00 am |
Thanks!
Edwub the Mage |
|
|
 |
|
|