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
shaun.murray
Magician


Joined: 23 Jul 2005
Posts: 334
Location: Chicago

PostPosted: Tue Jan 29, 2008 6:10 pm   

double output?
 
Code:
#TRIGGER {~[H:&%dhit_cur/&%dhit_max] ~[M:&%dman_cur/&%dman_max] ~[S:&%dspi_cur/&%dspi_max] ~[E:&%dend_cur/&%dend_max]} {
  #IF (@bdetect) {
    #IF (@combat_check = 0) {
      #VARIABLE bdetect 0
      act
      }
    }
  #IF (@combat_check = 10) {
    #IF (@autoglobe = 1) {
      #IF (@globebuffer = 1) {
        #IF (@globe_check = 1) {
          invoke 'globe of fluc'
          #VARIABLE globebuffer 0
          #VARIABLE globe_check 1
          }
        }
      }
    #IF (@autorad = 1) {
      #IF (@radbuffer = 1) {
        #IF (@rad_check = 1) {
          rad def
          #VARIABLE radbuffer 0
          #VARIABLE rad_check 1
          }
        }
      }
    #IF (@stance_buffer = 1) {#IF (@autostance = 1) {#IF (@stance_combat = 0) {ann stan}}}
    #IF (@autozmh = 1) {
      #IF (@hit_cur < @hps_pool) {
        #IF (@healbuffer = 1) {
          #VARIABLE healbuffer 4
          zmh
          zmh
          zmh
          }
        }
      }
    #IF (@autozin = 1) {
      #IF (@end_cur < @end_pool) {
        #IF (@endbuffer <= 1) {
          #VARIABLE endbuffer 3
          zin
          zin
          zin
          }
        }
      }
    #IF (@hit_cur < 8000) {#VARIABLE healbuffer 1}
    #IF (@end_cur < 2500) {#VARIABLE endbuffer 1}
    #VARIABLE combat_check 0
    }
  #SAY this is the outcombat trigger
  } "" {prompt|case}


Is giving me this....

[Lag: 0] [Align: -1000] [ 122454657 ] [Reply: ]
[H:28677/35485] [M:100/100] [S:7401/8271] [E:19771/20070]this is the outcombat trigger
this is the outcombat trigger


Any idea why? As far as I've found... This is the ONLY trigger to do that #say.... TIA!
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Tue Jan 29, 2008 6:40 pm   
 
What were you expecting to happen? What is it about this trigger that you think is incorrect? The pattern matches and the #say command you have there it outside any of the #if statements. It should be firing and printing that text, and it is. It prints it on the same line because prompt lines don't end in a CRLF like normal lines do - that's why when you enter a command, it goes next to the prompt instead of on the next line. So it looks to me like that output is just what it's supposed to be.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
shaun.murray
Magician


Joined: 23 Jul 2005
Posts: 334
Location: Chicago

PostPosted: Tue Jan 29, 2008 6:49 pm   
 
Code:
#TRIGGER {~[H:&%dhit_cur/&%dhit_max] ~[M:&%dman_cur/&%dman_max] ~[S:&%dspi_cur/&%dspi_max] ~[E:&%dend_cur/&%dend_max]} {  #IF (@bdetect) {#IF (@combat_check = 0) {#VARIABLE bdetect 0;act}};#IF (@combat_check = 10) {#IF (@autoglobe = 1) {#IF (@globebuffer = 1) {#IF (@globe_check = 1) {invoke 'globe of fluc';#VARIABLE globebuffer 0;#VARIABLE globe_check 1}}};#IF (@autorad = 1) {#IF (@radbuffer = 1) {#IF (@rad_check = 1) {rad def;#VARIABLE radbuffer 0;#VARIABLE rad_check 1}}};#IF (@stance_buffer = 1) {#IF (@autostance = 1) {#IF (@stance_combat = 0) {ann stan}}};#IF (@autozmh = 1) {#IF (@hit_cur < @hps_pool) {#IF (@healbuffer = 1) {#VARIABLE healbuffer 4;zmh;zmh;zmh}}};#IF (@autozin = 1) {#IF (@end_cur < @end_pool) {#IF (@endbuffer <= 1) {#VARIABLE endbuffer 3;zin;zin;zin}}};#IF (@hit_cur < 8000) {#VARIABLE healbuffer 1};#IF (@end_cur < 2500) {#VARIABLE endbuffer 1};#VARIABLE combat_check 0};#SAY this is the outcombat trigger} "" {prompt|case}


