[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]  Send Chat

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: Send Chat
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please)
Maximum of 6000 characters. Text only please, no HTML.
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Posted by Shaun Biggs   USA  (644 posts)  [Biography] bio
Date Mon 21 May 2007 01:24 PM (UTC)  quote  ]
Message
Getting there... you should see what I had before. I originally had some channels initialized to true, and some to false, and it was a bit easier for me to just copy/paste the whole thing while testing. Once I get everything tested out, I'm just going to save a serialized version of the channel table and skip that whole thing aside from an initialization test.

It is much easier to fight for one's ideals than to live up to them.
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Mon 21 May 2007 06:06 AM (UTC)  quote  ]

Amended on Mon 21 May 2007 06:07 AM (UTC) by Nick Gammon

Message
Speaking of simplicity, instead of:


channels = { ["clantalk"]   = GetVariable( "clantalk" ) == "true",
             ["ftalk"]  = GetVariable( "ftalk" ) == "true",
	     ["spouse"] = GetVariable( "spouse" ) == "true",
	     ["gtell"]  = GetVariable( "gtell" ) == "true",
	     ["gossip"]  = GetVariable( "gossip" ) == "true",
	     ["tiertalk"]  = GetVariable( "tiertalk" ) == "true",
	     ["tech"]  = GetVariable( "tech" ) == "true",
	     ["barter"]  = GetVariable( "barter" ) == "true",
	     ["global"]  = GetVariable( "global" ) == "true",
	     ["curse"]  = GetVariable( "curse" ) == "true",
	     ["debate"] = GetVariable( "debate" ) == "true",
	     ["gametalk"] = GetVariable( "gametalk" ) == "true",
	     ["gratz"] = GetVariable( "gratz" ) == "true",
	     ["immtalk"] = GetVariable( "immtalk" ) == "true",
             -- class channels below
	     ["commune"]  = GetVariable( "commune" ) == "true"
	   }


for i,v in pairs( channels ) do
  EnableTriggerGroup( i, v )
end


How about:


channels = { 
            "clantalk"  , "ftalk"     , "spouse"    ,
            "gtell"     , "gossip"    , "tiertalk"  ,
            "tech"      , "barter"    , "global"    ,
            "curse"     , "debate"    , "gametalk"  ,
            "gratz"     , "immtalk"   , "commune"   ,
            }

for i, v in ipairs (channels) do
  EnableTriggerGroup (v, GetVariable (v) == "true")
end -- for


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Shaun Biggs   USA  (644 posts)  [Biography] bio
Date Sun 20 May 2007 11:43 PM (UTC)  quote  ]

Amended on Sun 20 May 2007 11:51 PM (UTC) by Shaun Biggs

Message
Here are the main two parts, the rest are in the link I sent you on Aard.
this toggless the channels on/off:
  <alias
   match="chancap:*"
   send_to="12"
   sequence="101"
   enabled="y"
  >
  <send>  local temp = channels["%1"]
if temp ~= nil then
  temp = not(temp)
  ColourTell( "white", "black", "ChanCap: ",
              "lime",  "black", "%1",
	      "white", "black", " turned " )
  if temp == true then
    ColourNote( "lime", "black", "on" )
  else
    ColourNote( "lime", "black", "off" )
  end
  SetVariable( "%1", tostring( temp ) )
  channels["%1"] = temp
  EnableTriggerGroup( "%1", temp )
else
  ColourNote( "white", "black", "Invalid option.  Please check ",
              "lime",  "black", "chancap:help",
	      "white", "black", " for a list of commands." )
end
  </send>
  </alias>

And here's the rest of the script. Anything that matches a channel is sent to the chancap function.
channels = { ["clantalk"]   = GetVariable( "clantalk" ) == "true",
             ["ftalk"]  = GetVariable( "ftalk" ) == "true",
	     ["spouse"] = GetVariable( "spouse" ) == "true",
	     ["gtell"]  = GetVariable( "gtell" ) == "true",
	     ["gossip"]  = GetVariable( "gossip" ) == "true",
	     ["tiertalk"]  = GetVariable( "tiertalk" ) == "true",
	     ["tech"]  = GetVariable( "tech" ) == "true",
	     ["barter"]  = GetVariable( "barter" ) == "true",
	     ["global"]  = GetVariable( "global" ) == "true",
	     ["curse"]  = GetVariable( "curse" ) == "true",
	     ["debate"] = GetVariable( "debate" ) == "true",
	     ["gametalk"] = GetVariable( "gametalk" ) == "true",
	     ["gratz"] = GetVariable( "gratz" ) == "true",
	     ["immtalk"] = GetVariable( "immtalk" ) == "true",
             -- class channels below
	     ["commune"]  = GetVariable( "commune" ) == "true"
	   }


