Add location recognition for combat and death reporters
This commit is contained in:
@@ -246,6 +246,30 @@ function shared.MinimapTagger.Init()
|
||||
PlantTag(tonumber(x), tonumber(y), 2)
|
||||
end
|
||||
end
|
||||
if string.find(msg, "^I am in combat with") then
|
||||
if Heimdall_Data.config.minimapTagger.debug then
|
||||
print(string.format("[%s] Found combat alert in message: %s", ModuleName, msg))
|
||||
end
|
||||
local x, y = string.match(msg, "%((%d+%.%d+)%s*,%s*(%d+%.%d+)%)")
|
||||
if Heimdall_Data.config.minimapTagger.debug then
|
||||
print(string.format("[%s] Found combat position: %s, %s", ModuleName, tostring(x), tostring(y)))
|
||||
end
|
||||
if x and y then
|
||||
PlantBattle(tonumber(x), tonumber(y), 2)
|
||||
end
|
||||
end
|
||||
if string.find(msg, " killed ") then
|
||||
if Heimdall_Data.config.minimapTagger.debug then
|
||||
print(string.format("[%s] Found death alert in message: %s", ModuleName, msg))
|
||||
end
|
||||
local x, y = string.match(msg, "%((%d+%.%d+)%s*,%s*(%d+%.%d+)%)")
|
||||
if Heimdall_Data.config.minimapTagger.debug then
|
||||
print(string.format("[%s] Found death position: %s, %s", ModuleName, tostring(x), tostring(y)))
|
||||
end
|
||||
if x and y then
|
||||
PlantAlert(tonumber(x), tonumber(y), 2)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
print("[Heimdall] MinimapTagger loaded")
|
||||
|
Reference in New Issue
Block a user