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
DanteX
Apprentice


Joined: 13 Aug 2007
Posts: 166

PostPosted: Thu Aug 30, 2007 9:51 am   

Help with capture script optimizing
 
This script is actually made for Aardwolf zMUD users, and in zMUD it works perfectly fine, speed wise and everything.

Code:
<class name="Automap" enabled="false" id="107">
  <class name="MapCapture" initdisable="true" enabled="false" id="108">
    <trigger priority="27330" regex="true" id="2733">
      <pattern>^\& lt;MAPEND\& gt;</pattern>
      <value>#T- {AutoMap|MapCapture};#gag</value>
    </trigger>
    <trigger priority="27340" id="2734">
      <pattern>(*)</pattern>
      <value>#cap maps;#gag</value>
    </trigger>
  </class>
  <trigger priority="27320" id="2732">
    <pattern>^~& lt;MAPSTART~& gt;</pattern>
    <value>#gag;#T+ {AutoMap|MapCapture}</value>
  </trigger>
</class>


This is an example of how the recieved text looks upon entering a room, and it's supposed to capture everything between the tags. Paste it in notepad or something to view it better.

Code:

A Misty Path

<MAPSTART>
                           
                         
                             
    |[!]|       |[!]|[!]|[!]|
    |   |       |   |   |   
    |[!]|       |[!]|[!]|[!]
 ---     -------             
 [!] [ ] [ ] [#] [!] [!] [!]|
 -----------         -------
            |[!]|[!]|     
                |           
        |[!] [!]|[!]     
         -----------         
                         
                             

<MAPEND>

[Exits: east south west]


In CMUD on the other hand, it slows everything down alot. Sometimes it can take 2-3 seconds to load a map+room, other times, mostly when moving fast, it gags room names and/or exits, which is very annoying. The room names always come right before theI don't know if it's the #CAPTURE command that does what it's supposed to alot slower, or what, but whatever it that causes this it makes moving around a not-so-pleasant thing. Using #WINDOW instead of #CAPTURE is not an option, since it doesn't keep colors. I also don't know what's worst, the gaged room names and/or exits, or the lag it causes.

D
Reply with quote
DanteX
Apprentice


Joined: 13 Aug 2007
Posts: 166

PostPosted: Thu Aug 30, 2007 12:08 pm   
 
The script in zMUD that works perfectly looks like this:

Code:

#CLASS {Automap}
#TRIGGER {^~<MAPSTART~>} {
  #PRIORITY {#GAG}
  #T+ {AutoMap|MapCapture}
 }
#CLASS 0
#CLASS {Automap|MapCapture} {disable}
#REGEX {^\<MAPEND\>} {
  #T- {AutoMap|MapCapture}
  #GAG
 }
#TRIGGER {(*)} {
  #CAP maps
  #GAG
 }
#CLASS 0


D
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5187

PostPosted: Thu Aug 30, 2007 1:07 pm   
 
First it looks like the XML copy of this mucked up the pattern fields. So I am guessing your are working with 2.01 and you should bug report the use < and > not being properly converted in a pattern. Edit: I see this is a forum problem instead I will try to edit that into your post.

There also seems to be no reason for the slowdown. The only thing I can think of to try is change the pattern "(*)" to "*", as you don't need the information in a variable. If that makes a large effect then you should probably also bug report it, as it means that there is a problem in how adding the quote characters is being done.

Also I changed one of your quote tags to code so formatting would be preserved.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
DanteX
Apprentice


Joined: 13 Aug 2007
Posts: 166

PostPosted: Thu Aug 30, 2007 2:19 pm   
 
I changed from (*) to * only, and it is a bit better. But still not nearly as flowing as in zmud. The unwanted gagings are a bit better though. I've also tried with different refresh rates on the scrollback, and it isn't getting any better. What did you mean you'd edit in my post?
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