Maybe that'll be easier to read? I'm not following what your saying. The problem is, the double output. The two #SAY that gets shown. Should only be one. Because I'm getting two with each trigger, when 'rad def' or 'invoke 'globe of fluc' fire off, it does it twice. =[
Reply with quote
shaun.murray
Magician


Joined: 23 Jul 2005
Posts: 334
Location: Chicago

PostPosted: Tue Jan 29, 2008 6:59 pm   
 
Code:

#TRIGGER {~[H:&%dhit_cur/&%dhit_max] ~[M:&%dman_cur/&%dman_max] ~[S:&%dspi_cur/&%dspi_max] ~[E:&%dend_cur/&%dend_max]} {
  #IF (@bdetect) {
    #IF (@combat_check = 0) {
      #VARIABLE bdetect 0
      act
      }
    }
  #IF (@autoglobe = 1) {
    #IF (@globebuffer = 1) {
      #IF (@globe_check = 1) {
        invoke 'globe of fluc'
        #VARIABLE globebuffer 0
        #VARIABLE globe_check 1
        }
      }
    }
  #IF (@autorad = 1) {
    #IF (@radbuffer = 1) {
      #IF (@rad_check = 1) {
        rad def
        #VARIABLE radbuffer 0
        #VARIABLE rad_check 1
        }
      }
    }
  #IF (@stance_buffer = 1) {#IF (@autostance = 1) {#IF (@stance_combat = 0) {ann stan}}}
  #IF (@autozmh = 1) {
    #IF (@hit_cur < @hps_pool) {
      #IF (@healbuffer = 1) {
        #VARIABLE healbuffer 4
        zmh
        zmh
        zmh
        }
      }
    }
  #IF (@autozin = 1) {
    #IF (@end_cur < @end_pool) {
      #IF (@endbuffer <= 1) {
        #VARIABLE endbuffer 3
        zin
        zin
        zin
        }
      }
    #VARIABLE combat_check 0
    }
  #VARIABLE hit_diff %eval( @hit_max - @hit_cur)
  #VARIABLE hit_heals %eval( %eval( @hit_diff / 200) - 6)
  } "" {prompt|case}


*sigh* Still a no go... Getting double of everything....
Reply with quote
Dharkael
Enchanter


Joined: 05 Mar 2003
Posts: 593
Location: Canada

PostPosted: Tue Jan 29, 2008 7:59 pm   
 
The problem, I think is this.
the last line of your code
Code:
  } "" {prompt|case}

should read
Code:
  } "" {nocr|prompt|case}


The Prompt and Newline options are not mutaully exclusive
In your code the trigger is being fired once as a prompt trigger and and once after the newline is received.
_________________
-Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style."
Reply with quote
shaun.murray
Magician


Joined: 23 Jul 2005
Posts: 334
Location: Chicago

PostPosted: Tue Jan 29, 2008 8:09 pm   
 
Hrmmm... I added in the nocr and that completely locked up the script! =[ Reset it back, and its running... what does nocr mean? Is there a way I can put it in via gui?
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Tue Jan 29, 2008 8:32 pm   
 
Untick the newline option.
_________________
Taz :)
Reply with quote
Leyline
Wanderer


Joined: 03 Feb 2007
Posts: 64

PostPosted: Tue Jan 29, 2008 8:39 pm   
 
Maybe you have show triggers on
and you are seeing the trigger fire,
and then seeing the result of what the trigger was trying to do (the #say)

I am not in front of zmud atm but look for and
check your options and turn off echo triggers (good for debug purposes)
I think it read.
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