[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  chat windows
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

chat windows

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Dragish   USA  (10 posts)  [Biography] bio
Date Sun 06 Nov 2005 06:46 AM (UTC)  quote  ]
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

[Go to top] top

Posted by Rinor   (16 posts)  [Biography] bio
Date Sun 06 Nov 2005 05:14 PM (UTC)  quote  ]
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.
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Sun 06 Nov 2005 10:02 PM (UTC)  quote  ]
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.
[Go to top] top

Posted by Dragish   USA  (10 posts)  [Biography] bio
Date Tue 08 Nov 2005 06:15 AM (UTC)  quote  ]

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

[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Tue 08 Nov 2005 08:56 AM (UTC)  quote  ]

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.
[Go to top] top

Posted by Dragish   USA  (10 posts)  [Biography] bio
Date Tue 08 Nov 2005 05:24 PM (UTC)  quote  ]
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>
[Go to top] top

Posted by Nick Gammon   Australia  (15,726 posts)  [Biography] bio
Date Tue 08 Nov 2005 09:59 PM (UTC)  quote  ]
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", "&gt;", "%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
[Go to top] top

Posted by Dragish   USA  (10 posts)  [Biography] bio
Date Thu 10 Nov 2005 04:53 AM (UTC)  quote  ]
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
[Go to top] top

Posted by Nick Gammon   Australia  (15,726 posts)  [Biography] bio
Date Thu 10 Nov 2005 05:07 AM (UTC)  quote  ]
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", "&gt;" &amp; "%0" &amp; 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" &amp; vbCrLf
</send>
  </trigger>
</triggers>

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] 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.


2,112 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]