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.
Entire forum
➜ MUSHclient
➜ General
➜ chat windows
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Dragish
USA (10 posts) Bio
|
Date
| Sun 06 Nov 2005 06:46 AM (UTC) |
Message
| hi im completely new to this program. im trying to set up a trig/script to grab talk on certain channels and send it to a seperate window. ive download the chat plugin but mush wouldnt activate it. ive tried a simple script using the trigger command but it didnt work
in trigger window i have "%1 tells you %2"
then have it do: SendToNotepad "Tell", "%1 tells you %2"
then i have it sent to script, i couldnt get it to work that way
i tried having it just straigh appended to the notepad but it didnt work
| Top |
|
Posted by
| Rinor
(16 posts) Bio
|
Date
| Reply #1 on Sun 06 Nov 2005 05:14 PM (UTC) |
Message
| It isn't working because chat isn't part of the output from the game. So the trigger can't catch any of that. However you can open up the chat.xml file and look for this part:
' if message >= 4 and message <= 9 then
' AppendToNotepad "Chats", Replace (StripAnsi (sText), chr (10), vbCrLf)
' OnPluginChatDisplay = vbFalse
' end if
Then remove the 's on the first, second, and fourth line, it will make a notepad file and sends chat msgs there. | Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #2 on Sun 06 Nov 2005 10:02 PM (UTC) |
Message
| No, you don't need the chat plugin, that's for chatting with other clients, outside of the server.
What you need to do is change your trigger from %1 and %2 to * and * (in the match text).
And, go with append to notepad instead of SendtoNotepad.
But, the rest of your stuff looks good. You just weren't triggering on any lines.
Another thing you might want to do is just send %0, which is 'the whole line'. AppendToNotepad "Tell", "%0" |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | Top |
|
Posted by
| Dragish
USA (10 posts) Bio
|
Date
| Reply #3 on Tue 08 Nov 2005 06:15 AM (UTC) Amended on Tue 08 Nov 2005 07:47 AM (UTC) by Dragish
|
Message
| thanks very much fannel, that did the trick. is it possible to set it up so i can also send stuff i write to the same document? i can grab it, but it says 'tell' is already used
| Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #4 on Tue 08 Nov 2005 08:56 AM (UTC) Amended on Tue 08 Nov 2005 08:57 AM (UTC) by Flannel
|
Message
| Umm, it shouldn't mention a notepad window being already used. Could you copy/paste your trigger here? (the whole trigger, not just the fields, it's easier! honest, click copy on the triggers dialog (thats the one with the multiple trigger) and then paste it here (both of the problem causing triggers, you can actually select them both and copy at the same time). |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | Top |
|
Posted by
| Dragish
USA (10 posts) Bio
|
Date
| Reply #5 on Tue 08 Nov 2005 05:24 PM (UTC) |
Message
| heres the logging trigger
<triggers>
<trigger
enabled="y"
group="clan"
match="[CLAN] *"
name="CLAN2"
send_to="5"
sequence="100"
>
<send>%1</send>
</trigger>
</triggers>
| Top |
|
Posted by
| Nick Gammon
Australia (23,100 posts) Bio
Forum Administrator |
Date
| Reply #6 on Tue 08 Nov 2005 09:59 PM (UTC) |
Message
| You can make both your input and the clan channel come out to the same window by using a small bit of script rather than "append to notepad". This is an example:
<aliases>
<alias
match="#clan *"
enabled="y"
send_to="12"
sequence="100"
>
<send>AppendToNotepad ("ClanTalk", ">", "%0", "\\r\\n")
Send ("%0")
</send>
</alias>
</aliases>
<triggers>
<trigger
enabled="y"
group="clan"
match="[CLAN] *"
send_to="12"
sequence="100"
>
<send>AppendToNotepad ("ClanTalk", "%0")
</send>
</trigger>
</triggers>
Both the trigger and alias use AppendToNotepad to append to the same window, "ClanTalk". I made the alias match on #clan, but you can make it whatever you usually type to chat in the clan channel. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Dragish
USA (10 posts) Bio
|
Date
| Reply #7 on Thu 10 Nov 2005 04:53 AM (UTC) |
Message
| i get errors on both i get
Cannot use parentheses when calling a Sub
Line in error:
AppendToNotepad ("ClanTalk", ">", "#ct moo", "\r\n")
called by Immediate execution
Cannot use parentheses when calling a Sub
Line in error:
AppendToNotepad ("ClanTalk", "[CLAN] Lulu: '[Lu] I was so pissed off'")
called by immediate execution | Top |
|
Posted by
| Nick Gammon
Australia (23,100 posts) Bio
Forum Administrator |
Date
| Reply #8 on Thu 10 Nov 2005 05:07 AM (UTC) |
Message
| My example was in Lua, the recommended scripting language these days. The syntax in VBscript is slightly different:
<aliases>
<alias
match="#clan *"
enabled="y"
send_to="12"
sequence="100"
>
<send>AppendToNotepad "ClanTalk", ">" & "%0" & vbCrLf
Send "%0"
</send>
</alias>
</aliases>
<triggers>
<trigger
enabled="y"
group="clan"
match="[CLAN] *"
name="CLAN2"
send_to="12"
sequence="100"
>
<send>AppendToNotepad "ClanTalk", "%0" & vbCrLf
</send>
</trigger>
</triggers>
|
- 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.
24,483 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top