So .- is what makes up a color-code syntax? Ugh, I've looked through the battlemod .luas and all I found was...
Code:
function fieldsearch(message)
local fieldarr = {}
string.gsub(message,"{(.-)}", function(a) fieldarr[a] = true end)
return fieldarr
end
And I'm not sure what to make of that or if it would have helped me figure it out.
Thank you, it has gotten this to where it will work on helixes I believe! I haven't tested it on a helix because I don't have time to play sch with all these campaigns going on but since it works on haste wearing off it'll probably work on a helix, too.
Here is what I'm using to experiment with. (I'm not sure whether to use Byrthnoth or Dlsmd's function as I don't know what different features each one offers. I just went with Byrth's for now)
Code:
haste_command = "Haste.-" --works--
casthaste_command = "Haste ¨" --broken--
wear_command = "Haste.- effect wears off" --works--
flutter1_command = "Erratic Flutter.-" --broken--
flutter2_command = "Flutter.-" --works--
windower.raw_register_event('incoming text',function(col,org,mod)
if string.find(org,haste_command) then
windower.send_command('input /echo The test worked!')
elseif string.find(org,casthaste_command) then
windower.send_command('input /echo The test worked!')
elseif string.find(org,wear_command) then
windower.send_command('input /echo The test worked!')
elseif string.find(org,flutter1_command) then
windower.send_command('input /echo The test worked!')
elseif string.find(org,flutter2_command) then
windower.send_command('input /echo The test worked!')
end
end)
Battlemod must take many-worded abilities and put some sort of symbol inbetween the words, because there's something other than a space between the two words that is breaking "Erratic Flutter.-" from working, whereas "Flutter.-" actually works. It is also interesting trying to get the casting line to trigger. The -> is apparently a ¨ symbol, but I can't get "Haste ¨" to trigger. Battlemod sure is interesting to try to pick apart.