SHARE
TWEET

Untitled

a guest Jan 19th, 2020 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <triggers>
  2.   <trigger
  3.    enabled="y"
  4.    match="^(.* say.*)"
  5.    omit_from_output="y"
  6.    regexp="y"
  7.    send_to="14"
  8.    sequence="100"
  9.   >
  10.   <send>lineData = TriggerStyleRuns
  11. EnableTrigger("multi_line_chat",true)</send>
  12.   </trigger>
  13.   <trigger
  14.    match="^(.*)$"
  15.    name="multi_line_chat"
  16.    omit_from_output="y"
  17.    regexp="y"
  18.    send_to="14"
  19.    sequence="100"
  20.   >
  21.   <send>local w = GetWorld("OOC")
  22. local printAnyways = true
  23. --only work if both ooc world and lineData exist
  24. if (w and lineData) then
  25.     if (("%1"):sub(1,4) == "    ") then
  26.     -- if first four chars are blank space, add to line
  27.       for _,v in ipairs(TriggerStyleRuns) do
  28.          -- left-trim that bish (only for first style of line)
  29.          if (_ == 1) then
  30.             while (v.text:sub(1,1) == " ") do v.text = v.text:sub(2) end
  31.          end
  32.          lineData[#lineData + 1] = v
  33.       end
  34.       printAnyways = false
  35.     else
  36.        -- print concatenated data to other world
  37.        for _,v in ipairs(lineData) do
  38.           w:ColourTell(RGBColourToName(v.textcolour),
  39.                        RGBColourToName(v.backcolour),
  40.                        v.text)
  41.        end
  42.        w:Note("")
  43.        lineData = nil
  44.        EnableTrigger("multi_line_chat",false)
  45.     end
  46. end
  47. if (printAnyways) then
  48.     -- only gets set if it didn't match text
  49.     for _, v in ipairs (TriggerStyleRuns) do
  50.         -- print current line to screen since it didn't match
  51.         ColourTell (RGBColourToName (v.textcolour),
  52.                     RGBColourToName (v.backcolour),
  53.                     v.text)
  54.     end
  55. end</send>
  56.   </trigger>
  57. </triggers>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top