Unknown2010-08-28 14:48:31
QUOTE (AquaNeos @ Aug 28 2010, 05:32 AM) <{POST_SNAPBACK}>
how I do it. then just have the appending stuff for tells.
CODE
You tell <-- begin of line substring
^(\\w+) tells you, "(.*)"$ <-- regex
^(\\w+) tells you, "(.*)"$ <-- regex
I think the best way is as follows:
one trigger, 2 patterns. First is begin of line substring for "You tell" and the second is a regular substring for
tells you, "
Then make another trigger, two patterns. This time, both are perl regex type patterns:
^You tell .*$
^\\w+ tells you, ".*"$
Takes this second trigger, and drag it on top of the first, making it a child trigger to the first.
Put the code for capturing it and shipping it to the chat screens in this second child trigger. This way, you are using the faster substring type triggers to validate that it -might- be the right tell line, and the more precise (if only a little in the case of you sending a tell) but slower and more resource costly perl regex patterns don't get evaluated until the substrings have matched.
Vadi did some testing, and if I remember correctly the result was that 100k perl regex triggers were 50% slower than 100K shielded regex triggers (of the type I described just above)
IOW, not a big difference individually necessarily, but it adds up over time. 100ms with shield, 150ms with unshield, 200ms shielded, 300ms unshielded... it can add up.
link to post on mudlet forums for reference
Edit: forgot a step
Unknown2010-08-28 14:53:36
Making this a separate reply, rather than editing the previous as it's kind of a seperate thread...
For capturing tells and emotes, I've found your friend is config color.
You can set emotes and says to something horrible and screaming, color combo wise. Then make a trigger which matches that color. Using the color trigger pattern. You can then recolor it however you like using the fg("colorname") and bg("colorname") functions between selectString(line,1) and the copy() line.
so far, the only thing I have failed to catch using this method is some of the quest stuff... for instance, when Rowena summons Mother Night, a couple of pieces which look like they'd be emotes but I'm guessing are classified somehow differently in rapture (event scripts or some such, I don't know) aren't colored, and so aren't captured. But all player/divine/etc. interactions should be. Well... except perhaps when they whisper in your head, that's never happened to me so I don't know =)
For capturing tells and emotes, I've found your friend is config color.
You can set emotes and says to something horrible and screaming, color combo wise. Then make a trigger which matches that color. Using the color trigger pattern. You can then recolor it however you like using the fg("colorname") and bg("colorname") functions between selectString(line,1) and the copy() line.
so far, the only thing I have failed to catch using this method is some of the quest stuff... for instance, when Rowena summons Mother Night, a couple of pieces which look like they'd be emotes but I'm guessing are classified somehow differently in rapture (event scripts or some such, I don't know) aren't colored, and so aren't captured. But all player/divine/etc. interactions should be. Well... except perhaps when they whisper in your head, that's never happened to me so I don't know =)
Okin2010-09-21 14:09:54
Sorry for the slight necro, but did anything ever get scripted for reducing the width of this? I'm running Mudlet on an oldish laptop and, while the chat capture is my official New Favourite Thing, it covers the top right corner of my inventory.
Unknown2010-09-21 14:57:56
QUOTE (Okin @ Sep 21 2010, 10:09 AM) <{POST_SNAPBACK}>
Sorry for the slight necro, but did anything ever get scripted for reducing the width of this? I'm running Mudlet on an oldish laptop and, while the chat capture is my official New Favourite Thing, it covers the top right corner of my inventory.
Its at the top of the script. Not looking at it right now, but should be something like ChatStuff.width = 400
Just change the number and restart mudlet.
Okin2010-09-23 09:16:47
Merci beaucoup, danke schön, etc.
Janalon2010-09-23 10:08:30
QUOTE (Okin @ Sep 23 2010, 05:16 AM) <{POST_SNAPBACK}>
Merci beaucoup, danke schön, etc.
What width Okin... also, what lines do we need to cut to deduce specific tabs?
Okin2010-09-23 14:04:30
I ended up reducing mine to 300. It works fine with All, City, Guild, Tells, Youth, Battle and Other.
The bit that defines the different tabs is
for me. You can delete or alter this at will to change the tabs, as I understand it.
The bit that defines the different tabs is
CODE
chatTable = {
        "All",
        "City",
        "Guild",
        "Tells",
        "Youth",
        "Battle",
        "Other",
        }
        "All",
        "City",
        "Guild",
        "Tells",
        "Youth",
        "Battle",
        "Other",
        }
for me. You can delete or alter this at will to change the tabs, as I understand it.
Unknown2010-09-23 14:45:23
Yes, though the changes won't take effect properly until you restart mudlet... you can call the creation function again, but you'll end up with the old labels not gone, and new labels crossing over them, or them crossing over the reduced number of tabs/etc.
Janalon2010-09-26 20:08:57
Bad news. Long story short I had to reformat my drive. Sux. Went to reimport the blinky tabbed chat. Had it working prior to reformatting... now I can't get it to work again. Worked through the problem once (thanks to this thread). Now I face a new problem: I speak over the proper aether, and NOTHING appears in the tabbed chat. Nothing. This is what I have:
"Trigger" beginning of Line Substring:
Script:
HELP? Also, did I happen to see a Mudlet reformatted potion list floating around somewhere?
"Trigger" beginning of Line Substring:
CODE
(Nekotai):
<>:
selectString(line,1)
copy()
ChatStuff.append("All")
ChatStuff.append("Guild")
deselect()
<
selectString(line,1)
copy()
ChatStuff.append("All")
ChatStuff.append("Guild")
deselect()
Script:
CODE
ChatStuff = ChatStuff or {}
ChatStuff.fontSize = ChatStuff.fontSize or 9
ChatStuff.fontWidth, ChatStuff.fontHeight = calcFontSize(ChatStuff.fontSize)
mainWidth, mainHeight = getMainWindowSize()
ChatStuff.width = 400
ChatStuff.height = ChatStuff.fontHeight * 35
ChatStuff.wordwrap = (ChatStuff.width / ChatStuff.fontWidth) - 1
ChatStuff.blinkyTimers = ChatStuff.blinkyTimers or {}
ChatStuff.blinkyColor = ChatStuff.blinkyColor or {}
function ChatStuff.posY()
  return 25 --because the tabs are 25 high
end
function ChatStuff.posX()
  return mainWidth - ChatStuff.width - 15 --the -15 is to keep it from covering the scroll bar
end
function ChatStuff.append(chat)Â Â
  appendBuffer(string.format("chat%s", chat))
  local tab = string.format("tab%s", chat)
  if ChatStuff.blinkyTimers or ChatStuff.currentTab == chat or chat == "All" then
    return true
  else
    ChatStuff.blinkyTimers = tempTimer(0.5, string.format(], chat))
    setBackgroundColor(tab, 100, 100, 100, 125)
    ChatStuff.blinkyColor = 1
  end
  return true
