SHARE
TWEET

Untitled

a guest Jan 19th, 2020 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Trigger 1:
  2. SETUP: https://i.imgur.com/579lOVx.png
  3.  
  4. lineData = TriggerStyleRuns
  5. EnableTrigger("multi_line_chat",true)
  6.  
  7.  
  8. Trigger 2:
  9. SETUP: https://i.imgur.com/rjVVm68.png
  10. SETUP #2: Note - **NOT** Enabled, and named "multi_line_chat"
  11.  
  12. local w = GetWorld("OOC")
  13. local printAnyways = true
  14. --only work if both ooc world and lineData exist
  15. if (w and lineData) then
  16.     if (("%1"):sub(1,4) == "    ") then
  17.     -- if first four chars are blank space, add to line
  18.       for _,v in ipairs(TriggerStyleRuns) do
  19.          -- left-trim that bish (only for first style of line)
  20.          if (_ == 1) then
  21.             while (v.text:sub(1,1) == " ") do v.text = v.text:sub(2) end
  22.          end
  23.          lineData[#lineData + 1] = v
  24.       end
  25.       printAnyways = false
  26.     else
  27.        -- print concatenated data to other world
  28.        for _,v in ipairs(lineData) do
  29.           w:ColourTell(RGBColourToName(v.textcolour),
  30.                        RGBColourToName(v.backcolour),
  31.                        v.text)
  32.        end
  33.        w:Note("")
  34.        lineData = nil
  35.        EnableTrigger("multi_line_chat",false)
  36.     end
  37. end
  38. if (printAnyways) then
  39.     -- only gets set if it didn't match text
  40.     for _, v in ipairs (TriggerStyleRuns) do
  41.         -- print current line to screen since it didn't match
  42.         ColourTell (RGBColourToName (v.textcolour),
  43.                     RGBColourToName (v.backcolour),
  44.                     v.text)
  45.     end
  46. end
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