mazda313 napisał
2) jak ustawić by nie bił czyich monsterow? Ustawiłem zeby był tylko te co jego biją ale on bije tylko gdy podejdzie do niego
Kod :
init start
local r = 3 -- Range.
local safelist = { } -- The bot WILL KS this players. Add more to this if you want.
table.insert(safelist, $name) -- Do not edit it.
init end
auto(100)
local ppos = {}
foreach creature p 'pf' do
if not table.find(safelist, p.name) then
table.insert(ppos, {x = p.posx, y = p.posy})
end
end
foreach creature c 'mf' do
local ignore = false
if c.id ~= $mattacker.id then
for i = 1, #ppos do
local difx, dify = ppos[i].x - c.posx, ppos[i].y - c.posy
if math.abs(difx) <= r and math.abs(dify) <= r then
ignore = true
if c.ignored == false then
ignorecreature(c.id)
end
break
end
end
end
if ignore == false and c.ignored == true then
ignorecreature(c.id, true)
end
end
if $attacked.id ~= 0 then
if $attacked.ignored then
stopattack()
end
end
local r = 3 -- Range - w tej linijce zmieniasz odległość jaką potwora od innego gracza. Jeżeli potwór będzie w odległość 3 kratki od innego gracza to ty nie będziesz go atakował. Ustaw sobie jak chcesz :)
Pozdrawiam,
Zikk
Zakładki