Log in

View Full Version : Autofollow with attack



ssayum
03-27-2017, 12:59 AM
Hi, I have this autofollow script but i wanna to do this autofollow and attack with the Leader, anyone can help?


local player = "Testero"
local distance = 3

local stairsUp = ", 1947, 1950, 1952, 1954, 1956, 1958, 1960, 1962, 1964, 1966, 2192, 2194, 2196, 2198, 1969, 1971, 1973, 1975, 1977, 1978, 5257, 5258, 5259, 6909, 6911, 6913, 6915, 855, 856, 7542, 7544, 7546, 7548, 7881, 7887, 7888, 5033, 5035, 5037, 5039, 8657, 8830, 8831,"
local stairsDown = ", 293, 294, 369, 370, 385, 394, 411, 412, 413, 414, 428, 432, 433, 434, 437, 438, 469, 476, 594, 595, 601, 600, 604, 605, 607, 609, 610, 615, 1156, 482, 483, 484, 485, 566, 567, 1066, 482, 483, 484, 485, 566, 567, 1066, 1067, 1080, 4823, 859, 4825, 4826, 5081, 5544, 5691, 5731, 5763, 6127, 6128, 6129, 6130, 6172, 6173, 6754, 6755, 6756, 6917, 6918, 6919, 6920, 6921, 6922, 6923, 6924, 7053, 166, 167, 867, 868, 874, 4824, 7181, 7182, 7476, 7477, 7478, 7479, 7515, 7516, 7517, 7518, 7519, 7520, 7521, 7522, 369, 370, 411, 7767, 413, 414, 428, 432, 433, 7768, 967, 7550, 7229, 7730, 7731, 7732, 7733, 7734, 7735, 7736, 7737, 7755, 7767, 7768, 7804, 8104, 8144, 8658, 8690, 8709, 8932,"

Module.New("follow", function(module)
for i = CREATURES_LOW, CREATURES_HIGH do
local creature = Creature.GetFromIndex(i)
if creature:isValid() and creature:ID() ~= Self.ID() then
if creature:isOnScreen() and creature:isVisible() and creature:isAlive() and creature:isReachable() then
local name = creature:Name()
if creature:isPlayer() and creature:Name():lower() == player:lower() and not creature:isFollowed() then
creature:Follow()
end
end
end
end
module:Delay(1000)
end)

HjugO
03-27-2017, 12:49 PM
Hi, I have this autofollow script but i wanna to do this autofollow and attack with the Leader, anyone can help?

Purchase XB licence szmato.