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


Joined: 09 Mar 2003
Posts: 28

PostPosted: Sun Mar 09, 2003 4:37 pm   

Trigger repeating trouble
 
Ok I have a set of leveling triggers, which appear to be almost all working; I have handled the battle checks, and the hp/mana checks, that’s not the trouble.

#trigger {~[ Exits~:} {#var mobroom 0;#wait 200;#echo letslevellikemad}

#trigger {letslevellikemad} {#if (@mobroom > 0) {#while (@mobcount <= %numitems(@mobs)) {};#var mobcount 1;#var current 0} {#var moveyet 1;#echo movenow}

#trigger {movenow} {#if (@moveyet > 0) {#if (@pathtrack >= 18) {#var pathtrack 0;#echo letsstartover};#add pathtrack 1;%item( @pathing, @pathtrack)};#var moveyet 1

#var pathing {e|e|s|e|n|e|w|e|s|e|n|e|w|e|e|n|n}

ok now the actual trouble that comes up is, when the trigger movenow is called by letslevellikemad it returns 2-3 directions from the @pathing variable. As you can tell I tried to put in a check to see if it was being called twice, but that does not seem to be the case. Anyone have any suggestions?

Thanks Krohnu
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Mon Mar 10, 2003 12:05 am   
 
The only thing i can think of, is your {movenow} trigger must be firing multiple times. Maybe check your settings to see if this trigger is duplicated? Is there anything in the {letsstartover} trigger that might cause this? Does it happen reliably every time (the extra directions)?

--------

moon.icebound.net:9000
Reply with quote
krohnu
Beginner


Joined: 09 Mar 2003
Posts: 28

PostPosted: Mon Mar 10, 2003 2:50 am   
 
Thats kind of what i was thinking. But there is only one thing that it can fire off of, and nothing that I can find in any settings. When i right click on the trigger to run it, it works correctly, but when other trigers "trigger it" it consistently goes off 3 times. The little bad code fix I put in doesnt make any differance. I can see nothing in the {letsgoleveling} trigger to cause it. but maybe I am missing something.This is all the triggers i have running, and even coded at the time.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Mon Mar 10, 2003 6:33 am   
 
Using #WAIT is a bad thing. (Delays processing of further commands on the line until text is received from the MUD.) This might be causing multiple firings.


#trigger {~[ Exits~:} {#var mobroom 0;#ALARM letslevellikemadalarm +1;letslevellikemad}}

#ALIAS letslevellikemad {#if (@mobroom > 0) {#while (@mobcount <= %numitems(@mobs)) {};#var mobcount 1;#var current 0} {#var moveyet 1;#echo movenow}}

After seeing the line with Exits, it will wait a second then process the alias letslevellikemad.


Ton Diening
Reply with quote
krohnu
Beginner


Joined: 09 Mar 2003
Posts: 28

PostPosted: Mon Mar 10, 2003 6:52 pm   
 
Thanks TonDiening, that seemed to fix my trouble!
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