end
function ChatStuff.blink(chat)
  local tab = string.format("tab%s", chat)
  if ChatStuff.blinkyColor == 1 then
    setBackgroundColor(tab, 0, 0, 0, 0)
    ChatStuff.blinkyColor = 0
  else
    setBackgroundColor(tab, 100, 100, 100, 125)
    ChatStuff.blinkyColor = 1
  end
  ChatStuff.blinkyTimers = tempTimer(0.5, string.format(], chat))
end
chatTable = {
        "All",
        "City",
        "Guild",
        "Tells",
        "Battle",
        "Market",
        "Misc",
        }
ChatStuff.tabWidth, ChatStuff.tabHeight = math.floor( ChatStuff.width / #chatTable  ), 25
ChatStuff.tabPosX, ChatStuff.tabPosY = ChatStuff.posX(), ChatStuff.posY() - 25
-- Functions
function ChatStuffCreate()
  local startX = ChatStuff.tabPosX
  for _,v in ipairs( chatTable ) do
    local tab = "tab" .. v
    createLabel( tab, startX, ChatStuff.tabPosY, ChatStuff.tabWidth, ChatStuff.tabHeight, 0 )
    resizeWindow( tab, ChatStuff.tabWidth, ChatStuff.tabHeight )
    setLabelClickCallback( tab, "switchchat", v )
    echo( tab, ] .. v .. ] )
    moveWindow( tab, startX, ChatStuff.tabPosY )
    startX = startX + ChatStuff.tabWidth
    local chat = "chat" .. v
    createMiniConsole( chat, ChatStuff.posX(), ChatStuff.posY(), ChatStuff.width, ChatStuff.height )
    resizeWindow( chat, ChatStuff.width, ChatStuff.height )
    setWindowWrap( chat, ChatStuff.wordwrap )
    setMiniConsoleFontSize( chat, ChatStuff.fontSize )
    setBackgroundColor( chat, 0, 0, 0, 0 )
    moveWindow( chat, ChatStuff.posX(), ChatStuff.posY() )
    hideWindow( chat )
  end
  ChatStuff.currentTab = "none"
  switchchat( "All" )
