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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Lina
Novice


Joined: 12 Oct 2006
Posts: 49

PostPosted: Sun Jul 27, 2008 5:37 pm   

Gag trigger question.
 
Hi, I was trying out some capturing and gagging triggers. Basically I captured the mapview in Lusternia into a seperate window, which works wonderfully. But when I tried to gag it out from the main window, it seems to have a slight delay where the map is still seen on the main window ever so briefly, before being gagged. Is there any way I could get a smoother gagging? Below is a trigger I use.

Code:
<trigger priority="1710" regex="true" id="171">
  <pattern>^\-{3} .+? \-{1,18} \-?\d+?\:\-?\d+?\:\-?\d+? \-{3}$</pattern>
  <value>#CAP 25 Mapview
#gag -24
#gag
#WINDOW Mapview {%cr}</value>
</trigger>
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Sun Jul 27, 2008 5:40 pm   
 
The delay comes from #gag having to look at 24 lines...

Is there an end prompt so you can use #gagon instead? I know for Aardwolf, we have <Mapstart> and <Mapend>, which we can use to initiate #gagon and #gagoff...

Charneus
Reply with quote
Lina
Novice


Joined: 12 Oct 2006
Posts: 49

PostPosted: Sun Jul 27, 2008 5:42 pm   
 
Yeah, I did try to #gagon and #gagoff stuff, but it wasn't capturing the gagged lines at all. :(
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Sun Jul 27, 2008 5:47 pm   
 
Maybe looking at my script will help you with your script.

Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <class name="AutoMap" copy="yes">
    <trigger priority="23550" copy="yes">
      <pattern>^You will no longer see the map automatically when you move.$</pattern>
      <value>#clr MAP
#loop 4 {#win MAP %cr}
#win MAP "     "%ansi( red)~[ %ansi( hi, red)Map Unavailable %ansi( red)~]</value>
    </trigger>
    <trigger priority="23600" copy="yes">
      <pattern>^You{ will now see the map automatically when you move|r journey was broken by the need to defend yourself}.$</pattern>
      <value>map;#gag</value>
    </trigger>
    <trigger priority="11840" copy="yes">
      <pattern>^~</pattern>
      <value>#gag</value>
    </trigger>
    <trigger priority="12120" copy="yes">
      <pattern>^$</pattern>
      <value>#gagon
#gag
#c+ maps
#clr maps</value>
      <trigger param="20">
        <pattern>^~[ Exits*</pattern>
        <value>#gag;#gagoff;#C-</value>
      </trigger>
    </trigger>
  </class>
</cmud>


Charneus
Reply with quote
Lina
Novice


Joined: 12 Oct 2006
Posts: 49

PostPosted: Sun Jul 27, 2008 5:59 pm   
 
Thanks! That works so much better. I had forgotten about #C+ and #C- :-)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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