Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Yodous
Apprentice


Joined: 23 Jun 2004
Posts: 105
Location: Poland

PostPosted: Wed Oct 21, 2009 10:21 pm   

[3.10] Trigger that fires at prompt - bug?
 
Hi there.
I'm playing on mud, where the prompt is '> '.
I've created a trigger, that is type 'pattern' with someText. I've added a state to that trigger of type 'pattern' with pattern '>'.
I want to work something like:
Code:

someText //set some vars
.........
......... //some other text from mud
> //make some calculation

It works all fine in 2.37, but it seems that in 3.10 not all the time the prompt '>' is matching.
I have created a simple trigger with pattern '>' and value '#SA Prompt' and press a few times enter and i got:
Code:

>
>
>
>
>
>
Prompt

It seems that it isn't so easy to catch a prompt in 3.10 (in 2.37 there wasn't any problem).
Any ideas how to fix it?

Best regards
Yodous
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Oct 21, 2009 10:38 pm   
 
For the MUD, you want the trigger to have the Prompt option enabled. This causes the trigger to fire when the > is the last text in a network packet and not followed by a newline, or if the MUD supports the EOR/GA method for flagging the MUD prompt.

If you still have trouble, go to the XML tab for the Trigger and paste the XML into this forum within [code] tags so we can see the exact trigger.
Reply with quote
Yodous
Apprentice


Joined: 23 Jun 2004
Posts: 105
Location: Poland

PostPosted: Thu Oct 22, 2009 11:04 am   
 
I still have some problem. Here is a XML class:
Code:
<class name="Example" id="7842">
  <trigger priority="78390" id="7839">
    <pattern>Sposrod</pattern>
    <value>#SA Start
#T+ exampleTrigger</value>
    <trigger newline="false" prompt="true">
      <pattern>^></pattern>
      <value>#SA End
#T- exampleTrigger</value>
    </trigger>
  </trigger>
  <trigger name="exampleTrigger" priority="78430" id="7843">
    <pattern>%w</pattern>
    <value>//do some stuff</value>
  </trigger>
</class>

And an output from mud:
Code:

Sposrod dziewiecdziesieciu czterech osob przebywajacych obecnie w swiecie Arkadii, znane tobie to:
Start
Belmaras Tharr, Throngrink Powazanego Rodu Orr'Khraman z Twierdzy Karak Kadrin, krasnolud
Berondal de Quenelles, Doswiadczony Mistrz Areny Rodu von Raugen zwany Bialym, mezczyzna
Ghazar z Twierdzy Karak Kadrin, Zabojca Demonow, krasnolud
Kan z Twierdzy Karak Varn, Rekrut z Gwardii Wielkiego Mistrza Zakonu Sigmara Mlotodzierzcy, krasnolud
Maldun z Gor Szarych, Mlocarz z Ogrzej Kompanii, ogr
Moradin z Twierdzy Karak Kadrin, Honorowy Gwardzista Wielkiego Mistrza Zakonu Sigmara Mlotodzierzcy, krasnolud
Nerri Catone, Wycwiczony Zbrojny Domu von Raugen, gnom
Urisiel Kristiansen, Kapitan Kompanii Gryfa, mezczyzna
Czcigodny Vaxon Gernstein z Karak Varn, Doradca Najwyzszego Krola Karaz Ankor, krasnolud
Yalom de Yremy, Poczatkujacy Gnomi Mechanik, Gnomi Projektant, Kierownik Wydzialu Alchemii i Swiatopoznawstwa, gnom
>
>

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
End


As you can see, I pressed a few times 'enter' to force mud to send a few '>' to me and the 'End' is output randomly.
As I said - all worked In 2.37.

Best regards.
Reply with quote
Yodous
Apprentice


Joined: 23 Jun 2004
Posts: 105
Location: Poland

PostPosted: Thu Oct 22, 2009 11:27 am   
 
Looks like disable Options/General/Session/Emulation and 'Use GA/EOR for prompt' fix the problem.
Reply with quote
Yodous
Apprentice


Joined: 23 Jun 2004
Posts: 105
Location: Poland

PostPosted: Thu Oct 22, 2009 11:38 am   
 
So the problem has been fix but I have some related question.
As I said, on MUD that I'm playing, '>' is a prompt.
I'm writtring triggers that pattern is something like:
Code:
^(?:> )?Some text

Becouse I want to force the pattern to works only if the text is at the begining of a new line (That explains the '^' sign). The text can be both
Code:
Some text
and
Code:
> Some text

Is there any way, to write a triggers without always putting '(?:> )?' at the begin? And the '^' is required becouse the 'Some text' can be also in some other places in the sentence.
Maybe it can be implemented in the future? It can omit the prompt from the mud, from the matching it in a trigger pattern.

Best regards
Yodous
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Thu Oct 22, 2009 4:52 pm   
 
That is something planned for the future, but not in the first 3.x public version.

Glad you found the GA/EOR option.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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