Untitled
unknown
plain_text
2 years ago
833 B
6
Indexable
local target
local m = macro(1000, "Attack Monsters", function()
if target then return end
local monsters = string.split(storage.attackMonsterName, "\n")
for i, monster in pairs(getSpectators(posz())) do
if monster:isMonster() and not table.contains(monsters, monster:getName(), true) then
g_game.attack(monster)
target = monster
break
end
end
end)
UI.Button("Ignore List", function(newText)
UI.MultilineEditorWindow(storage.attackMonsterName or "", {title="Monster List", description="Monster List \nExample:\nMonster1\nMonster2\nMonster3"}, function(text)
storage.attackMonsterName = text
end)
end)
onCreatureDisappear(function(creature)
if not target then return end
if m.isOff() then return end
if creature:getName() ~= target:getName() then return end
target = nil
end)Editor is loading...