end
function switchchat ( chat )
  local o_c = "chat" .. ChatStuff.currentTab
  local o_t = "tab" .. ChatStuff.currentTab
  local n_c = "chat" .. chat
  local n_t = "tab" .. chat
  if ChatStuff.currentTab ~= chat then
    if ChatStuff.blinkyTimers then
      killTimer(ChatStuff.blinkyTimers)
      ChatStuff.blinkyTimers = nil
      ChatStuff.blinkyColor = nil
    end
    hideWindow( o_c )
    showWindow( n_c )
    ChatStuff.currentTab = chat
    setBackgroundColor( o_t, 0, 0, 0, 0 )
    setBackgroundColor( n_t, 100, 100, 100, 125 )
  end
end
function ChatStuffResize()
  ChatStuff.fontWidth, ChatStuff.fontHeight = calcFontSize(ChatStuff.fontSize)
  mainWidth, mainHeight = getMainWindowSize()
  ChatStuff.height = ChatStuff.fontHeight * 35
  ChatStuff.wordwrap = (ChatStuff.width / ChatStuff.fontWidth) - 1
  ChatStuff.tabWidth, ChatStuff.tabHeight = math.floor( ChatStuff.width / #chatTable), 25
  ChatStuff.tabPosX, ChatStuff.tabPosY = ChatStuff.posX(), ChatStuff.posY() - 25
  ChatStuffCreate()
end
if not ChatStuff.initialized then
    ChatStuffCreate()
    ChatStuff.initialized = true
end
ChatStuff.fontSize = ChatStuff.fontSize or 9
ChatStuff.fontWidth, ChatStuff.fontHeight = calcFontSize(ChatStuff.fontSize)
mainWidth, mainHeight = getMainWindowSize()
ChatStuff.width = 400
ChatStuff.height = ChatStuff.fontHeight * 35
ChatStuff.wordwrap = (ChatStuff.width / ChatStuff.fontWidth) - 1
ChatStuff.blinkyTimers = ChatStuff.blinkyTimers or {}
ChatStuff.blinkyColor = ChatStuff.blinkyColor or {}
function ChatStuff.posY()
  return 25 --because the tabs are 25 high
end
function ChatStuff.posX()
  return mainWidth - ChatStuff.width - 15 --the -15 is to keep it from covering the scroll bar
end
function ChatStuff.append(chat)Â Â
  appendBuffer(string.format("chat%s", chat))
  local tab = string.format("tab%s", chat)
  if ChatStuff.blinkyTimers or ChatStuff.currentTab == chat or chat == "All" then
    return true
  else
    ChatStuff.blinkyTimers = tempTimer(0.5, string.format(], chat))
    setBackgroundColor(tab, 100, 100, 100, 125)
    ChatStuff.blinkyColor = 1
  end
  return true
end
function ChatStuff.blink(chat)
  local tab = string.format("tab%s", chat)
  if ChatStuff.blinkyColor == 1 then
    setBackgroundColor(tab, 0, 0, 0, 0)
    ChatStuff.blinkyColor = 0
  else
    setBackgroundColor(tab, 100, 100, 100, 125)
    ChatStuff.blinkyColor = 1
  end
  ChatStuff.blinkyTimers = tempTimer(0.5, string.format(], chat))
end
chatTable = {
        "All",
        "City",
        "Guild",
        "Tells",
        "Battle",
        "Market",
        "Misc",
        }
