Lure Cave

Descrição

Desligue o cavebot quando tiver mais de 2 monstros na tela e ligue quando tiver menos de 1

Autor:

                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
function distanceFromPlayer(coords) if not coords then return false end return getDistanceBetween(pos(), coords) end function getMonsters(range, multifloor) if not range then range = 10 end local mobs = 0; for _, spec in pairs(getSpectators(multifloor)) do mobs = (g_game.getClientVersion() < 960 or spec:getType() < 3) and spec:isMonster() and distanceFromPlayer(spec:getPosition()) <= range and mobs + 1 or mobs; end return mobs; end macro(500, "Lure", function() if getMonsters() > 2 then CaveBot.setOff() else if getMonsters() < 1 then CaveBot.setOn() end end end)