|
trpstrife Novice
Joined: 26 Jul 2005 Posts: 34
|
Posted: Wed Aug 17, 2005 12:59 am
Swap containers when full |
I've been kicking around the idea of createing a code that will swap bags of holding until i have an empty one.
when you look at a full bag you get this message
bag of holding is about 90% full.
I could set it up where it would give me bag 2 but how can i set it up so it would continue to give me a bag, look at the bag and give me a new bag until it comes across one that says.
bag of holding is about 0% full. |
|
|
|
Aarlot Adept
Joined: 30 Dec 2003 Posts: 226
|
Posted: Wed Aug 17, 2005 1:59 am |
#TR {bag of holding is about (%d)~% full.$} {#IF (%1>0) {whatever you do to swap bags} {#SAY Empty bag found!}}
|
|
_________________ Everyone is entitled to their beliefs - until they die. Then only the truth matters. |
|
|
|
trpstrife Novice
Joined: 26 Jul 2005 Posts: 34
|
Posted: Wed Aug 17, 2005 2:20 am |
the sytnax is give bag # to yourself. the problem is if bag 1 and bag 2 is full i need it to give me bag 3
|
|
|
|
Aarlot Adept
Joined: 30 Dec 2003 Posts: 226
|
Posted: Wed Aug 17, 2005 3:20 am |
Ah, k. Something like this?
#ALIAS findbag {#VAR bagcount {1};give bag 1 to yourself}
#TR {bag of holding is about (%d)~% full.$} {#IF (%1>0) {#ADD bagcount 1;give bag @bagcount to yourself} {#SAY Empty bag found}}
#VAR bagcount {1} |
|
_________________ Everyone is entitled to their beliefs - until they die. Then only the truth matters. |
|
|
|
|
|