chat windows

Posted by Dragish on Sun 06 Nov 2005 06:46 AM — 9 posts, 34,004 views.

USA #0
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

#1
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.
USA #2
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"
USA #3
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

Amended on Tue 08 Nov 2005 07:47 AM by Dragish
USA #4
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).
Amended on Tue 08 Nov 2005 08:57 AM by Flannel
USA #5
heres the logging trigger

<triggers>
<trigger
enabled="y"
group="clan"
match="[CLAN] *"
name="CLAN2"
send_to="5"
sequence="100"
>
<send>%1</send>
</trigger>
</triggers>
Australia Forum Administrator #6
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.
USA #7
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
Australia Forum Administrator #8
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>