Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Trigger 1:
- SETUP: https://i.imgur.com/579lOVx.png
- lineData = TriggerStyleRuns
- EnableTrigger("multi_line_chat",true)
- Trigger 2:
- SETUP: https://i.imgur.com/rjVVm68.png
- SETUP #2: Note - **NOT** Enabled, and named "multi_line_chat"
- local w = GetWorld("OOC")
- local printAnyways = true
- --only work if both ooc world and lineData exist
- if (w and lineData) then
- if (("%1"):sub(1,4) == " ") then
- -- if first four chars are blank space, add to line
- for _,v in ipairs(TriggerStyleRuns) do
- -- left-trim that bish (only for first style of line)
- if (_ == 1) then
- while (v.text:sub(1,1) == " ") do v.text = v.text:sub(2) end
- end
- lineData[#lineData + 1] = v
- end
- printAnyways = false
- else
- -- print concatenated data to other world
- for _,v in ipairs(lineData) do
- w:ColourTell(RGBColourToName(v.textcolour),
- RGBColourToName(v.backcolour),
- v.text)
- end
- w:Note("")
- lineData = nil
- EnableTrigger("multi_line_chat",false)
- end
- end
- if (printAnyways) then
- -- only gets set if it didn't match text
- for _, v in ipairs (TriggerStyleRuns) do
- -- print current line to screen since it didn't match
- ColourTell (RGBColourToName (v.textcolour),
- RGBColourToName (v.backcolour),
- v.text)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement