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
➜ Plugins
➜ Mix of the new Multi-line triggers w/Partial Line plugin
|
Mix of the new Multi-line triggers w/Partial Line plugin
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Gore
(207 posts) Bio
|
| Date
| Mon 31 May 2004 11:59 PM (UTC) |
| Message
| Hello, I'm trying to mix up the partial line plugin with the new multi-line triggers. here's what I have so far:
<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE muclient [
<!ENTITY regexp_match_ginseng
"You eat a ginseng root\.\n(.*?)h\, (.*?)m (.*?)\-\n$"
>
]>
<muclient>
<plugin
name="Status_Bar_Prompt"
author="Nick Gammon (original), Modified by Matt"
id="ff9331b06c15ab21046be001"
language="VBscript"
purpose="Testing the use of multi-line triggers including a prompt"
date_written="2004-02-13 16:41:24"
requires="3.50"
version="1.0"
>
</plugin>
<script>
<![CDATA[
sub OnPluginPartialLine (sText)
Dim regEx, Matches, Match
Set regEx = New RegExp
]]>
regEx.Pattern = "®exp_match_ginseng;"
<![CDATA[
Set Matches = regEx.Execute (sText)
If Matches.Count = 0 then
Set regEx = Nothing
Set Matches = Nothing
exit sub
End If
Set Match = Matches.Item (0)
Set regEx = Nothing
Set Matches = Nothing
World.Send "say it's just an illusion!"
Set Match = Nothing
end sub
]]>
</script>
</muclient>
The output will be:
1983h, 2054m ex-
Then when I eat the ginseng, it'll be
1983h, 2054m ex-You eat a ginseng root.
1983h, 2054m ex-
Any suggestions?
| | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Tue 01 Jun 2004 01:42 AM (UTC) |
| Message
| It isn't clear what you are asking.
You talk about the multi-line triggers but don't appear to be using them. To get the recent lines (eg. for a multi-line trigger) you want world.GetRecentLines.
Why do you want multi-line triggers, and in what way is what you have not working?
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | 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.
13,656 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top