PDA

View Full Version : Help fix Slime remover script



Hetcolt
04-30-2016, 01:20 PM
hello,

Can anybody help fixing my Slime remover script pls.
It stopps cavebot and removes slime if they are in range. If no Slime is in range it will start cavebot.
The problem is, that the ELSE does not work right.If there are slimes it stopps bot and activates immediatly.

local itemID = {12061, 12063, 12075} -- ItemID of slimes
Module.New('SlimeRemover', function(module)
if (Self.TargetID() <= 0) then
for y = -3, 3 do
for x = -3, 3 do
if table.contains(itemID, Map.GetTopUseItem(Self.Position().x + x, Self.Position().y + y, Self.Position().z).id) then
Cavebot.Stop()
Self.UseItemWithGround(12077, Self.Position().x + x, Self.Position().y + y, Self.Position().z)
wait(6000)
else
Cavebot.Start()

end
end
end
end
end)

yompa93
05-04-2016, 07:30 AM
This works for me. try it out


local itemID = {12061, 12063, 12075} -- ItemID of slimes
Module.New('SlimeRemover', function(module)
if (Self.TargetID() ~= 1) then
pos = Self.Position()
for y = -3, 3 do
for x = -3, 3 do
if table.contains(itemID, Map.GetTopUseItem(pos.x + x, pos.y + y, pos.z).id) then
Cavebot.Stop()
Self.UseItemWithGround(12077, pos.x + x, pos.y + y, pos.z)
wait(5500)
else
Cavebot.Start()
end
end
end
end
end)

josets79
05-28-2016, 05:14 PM
Really, i love you very much <3 _ <3