Post by rustymetal on Nov 5, 2005 5:41:52 GMT -5
What I'm trying to do is make a script that filters chat lines to only show what you want, like linkshell, party, ect.
Thats what I have so far, it does not display anything on screen, I can't seem to figure out where my error is. I know its somwhere in the line function.
What I was doing, is sense the line # arnt 1 2 and 3. To find the 5 (or might be 8) lines displayed on screen, you take the current line -x.
And say the line is not LS, then -1 more to go up another line and another until it gets to the top. Well, Im not even sure this the right way to do this at all. I can already see 2 problems doing it this way, Your going to get the same line more then once when the last LS chat was over 5 lines ago, and that so far, it only shows out going ls not incoming...
Any suggestions helpful.
Also a bug i found, if you use auto-translator it wont come up in ChatText, its skipped.
MyText=Graphics.text_CreateObject()
Graphics.text_SetColor(255,255,255,255,MyText)
Graphics.text_SetPosition(100,100,MyText)
Graphics.text_SetFont("Arial",10,MyText)
Graphics.text_SetVisibility(1,MyText)
while true do
function ChatType(x)
local Type
Type=FFXI.chat_GetLineType(FFXI.chat_GetNewestLineNumber()-x)
return Type
end
function ChatText(x)
local Text
Text=FFXI.chat_GetLine(FFXI.chat_GetNewestLineNumber()-x)
return Text
end
function Line(x)
local Type,Text,output
repeat
if ChatType(x)==06 then
output=ChatText(x)
else
x=x+1
end
until ChatType(x)==06
return output
end
ChatLine=string.format("Test: %s",Line(0))
Graphics.text_SetText(ChatLine,MyText)
Windower.script_Sleep(1000)
end
Thats what I have so far, it does not display anything on screen, I can't seem to figure out where my error is. I know its somwhere in the line function.
What I was doing, is sense the line # arnt 1 2 and 3. To find the 5 (or might be 8) lines displayed on screen, you take the current line -x.
And say the line is not LS, then -1 more to go up another line and another until it gets to the top. Well, Im not even sure this the right way to do this at all. I can already see 2 problems doing it this way, Your going to get the same line more then once when the last LS chat was over 5 lines ago, and that so far, it only shows out going ls not incoming...
Any suggestions helpful.
Also a bug i found, if you use auto-translator it wont come up in ChatText, its skipped.