GotoLabel onTextMessage
#87
This will read a message and goto a label if kills = 0
local gotoKills = 0
onTextMessage(function(mode,text)
local data = regexMatch(text, "([a-z A-Z-]*) defeated. You gained \\+([0-9]*) prey experience. ([0-9]*) kills remaining.")[1]
if #data ~= 0 then
local monsterName = data[2]
local exp = tonumber(data[3])
local kills = tonumber(data[4])
if kills == gotoKills then
CaveBot.gotoLabel("Cave")
end
end
end)
- remove | + add
26 Mar 2022