Hello! I'm working on something where I need to get a value from server log.
I have managed to run a certain action if the message I have selected appears, using newmessage. My question is this, is there any way to save damage I do to a certain monster as an persistent int perhaps?
03:29 A scorpion loses 43 hitpoints due to your attack.
For example here I want to save the value 43 which I will use for counting purposes later on
This is what I got so far:
Any help is appreciated!!PHP Code:
init start
local check = {
example = {'A scorpion loses'},
}
table.lower(check)
init end
auto(200)
foreach newmessage m do
for _, v in pairs(check) do
for k, vv in ipairs(v) do
if m.content:lower():find(vv:lower()) then
--ACTION HERE
end
end
end
end
Thanks