Shattered Kingdoms

Where Roleplay and Tactics Collide
VOTE NOW!
It is currently Sat Apr 27, 2024 5:54 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: MUSHclient halp.
PostPosted: Thu Sep 06, 2012 9:48 pm 
Offline
Mortal

Joined: Mon Jun 11, 2012 9:57 pm
Posts: 40
it does not squelch the tells etc in the main window, they appear in both. If you want to blank the tells out in the main window, insert the tag (i.e., match, enabled, script)
Quote:
omit_from_output="y"

to each trigger.

Quote:
<trigger
enabled="y"
group="chatlogging"
match="* tells you '*'"
omit_from_output="y"
script="redirect"
sequence="100"
>


Edit: I tried this and it does not appear to leave a trail of blanks in MUSHClient ver 4.73. I think it used to in older versions. Although it does reiterate the command prompt (on either sending or receiving) as that is the MUD's response to a successfully sent command or recieved packet. No easy way around that.


Top
 Profile  
Reply with quote  
 Post subject: Re: MUSHclient halp.
PostPosted: Fri Sep 07, 2012 2:44 am 
Offline
Mortal

Joined: Sat Apr 02, 2011 12:07 pm
Posts: 263
Dragonite2012 thank you, but I don't understand a thing from what you posted. :oops:


Top
 Profile  
Reply with quote  
 Post subject: Re: MUSHclient halp.
PostPosted: Fri Sep 07, 2012 6:31 am 
Offline
Mortal

Joined: Thu Feb 28, 2002 4:00 pm
Posts: 1081
Location: DC
Dragonite2012 wrote:
it does not squelch the tells etc in the main window, they appear in both. If you want to blank the tells out in the main window, insert the tag (i.e., match, enabled, script)
Quote:
omit_from_output="y"

to each trigger.

Quote:
<trigger
enabled="y"
group="chatlogging"
match="* tells you '*'"
omit_from_output="y"
script="redirect"
sequence="100"
>


Edit: I tried this and it does not appear to leave a trail of blanks in MUSHClient ver 4.73. I think it used to in older versions. Although it does reiterate the command prompt (on either sending or receiving) as that is the MUD's response to a successfully sent command or recieved packet. No easy way around that.


I built a script/trigger system for this, (the same trigger system you have, with different script name) and it leaves me

*100%*100%*100%*10pm
>

*100%*100%*100%*10pm

The only successful way I found is to have a chain of gag triggers that are activated with a redirect fires that gags 2-4 lines blankly. The problem with that is, when I sent those gags to a separate test window to see what I was losing, I was losing an intermittent but substantial amount of relevant information.

It would be nicer if I could find a way to make mushclient capture my prompt, but I might use the most impossible prompt in the world for that prospect.


Top
 Profile  
Reply with quote  
 Post subject: Re: MUSHclient halp.
PostPosted: Fri Sep 07, 2012 11:03 am 
Offline
Mortal

Joined: Mon Jun 11, 2012 9:57 pm
Posts: 40
First of all, your prompt isnt that hard to match....
Quote:
match="^\*\s?\d+\%\*\s?\d+\%\*\s?\d+\%\*\s?\d+(am|pm)$"


chat.xml wrote:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Saturday, June 30, 2007, 10:48 -->
<!-- MuClient version 4.13 -->

<!-- Plugin "Chat_Redirector" generated by Plugin Wizard -->

<!--
Edit plugin and change "chat_world" variable to be the name of the
world you want chats to go to.
-->

<muclient>
<plugin
name="Chat_Redirector"
author="Nick Gammon"
id="cb84a526b476f69f403517da"
language="Lua"
purpose="Redirects chat messages to another world"
date_written="2007-06-30 10:45:35"
requires="4.08"
version="1.0"
>
<description trim="y">
<![CDATA[
Redirects chats to the specified world.

Add or modify "chat" triggers to capture different sorts of message.

Change the variable "chat_world" to be the name of the world chats are to go

to.
]]>
</description>

</plugin>


<!-- Triggers -->

<triggers>

<trigger
enabled="n"
name="gag_prompt"
group="chatlogging"
match="^\*\s?\d+\%\*\s?\d+\%\*\s?\d+\%\*\s?\d+(am|pm)$"
regexp="y"
omit_from_output="y"
script="gagged_prompt"
sequence="100"
>
</trigger>


<trigger
enabled="y"
name="they_yell"
group="chatlogging"
match="^[A-Za-z\- ]+ yells \'(.*?)\'$"
omit_from_output="y"
regexp="y"
script="redirect"
sequence="100"
>
</trigger>

<trigger
enabled="y"
name="you_yell"
match="^You yell \'(.*?)\'$"
omit_from_output="y"
regexp="y"
script="redirect"
sequence="100"
>
</trigger>

