Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Tips and tricks ➜ Plugins and writing them

Plugins and writing them

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1  2 

Posted by Hathcock   (49 posts)  Bio
Date Reply #15 on Wed 24 Dec 2003 09:20 AM (UTC)
Message
H:3436 M:2644 B:98% [eb]

thats what the prompt look like....I tried this, but it didn't work ^H\:(\d+) M\:(\d+) B\:(\d+)\% \[.*\]
Top

Posted by Shadowfyr   USA  (1,792 posts)  Bio
Date Reply #16 on Wed 24 Dec 2003 04:53 PM (UTC)
Message
Hmm. The problem here is if there are any extra spaces between things. The trigger you have 'should' work if the like is exactly that way, but if there are two spaces some place instead... You could try:

^H\:(\d+)\s+M\:(\d+)\s+B\:(\d+)\%\s+\[.*\]

By using \s+ you tell it to match no matter how many spaces are in between. Also, make *sure* you have the trigger set to use a regular expression. This is often the single most common mistake made, aside from getting the spacing wrong.
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #17 on Wed 24 Dec 2003 07:27 PM (UTC)
Message
The first question is, did the trigger actually match?

Disable the plugin for a moment, and try your trigger manually by entering it into trigger configuration, and colour the line (eg. yellow).

Then see if the prompt changes the line colour. If so, there is a problem in the calculations. If not, you need to investigate why.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Hathcock   (49 posts)  Bio
Date Reply #18 on Wed 24 Dec 2003 09:03 PM (UTC)
Message
That worked!! It works great, but is there a way to stop it from drinking twice in a row...it does that every so often...instead of waiting the 5 second delay
Top

Posted by Ked   Russia  (524 posts)  Bio
Date Reply #19 on Thu 25 Dec 2003 03:01 AM (UTC)
Message
That's a little bug I've noticed myself: if you sit there without doing anything and let the prompt idle on the screen without recieving a newline to close it, the timer will eventualy fire and it drinks twice. Not exactly sure why that happens, but I'll be looking into it. Myself, I simply don't loiter - I use the plugin when bashing or pk'ing and then everything moves fast enough to avoid getting that behavior.
Top

Posted by LordFaux   (7 posts)  Bio
Date Reply #20 on Sun 26 Apr 2009 04:47 PM (UTC)
Message
Alright, I am having problems with this auto healer as well. Using the previous posts I now have the match to be

^H\:(\d+)\s+M\:(\d+)\s+E\:(\d+)\s+Dev\:(\d+)\%\s+XP\:(\d+)\%\s+\[.*\]

My prompt in game looks like this:

H:2140 M:1274 E:9600 Dev:100% XP:1% [eb]

What am I doing wrong? As for "regular expressions, how do I check and set that?
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #21 on Sun 26 Apr 2009 09:52 PM (UTC)
Message
Can you show the whole trigger?

Inside it there should be: regexp="y"

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by LordFaux   (7 posts)  Bio
Date Reply #22 on Mon 27 Apr 2009 04:33 AM (UTC)
Message
<triggers>
<trigger
enabled="y"
keep_evaluating="y"
match="^H\:(\d+)\s+M\:(\d+)\s+E\:(\d+)\s+Dev\:(\d+)\%\s+XP\:(\d+)\%\s+\[.*\]"
name="prompt_trigger"
regexp="y"
script="DecipherPromptInfo"
sequence="1"
other_text_colour="black"
other_back_colour="black"
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #23 on Wed 29 Apr 2009 05:25 AM (UTC)
Message
I tested that with your example line and the trigger fired. Are you saying the trigger doesn't fire, or something else goes wrong?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by LordFaux   (7 posts)  Bio
Date Reply #24 on Wed 29 Apr 2009 04:32 PM (UTC)
Message
After re-downloading the file and pasting in the match line, it now works. Thank you so much for all of your help.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


98,136 views.

This is page 2, subject is 2 pages long:  [Previous page]  1  2 

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.