Alright so I've created a mini window that displays a map that is given to me through the output on the game Aetolia. Now, it does exactly what I want it to(omits the map from the output and redirects it into the miniwindow) but only when I tell it specifically where the map starts and where the map ends. Here is a chunk of code to help (note, this is based off of Nick's inventory alias):
Checks to see if map starts
Checks to see if end of map
now the start lines(---------- v10009 -----------) and end lines(----------- 4:2:0 -----------) can vary, but not by much I believe. The problem is that I can't make those two lines match in different rooms because the numbers change. I was thinking that you most likely need to use regular expressions, but being as I am not the brightest crayon in the box, I need your help. Will be greatly appreciated, thanks.
Checks to see if map starts
-- Waiting for map to start
local x = wait.match ("---------- v10009 -----------", 5)
if not x then
ColourNote ("white", "blue", "No map received within 5 seconds")
return
end -- if
Checks to see if end of map
-- Check to see if end of map
if string.match (line, "^----------- 4:2:0 -----------") then
break
end -- if
now the start lines(---------- v10009 -----------) and end lines(----------- 4:2:0 -----------) can vary, but not by much I believe. The problem is that I can't make those two lines match in different rooms because the numbers change. I was thinking that you most likely need to use regular expressions, but being as I am not the brightest crayon in the box, I need your help. Will be greatly appreciated, thanks.