for i,v in pairs( channels ) do
  EnableTriggerGroup( i, v )
end

function chancap( TriggerName, trig_line, wildcards, style )
  w = GetWorld( "chancap" )  -- get channel specific soon
  if w then -- attempt to print only if channel window is open.
    for i,v in pairs(style) do
      w:ColourTell(RGBColourToName(v.textcolour), RGBColourToName(v.backcolour), v.text)
    end
    w:Note( "" )
  end
end -- chancap

It is much easier to fight for one's ideals than to live up to them.
[Go to top] top

Posted by Onoitsu2   USA  (246 posts)  [Biography] bio
Date Sun 20 May 2007 11:21 PM (UTC)  quote  ]
Message
Well actually I would LOVE to take a gander at your channel separator, or what you have so far, cause I always love to learn new methods of doing things. I tend to want to cram in at least 2/3 of the possible ways of doing things, into my head :)

Laterzzz,
Onoitsu2 (Venificius on Aardwolf)
[Go to top] top

Posted by Shaun Biggs   USA  (644 posts)  [Biography] bio
Date Sun 20 May 2007 04:09 PM (UTC)  quote  ]
Message
No offense meant here, but I like making my own plugins whenever possible. Partly so I learn a lot more, and partly because I have specific ideas of how the style of the program should be. To be honest, I have looked at your channel separator, and I think you would have the same reaction looking at mine. Completely confused why the other person didn't do it "the simpler" way.

I'm also trying to add in a bit of functionality into mine that would pretty much require rewriting your plugin anyway, and would be easier to start from scratch. Like having the plugin capture socials on all channels, or redirecting channels to different windows per channel. My clannies keep feeding me ideas when I mention a plugin.

I'm also having a few peculiarities with your plugin, probably from me not setting things up right, but clan -h didn't seem to work terribly well for me.

It is much easier to fight for one's ideals than to live up to them.
[Go to top] top

Posted by Onoitsu2   USA  (246 posts)  [Biography] bio
Date Sun 20 May 2007 11:15 AM (UTC)  quote  ]
Message
Shaun,
perhaps you might want to check out MY chat separator plugin for inspiration.
On Aardwolf, finger venificius, and download the plugin installer that is in the URL shown...

That will then install ALL plugins into a folder located within the Mushclient/worlds/plugins/AardOnoitsu2/ folder, it does not matter where you installed mushclient to, it will place the files in the proper locations...

And who knows you might enjoy some of my other plugins too :)

Sorry this is somewhat off topic, BUT Anyone can look at these plugins and possibly modify them to their needs.

Laterzzz,
Onoitsu2 (Venificius on Aardwolf)
[Go to top] top

Posted by Zzad   (2 posts)  [Biography] bio
Date Sat 19 May 2007 01:27 PM (UTC)  quote  ]
Message
Cheers, and no its not for aardwolf its for DW. Thanks
[Go to top] top

Posted by Shaun Biggs   USA  (644 posts)  [Biography] bio
Date Sat 19 May 2007 11:52 AM (UTC)  quote  ]
Message
Omit_from_output="y" for the triggers in the main world. If this script is for Aardwolf, I'm currently designing one, which is about 60% finished. You can set which channels are working, if it shows in the main world window, and toggle the whole script on/off. But I just have it for a few channels that my clannie requested until I have the whole thing working well enough to release.

It is much easier to fight for one's ideals than to live up to them.
[Go to top] top

Posted by Zzad   (2 posts)  [Biography] bio
Date Sat 19 May 2007 09:00 AM (UTC)  quote  ]
Message
I have read the FAQ on sending chat to another world. Which I have got working just sweet, is there any way that I can not show the chatter in the original world?

Great client by the way, lua scripting is much nicer (by nicer I mean easier) than the TinTin I have been previously using.
[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.


1,932 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]