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
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Mon Nov 03, 2008 10:49 pm   

"Prompt" trigger not firing... but fires fine if set as a newline trigger.
 
I have the following class, and I want the triggers to notify my ASAP, so I set them all to "prompt" but now they don't fire at all. Anyone tell me why?
I should note that EVERY single one works if set as a Newline trigger instead. And I've had them work on another computer (my old one) as Prompt triggers. So I'm wondering if there's some setting I accidentally screwed up that they no longer work.
Code:
#CLASS {Combat Actions}
#ALIAS cahelp {
  #ECHO %cr
  #ECHO {Combat Actions - Version: @CAvers}
  #ECHO {This set includeds combat triggers for the most common response actions.}
  #ECHO {Covered in this set are: Dispell Magic, Blind (All forms including gouge), and Poison.}
  #ECHO {In the future I will include one for cure disease as well}
  #ECHO {The trigger to remove poison uses a platinum ring in an oriental rug. Adjust it to fit your remove poison equipment and location.}
  #ECHO {The dispell magic trigger depends on a set of variables. You must set those variables to the equipment you are using.}
  #ECHO {Included in the dispell magic trigger is a list variable of lights.}
  #ECHO {If your equipment name is inside that list it will hold the equipment instead of wear it.}
  #ECHO {For that to work you must make sure that you have have matched the name in the list fully.}
  #ECHO {For instance you must use sceptre, instead of scept, in your variable for that equipment.}
  %cr
  }
#VAR dsi {graeae}
#VAR fort {amulet}
#VAR sanc {evenstar}
#VAR crypt {cruithni}
#VAR invul {odin}
#VAR windwall {crown}
#VAR lights {sceptre|ozy|graeae}
#VAR CAver {1.4}
#TRIGGER {You are dead! Sorry...} {#SPEAK {@Name is dead, oops!}} "" {nocr|prompt}
#TRIGGER {You have been poisoned!} {
  rem ring
  get platinum rug
  wea ring
  rem ring
  put platinum rug
  wea ring
  } "" {nocr|prompt}
#TRIGGER {You feel burning poison in your blood, and suffer. ~((%d)~)} {
  rem ring
  get platinum rug
  wea ring
  rem ring
  put platinum rug
  wea ring
  } "" {nocr|prompt}
#TRIGGER {You have been blinded!} {
  #T+ Blinded
  c 'heal'
  } "" {nocr|prompt}
#TRIGGER {You are gouged and BLINDED by someone!!!} {
  #T+ Blinded
  c 'heal'
  } "" {nocr|prompt}
#TRIGGER {A huge flash of light covers your body!} {#STATE 1} "" {nocr|prompt}
#COND {You feel slightly different.} {
  rem @dsi
  #if (%ismember( @dsi, @lights)) {hold @dsi} {wea @dsi}
  rem @crypt
  rem @fort
  rem @sanc
  rem @invul
  rem @windwall
  wea @crypt
  wea @fort
  wea @sanc
  wea @invul
  wea @windwall
  #STATE 0
  } {nocr|prompt}
#TRIGGER {The warmth leaves your body making you feel empty.} {#SPEAK {@Name has lost heal over time}} "" {nocr|prompt}
#TRIGGER {You lost your concentration trying to cast (*)!} {#IF (%ismember( %1, @CriticalSpells)) {#ECHO {@Name~: Lost Con %1}}} "" {nocr|prompt}
#CLASS 0
#CLASS {Combat Actions|Blinded} {disable}
#TRIGGER {A warm feeling floods your body.} {#T- Blinded}
#TRIGGER {You lost your concentration trying to cast heal!} {c 'heal'}
#CLASS 0
#CLASS {Combat Actions|Vars}
#VAR CriticalSpells {armageddon|complete healing}
#CLASS 0
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Mon Nov 03, 2008 11:40 pm   
 
Whether a line is a prompt or not depends on the characters the MUD is sending at the end of the line. It's much more difficult in zMUD than it is in CMUD; you'll want to take a look at the readable log created by the #debug command. But if it all works fine when set to newline, why complain?
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Tue Nov 04, 2008 4:58 am   
 
Because I want them to fire faster ;)
Especially the trigger for dispell magic, which removes all protection spells. If I don't re-wear my equipment that casts those spells fast enough I die. Period. So, the faster the better ;)
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
Rappy
Wanderer


Joined: 15 Jul 2005
Posts: 96

PostPosted: Tue Nov 04, 2008 6:34 am   
 
From what I understand prompt triggers only fire if it's actually a prompt, IE no %cr %lf characters at the end of the line (like when you are prompted for your name to sign in to the MUD) and therefore won't trigger when the line actually contains a carriage return/line feed.

-Rappy
_________________
Windows 11 Pro,
cMUD 3.34
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Tue Nov 04, 2008 1:11 pm   
 
Yes, that's what happens. If they're newline triggers, they fire when the line has a newline (the carriage return character and the linefeed character) at the end. If they're prompt triggers, they only fire when the line either ends in no characters (which it shouldn't do really) or when it ends with a go-ahead or end-of-record character. Neither one is faster than the other, it's just an easy way of triggering based on what kind of line it is.

I'm really not sure where you got this impression that prompt triggers fire more quickly. It might possibly look that way because the text appears at the end of a prompt line, but appears on a new line when the line ends in CRLF, but that's because the CRLF character demands that nothing else appear on that line, so the commands go onto the next one. With GA or EOR, CMUD is free to write on the end of the line. Either way, it's not the case.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Tue Nov 04, 2008 1:38 pm   
 
Still doesn't explain why they worked before and not now. Unless it is something to do with the latest code update. Oh well, guess it doesn't matter.
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
Rappy
Wanderer


Joined: 15 Jul 2005
Posts: 96

PostPosted: Tue Nov 04, 2008 8:38 pm   
 
Sure it does, they worked before set on Newline (which is what you need to actually trigger what you are wanting) but they don't now because you changed them to prompt (which is ignored completely by zMUD because it's NOT a prompt, the crlf characters at the end tell zMUD to look for a newline trigger, if, as Fang said, those are missing and has a GA or EoR character instead, zMUD looks for prompt triggers)

Think of a prompt trigger being used ONLY when there is an action required from you (IE. creating a new character... Please choose your race: <--- waits for your action to continue and would be treated as a prompt trigger)

Hope that helps clear things up.

-Rappy
_________________
Windows 11 Pro,
cMUD 3.34
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Tue Nov 04, 2008 8:46 pm   
 
No Rappy, they worked on another computer as Prompt triggers a couple months back :p I guess you missed that from the original post. I wouldn't have posted this question if it hadn't worked this way before.
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
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