Two Hs for spawning alts to help kill sheep are : sheepmustdie and diesheep
we are trying to start with killing the females first please.
windmaker wrote:the pregnant sheeps die more fast than male sheeps.
so just killing is a good way too. ofc. if a lot of people are involved. can target him more fast:
hs : FknSheeps
//#! name = Animal Killer
//#! uniq =killer
// Globals
include("jBotAPI");
//include("jBotAPIArcanist");
include("pathfinder");
function killAnimal(animal){
if (jGetWindow("Cattle Info")){
jAbsClick(jMyCoords(), 1, 0);
jSleep(1000);
}
do {
jOffsetClick(jCoord(getRandomArbitary(-2,2),getRandomArbitary(-2,2)),1,0);
goNearPosition(animal.position(), 1);
jSleep(500);
jDoClick(animal.getID(), 3, 0);
jWaitPopup(3000);
jSelectContextMenu("Slaughter");
jSleep(1000);
jToConsole("Tried to kill cattle");
jSleep(1000);
} while (!jHaveHourglass());
while (jHaveHourglass()){
jSleep(1000);
}
}
while(1){
jSleep(500);
killAnimal(getNearest( "sheep/s"));
}
function goNearPosition( position, offset){
while (jIsMoving() || jMyCoords().dist(jTilify(position)) > offset*11){
var moving = jPFMoveOffset_LX(position, offset);
jSleep(500);
jPrint("[goNearPosition]Walking to " + position);
jPrint("[goNearPosition]Dist is " + jMyCoords().dist(jTilify(position)));
if (jMyCoords().dist(jTilify(position)) == offset*11) {
jPrint("[goNearPosition]Arrived at point");
return true;
}
if (moving == -1){
jToConsole("[goNearPosition] Point offscreen ")
return false;
}
}
function getNearest(object) {
var obj = jGetObjects(40, jCoord(0, 0), object);
var min_len = 100500;
var objid = 0;
for (var i = 0; i < obj.length; i++) {
if (obj[i].position().dist(jMyCoords()) < min_len) {
objid = obj[i];
min_len = obj[i].position().dist(jMyCoords());
}
}
return objid;
}
}
Users browsing this forum: Claude [Bot], Yandex [Bot] and 2 guests