|
Post by X-Drop on Dec 5, 2005 22:02:19 GMT -5
Yeah, I realize alot of you guys already know how to extract a pattern from a string. But since its not posted here, let me go ahead put this out for anyone wanting to see what Lua can do.
I think this is pretty powerful stuff! I am able to filter through chat lines and pull out very useful information that doesn't neccessarily have a unique FFXI.chat_GetLineType code.
Here is the barebones script. You can add your own block,
--PatternCheck.lua 12/3/2005 Xdrop
Chat={} LineNumber={} PatternCheck={}
for i=1,5,1 do --checks last 5 chat lines LineNumber[i]=FFXI.chat_GetNewestLineNumber()-(i-1) Chat[i]=FFXI.chat_GetLine(LineNumber[i])
PatternCheck[i]=string.find(Chat[i],"x") --replace x with pattern to search for
if PatternCheck[i]~=nil then --==============================================================================add block here end
end
|
|
|
Post by deathravin on Dec 31, 2005 11:02:53 GMT -5
Whenever I try to use anything like this I get a microsoft send/don't send critical error about lunar.dll (abruptly closes FFXI)- ... not sure if its the plugin or my code that is screwing it up, but I pretty much used Leviathan as a base (which you have pretty much moved into here)
Leviathan gives me the same critical error sometimes. Sometimes right after I catch a fish, other times when it's asking me questions, so I'm pretty sure its the chat line recognizer.
|
|
|
Post by X-Drop on Dec 31, 2005 14:00:37 GMT -5
This is definetely a known issue with the current version of Lunar. For me, I get the critical error on occassion. It just happens randomly. I used the same method in Leviathan and usually it works fine, but then once in a while out of nowhere.... *crash*!
|
|