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
trpstrife
Novice


Joined: 26 Jul 2005
Posts: 34

PostPosted: 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.
Reply with quote
Aarlot
Adept


Joined: 30 Dec 2003
Posts: 226

PostPosted: 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.
Reply with quote
trpstrife
Novice


Joined: 26 Jul 2005
Posts: 34

PostPosted: 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
Reply with quote
Aarlot
Adept


Joined: 30 Dec 2003
Posts: 226

PostPosted: 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.
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