<trigger
enabled="y"
group="chatlogging"
match="* replies '*'"
omit_from_output="y"
script="redirect"
sequence="100"
>
</trigger>
<trigger
enabled="y"
group="chatlogging"
match="You reply to * '*'"
omit_from_output="y"
script="redirect"
sequence="100"
>
</trigger>
<trigger
enabled="y"
group="chatlogging"
match="* tells you '*'"
omit_from_output="y"
script="redirect"
sequence="100"
>
</trigger>
<trigger
enabled="y"
group="chatlogging"
match="You tell * '*'"
omit_from_output="y"
script="redirect"
sequence="100"
>
</trigger>
<trigger
enabled="y"
group="chatlogging"
match="^You tell the (group|formation) \'(.*?)\'$"
omit_from_output="y"
regexp="y"
script="redirect"
sequence="100"
>
</trigger>

<trigger
enabled="y"
group="chatlogging"
match="* tells the group '*'"
omit_from_output="y"
script="redirect"
sequence="100"
>
</trigger>

<trigger
enabled="y"
group="chatlogging"
match="* tells the formation '*'"
omit_from_output="y"
script="redirect"
sequence="100"
>
</trigger>

<trigger
enabled="y"
group="chatlogging"
match="^\[[A-Z]+\] [A-Za-z\- ]+\: (.*)$"
omit_from_output="y"
regexp="y"
script="redirect"
sequence="100"
>
</trigger>


<trigger
enabled="y"
group="chatlogging"
match="^\[\d+\] clan members heard you say, (.*)$"
regexp="y"
omit_from_output="y"
script="redirect"
sequence="100"
>
</trigger>


</triggers>



<aliases>
<alias
enabled="y"
match="clear tells"
script="clear_tells"
></alias>
</aliases>

<aliases>
<alias
enabled="y"
match="noyells on"
script="no_yells"
></alias>
</aliases>

<aliases>
<alias
enabled="y"
match="noyells off"
script="yells_on"
></alias>
</aliases>




<!-- Script -->


<script>
<![CDATA[
chat_world = "chat"
local first_time = true


function redirect (name, line, wildcards, styles)

-- try to find "chat" world
local w = GetWorld (chat_world) -- get "chat" world

if w then -- if present
for _, v in ipairs (styles) do
w:ColourTell (RGBColourToName (v.textcolour),
RGBColourToName (v.backcolour),
v.text)
end -- for each style run
w:Note ("") -- wrap up line
w:Note (os.date("(%X)"))
w:Note ("")
SetTriggerOption("gag_prompt","enabled","y")
end -- world found

end -- function redirect

function gagged_prompt(n,l,wc)
SetTriggerOption("gag_prompt","enabled","n")
end

function clear_tells(name, line, wildcards)

local w = GetWorld (chat_world) -- get "chat" world

if w then
w:DeleteOutput()
w:Note ("")
end

end

function no_yells (n,l,w)
SetTriggerOption("you_yell","enabled","n")
SetTriggerOption("they_yell","enabled","n")
ColourNote("YELLOW","BLACK","Yells will NOT redirect.")
end

function yells_on (n,l,w)
SetTriggerOption("you_yell","enabled","y")
SetTriggerOption("they_yell","enabled","y")
ColourNote("YELLOW","BLACK","Yells WILL redirect.")
end


function init_chat()

local w = GetWorld (chat_world) -- get "chat" world

-- if not found, try to open it
if first_time and not w then
local filename = GetInfo (67) .. chat_world .. ".mcl"
Open (filename)
w = GetWorld (chat_world) -- try again
if not w then
ColourNote ("white", "red", "Can't open chat world file: " .. filename)
first_time = false -- don't repeatedly show failure message
end -- can't find world
end -- can't find world first time around

end -- end function

function OnPluginConnect()
init_chat()
end

function OnPluginLoad()
init_chat()
end

function OnPluginInstall()
init_chat()
end

]]>
</script>

</muclient>


Last edited by Dragonite2012 on Sat Sep 08, 2012 3:49 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: MUSHclient halp.
PostPosted: Fri Sep 07, 2012 11:04 am 
Offline
Mortal

Joined: Thu Jan 22, 2009 4:41 am
Posts: 2596
Location: Witness Protection
SK Character: Cyndane - Talys
what


Top
 Profile  
Reply with quote  
 Post subject: Re: MUSHclient halp.
PostPosted: Fri Sep 07, 2012 11:29 am 
Offline
Mortal

Joined: Sat Apr 02, 2011 12:07 pm
Posts: 263
wut? xD


Top
 Profile  
Reply with quote  
 Post subject: Re: MUSHclient halp.
PostPosted: Fri Sep 07, 2012 1:49 pm 
Offline
Mortal

Joined: Wed Apr 24, 2002 11:51 am
Posts: 1500
There's an easier way. You can simply omit the blank lines from output, too. I've got a working plugin for a cabal/tell redirect that also omits blank lines, but it keeps crashing my client. Soon as it is stable and debugged, I will post a downlink link.


Top
 Profile  
Reply with quote  
 Post subject: Re: MUSHclient halp.
PostPosted: Fri Sep 07, 2012 3:57 pm 
Offline
Mortal

Joined: Wed Apr 24, 2002 11:51 am
Posts: 1500
only posting in gd from now - thx and have a nice day


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group