ChatStuff.tabWidth, ChatStuff.tabHeight = math.floor( ChatStuff.width / #chatTable  ), 25
ChatStuff.tabPosX, ChatStuff.tabPosY = ChatStuff.posX(), ChatStuff.posY() - 25
-- Functions
function ChatStuffCreate()
  local startX = ChatStuff.tabPosX
  for _,v in ipairs( chatTable ) do
    local tab = "tab" .. v
    createLabel( tab, startX, ChatStuff.tabPosY, ChatStuff.tabWidth, ChatStuff.tabHeight, 0 )
    resizeWindow( tab, ChatStuff.tabWidth, ChatStuff.tabHeight )
    setLabelClickCallback( tab, "switchchat", v )
    echo( tab, ] .. v .. ] )
    moveWindow( tab, startX, ChatStuff.tabPosY )
    startX = startX + ChatStuff.tabWidth
    local chat = "chat" .. v
    createMiniConsole( chat, ChatStuff.posX(), ChatStuff.posY(), ChatStuff.width, ChatStuff.height )
    resizeWindow( chat, ChatStuff.width, ChatStuff.height )
    setWindowWrap( chat, ChatStuff.wordwrap )
    setMiniConsoleFontSize( chat, ChatStuff.fontSize )
    setBackgroundColor( chat, 0, 0, 0, 0 )
    moveWindow( chat, ChatStuff.posX(), ChatStuff.posY() )
    hideWindow( chat )
  end
  ChatStuff.currentTab = "none"
  switchchat( "All" )
end
function switchchat ( chat )
  local o_c = "chat" .. ChatStuff.currentTab
  local o_t = "tab" .. ChatStuff.currentTab
  local n_c = "chat" .. chat
  local n_t = "tab" .. chat
  if ChatStuff.currentTab ~= chat then
    if ChatStuff.blinkyTimers then
      killTimer(ChatStuff.blinkyTimers)
      ChatStuff.blinkyTimers = nil
      ChatStuff.blinkyColor = nil
    end
    hideWindow( o_c )
    showWindow( n_c )
    ChatStuff.currentTab = chat
    setBackgroundColor( o_t, 0, 0, 0, 0 )
    setBackgroundColor( n_t, 100, 100, 100, 125 )
  end
