|
Alcander Wanderer
Joined: 04 Aug 2001 Posts: 79 Location: USA
|
Posted: Mon Dec 31, 2007 6:33 pm
Potion Script problem |
On the pattern "brew (%d) cyan"$
I am trying to use the code below. I really suck at these things so if you see obvious I do apologize.
@cyan = the number of cyan potions I have available
@waters = the number of water potions that I use to create cyan potions
fb = a mud alias, Fill Bottle
When I attempt to run this trigger it ends up locking up my Cmud session. Anything obvious that I am doing wrong here?
Any help is appreciated.
Code: |
#IF (@cyan > %1) {
put cyan potions in backpack
get %1 cyan potions from backpack
drop %1 cyan potions
}
#IF (@Cyan < %1) {#UNTIL (@waters > %1) {fb 25}}
#IF (@waters > %1) {#UNTIL (@cyan > %1) {create 25 mana}} |
|
|
|
|
Arde Enchanter
Joined: 09 Sep 2007 Posts: 605
|
Posted: Mon Dec 31, 2007 10:43 pm |
You have an infinite #UNTIL loop, read here more detailed explanation: http://forums.zuggsoft.com/forums/viewtopic.php?t=29411
For ex., in your first #until loop there is no commands inside loop body to adjust @waters value, so if once (@waters > %1) evaluates to true, it will remains true forever. |
|
|
|
Alcander Wanderer
Joined: 04 Aug 2001 Posts: 79 Location: USA
|
Posted: Tue Jan 01, 2008 6:27 pm |
Thanks Arde. I knew it was something stupid.
|
|
|
|
|
|