How to get the dialog with the color?

halfastrc

Участник
Автор темы
33
4
Версия MoonLoader
.027.0-preview
I have this to get the dialog text:

Lua:
function sampev.onShowDialog(dialogId, style, title, button1, button2, text)
    if string.find(title, "ANT") then 
        print(text)
    end
end

But I just want to get the line of the dialog with different color, in the case the line 6. And this it's random, maybe the color can be in the line 1, 4...

1665098261125.png


1665098254015.png


I appreciate any help, thanks
 

Иглобрюх

Активный
250
73
code:
function sampev.onShowDialog(dialogId, style, title, button1, button2, text)
    if title:find('{') then
        title = title:gsub('{', '[')
        title = title:gsub('}', ']')
    end
    if text:find('{') then
        text = text:gsub('{', '[')
        text = text:gsub('}', ']')
    end
    if button1:find('{') then
        button1 = button1:gsub('{', '[')
        button1 = button1:gsub('}', ']')
    end
    if button2:find('{') then
        button2 = button2:gsub('{', '[')
        button2 = button2:gsub('}', ']')
    end
    if string.find(title, "ANT") then
        print(text)
    end
end
 
  • Эм
  • Нравится
Реакции: qdIbp и halfastrc