end
function ChatStuffResize()
  ChatStuff.fontWidth, ChatStuff.fontHeight = calcFontSize(ChatStuff.fontSize)
  mainWidth, mainHeight = getMainWindowSize()
  ChatStuff.height = ChatStuff.fontHeight * 35
  ChatStuff.wordwrap = (ChatStuff.width / ChatStuff.fontWidth) - 1
  ChatStuff.tabWidth, ChatStuff.tabHeight = math.floor( ChatStuff.width / #chatTable), 25
  ChatStuff.tabPosX, ChatStuff.tabPosY = ChatStuff.posX(), ChatStuff.posY() - 25
  ChatStuffCreate()
end
if not ChatStuff.initialized then
    ChatStuffCreate()
    ChatStuff.initialized = true
end
HELP? Also, did I happen to see a Mudlet reformatted potion list floating around somewhere?
Neos2010-09-26 22:21:46
QUOTE (Janalon @ Sep 26 2010, 04:08 PM) <{POST_SNAPBACK}>
Bad news. Long story short I had to reformat my drive. Sux. Went to reimport the blinky tabbed chat. Had it working prior to reformatting... now I can't get it to work again. Worked through the problem once (thanks to this thread). Now I face a new problem: I speak over the proper aether, and NOTHING appears in the tabbed chat. Nothing. This is what I have:
"Trigger" beginning of Line Substring:
Script:
HELP? Also, did I happen to see a Mudlet reformatted potion list floating around somewhere?
"Trigger" beginning of Line Substring:
CODE
(Nekotai):
<>:
selectString(line,1)
copy()
ChatStuff.append("All")
ChatStuff.append("Guild")
deselect()
<
selectString(line,1)
copy()
ChatStuff.append("All")
ChatStuff.append("Guild")
deselect()
Script:
CODE
code that I on/off understand
HELP? Also, did I happen to see a Mudlet reformatted potion list floating around somewhere?
In regards to the last question: Demonnic made a reformatted potion list script. You'd have to search through topics made by him, or he'll link you soon as he finds his way here.
Ardmore2010-09-26 23:04:27
I have one I stole off the MKO website, except I fixed all the really horrid bugs in it.
Neos2010-09-26 23:30:51
QUOTE (Ardmore @ Sep 26 2010, 07:04 PM) <{POST_SNAPBACK}>
I have one I stole off the MKO website, except I fixed all the really horrid bugs in it.
But does it blink?
Unknown2010-09-27 02:28:32
QUOTE (Janalon @ Sep 26 2010, 04:08 PM) <{POST_SNAPBACK}>
Bad news. Long story short I had to reformat my drive. Sux. Went to reimport the blinky tabbed chat. Had it working prior to reformatting... now I can't get it to work again. Worked through the problem once (thanks to this thread). Now I face a new problem: I speak over the proper aether, and NOTHING appears in the tabbed chat. Nothing. This is what I have:
<>
HELP? Also, did I happen to see a Mudlet reformatted potion list floating around somewhere?
<
HELP? Also, did I happen to see a Mudlet reformatted potion list floating around somewhere?
I'll take import the blinky chat myself, since I'm setting up a clean profile for some things.
As for the reformatted potion list, I have some information tabs I wrote up which I've been pondering releasing, but I'd have to rip it out of my old profile. Shouldn't be too hard, just haven't found the time. If there's interest, though, I'll certainly take the time sooner.
Thing is, the windows are about as big as the stargaze output on my astrology module... they're kind of large. There's a lot of info in them, of course, but I'm not sure folks want that much screen real estate taken up to hold it all, when they can just type PL SUM to see the info.
Ahh well, no sense in not pulling it out =)
Back to the original problem, are you getting any errors? Have you checked to make sure the trigger is firing?
ETA: I used the script exactly as you pasted in the above post, and it's working fine for me.
Janalon2010-10-02 04:29:42
Odd things. Second time around I installed the last stable version of Mudlet... 1.1.1 or something similar I believe. Needed the beta to run Vadi's M&M. Did a huge no-no and installed 1.2.0 over the prior version. In retrospect, I should have deleted 1.1.1 before installing. This caused all "mods" with tabbed into (i.e. affs, chat, info) to blank out. Had to move back a few steps, export my own personal aliases & triggers, and deleted mudlet completely before reinstalling. Seems to worked like a charm.
Okin2010-11-14 10:29:20
Is there a way to quickly and easily turn off the flashing?
(A better option would be flashing to only be on if you're not on the 'All' tab, since it annoys me when I'm on All, get a GT and see the 'Guild' tab flash. I know! I've seen the message!)
(A better option would be flashing to only be on if you're not on the 'All' tab, since it annoys me when I'm on All, get a GT and see the 'Guild' tab flash. I know! I've seen the message!)
Fuyu2011-01-21 14:24:55
I'm getting blinking tabs..that, and just that.
Unknown2011-01-25 17:16:13
QUOTE (Fuyu @ Jan 21 2011, 09:24 AM) <{POST_SNAPBACK}>
I'm getting blinking tabs..that, and just that.
When you go into the script editor and click on 'error' are there any errors coming up? I haven't played in a while (real life has been kicking my butt) but I'm planning on fixing that very soon, and should be able to provide more support for these free snippets soon.
Neos2011-01-25 18:11:58
QUOTE (demonnic @ Jan 25 2011, 12:16 PM) <{POST_SNAPBACK}>
When you go into the script editor and click on 'error' are there any errors coming up? I haven't played in a while (real life has been kicking my butt) but I'm planning on fixing that very soon, and should be able to provide more support for these free snippets soon.
She was missing copy() from the trigger code box.
Fuyu2011-01-26 02:00:37
QUOTE (AquaNeos @ Jan 26 2011, 02:11 AM) <{POST_SNAPBACK}>
She was missing copy() from the trigger code box.
Trigger Name: Adiks
Trigger: (Adiks):
Code:
selectString(line,1)
copy()
ChatStuff.append("All")
ChatStuff.append("Adiks")
deselect()
I still kept seeing blinking lights with nothing below, though. Did I phrase it wrong?
Clicked the script, pushed error, and came up with this:
*** starting new session ***
object:
Also, I can use a single trigger to send different channels to a single tab, right?
Elodres2011-03-11 06:40:46
does anyone have any suggestions how to combine tabbedchat and potionlist?