Siema może mi ktoś powiedzieć jak zrobić żeby bot bił z exori i exori min jak jest więcej niż 3 potwory (chodzi o 3 rodzaje cyclopów). Bardzo mi zależy :)
local PvPSafe = false
local Attacks = {}
--[[
Options:
words - words of spell to cast
creatures - table of creatures to consider, if you disclude this it will consider all
count - amount of creatures in order to cast
range - distance from self to consider creatures
padding - for pvpsafe, if enabled each spell must have a padding setting, distance from self players must be in order to cast
needTarget - for spells that require a target, no need for a count or padding if this is enabled
]]--
Attacks[1] = { words = 'exori', creatures = {'Poison Spider', 'Orc', 'Snake', 'Orc Berserker'}, count = 4, range = 1, padding = 2}
Module.New('auto_attack', function()
for _, data in ipairs(Attacks) do
if (not PvPSafe) or (Self.isAreaPvPSafe(data.padding, true)) then
if data.needTarget then
local target = Creature.New(Self.TargetID())
if (data.creatures and table.find(data.creatures, target:Name(), false)) or (not data.creatures) then
if target:DistanceFromSelf() <= data.range and Self.CanCastSpell(data.words) then
Self.Say(data.words)
end
end
else
local count, mob = 0, Self.GetTargets(data.range)
if data.creatures then
for i = 1, #mob do
if mob[i]:isOnScreen() and table.find(data.creatures, mob[i]:Name(), false) then
count = count + 1
end
end
else
count = #mob
end
if count >= data.count and Self.CanCastSpell(data.words) then
Self.Say(data.words)
end
end
end
end
end)
Aktualnie 1 użytkowników przegląda ten temat. (0 użytkowników i 1 gości)
Zakładki