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
Sorin
Beginner


Joined: 28 Mar 2004
Posts: 10
Location: USA

PostPosted: Sun Mar 28, 2004 12:22 pm   

Need just a little help here.
 
Im using an advanced triggerset with Variables. The mud i play on, has something called balance regain, between each action that uses balance, etc. Its an Achean type mud. Now, i cant get it to pause the commands between balance regain, when im Enchanting. The #while isnt working with the trigger i have to capture it so it can work.
Its supposed to switch the variable @regbalance back to 0, and wait till the Variable =1 to do the next step. I have set a trigger to capture the balance regain message to set the variable to 1 again..

Still isnt working. So let me post it, and you can tell me whats wrong?


#ALIAS makeWorrystone {gh 1 gold;#LOOP @quantity,1 {outr ice;outr goldbar;outr silver;outr horn;outr dust;#WA 500;put ice in @bowlIN;put goldbar in @bowlIN;put silver in @bowlIN;put horn in @bowlIN;put dust in @bowlIN;#WA 500;BEGIN CREATION OF WORRYSTONE;ROLL DICE;@balanceReg = 0;#WHILE (@balanceReg == 0) {#WA 500};ROLL DICE;@balanceReg = 0;#WHILE (@balanceReg == 0) {#WA 500};ROLL DICE;@balanceReg = 0;#WHILE (@balanceReg == 0) {#WA 500};ROLL DICE;@balanceReg = 0;#WHILE (@balanceReg == 0) {#WA 500};ROLL DICE;@balanceReg = 0;#WHILE (@balanceReg == 0) {#WA 500};FLIPCOIN;@balanceReg = 0;#WHILE (@balanceReg == 0) {#WA 500};FLIPCOIN;@balanceReg = 0;#WHILE (@balanceReg == 0) {#WA 500};FLIPCOIN;@balanceReg = 0;#WHILE (@balanceReg == 0) {#WA 500};FLIPCOIN;@balanceReg = 0;#WHILE (@balanceReg == 0) {#WA 500};FLIPCOIN;@balanceReg = 0;#WHILE (@balanceReg == 0) {#WA 500};SPIN AROUND THRICE;@balanceReg = 0;#WHILE (@balanceReg == 0) {#WA 500};WAVE FEATHER;@balanceReg = 0;#WHILE (@balanceReg == 0) {#WA 500};SQUARE THE CIRCLE;@balanceReg = 0;#WHILE (@balanceReg == 0) {#WA 500};END RITUAL;get stone from @bowlOUT}}

Sorry for the terrible formatting, but this is how i scripted it in.
im not sure what i did wrong, but maybe someone can help me.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Mar 28, 2004 3:52 pm   
 
"Its supposed to switch the variable @regbalance back to 0"
"#WHILE (@balanceReg == 0)"

Perhaps your trigger is changing the wrong variable?

The routine worked when I tested it. As a commandline alias, it should be fine, but with all those #WAITs it wouldn't be advisable to call it from a trigger.
Reply with quote
Sorin
Beginner


Joined: 28 Mar 2004
Posts: 10
Location: USA

PostPosted: Mon Mar 29, 2004 8:31 am   
 
I messed up writing the triggers action here, but i did it correctly with the client. My problem is, that its not waiting, till i get that damn message, its just doing it all at once.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Mon Mar 29, 2004 1:04 pm   
 
Read this article to find out more about the perils of using #WAIT in your triggers. The advisable course of action would be to replace them by alarms.

However, you are using zMUD scripting the wrong way. zScript is an event-driven language and things like
#WHILE (@balanceReg == 0) {#WA 500}

go against this.

Instead, you should have your balance trigger do the next step in the sequence. The sequence of steps could then be stored in a stringlist. The trigger would just get the next item in the stringlist (which could contain more than one command) and executes it. Then it advances to the next item.
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