mirror of
https://github.com/bdnugget/APOS.git
synced 2026-11-07 08:47:27 +00:00
10 files changed
+3067
-2169
No files matched your search
@@ -0,0 +1,186 @@
|
||||
public class Abyte0_BettyEyesShopper extends Abyte0_Script
|
||||
{
|
||||
int betty = 149;
|
||||
int coins = 10;
|
||||
int eyes = 270;
|
||||
int fMode = 3;
|
||||
boolean buyRunes = true;
|
||||
private final String SCRIPT_VERSION = "1.0";
|
||||
|
||||
|
||||
public Abyte0_BettyEyesShopper(Extension e)
|
||||
{
|
||||
super(e);
|
||||
}
|
||||
|
||||
public void init( String params )
|
||||
{
|
||||
print("Started Abyte0 Betty Eyes Shopper");
|
||||
print("Version "+ SCRIPT_VERSION);
|
||||
print("Any param = Eyes only");
|
||||
print("No param = Eyes + runes");
|
||||
if(params.equals(""))
|
||||
buyRunes = true;
|
||||
else
|
||||
buyRunes = false;
|
||||
}
|
||||
public int main()
|
||||
{
|
||||
if(getFightMode() != fMode)
|
||||
{
|
||||
setFightMode(fMode);
|
||||
}
|
||||
if(isBanking())
|
||||
{
|
||||
for(int i = 31; i<37; i++)
|
||||
{
|
||||
if(getInventoryCount(i) > 0)
|
||||
{
|
||||
deposit(i,getInventoryCount(i));
|
||||
return 100;
|
||||
}
|
||||
}
|
||||
|
||||
if(getInventoryCount(eyes) > 0)
|
||||
{
|
||||
deposit(eyes,1);
|
||||
return 100;
|
||||
}
|
||||
|
||||
if(getInventoryCount(coins) < 2500)
|
||||
{
|
||||
withdraw(coins,25000);
|
||||
return 1000;
|
||||
}
|
||||
closeBank();
|
||||
return 1000;
|
||||
}
|
||||
if(isQuestMenu())
|
||||
{
|
||||
answer(0);
|
||||
return 1000 + random(300, 1200);
|
||||
}
|
||||
|
||||
if(getInventoryCount() == 30 || getInventoryCount(coins) < 10)
|
||||
{
|
||||
if(getY() > 629)
|
||||
{
|
||||
walkTo(278,629);
|
||||
return 1000;
|
||||
}
|
||||
while(getY() > 575)
|
||||
{
|
||||
walkTo(290,getY()-3);
|
||||
return 500;
|
||||
}
|
||||
if(getX() == 287 && getY() == 572)
|
||||
{
|
||||
//Si a coter de la porte a exterieur
|
||||
print("Step Inside Bank");
|
||||
//atObject(287,571);
|
||||
walkTo(286,571);
|
||||
return 3000;
|
||||
}
|
||||
if(getX() >= 280 && getX() <= 286 && getY() >= 564 && getY() <= 573)
|
||||
{
|
||||
//Si dans la banque
|
||||
print("Talking to Banker");
|
||||
if(!isBanking())
|
||||
{
|
||||
int banker[] = getNpcByIdNotTalk(new int[]{95});
|
||||
if (banker[0] != -1 && !isBanking())
|
||||
{
|
||||
talkToNpc(banker[0]);
|
||||
return 3000;
|
||||
}
|
||||
}
|
||||
return 1000;
|
||||
}
|
||||
if(getY() < 575)
|
||||
{
|
||||
walkTo(287,572);
|
||||
return 1000 + random(300, 1200);
|
||||
}
|
||||
print("Walking to 287,571");
|
||||
walkTo(287,571);
|
||||
return 1000 + random(300, 1200);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(shopWindowOpen())
|
||||
{
|
||||
//then we close the shop
|
||||
if(getInventoryCount() == 30)
|
||||
{
|
||||
closeShop();
|
||||
return 2500;
|
||||
}
|
||||
|
||||
if(buyRunes)
|
||||
{
|
||||
for(int i = 31; i<36; i++)
|
||||
{
|
||||
if(getShopItemIdAmount(i) > 0)
|
||||
{
|
||||
buyItemIdFromShop(i,50);
|
||||
return 200;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buyItemIdFromShop(eyes,1);
|
||||
return 100;
|
||||
}
|
||||
|
||||
if(getX() == 286 && getY() == 571)
|
||||
{
|
||||
//Si a coter de la porte a linterieur
|
||||
print("Step Outside Bank");
|
||||
//atObject(287,571);
|
||||
walkTo(287,571);
|
||||
return random(121, 3500);
|
||||
}
|
||||
if(getX() >= 280 && getX() <= 286 && getY() >= 564 && getY() <= 573)
|
||||
{
|
||||
//Si dans la banque
|
||||
print("Walking to Door");
|
||||
walkTo(286,571);
|
||||
return random(240, 2500);
|
||||
}
|
||||
while(getY() < 620)
|
||||
{
|
||||
walkTo(290,getY()+3);
|
||||
return 500;
|
||||
}
|
||||
if(getY() < 628)
|
||||
{
|
||||
walkTo(285,628);
|
||||
return 3000;
|
||||
}
|
||||
if(getX() > 274)
|
||||
{
|
||||
walkTo(getX()-2,629);
|
||||
return 1000;
|
||||
}
|
||||
|
||||
if(getX() <= 274)
|
||||
{
|
||||
int bettyRef[] = getNpcByIdNotTalk(new int[]{betty});
|
||||
if (bettyRef[0] != -1)
|
||||
{
|
||||
talkToNpc(bettyRef[0]);
|
||||
return 2500;
|
||||
}
|
||||
return 3000;
|
||||
}
|
||||
return 5000;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSctiptVersion()
|
||||
{
|
||||
return SCRIPT_VERSION;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +1,9 @@
|
||||
public class Abyte0_Blood extends Abyte0_Script {
|
||||
public class Abyte0_Blood extends Abyte0_Script
|
||||
{
|
||||
//Version 3.1 2021-08-17 Support Cake as 330
|
||||
//Version 3.2 2022-06-24 AntiLogout when pid is good
|
||||
//Version 3.2.6 2024-03-12 Stop loop for debuggin the fighting teleport bug that rarely happen
|
||||
|
||||
|
||||
|
||||
int fmode = 2;
|
||||
@@ -9,242 +13,346 @@ public class Abyte0_Blood extends Abyte0_Script {
|
||||
int minFoodToBankAt = 3;
|
||||
int SafeOrNot = 0; //0 oui 1 non
|
||||
int BuryOrNot = 0; //0 oui 1 non
|
||||
|
||||
|
||||
int minWait = 30000;
|
||||
int maxWait = 90000;
|
||||
|
||||
public Abyte0_Blood(Extension e) {
|
||||
super(e);
|
||||
int stuckLoop = 0;
|
||||
|
||||
public Abyte0_Blood(Extension e)
|
||||
{
|
||||
super(e);
|
||||
}
|
||||
|
||||
public void init(String params)
|
||||
{
|
||||
String str[]=params.split(",");
|
||||
|
||||
public void init(String params) {
|
||||
String[] str = params.split(",");
|
||||
|
||||
if (str.length >= 5) {
|
||||
if(str.length >= 5)
|
||||
{
|
||||
fmode = Integer.parseInt(str[0]);
|
||||
foodId = Integer.parseInt(str[1]);
|
||||
minFoodToBankAt = Integer.parseInt(str[2]);
|
||||
SafeOrNot = Integer.parseInt(str[3]);
|
||||
BuryOrNot = Integer.parseInt(str[4]);
|
||||
if (str.length == 7) {
|
||||
if(str.length == 7)
|
||||
{
|
||||
minWait = Integer.parseInt(str[5]);
|
||||
maxWait = Integer.parseInt(str[6]);
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
print("You should use: Abyte0_Blood Fmode,FoodId,minFoodToBankAt,SafeOrNot(0= save food 1 = not),BuryOrNot(0= yes 1 = not) (optional ,minWait,maxWait");
|
||||
print("You are Using Default: Attack Mode, Lobs, Run To Bank At 2 Lobs Left, Walk to center even if no chest ready");
|
||||
}
|
||||
|
||||
|
||||
//if(str[1].equals("2")
|
||||
|
||||
|
||||
print("Blood Runes Banker ~By Abyte0");
|
||||
print("Version 3.1 Now support cake");
|
||||
print("Version 3.2 Debug the teleport bug v6");
|
||||
print("-");
|
||||
print("Fmode = " + fmode);
|
||||
print("foodId = " + foodId);
|
||||
print("minFoodToBankAt = " + minFoodToBankAt);
|
||||
if (SafeOrNot == 0)
|
||||
if(SafeOrNot == 0)
|
||||
print("Saving Food By Using Wait Wall");
|
||||
else
|
||||
print("Just use more food but faster maybe");
|
||||
if (BuryOrNot == 0)
|
||||
if(BuryOrNot == 0)
|
||||
print("Bury Big Bones");
|
||||
else
|
||||
print("Fk Prayer");
|
||||
print("minWait = " + minWait);
|
||||
print("maxWait = " + maxWait);
|
||||
}
|
||||
|
||||
public int main() {
|
||||
|
||||
if (getFightMode() != fmode)
|
||||
public int main()
|
||||
{
|
||||
|
||||
if(getFightMode() != fmode)
|
||||
setFightMode(fmode);
|
||||
|
||||
if (isAtApproxCoords(615, 3396, 25)) {
|
||||
if (getInventoryCount(foodId) <= minFoodToBankAt || getFatigue() > 70) {
|
||||
|
||||
if(isAtApproxCoords(615, 3396, 25))
|
||||
{
|
||||
if(getInventoryCount(foodId) <= minFoodToBankAt || getFatigue() > 70)
|
||||
{
|
||||
print("Running");
|
||||
if (inCombat()) {
|
||||
if(inCombat())
|
||||
{
|
||||
RunFromCombat();
|
||||
return random(200, 400);
|
||||
return random(200,400);
|
||||
}
|
||||
if (getHpPercent() < 60 && IsStillHavingFood(foodId)) {
|
||||
if(getHpPercent() < 60 && IsStillHavingFood(foodId))
|
||||
{
|
||||
EatFood(foodId);
|
||||
return random(2400, 3000);
|
||||
return random(2400,3000);
|
||||
}
|
||||
if (getY() > 3388) {
|
||||
if(getY() > 3388)
|
||||
{
|
||||
RunNorthOrAttackNorth();
|
||||
return random(500, 1104);
|
||||
}
|
||||
if (getX() >= 617 && getX() <= 619 && getY() >= 3382 && getY() <= 3388) {
|
||||
if (getFatigue() > 60) {
|
||||
if(getX() >= 617 && getX() <= 619 && getY() >= 3382 && getY() <= 3388)
|
||||
{
|
||||
if(getFatigue() > 60)
|
||||
{
|
||||
useSleepingBag();
|
||||
return 3000;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
//on monte lechelle
|
||||
int[] stairs = getObjectById(5);
|
||||
if (stairs[0] != -1) {
|
||||
int[] stairs = getObjectById(5);
|
||||
if(stairs[0] != -1)
|
||||
{
|
||||
atObject(stairs[1], stairs[2]);
|
||||
return random(800, 900);
|
||||
return random(800,900);
|
||||
}
|
||||
}
|
||||
return random(800, 1300);
|
||||
}
|
||||
return random(100, 212);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
//si asser de food on thieve le chest :D
|
||||
//si blblabla 614 3398 614 3402
|
||||
int[] bloodChest = getObjectById(337);
|
||||
if (getHpPercent() < 60) {
|
||||
if (inCombat()) {
|
||||
//si blblabla 614 3398 614 3402
|
||||
int bloodChest[] = getObjectById(337);
|
||||
if(getHpPercent() < 60)
|
||||
{
|
||||
if(inCombat())
|
||||
{
|
||||
RunFromCombat();
|
||||
return random(99, 222);
|
||||
return random(99,222);
|
||||
}
|
||||
EatFood(foodId);
|
||||
return random(2400, 3000);
|
||||
} else if (bloodChest[0] != -1) {
|
||||
if (inCombat()) {
|
||||
return random(2400,3000);
|
||||
}
|
||||
else if(bloodChest[0] != -1)
|
||||
{
|
||||
if(inCombat())
|
||||
{
|
||||
RunFromCombat();
|
||||
random(250, 300);
|
||||
}
|
||||
atObject2(bloodChest[1], bloodChest[2]);
|
||||
atObject2(bloodChest[1],bloodChest[2]);
|
||||
return random(250, 589);
|
||||
} else if (getObjectIdFromCoords(614, 3399) == 340 && getObjectIdFromCoords(614, 3401) == 340) {
|
||||
}
|
||||
else if(getObjectIdFromCoords(614,3399) == 340 && getObjectIdFromCoords(614,3401) == 340)
|
||||
{
|
||||
//si position 1 = 340 = lotted et si position 2 = 340 = lotted
|
||||
//Run Safe or Run Center
|
||||
if (SafeOrNot == 0) {
|
||||
if (!(getX() == 618 && getY() == 3398))
|
||||
walkTo(618, 3398);//wall
|
||||
else {
|
||||
int nombre = TryBury();
|
||||
if (nombre != -1)
|
||||
return nombre;
|
||||
}
|
||||
} else {
|
||||
if (!(getX() == 614 && getY() == 3400))
|
||||
walkTo(614, 3400);//centre chest
|
||||
else {
|
||||
int nombre = TryBury();
|
||||
if (nombre != -1)
|
||||
return nombre;
|
||||
//Run Safe or Run Center
|
||||
if(needToMove)
|
||||
{
|
||||
changePosition();
|
||||
return 500;
|
||||
}
|
||||
|
||||
int nombre = TryBury();
|
||||
if(nombre != -1)
|
||||
return nombre;
|
||||
|
||||
if(SafeOrNot == 0)
|
||||
{
|
||||
if(!(getX() == 618 && getY() == 3398))
|
||||
walkTo(618,3398);//wall
|
||||
}
|
||||
else
|
||||
{
|
||||
if(SafeOrNot == 2)
|
||||
{
|
||||
int[] npcs = getNpcById(312);
|
||||
if(npcs[0] != -1)
|
||||
{
|
||||
attackNpc(npcs[0]);
|
||||
return 500;
|
||||
}
|
||||
}
|
||||
|
||||
if(!(getX() == 614 && getY() == 3400))
|
||||
walkTo(614,3400);//centre chest
|
||||
}
|
||||
return random(300, 654);
|
||||
} else {
|
||||
if (inCombat()) {
|
||||
}
|
||||
else
|
||||
{
|
||||
if(inCombat())
|
||||
{
|
||||
RunFromCombat();
|
||||
return 200;
|
||||
}
|
||||
if (random(1, 2) == 1)
|
||||
atObject2(614, 3399);
|
||||
if(random(1, 2) == 1)
|
||||
atObject2(614,3399);
|
||||
else
|
||||
atObject2(614, 3401);
|
||||
atObject2(614,3401);
|
||||
return random(300, 650);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isBanking()) {
|
||||
if (getInventoryCount(coinsId) > 1) {
|
||||
deposit(coinsId, getInventoryCount(coinsId) - 1);
|
||||
return random(1000, 1500);
|
||||
if(isBanking())
|
||||
{
|
||||
if(getInventoryCount(coinsId) > 1)
|
||||
{
|
||||
deposit(coinsId, getInventoryCount(coinsId)-1);
|
||||
return random(1000, 1500);
|
||||
}
|
||||
if (getInventoryCount(coinsId) < 1) {
|
||||
if(getInventoryCount(coinsId) < 1)
|
||||
{
|
||||
withdraw(coinsId, 1);
|
||||
return random(1000, 1500);
|
||||
return random(1000, 1500);
|
||||
}
|
||||
if (getInventoryCount(bloodId) > 1) {
|
||||
deposit(bloodId, getInventoryCount(bloodId) - 1);
|
||||
return random(1000, 1500);
|
||||
if(getInventoryCount(bloodId) > 1)
|
||||
{
|
||||
deposit(bloodId, getInventoryCount(bloodId)-1);
|
||||
return random(1000, 1500);
|
||||
}
|
||||
if (getInventoryCount(bloodId) < 1) {
|
||||
if(getInventoryCount(bloodId) < 1)
|
||||
{
|
||||
withdraw(bloodId, 1);
|
||||
}
|
||||
if (getInventoryCount() < 28) {
|
||||
withdraw(foodId, 29 - getInventoryCount());
|
||||
if(getInventoryCount() < 28)
|
||||
{
|
||||
withdraw(foodId, 29-getInventoryCount());
|
||||
return random(1000, 1500);
|
||||
}
|
||||
if (getInventoryCount() > 28 && getInventoryCount(bloodId) < 5 && getInventoryCount(coinsId) < 1000)
|
||||
closeBank();
|
||||
if(getInventoryCount() > 28 && getInventoryCount(bloodId) < 5 && getInventoryCount(coinsId) < 1000)
|
||||
closeBank();
|
||||
}
|
||||
if (getX() == 612 && getY() == 572) {
|
||||
if(getX() == 612 && getY() == 572)
|
||||
{
|
||||
//Si a coter d ela porte de la teleported house
|
||||
print("Step Outside House");
|
||||
int[] doorObj = getWallObjectById(2);
|
||||
if (doorObj[0] != -1) {
|
||||
if (isAtApproxCoords(doorObj[1], doorObj[2], 5)) ;
|
||||
atWallObject(doorObj[1], doorObj[2]);
|
||||
if(doorObj[0] != -1)
|
||||
{
|
||||
if (isAtApproxCoords(doorObj[1], doorObj[2], 5));
|
||||
atWallObject(doorObj[1], doorObj[2]);
|
||||
}
|
||||
walkTo(612, 573);
|
||||
|
||||
if (getHpPercent() < 70) {
|
||||
walkTo(612,573);
|
||||
stuckLoop = 0;
|
||||
|
||||
if(getHpPercent() < 70)
|
||||
{
|
||||
EatFood(foodId);
|
||||
return random(2400, 3000);
|
||||
return random(2400,3000);
|
||||
}
|
||||
|
||||
|
||||
return random(100, 1500);
|
||||
}
|
||||
if (getX() >= 611 && getX() <= 617 && getY() >= 568 && getY() <= 572) {
|
||||
if(getX() >= 611 && getX() <= 617 && getY() >= 568 && getY() <= 572)
|
||||
{
|
||||
//Si dans la teleported room
|
||||
walkTo(612, 572);
|
||||
if (getFatigue() > 6) {
|
||||
|
||||
//start of debug part for the bug
|
||||
if(!inCombat())
|
||||
{
|
||||
print("Resetting we are not fighting in the room");
|
||||
stuckLoop = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(stuckLoop < 4)
|
||||
{
|
||||
print(getDateTime() + " : " + stuckLoop + " STUCK FIGHTING?");
|
||||
print("waiting 30 secs");
|
||||
stuckLoop ++;
|
||||
walkTo(612,572);
|
||||
return 30000;
|
||||
}
|
||||
|
||||
print("-------------------------");
|
||||
print("-------------------------");
|
||||
print("-------------------------");
|
||||
print("-------------------------");
|
||||
print(getDateTime() + " : " + "Still stuck :::::::::::::::::::::::::::::");
|
||||
takeScreenshot(getDateTime() + ".png");
|
||||
//setAutoLogin(false);
|
||||
//logout();
|
||||
//stopScript();
|
||||
return 60000;
|
||||
}
|
||||
//end of debug part for the bug
|
||||
|
||||
walkTo(612,572);
|
||||
if(getFatigue() > 6)
|
||||
{
|
||||
useSleepingBag();
|
||||
print("Waitting....");
|
||||
return random(minWait, maxWait);
|
||||
}
|
||||
return random(14000, 30003);//618,551
|
||||
}
|
||||
if (isAtApproxCoords(581, 574, 5)) {
|
||||
if (getInventoryCount(335) > 0) //We do not want any residue of cake in inventory for next batch
|
||||
if(isAtApproxCoords(581, 574, 5))
|
||||
{
|
||||
if(getInventoryCount(335) > 0) //We do not want any residue of cake in inventory for next batch
|
||||
{
|
||||
EatFood(335);
|
||||
return 2000;
|
||||
}
|
||||
if (getInventoryCount(333) > 0) //We do not want any residue of cake in inventory for next batch
|
||||
if(getInventoryCount(333) > 0) //We do not want any residue of cake in inventory for next batch
|
||||
{
|
||||
EatFood(333);
|
||||
return 2000;
|
||||
}
|
||||
if (getInventoryCount() < 28 || getInventoryCount(bloodId) > 5 || getInventoryCount(coinsId) > 1000) {
|
||||
if (!isQuestMenu()) {
|
||||
int[] banker = getNpcByIdNotTalk(95);
|
||||
if (banker[0] != -1) {
|
||||
talkToNpc(banker[0]);
|
||||
return random(2000, 2700);
|
||||
}
|
||||
return 1000;
|
||||
} else {
|
||||
answer(0);
|
||||
return 6000;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isAtApproxCoords(617, 558, 2) && getInventoryCount(foodId) > minFoodToBankAt) {
|
||||
int[] door = getWallObjectById(96);
|
||||
if (door[0] != -1)
|
||||
atWallObject2(door[1], door[2]);
|
||||
return random(1000, 1500);
|
||||
}
|
||||
if (isAtApproxCoords(617, 552, 3) && getInventoryCount(foodId) <= minFoodToBankAt) {
|
||||
int[] door = getWallObjectById(96);
|
||||
if (door[0] != -1) {
|
||||
if(getInventoryCount() < 28 || getInventoryCount(bloodId) > 5 || getInventoryCount(coinsId) > 1000)
|
||||
{
|
||||
if(!isQuestMenu())
|
||||
{
|
||||
int banker[] = getNpcByIdNotTalk(new int[]{95});
|
||||
if(banker[0] != -1)
|
||||
{
|
||||
talkToNpc(banker[0]);
|
||||
return random(2000, 2700);
|
||||
}
|
||||
return 1000;
|
||||
}
|
||||
else
|
||||
{
|
||||
answer(0);
|
||||
return 6000;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(isAtApproxCoords(617, 558, 2) && getInventoryCount(foodId) > minFoodToBankAt)
|
||||
{
|
||||
int[] door = getWallObjectById(96);
|
||||
if(door[0] != -1)
|
||||
atWallObject2(door[1], door[2]);
|
||||
return random(1000, 1500);
|
||||
}
|
||||
if(isAtApproxCoords(617, 552, 3) && getInventoryCount(foodId) <= minFoodToBankAt)
|
||||
{
|
||||
int[] door = getWallObjectById(96);
|
||||
if(door[0] != -1)
|
||||
{
|
||||
atWallObject(door[1], door[2]);
|
||||
return random(800, 1200);
|
||||
return random(800, 1200);
|
||||
}
|
||||
return 1000;
|
||||
return 1000;
|
||||
}
|
||||
if (isAtApproxCoords(617, 552, 3) && getInventoryCount(foodId) > minFoodToBankAt) {
|
||||
int[] stairs = getObjectById(6);
|
||||
if (stairs[0] != -1) {
|
||||
if(isAtApproxCoords(617, 552, 3) && getInventoryCount(foodId) > minFoodToBankAt)
|
||||
{
|
||||
int[] stairs = getObjectById(6);
|
||||
if(stairs[0] != -1)
|
||||
{
|
||||
atObject(stairs[1], stairs[2]);
|
||||
return random(800, 900);
|
||||
|
||||
//debug the stuck
|
||||
print("---- Resetting we are going DOWN ----");
|
||||
stuckLoop = 0;
|
||||
//END debug the stuck
|
||||
|
||||
return random(800,900);
|
||||
}
|
||||
return random(500, 800);
|
||||
}
|
||||
if (getX() == 618 && getY() == 3382) {
|
||||
if(getX() == 618 && getY() == 3382)
|
||||
{
|
||||
//on monte lechelle car on est bloquer du mauvais coter
|
||||
int[] stairs = getObjectById(5);
|
||||
if (stairs[0] != -1) {
|
||||
int[] stairs = getObjectById(5);
|
||||
if(stairs[0] != -1)
|
||||
{
|
||||
atObject(stairs[1], stairs[2]);
|
||||
return random(800, 900);
|
||||
return random(800,900);
|
||||
}
|
||||
return random(500, 800);
|
||||
}
|
||||
@@ -252,105 +360,159 @@ public class Abyte0_Blood extends Abyte0_Script {
|
||||
return random(2000, 2500);
|
||||
}
|
||||
|
||||
public int walk() {
|
||||
if (getInventoryCount(foodId) <= minFoodToBankAt) {
|
||||
public int walk()
|
||||
{
|
||||
if(getInventoryCount(foodId) <= minFoodToBankAt)
|
||||
{
|
||||
//wee need to bank
|
||||
//617, 558, 609, 565, 603, 582, 600, 595, 588, 598, 590, 578, 581, 574
|
||||
if (getX() > 600) {
|
||||
if (getY() < 558)
|
||||
if(getX()> 600)
|
||||
{
|
||||
if(getY() < 558)
|
||||
walkTo(617, 558);
|
||||
else if (getY() < 565)
|
||||
else if(getY() < 565)
|
||||
walkTo(609, 565);
|
||||
else if (getY() < 582)
|
||||
else if(getY() < 582)
|
||||
walkTo(603, 582);
|
||||
else if (getY() < 595)
|
||||
else if(getY() < 595)
|
||||
walkTo(600, 595);
|
||||
else
|
||||
walkTo(597, 602);
|
||||
} else {
|
||||
if (getX() > 588 && getY() > 580)
|
||||
walkTo(588, 598);
|
||||
else if (getY() > 578)
|
||||
walkTo(590, 578);
|
||||
else if (getY() > 574)
|
||||
walkTo(581, 574);
|
||||
walkTo(597,602);
|
||||
}
|
||||
} else {
|
||||
else
|
||||
{
|
||||
if(getX() > 588 && getY() > 580)
|
||||
walkTo(588, 598);
|
||||
else if(getY() > 578)
|
||||
walkTo(590,578);
|
||||
else if(getY() > 574)
|
||||
walkTo(581,574);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//enoug food we go war
|
||||
//581, 574, 590, 578, 588, 598, 600, 595, 603, 582, 609, 565, 617, 558
|
||||
if (getX() < 600) {
|
||||
if(getX()< 600)
|
||||
{
|
||||
//if(getY() < 574)
|
||||
// walkTo(581,574);
|
||||
if (getY() < 578)
|
||||
walkTo(590, 578);
|
||||
else if (getY() < 598)
|
||||
// walkTo(581,574);
|
||||
if(getY() < 578)
|
||||
walkTo(590,578);
|
||||
else if(getY() < 598)
|
||||
walkTo(588, 598);
|
||||
//else if(getY() < 602)
|
||||
//else if(getY() < 602)
|
||||
//walkTo(597,602);
|
||||
else
|
||||
walkTo(602,594);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if(getY() > 594)
|
||||
walkTo(602, 594);
|
||||
|
||||
} else {
|
||||
if (getY() > 594)
|
||||
walkTo(602, 594);
|
||||
else if (getY() > 582)
|
||||
else if(getY() > 582)
|
||||
walkTo(603, 582);
|
||||
else if (getY() > 565)
|
||||
else if(getY() > 565)
|
||||
walkTo(609, 565);
|
||||
else if (getY() > 558)
|
||||
else if(getY() > 558)
|
||||
walkTo(617, 558);
|
||||
}
|
||||
}
|
||||
return 1000;
|
||||
}
|
||||
|
||||
public final void BuryBigBone() {
|
||||
return 1000;
|
||||
}
|
||||
|
||||
public final void BuryBigBone()
|
||||
{
|
||||
int boneIndex = getInventoryIndex(413);
|
||||
print("Bury Bones at position : " + boneIndex);
|
||||
useItem(boneIndex);
|
||||
}
|
||||
|
||||
public int TryBury() {
|
||||
if (BuryOrNot == 0) {
|
||||
if (getInventoryCount(413) > 0) {
|
||||
if (inCombat()) {
|
||||
|
||||
public int TryBury()
|
||||
{
|
||||
if(BuryOrNot == 0)
|
||||
{
|
||||
if(getInventoryCount(413)>0)
|
||||
{
|
||||
if(inCombat())
|
||||
{
|
||||
RunFromCombat();
|
||||
return random(100, 200);
|
||||
return random(100,200);
|
||||
}
|
||||
BuryBigBone();
|
||||
return random(200, 300);
|
||||
return random(200,300);
|
||||
}
|
||||
int[] bigBone = getItemById(413);
|
||||
if (bigBone[0] != -1) {
|
||||
if (bigBone[1] == getX() && bigBone[2] == getY()) {
|
||||
if (inCombat()) {
|
||||
if(bigBone[0] != -1)
|
||||
{
|
||||
int distanceX = bigBone[1] - getX();
|
||||
int distanceY = bigBone[2] - getY();
|
||||
int maxDistanceFromBones = 3;
|
||||
if(getInventoryCount() < 30 && (distanceX < maxDistanceFromBones && distanceX > -maxDistanceFromBones) && (distanceY < maxDistanceFromBones && distanceY > -maxDistanceFromBones))
|
||||
{
|
||||
if(inCombat())
|
||||
{
|
||||
RunFromCombat();
|
||||
return random(100, 200);
|
||||
return random(100,200);
|
||||
}
|
||||
|
||||
|
||||
pickupItem(bigBone[0], bigBone[1], bigBone[2]);
|
||||
return random(200, 300);
|
||||
return 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onServerMessage(String s) {
|
||||
|
||||
public void RunFromCombat() {
|
||||
if (s.contains("standing here for 5 mins!")) {
|
||||
needToMoveFromX = getX();
|
||||
needToMoveFromY = getY();
|
||||
needToMove = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void changePosition()
|
||||
{
|
||||
int pid = getSelfPid();
|
||||
if(pid > 20)
|
||||
{
|
||||
print("bad pid, we can relog");
|
||||
needToMove = false;
|
||||
}
|
||||
|
||||
if(getX() != needToMoveFromX || getY() != needToMoveFromY)
|
||||
needToMove = false;
|
||||
else
|
||||
walkTo(needToMoveFromX + random(0,2) - 1, needToMoveFromY + random(0,2) - 1);
|
||||
}
|
||||
|
||||
public void RunFromCombat()
|
||||
{
|
||||
int x = getX();
|
||||
int y = getY();
|
||||
walkTo(x, y);
|
||||
walkTo(x,y);
|
||||
}
|
||||
|
||||
public void RunNorthOrAttackNorth() {
|
||||
int[] npcs = getNpcInRadius(312, getX(), getY() - 1, 0);//,525,706);
|
||||
if (npcs[0] != -1)
|
||||
|
||||
public void RunNorthOrAttackNorth()
|
||||
{
|
||||
int[] npcs = getNpcInRadius(312,getX(),getY()-1,0);//,525,706);
|
||||
if(npcs[0] != -1)
|
||||
attackNpc(npcs[0]);
|
||||
else {
|
||||
if (getObjectIdFromCoords(getX(), getY() - 1) == -1)
|
||||
walkTo(617, getY() - 1);
|
||||
else
|
||||
{
|
||||
if(getObjectIdFromCoords(getX(),getY()-1) == -1)
|
||||
walkTo(617,getY()-1);
|
||||
else
|
||||
walkTo(618, getY() - 1);
|
||||
walkTo(618,getY()-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int needToMoveFromX = -1;
|
||||
int needToMoveFromY = -1;
|
||||
boolean needToMove = false;
|
||||
}
|
||||
@@ -1,171 +1,335 @@
|
||||
/**
|
||||
* Catherby Lobster Fishing *
|
||||
* v1.0 please report bugs if any *
|
||||
* XcendroX`
|
||||
*/
|
||||
* Catherby Lobster Fishing *
|
||||
* v1.0 please report bugs if any *
|
||||
* XcendroX` */
|
||||
//Version 0 by XcendroX
|
||||
//Version 1 by Abyte0
|
||||
//2 Ways doors opener
|
||||
//Lobs OR Tuna/Swordy
|
||||
//2021-07-09 V1.2 Updated to OpenRSC + added Shark
|
||||
//2021-07-14 V1.3 Fixed walking bug which would happen when map is loaded from reloggin at fishing spot
|
||||
public class Abyte0_CatherbyFisher extends Abyte0_Script {
|
||||
//2024-05-11 V1.4.3 Added xp report and 5 mins move instead of counting
|
||||
|
||||
public class Abyte0_CatherbyFisher extends Abyte0_Script
|
||||
{
|
||||
int sleepAt = 80;
|
||||
int FishType = 372;
|
||||
int FishType2 = 369;
|
||||
boolean isDoingShark = false;
|
||||
int cptTry = 0;
|
||||
|
||||
public Abyte0_CatherbyFisher(Extension e) {
|
||||
super(e);
|
||||
|
||||
|
||||
private final String SCRIPT_VERSION = "1.4.3";
|
||||
|
||||
@Override
|
||||
public String[] getRandomQuotes()
|
||||
{
|
||||
String[] result = {"Don't let me sink! @ran@HELP!","Let's take a swim...","Sharknado!","Are you botting?","How far are you from level 99?","Nice Lobster!","What a HUGE trout!","Cooking level?","Fish level?","lvl?","OMG","Got it!","Watchout! There are Sharks!","A bad day of fishing is still better than a good day at the office!", "Life is like a game, but fishing is serious...","I fish better with a lit cigar; some with talent...","Good things come to those who bait","Gotta catch em all"};
|
||||
return result;
|
||||
}
|
||||
|
||||
public void init(String params) {
|
||||
public Abyte0_CatherbyFisher(Extension e)
|
||||
{ super(e); }
|
||||
public void init(String params)
|
||||
{
|
||||
print("Selected Abyte0 Catherby Fisher");
|
||||
print("Version 1.3");
|
||||
print("Param can be 'Tunas', 'Sharks' or default 'Lobs'");
|
||||
if (params.equals("Shark") || params.equals("Sharks")) {
|
||||
FishType = 545;
|
||||
isDoingShark = true;
|
||||
print("Doing Sharks!");
|
||||
} else if (params.equals("Tuna") || params.equals("Tunas")) {
|
||||
FishType = 366;
|
||||
print("Doing Tunas and Swordy!");
|
||||
} else {
|
||||
print("Version " + SCRIPT_VERSION);
|
||||
print("Param can be 'Tunas', 'Sharks' or 'Lobs', default Sharks");
|
||||
|
||||
printHelp();
|
||||
|
||||
if(params.equals("Lob") || params.equals("Lobs"))
|
||||
{
|
||||
FishType = 372;
|
||||
print("Doing Lobs!");
|
||||
}
|
||||
if(params.equals("Shark") || params.equals("Sharks"))
|
||||
{
|
||||
FishType = 545;
|
||||
isDoingShark = true;
|
||||
print("Doing Sharks!");
|
||||
}
|
||||
else if(params.equals("Tuna") || params.equals("Tunas"))
|
||||
{
|
||||
FishType = 366;
|
||||
print("Doing Tunas and Swordy!");
|
||||
}
|
||||
else
|
||||
{
|
||||
FishType = 545;
|
||||
isDoingShark = true;
|
||||
print("Doing Default Sharks!");
|
||||
}
|
||||
|
||||
initialXp = getFishingXp();
|
||||
initialTime = System.currentTimeMillis();
|
||||
|
||||
//Do not change
|
||||
hasStatistics = true;
|
||||
}
|
||||
|
||||
public int main() {
|
||||
if (getFatigue() > 80) {
|
||||
|
||||
public int main()
|
||||
{
|
||||
SayRandomQuote();
|
||||
if(getFatigue() > 80)
|
||||
{
|
||||
useSleepingBag();
|
||||
return 1000;
|
||||
}
|
||||
if (getInventoryCount() == 30) {
|
||||
if (isQuestMenu()) {
|
||||
if(getInventoryCount() == 30)
|
||||
{
|
||||
if(isQuestMenu())
|
||||
{
|
||||
answer(0);
|
||||
return random(1410, 1987);
|
||||
}
|
||||
if (isBanking()) {
|
||||
if (getInventoryCount(FishType) > 0 || getInventoryCount(FishType2) > 0) {
|
||||
if (getInventoryCount(FishType) > 0)
|
||||
if(isBanking())
|
||||
{
|
||||
if(getInventoryCount(FishType) > 0 || getInventoryCount(FishType2) > 0)
|
||||
{
|
||||
if(getInventoryCount(FishType) > 0)
|
||||
deposit(FishType, getInventoryCount(FishType));
|
||||
if (getInventoryCount(FishType2) > 0)
|
||||
if(getInventoryCount(FishType2) > 0)
|
||||
deposit(FishType2, getInventoryCount(FishType2));
|
||||
} else
|
||||
}
|
||||
else
|
||||
closeBank();
|
||||
return random(523, 603);
|
||||
}
|
||||
if (getX() < 412) {
|
||||
if(getX() < 412)
|
||||
{
|
||||
walkTo(412, 501);
|
||||
return random(430, 1502);
|
||||
}
|
||||
if (getX() < 423) {
|
||||
if(getX() < 423)
|
||||
{
|
||||
walkTo(423, 495);
|
||||
return random(430, 1502);
|
||||
}
|
||||
if (getX() < 437) {
|
||||
if(getX() < 437)
|
||||
{
|
||||
walkTo(439, 497);
|
||||
return random(430, 1502);
|
||||
}
|
||||
if (getX() > 443) {
|
||||
if(getX() > 443)
|
||||
{
|
||||
walkTo(439, 497);
|
||||
return random(430, 1502);
|
||||
}
|
||||
if (getY() < 491) {
|
||||
if(getY() < 491)
|
||||
{
|
||||
walkTo(439, 497);
|
||||
return random(4030, 8502);
|
||||
}
|
||||
if (getX() == 439 && getY() == 497) {
|
||||
if(getX() == 439 && getY() == 497)
|
||||
{
|
||||
//System.out.println("Open + Step InSide Bank");
|
||||
atObject(439, 497);
|
||||
walkTo(439, 496);
|
||||
//On remet el compteur a 0;
|
||||
cptTry = 0;
|
||||
return random(100, 1500);
|
||||
}
|
||||
if (getY() == 497) {
|
||||
if(getY() == 497)
|
||||
{
|
||||
//si on est perdu sur le coter...
|
||||
walkTo(439, 497);
|
||||
//On remet el compteur a 0;
|
||||
cptTry = 0;
|
||||
return random(100, 1500);
|
||||
}
|
||||
int[] banker = getNpcByIdNotTalk(BANKERS);
|
||||
if (banker[0] != -1) {
|
||||
int banker[] = getNpcByIdNotTalk(BANKERS);
|
||||
if(banker[0] != -1)
|
||||
{
|
||||
talkToNpc(banker[0]);
|
||||
return 1000 + random(1423, 1501);
|
||||
return 1000+random(1423, 1501);
|
||||
}
|
||||
return random(400, 500);
|
||||
} else {
|
||||
if (getX() == 439 && getY() == 496) {
|
||||
}
|
||||
else
|
||||
{
|
||||
if(getX() == 439 && getY() == 496)
|
||||
{
|
||||
//Si on ets a la porte on louvre et sort
|
||||
print("Open + Step OutSide Bank");
|
||||
//print("Open + Step OutSide Bank");
|
||||
atObject(439, 497);
|
||||
walkTo(439, 498);
|
||||
return random(100, 1500);
|
||||
}
|
||||
if (getY() < 497 && getX() > 436) {
|
||||
if(getY() < 497 && getX() > 436)
|
||||
{
|
||||
//Si on est dans la banque on va a coter de la porte
|
||||
walkTo(439, 496);
|
||||
print("Walk to Door");
|
||||
//print("Walk to Door");
|
||||
return 1000;
|
||||
}
|
||||
if (getX() == 439 && getY() == 497) {
|
||||
print(".wait.");
|
||||
if(getX() == 439 && getY() == 497)
|
||||
{
|
||||
//print(".wait.");
|
||||
//NOTHING waitting to be at 439, 498
|
||||
}
|
||||
|
||||
if (isDoingShark) {
|
||||
if (getX() != 406 && getY() != 504) {
|
||||
print("Walk to Shark");
|
||||
|
||||
if(needToMove)
|
||||
{
|
||||
changePosition();
|
||||
return 500;
|
||||
}
|
||||
|
||||
if(isDoingShark)
|
||||
{
|
||||
if(getX() != 406 && getY() != 504)
|
||||
{
|
||||
//print("Walk to Shark");
|
||||
//Si on est pas rndu au fishing on Marche
|
||||
walkTo(406, 504);
|
||||
walkTo(406,504);
|
||||
return 1000;
|
||||
}
|
||||
if (cptTry++ >= random(80, 130)) {
|
||||
//Si on a beaucoup dessaie on bouge pas loguer out
|
||||
walkTo(406, 503);
|
||||
print("Moving because " + cptTry + " trys...");
|
||||
cptTry = 0;
|
||||
return random(1003, 4221);
|
||||
}
|
||||
if (isAtApproxCoords(406, 504, 10) && getInventoryCount() != 30) {
|
||||
int[] fish = getObjectById(261);
|
||||
if (fish[0] != -1) {
|
||||
atObject2(fish[1], fish[2]);
|
||||
return random(403, 1721);
|
||||
if(isAtApproxCoords(406,504, 10) && getInventoryCount() != 30)
|
||||
{
|
||||
int[] fish = getObjectById(new int[]{261});
|
||||
if( fish[0] != -1 )
|
||||
{
|
||||
atObject2(fish[1], fish[2]);
|
||||
return random(403,1721);
|
||||
}
|
||||
}
|
||||
} else //Tunas && Lobs
|
||||
}
|
||||
else //Tunas && Lobs
|
||||
{
|
||||
if (getX() != 409 && getY() != 503) {
|
||||
print("Walk to Fish");
|
||||
if(getX() != 409 && getY() != 503)
|
||||
{
|
||||
//print("Walk to Fish");
|
||||
//Si on est pas rndu au fishing on Marche
|
||||
walkTo(409, 503);
|
||||
walkTo(409,503);
|
||||
return 1000;
|
||||
}
|
||||
if (cptTry++ >= random(80, 130)) {
|
||||
//Si on a beaucoup dessaie on bouge pas loguer out
|
||||
walkTo(409, 502);
|
||||
print("Moving because " + cptTry + " trys...");
|
||||
cptTry = 0;
|
||||
return random(1003, 4221);
|
||||
}
|
||||
if (isAtApproxCoords(409, 503, 10) && getInventoryCount() != 30) {
|
||||
int[] fish = getObjectById(194);
|
||||
if (fish[0] != -1) {
|
||||
if (FishType == 372)
|
||||
if(isAtApproxCoords(409,503, 10) && getInventoryCount() != 30)
|
||||
{
|
||||
int[] fish = getObjectById(new int[]{194});
|
||||
if( fish[0] != -1 )
|
||||
{
|
||||
if(FishType == 372)
|
||||
atObject2(fish[1], fish[2]);
|
||||
else
|
||||
atObject(fish[1], fish[2]);
|
||||
cptTry++;
|
||||
return random(403, 1721);
|
||||
return random(403,1721);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return random(400, 500);
|
||||
return random(400, 500);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void onKeyPress(int keyCode) {
|
||||
if (keyCode == 192 || keyCode == 128) { //# or '
|
||||
reportXpChange();
|
||||
}
|
||||
//if (keyCode == 107) { //+
|
||||
// increaseDelay();
|
||||
//}
|
||||
//if (keyCode == 109) { //-
|
||||
// decreaseDelay();
|
||||
//}
|
||||
if (keyCode == 113) { //F2
|
||||
resetCounters();
|
||||
}
|
||||
|
||||
|
||||
//print(""+keyCode);
|
||||
}
|
||||
|
||||
|
||||
private void resetCounters()
|
||||
{
|
||||
initialXp = getFishingXp();
|
||||
initialTime = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSctiptVersion()
|
||||
{
|
||||
return SCRIPT_VERSION;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onServerMessage(String s) {
|
||||
|
||||
if (s.contains("standing here for 5 mins!")) {
|
||||
needToMoveFromX = getX();
|
||||
needToMoveFromY = getY();
|
||||
needToMove = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChatMessage(String msg, String name, boolean pmod, boolean jmod) {
|
||||
|
||||
super.onChatMessage(msg, name, pmod, jmod);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void printHelp()
|
||||
{
|
||||
super.printHelp();
|
||||
|
||||
print("Param can be 'Tunas', 'Sharks' or 'Lobs', default Sharks");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void printParams()
|
||||
{
|
||||
if(FishType == 545)
|
||||
print("Script is fishing Sharks");
|
||||
else if(FishType == 372)
|
||||
print("Script is fishing Lobs");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void reportXpChange()
|
||||
{
|
||||
|
||||
int xpDifference = getFishingXp() - initialXp;
|
||||
long timeSpan = System.currentTimeMillis() - initialTime;
|
||||
long secondSpan = timeSpan / 1000;
|
||||
long xpRatio = xpDifference * 3600L / secondSpan; //The L set 3600 as long variable Forcing to calculate as long to avoid overflow
|
||||
|
||||
|
||||
print("=================================");
|
||||
print("initialXp: " + initialXp);
|
||||
print("total Fishing xp gained: " + xpDifference);
|
||||
print("time running: " + secondSpan + " s");
|
||||
print("xpRatio: " + xpRatio + "/h");
|
||||
print("=================================");
|
||||
|
||||
long fishCount = 0L;
|
||||
if(FishType == 545)
|
||||
{
|
||||
fishCount = (long)(xpDifference / 110);
|
||||
print("Sharks fished = " + fishCount);
|
||||
}
|
||||
else if(FishType == 372)
|
||||
{
|
||||
fishCount = (long)(xpDifference / 90);
|
||||
print("Lobs fished = " + fishCount);
|
||||
}
|
||||
}
|
||||
|
||||
private void changePosition()
|
||||
{
|
||||
int pid = getSelfPid();
|
||||
if(pid < 250 && pid > 15)
|
||||
{
|
||||
print("bad pid, we can relog");
|
||||
needToMove = false;
|
||||
}
|
||||
|
||||
if(getX() != needToMoveFromX || getY() != needToMoveFromY)
|
||||
needToMove = false;
|
||||
else
|
||||
walkTo(needToMoveFromX + random(0,2) - 1, needToMoveFromY + random(0,2) - 1);
|
||||
}
|
||||
|
||||
int needToMoveFromX = -1;
|
||||
int needToMoveFromY = -1;
|
||||
boolean needToMove = false;
|
||||
int initialXp = 0;
|
||||
long initialTime = 0;
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
//Version 1 - 2024-05-01 - Fix report word to add extras P to avoid triggering admins warning
|
||||
|
||||
public class Abyte0_FlyFisher extends Abyte0_Script
|
||||
{
|
||||
|
||||
@@ -11,7 +13,7 @@ public class Abyte0_FlyFisher extends Abyte0_Script
|
||||
@Override
|
||||
public String[] getRandomQuotes()
|
||||
{
|
||||
String[] result = {"Fish level?","What is your cook level?","Trout!","Nice large salmon","Selling Fresh fish!","Dropping fresh Salmon!","There's a fine line between fishing and just standing on the shore like an idiot.","I like to fish. Fishing is always a way of relaxing.","I didn't think I had time for fishing before I fished","The fun of fishing is catching 'em, not killing 'em.","I'm a fisherman. I've always loved fishing. I grew up fishing for trout.","I only make movies to finance my fishing.","Fishing has always been an excuse to drink in the daytime","What I miss most about living in Alaska is the fishing...","I'm bad at fishing for information","Fishing has been part of our culture since we landed here","When I go Miami, I go deep-sea fishing. I love doing that.","Its either fishing rods or golf clubs for me, one or the other","I grew up hunting and fishing, as did my family. But then I served in the military","I am fishing to PK","I really enjoy fishing, do you?","I really enjoy fishing","Are you 99 fish yet?","I bet you are still level 60 fishing?","How many feathers do you got left?"};
|
||||
String[] result = {"Fish level?","What is your cook level?","Trout!","Nice large salmon","Selling Fresh fish!","Dropping fresh Salmon!","There's a fine line between fishing and just standing on the shore like an idiot.","I like to fish. Fishing is always a way of relaxing.","I didn't think I had time for fishing before I fished","The fun of fishing is catching 'em, not killing 'em.","I'm a fisherman. I've always loved fishing. I grew up fishing for trout.","I only make movies to finance my fishing.","Fishing has always been an excuse to drink in the daytime","What I miss most about living in Alaska is the fishing...","I'm bad at fishing for information","Fishing has been part of our culture since we landed here","When I go Miami, I go deep-sea fishing. I love doing that.","Its either fishing rods or golf clubs for me, one or the other","I grew up hunting and fishing, as did my family. But then I served in the military","I am fishing to PK","I really enjoy fishing, do you?","I really enjoy fishing","Are you 99 fish yet?","I bet you are still level 60 fishing?","@ran@Bot! I'll reppppport you!","How many feathers do you got left?"};
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -22,7 +24,7 @@ public class Abyte0_FlyFisher extends Abyte0_Script
|
||||
|
||||
public void init( String params )
|
||||
{
|
||||
print("Abyte0 : Power Fly Fisher V0.4");
|
||||
print("Abyte0 : Power Fly Fisher V1");
|
||||
print("Abyte0 : Use at barbar village");
|
||||
print("Abyte0 : F2 reset counters");
|
||||
print("Abyte0 : Numpad + increase delay");
|
||||
@@ -93,11 +95,6 @@ public class Abyte0_FlyFisher extends Abyte0_Script
|
||||
print("fish time = " + (defaultTime + extraDelay));
|
||||
}
|
||||
|
||||
private int getFishingXp()
|
||||
{
|
||||
return getXpForLevel(10);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onServerMessage(String s) {
|
||||
|
||||
|
||||
@@ -1,244 +1,304 @@
|
||||
import javax.swing.*;
|
||||
import java.io.*;
|
||||
import java.util.Scanner;
|
||||
import java.awt.*;
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Container;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.event.*;
|
||||
import javax.swing.*;
|
||||
|
||||
public class Abyte0_GuildMiner extends Abyte0_Script {
|
||||
//Version 1.1B = Door fix for new 2023-03-15 change
|
||||
//Version 2024-05-01 - 1.2 = Fix report word to add extras P to avoid triggering admins warning
|
||||
|
||||
public class Abyte0_GuildMiner extends Abyte0_Script
|
||||
{
|
||||
int oreIron = 151;// Iron ore
|
||||
int oreCoal = 155;// Coal ore
|
||||
int oreMith = 153;// Mith ore
|
||||
|
||||
|
||||
int RockCoal2 = 110;// Coal rock/ EAST
|
||||
int RockCoal = 111;// Coal rock WEST
|
||||
int RockMith = 107;// Mith rock
|
||||
|
||||
private final String SCRIPT_VERSION = "1.2";
|
||||
|
||||
boolean mith = false;
|
||||
Extension myReference = null;
|
||||
|
||||
public Abyte0_GuildMiner(Extension e) {
|
||||
public Abyte0_GuildMiner ( Extension e )
|
||||
{
|
||||
super(e);
|
||||
myReference = e;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String[] getRandomQuotes() {
|
||||
String[] result = {"73", "97", "Botter!", "What pickaxe are you guy using?", "How far are you from level 99?", "Coal!!!!", "Do you mine the mith?", "Mining level?", "Smith level?", "lvl?", "OMG", "Got it!", "Who throw the first rock?", "Did you throw me a rock?", "@ran@Booorrriiinngggggg"};
|
||||
public String[] getRandomQuotes()
|
||||
{
|
||||
String[] result = {"73","97","I bet this guy use some sort of autominer, repppport him!","Botter!","What pickaxe are you guy using?","How far are you from level 99?","Coal!!!!","Do you mine the mith?","Mining level?","Smith level?","lvl?","OMG","Got it!","Who throw the first rock?","Did you throw me a rock?","@ran@Booorrriiinngggggg"};
|
||||
return result;
|
||||
}
|
||||
|
||||
public void init(String params) {
|
||||
public void init ( String params )
|
||||
{
|
||||
print("Started Abyte0 Guild Miner");
|
||||
print("Version 1.1");
|
||||
print("Version " + SCRIPT_VERSION);
|
||||
//Version 0
|
||||
//4 Ways doors opener
|
||||
//Version 1
|
||||
//Coal only mining OR Mith then Coal mining
|
||||
//based on old free guild mining script made in 2009
|
||||
|
||||
|
||||
Frame frame = new Frame("Ores Selection");
|
||||
Object[] fightModes = {"Coal", "Mith"};
|
||||
String S_FightMode = (String) JOptionPane.showInputDialog(frame, "Rock/Ore:\n", "Ore Selection", JOptionPane.PLAIN_MESSAGE, null, fightModes, null);
|
||||
if (S_FightMode.equals("Mith")) {
|
||||
String S_FightMode = (String)JOptionPane.showInputDialog(frame, "Rock/Ore:\n", "Ore Selection", JOptionPane.PLAIN_MESSAGE, null, fightModes, null);
|
||||
if (S_FightMode.equals("Mith"))
|
||||
{
|
||||
mith = true;
|
||||
print("Mining Mith then Coal...");
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
mith = false;
|
||||
print("Mining Only Coal...");
|
||||
}
|
||||
|
||||
|
||||
Frame frameS = new Frame("Spot Selection");
|
||||
Object[] spotName = {"Ladder Side First", "Far From Ladder First"};
|
||||
String choiceSpot = (String) JOptionPane.showInputDialog(frameS, "Spot:\n", "Spot Selection", JOptionPane.PLAIN_MESSAGE, null, spotName, null);
|
||||
if (choiceSpot.equals(spotName[1])) {
|
||||
String choiceSpot = (String)JOptionPane.showInputDialog(frameS, "Spot:\n", "Spot Selection", JOptionPane.PLAIN_MESSAGE, null, spotName, null);
|
||||
if (choiceSpot.equals(spotName[1]))
|
||||
{
|
||||
RockCoal2 = 111;// Coal rock/ EAST
|
||||
RockCoal = 110;// Coal rock WEST
|
||||
print("Spot: " + spotName[1]);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
RockCoal2 = 110;// Coal rock/ EAST
|
||||
RockCoal = 111;// Coal rock WEST
|
||||
print("Spot: " + spotName[0]);
|
||||
}
|
||||
|
||||
|
||||
print("Script loaded!");
|
||||
}
|
||||
|
||||
public int main() {
|
||||
public int main( )
|
||||
{
|
||||
SayRandomQuote();
|
||||
int[] doorObj;
|
||||
int[] stairs;
|
||||
if (getFightMode() != 2) {
|
||||
if(getFightMode() != 2)
|
||||
{
|
||||
setFightMode(2);
|
||||
}
|
||||
if (getFatigue() > 80) {
|
||||
}
|
||||
if(getFatigue() > 80)
|
||||
{
|
||||
useSleepingBag();
|
||||
return 1000;
|
||||
}
|
||||
if (isQuestMenu()) {
|
||||
System.out.println("Bank Answer");
|
||||
answer(0);
|
||||
return random(2000, 2100);
|
||||
}
|
||||
if (isBanking()) {
|
||||
if (isQuestMenu())
|
||||
{
|
||||
System.out.println("Bank Answer");
|
||||
answer(0);
|
||||
return random(2000,2100);
|
||||
}
|
||||
if(isBanking())
|
||||
{
|
||||
if (!depositGems()) //lol don't judge me
|
||||
{
|
||||
return 300;
|
||||
}
|
||||
}
|
||||
if (getInventoryCount() < 30) {
|
||||
if (!isAtApproxCoords(274, 3396, 30)) {
|
||||
if (getX() == 286 && getY() == 571) {
|
||||
}
|
||||
if(getInventoryCount() < 30)
|
||||
{
|
||||
if(!isAtApproxCoords(274, 3396, 30))
|
||||
{
|
||||
if(getX() == 286 && getY() == 571)
|
||||
{
|
||||
//Si a coter de la porte a linterieur
|
||||
print("Step Outside Bank");
|
||||
atObject(287, 571);
|
||||
walkTo(287, 571);
|
||||
print("Step Outside Bank");
|
||||
//atObject(287,571);
|
||||
walkTo(287,571);
|
||||
return random(121, 3500);
|
||||
}
|
||||
if (getX() >= 280 && getX() <= 286 && getY() >= 564 && getY() <= 573) {
|
||||
if(getX() >= 280 && getX() <= 286 && getY() >= 564 && getY() <= 573)
|
||||
{
|
||||
//Si dans la banque
|
||||
//print("Walking to Door");
|
||||
walkTo(286, 571);
|
||||
//print("Walking to Door");
|
||||
walkTo(286,571);
|
||||
return random(240, 2500);
|
||||
}
|
||||
if (getX() == 274 && getY() == 562) {
|
||||
if(getX() == 274 && getY() == 562)
|
||||
{
|
||||
//Si a lexterieur de la House
|
||||
doorObj = getWallObjectById(2);
|
||||
if (doorObj[0] != -1) {
|
||||
if (isAtApproxCoords(doorObj[1], doorObj[2], 5)) ;
|
||||
atWallObject(doorObj[1], doorObj[2]);
|
||||
}
|
||||
print("Step Inside House");
|
||||
walkTo(274, 563);
|
||||
if(doorObj[0] != -1)
|
||||
{
|
||||
if (isAtApproxCoords(doorObj[1], doorObj[2], 5));
|
||||
atWallObject(doorObj[1], doorObj[2]);
|
||||
}
|
||||
print("Step Inside House");
|
||||
walkTo(274,563);
|
||||
return random(100, 1500);
|
||||
}
|
||||
if (getX() >= 272 && getX() <= 277 && getY() >= 563 && getY() <= 567) {
|
||||
if(getX() >= 272 && getX() <= 277 && getY() >= 563 && getY() <= 567)
|
||||
{
|
||||
//print("Step to Ladder");
|
||||
stairs = getObjectById(223);
|
||||
if (stairs[0] != -1) {
|
||||
stairs = getObjectById(223);
|
||||
if(stairs[0] != -1)
|
||||
{
|
||||
atObject(stairs[1], stairs[2]);
|
||||
return random(800, 900);
|
||||
return random(800,900);
|
||||
}
|
||||
}
|
||||
walkTo(274, 562);
|
||||
walkTo(274,562);
|
||||
return random(100, 1500);
|
||||
} else {
|
||||
if (mith) {
|
||||
}
|
||||
else
|
||||
{
|
||||
if(mith)
|
||||
{
|
||||
int nombre = mineOre(RockMith);
|
||||
if (nombre > 0)
|
||||
return random(300, 601);
|
||||
if(nombre > 0)
|
||||
return random(300,601);
|
||||
}
|
||||
//SINON si aucun mith proche
|
||||
int nombre = mineOre(RockCoal);
|
||||
if (nombre > 0)
|
||||
return random(301, 605);
|
||||
if(nombre > 0)
|
||||
return random(301,605);
|
||||
nombre = mineOre(RockCoal2);
|
||||
if (nombre > 0)
|
||||
return random(301, 605);
|
||||
return random(800, 900);
|
||||
if(nombre > 0)
|
||||
return random(301,605);
|
||||
return random(800,900);
|
||||
}
|
||||
} else {
|
||||
if (isAtApproxCoords(267, 3394, 9)) {
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isAtApproxCoords(267,3394,9))
|
||||
{
|
||||
//Si downstair
|
||||
stairs = getObjectById(5);
|
||||
if (stairs[0] != -1) {
|
||||
if (isAtApproxCoords(stairs[1], stairs[2], 16)) {
|
||||
atObject(stairs[1], stairs[2]);
|
||||
return random(800, 900);
|
||||
stairs = getObjectById(5);
|
||||
if(stairs[0] != -1)
|
||||
{
|
||||
if(isAtApproxCoords(stairs[1], stairs[2], 16))
|
||||
{
|
||||
atObject(stairs[1], stairs[2]);
|
||||
return random(800,900);
|
||||
}
|
||||
} else {
|
||||
print("Where the fuck is the ladder lol?");
|
||||
walkTo(272, 3396);
|
||||
return random(800, 900);
|
||||
}
|
||||
else
|
||||
{
|
||||
print("Where the fuck is the ladder lol?");
|
||||
walkTo(272,3396);
|
||||
return random(800,900);
|
||||
}
|
||||
}
|
||||
if (getX() == 274 && getY() == 563) {
|
||||
if(getX() == 274 && getY() == 563)
|
||||
{
|
||||
//Si a linterieur de la House
|
||||
print("Step Outside House");
|
||||
doorObj = getWallObjectById(2);
|
||||
if (doorObj[0] != -1) {
|
||||
if (isAtApproxCoords(doorObj[1], doorObj[2], 5)) ;
|
||||
atWallObject(doorObj[1], doorObj[2]);
|
||||
}
|
||||
walkTo(274, 562);
|
||||
if(doorObj[0] != -1)
|
||||
{
|
||||
if (isAtApproxCoords(doorObj[1], doorObj[2], 5));
|
||||
atWallObject(doorObj[1], doorObj[2]);
|
||||
}
|
||||
walkTo(274,562);
|
||||
return random(100, 1500);
|
||||
}
|
||||
if (getX() >= 272 && getX() <= 277 && getY() >= 563 && getY() <= 567) {
|
||||
if(getX() >= 272 && getX() <= 277 && getY() >= 563 && getY() <= 567)
|
||||
{
|
||||
//Si dans la House
|
||||
//print("Walk to House Door");
|
||||
walkTo(274, 563);
|
||||
walkTo(274,563);
|
||||
return random(102, 1500);
|
||||
}
|
||||
if (getX() >= 280 && getX() <= 286 && getY() >= 564 && getY() <= 573) {
|
||||
if(getX() >= 280 && getX() <= 286 && getY() >= 564 && getY() <= 573)
|
||||
{
|
||||
//Si dans la banque
|
||||
print("Talking to Banker");
|
||||
if (!isBanking()) {
|
||||
int[] banker = getNpcByIdNotTalk(95);
|
||||
if (banker[0] != -1 && !isBanking()) {
|
||||
talkToNpc(banker[0]);
|
||||
return random(2000, 3000);
|
||||
print("Talking to Banker");
|
||||
if (!isBanking())
|
||||
{
|
||||
int banker[] = getNpcByIdNotTalk(new int[]{95});
|
||||
if (banker[0] != -1 && !isBanking())
|
||||
{
|
||||
talkToNpc(banker[0]);
|
||||
return random(2000,3000);
|
||||
}
|
||||
}
|
||||
}
|
||||
return random(631, 1500);
|
||||
}
|
||||
if (getX() == 287 && getY() == 571) {
|
||||
if(getX() == 287 && getY() == 571)
|
||||
{
|
||||
//Si a coter de la porte a exterieur
|
||||
print("Step Inside Bank");
|
||||
atObject(287, 571);
|
||||
walkTo(286, 571);
|
||||
print("Step Inside Bank");
|
||||
//atObject(287,571);
|
||||
walkTo(286,571);
|
||||
return random(100, 1500);
|
||||
}
|
||||
walkTo(287, 571);
|
||||
walkTo(287,571);
|
||||
|
||||
}
|
||||
return random(302, 400);
|
||||
}
|
||||
|
||||
public final int mineOre(int id) {
|
||||
int[] rock = getObjectById(id);
|
||||
if (rock[0] != -1) {
|
||||
if (rock[1] >= 263 && rock[1] <= 277 && rock[2] >= 3387 && rock[2] <= 3400) {
|
||||
return random(302,400);
|
||||
}
|
||||
|
||||
public final int mineOre(int id)
|
||||
{
|
||||
int[] rock = getObjectById(id);
|
||||
if( rock[0] != -1 )
|
||||
{
|
||||
if(rock[1] >= 263 && rock[1] <= 277 && rock[2] >= 3387 && rock[2] <= 3400)
|
||||
{
|
||||
//Si le rock est dans la sale...
|
||||
//print("Mining : " + id);
|
||||
atObject(rock[1], rock[2]);
|
||||
atObject(rock[1], rock[2]);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public boolean depositGems() {
|
||||
if (getInventoryCount(155) > 0) {
|
||||
}
|
||||
|
||||
public boolean depositGems( )
|
||||
{
|
||||
if ( getInventoryCount(155) > 0 )
|
||||
{
|
||||
deposit(155, getInventoryCount(155));
|
||||
return false;
|
||||
}
|
||||
if (getInventoryCount(153) > 0) {
|
||||
if(getInventoryCount(153) > 0 )
|
||||
{
|
||||
deposit(153, getInventoryCount(153));
|
||||
return false;
|
||||
}
|
||||
//Saphire
|
||||
if (getInventoryCount(160) > 0) {
|
||||
}
|
||||
//Saphire
|
||||
if ( getInventoryCount(160) > 0 )
|
||||
{
|
||||
deposit(160, getInventoryCount(160));
|
||||
return false;
|
||||
}
|
||||
//Ruby
|
||||
if (getInventoryCount(158) > 0) {
|
||||
deposit(158, getInventoryCount(158));
|
||||
return false;
|
||||
}
|
||||
//Emerald
|
||||
if (getInventoryCount(159) > 0) {
|
||||
deposit(159, getInventoryCount(159));
|
||||
return false;
|
||||
}
|
||||
//Diamond
|
||||
if (getInventoryCount(157) > 0) {
|
||||
deposit(157, getInventoryCount(157));
|
||||
return false;
|
||||
} else {
|
||||
walkTo(274, 562);
|
||||
}
|
||||
//Ruby
|
||||
if(getInventoryCount(158) > 0 ){ deposit(158, getInventoryCount(158)); return false;}
|
||||
//Emerald
|
||||
if(getInventoryCount(159) > 0 ){ deposit(159, getInventoryCount(159)); return false;}
|
||||
//Diamond
|
||||
if(getInventoryCount(157) > 0 ){ deposit(157, getInventoryCount(157)); return false;}
|
||||
else
|
||||
{
|
||||
walkTo(274,562);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChatMessage(String msg, String name, boolean pmod, boolean jmod) {
|
||||
|
||||
super.onChatMessage(msg, name, pmod, jmod);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSctiptVersion()
|
||||
{
|
||||
return SCRIPT_VERSION;
|
||||
}
|
||||
|
||||
//public final void print(String gameText)
|
||||
//{
|
||||
// System.out.println(gameText);
|
||||
//}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,14 @@
|
||||
public class Abyte0_Herb extends Abyte0_Script {
|
||||
int fmode = 2;
|
||||
int loop = 0;
|
||||
int i = 0;
|
||||
|
||||
int guam = 165; //Optional
|
||||
int tarromin = 436; //Optional
|
||||
//2023-03-18 - 3.0 Added Cleaning basic herbs and mixing with water when available
|
||||
|
||||
public class Abyte0_Herb extends Abyte0_Script
|
||||
{
|
||||
private final String SCRIPT_VERSION = "3.0 - Mix Basic Herbs to save time";
|
||||
|
||||
int fmode = 2;
|
||||
int loop = 0;
|
||||
int i = 0;
|
||||
|
||||
int FireRune = 31;
|
||||
int WaterRune = 32;
|
||||
int AirRune = 33;
|
||||
@@ -19,7 +23,7 @@ public class Abyte0_Herb extends Abyte0_Script {
|
||||
int halfKey1 = 526;
|
||||
int halfKey2 = 527;
|
||||
int ChristmasCracker = 575;
|
||||
int PartyHat0 = 576;
|
||||
int PartyHat0 = 576;
|
||||
int PartyHat1 = 577;
|
||||
int PartyHat2 = 578;
|
||||
int PartyHat3 = 579;
|
||||
@@ -34,31 +38,28 @@ public class Abyte0_Herb extends Abyte0_Script {
|
||||
int HalfDragonSquareShield1 = 1276;
|
||||
int HalfDragonSquareShield2 = 1277;
|
||||
int DragonSquareShield = 1278;
|
||||
|
||||
int[] herbs = {ChristmasCracker, PartyHat0, PartyHat1, PartyHat2, PartyHat3, PartyHat4, PartyHat5,
|
||||
Disk, Pumpkin, halloweenMask0, halloweenMask1, halloweenMask2, DragonBoneCertificate,
|
||||
Santa, FireRune, WaterRune, AirRune, DragonMediumHelmet, HalfDragonSquareShield1, HalfDragonSquareShield2, DragonSquareShield,
|
||||
EarthRune, MindRune, deathRunes, nature, law, crystalKey, halfKey1, halfKey2, 438, 439, 440, 441, 442, 443, 815, 817, 819, 821, 823, 933, 526, 527, 157, 158, 464, 465, guam, tarromin};//40 nature, 42 law, 157 158 uncut ruby diamon 526 527 key (464 465 vials)
|
||||
|
||||
int[] herbs = {ChristmasCracker,PartyHat0,PartyHat1,PartyHat2,PartyHat3,PartyHat4,PartyHat5,
|
||||
Disk,Pumpkin,halloweenMask0,halloweenMask1,halloweenMask2,DragonBoneCertificate,
|
||||
Santa,FireRune,WaterRune,AirRune,DragonMediumHelmet,HalfDragonSquareShield1,HalfDragonSquareShield2,DragonSquareShield,
|
||||
deathRunes,nature,law,crystalKey,halfKey1,halfKey2, 439, 440, 441, 442, 443, 815, 817, 819, 821, 823, 933, 526, 527, 157, 158, 465, waterVial, dirtyGuam, dirtyTarromin, dirtyHarralander, dirtyRanarr, unfinishGuam, unfinishTarromin, unfinishHarralander,unfinishRanarr, cleanGuam, cleanTarromin, cleanHarralander, cleanRanarr};//40 nature, 42 law, 157 158 uncut ruby diamon 526 527 key (464 465 vials)
|
||||
int[] path = null;
|
||||
|
||||
public Abyte0_Herb(Extension e) {
|
||||
super(e);
|
||||
}
|
||||
|
||||
public void init(String params) {
|
||||
if (params.equals("1"))
|
||||
public Abyte0_Herb(Extension e) { super(e); }
|
||||
public void init(String params)
|
||||
{
|
||||
if(params.equals("1"))
|
||||
fmode = 1;
|
||||
else if (params.equals("2"))
|
||||
else if(params.equals("2"))
|
||||
fmode = 2;
|
||||
else if (params.equals("3"))
|
||||
else if(params.equals("3"))
|
||||
fmode = 3;
|
||||
else
|
||||
fmode = 0;
|
||||
|
||||
|
||||
System.out.println("Fmode = " + fmode);
|
||||
System.out.println("Herb Collector - By mofo");
|
||||
System.out.println("Edited by Abyte0");
|
||||
System.out.println("Version 2.0 r2");
|
||||
System.out.println("Version 3.0 - Added");
|
||||
//Version 0 by yomama
|
||||
//Version 1 by Abyte0
|
||||
//Pick Up Nats
|
||||
@@ -67,106 +68,146 @@ public class Abyte0_Herb extends Abyte0_Script {
|
||||
//Walk Back
|
||||
//r1 pickup vials
|
||||
}
|
||||
|
||||
public int main() {
|
||||
if (getFightMode() != fmode)
|
||||
setFightMode(fmode);
|
||||
|
||||
if (getCurrentLevel(3) <= 5) {
|
||||
return random(60000, 90000);
|
||||
public int main()
|
||||
{
|
||||
if(getFightMode() != fmode)
|
||||
setFightMode(fmode);
|
||||
|
||||
if(getCurrentLevel(3) <= 5)
|
||||
{
|
||||
return random(60000,90000);
|
||||
}
|
||||
|
||||
if (getFatigue() > 90) {
|
||||
|
||||
if(getFatigue() > 90)
|
||||
{
|
||||
useSleepingBag();
|
||||
return 3000;
|
||||
}
|
||||
if (isBanking()) {
|
||||
if(isBanking())
|
||||
{
|
||||
i = 0;
|
||||
for (int h = 0; h < herbs.length; h++) {
|
||||
if (getInventoryCount(herbs[h]) > 0) {
|
||||
for(int h = 0; h < herbs.length; h++)
|
||||
{
|
||||
if(getInventoryCount(herbs[h]) > 0)
|
||||
{
|
||||
statusReport(getInventoryCount(herbs[h]), h);
|
||||
deposit(herbs[h], getInventoryCount(herbs[h]));
|
||||
return random(1000, 1500);
|
||||
return random(1000, 1500);
|
||||
}
|
||||
}
|
||||
closeBank();
|
||||
closeBank();
|
||||
}
|
||||
if (isAtApproxCoords(581, 574, 5) && getInventoryCount() == 30) {
|
||||
if(isAtApproxCoords(581, 574, 5) && getInventoryCount() == 30)
|
||||
{
|
||||
i = 0;
|
||||
if (!isQuestMenu()) {
|
||||
int[] banker = getNpcByIdNotTalk(95);
|
||||
if (banker[0] != -1) {
|
||||
talkToNpc(banker[0]);
|
||||
return random(2000, 2700);
|
||||
}
|
||||
return 1000;
|
||||
} else {
|
||||
answer(0);
|
||||
return 6000;
|
||||
}
|
||||
}
|
||||
if (isAtApproxCoords(617, 558, 2) && getInventoryCount() != 30) {
|
||||
i = 0;
|
||||
int[] door = getWallObjectById(96);
|
||||
if (door[0] != -1)
|
||||
atWallObject2(door[1], door[2]);
|
||||
return random(1000, 1500);
|
||||
}
|
||||
if (isAtApproxCoords(617, 552, 3) && getInventoryCount() == 30) {
|
||||
int[] door = getWallObjectById(96);
|
||||
if (door[0] != -1) {
|
||||
if(!isQuestMenu())
|
||||
{
|
||||
int banker[] = getNpcByIdNotTalk(new int[]{95});
|
||||
if(banker[0] != -1)
|
||||
{
|
||||
talkToNpc(banker[0]);
|
||||
return random(2000, 2700);
|
||||
}
|
||||
return 1000;
|
||||
}
|
||||
else
|
||||
{
|
||||
answer(0);
|
||||
return 6000;
|
||||
}
|
||||
}
|
||||
if(isAtApproxCoords(617, 558, 2) && getInventoryCount() != 30)
|
||||
{
|
||||
i = 0;
|
||||
int[] door = getWallObjectById(96);
|
||||
if(door[0] != -1)
|
||||
atWallObject2(door[1], door[2]);
|
||||
return random(1000, 1500);
|
||||
}
|
||||
if(isAtApproxCoords(617, 552, 3) && getInventoryCount() == 30)
|
||||
{
|
||||
int[] door = getWallObjectById(96);
|
||||
if(door[0] != -1)
|
||||
{
|
||||
atWallObject(door[1], door[2]);
|
||||
return random(800, 1200);
|
||||
return random(800, 1200);
|
||||
}
|
||||
return 1000;
|
||||
return 1000;
|
||||
}
|
||||
if (isAtApproxCoords(617, 552, 3) && getInventoryCount() != 30) {
|
||||
if(isAtApproxCoords(617, 552, 3) && getInventoryCount() != 30)
|
||||
{
|
||||
int[] druid = getNpcById(270);
|
||||
for (int h = 0; h < herbs.length; h++) {
|
||||
for(int h = 0; h < herbs.length; h++)
|
||||
{
|
||||
int[] groundHerbs = getItemById(herbs[h]);
|
||||
if (groundHerbs[0] != -1) {
|
||||
if(groundHerbs[0] != -1)
|
||||
{
|
||||
pickupItem(groundHerbs[0], groundHerbs[1], groundHerbs[2]);
|
||||
return random(1000, 1500);
|
||||
}
|
||||
}
|
||||
if (druid[0] != -1 && !inCombat()) {
|
||||
if(druid[0] != -1 && !inCombat())
|
||||
{
|
||||
attackNpc(druid[0]);
|
||||
return random(800, 1300);
|
||||
}
|
||||
if (druid[0] == -1 && !inCombat()) {
|
||||
if(druid[0] == -1 && !inCombat())
|
||||
{
|
||||
//walkback
|
||||
walkTo(617, 553);
|
||||
if(getX() != 617 || getY() != 553)
|
||||
walkTo(617,553);
|
||||
}
|
||||
return random(500, 800);
|
||||
if(doHerbMixing)
|
||||
{
|
||||
int potionResult = MakeUnfinishPotion();
|
||||
if(potionResult > -1) return potionResult;
|
||||
}
|
||||
return 300;
|
||||
}
|
||||
walk();
|
||||
return random(2000, 2500);
|
||||
}
|
||||
|
||||
public void statusReport(int herbCount, int arrayPoint) {
|
||||
if (arrayPoint < 6) {
|
||||
public void statusReport(int herbCount, int arrayPoint)
|
||||
{
|
||||
if(arrayPoint < 6)
|
||||
{
|
||||
total[arrayPoint] = total[arrayPoint] + herbCount;
|
||||
System.out.println("**Status Report**: Collected " + total[arrayPoint] + " " + herbNames[arrayPoint] + " so far!");
|
||||
}
|
||||
}
|
||||
|
||||
public int walk() {
|
||||
if (isAtApproxCoords(581, 574, 5) && getInventoryCount() != 30)
|
||||
path = new int[]{581, 574, 590, 578, 588, 598, 600, 595, 603, 582, 609, 565, 617, 558};
|
||||
if (isAtApproxCoords(617, 558, 2) && getInventoryCount() == 30)
|
||||
path = new int[]{617, 558, 609, 565, 603, 582, 600, 595, 588, 598, 590, 578, 581, 574};
|
||||
if ((i + 1) < path.length) {
|
||||
if (isAtApproxCoords(path[i], path[i + 1], 2))
|
||||
public int walk()
|
||||
{
|
||||
if(isAtApproxCoords(581, 574, 5) && getInventoryCount() != 30)
|
||||
path = new int[] {581, 574, 590, 578, 588, 598, 600, 595, 603, 582, 609, 565, 617, 558};
|
||||
if(isAtApproxCoords(617, 558, 2) && getInventoryCount() == 30)
|
||||
path = new int[] {617, 558, 609, 565, 603, 582, 600, 595, 588, 598, 590, 578, 581, 574};
|
||||
if((i + 1) < path.length)
|
||||
{
|
||||
if(isAtApproxCoords(path[i], path[i + 1], 2))
|
||||
i = i + 2;
|
||||
walkTo(path[i] + random(-2, 2), path[i + 1] + random(-2, 2));
|
||||
return random(1500, 2500);
|
||||
}
|
||||
loop++;
|
||||
if (loop > 5)
|
||||
walkTo(path[i], path[i + 1]);
|
||||
return 1000;
|
||||
}
|
||||
walkTo(path[i] + random(-2, 2), path[i + 1] + random(-2, 2));
|
||||
return random(1500, 2500);
|
||||
}
|
||||
loop++;
|
||||
if(loop > 5)
|
||||
walkTo(path[i], path[i + 1]);
|
||||
return 1000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChatMessage(String msg, String name, boolean pmod, boolean jmod) {
|
||||
|
||||
super.onChatMessage(msg, name, pmod, jmod);
|
||||
}
|
||||
|
||||
public int[] total = {0, 0, 0, 0, 0, 0};
|
||||
@Override
|
||||
public String getSctiptVersion()
|
||||
{
|
||||
return SCRIPT_VERSION;
|
||||
}
|
||||
|
||||
public int[] total = {0, 0, 0, 0, 0, 0};
|
||||
public String[] herbNames = {"Ranaar", "Irit", "Avantoe", "Kwuarm", "Cadantine", "Dwarf Weed"};
|
||||
}
|
||||
}
|
||||
@@ -17,23 +17,26 @@
|
||||
//2.1 2022-01-27 - Will try to move to avoid reloggin [Require Abyte0_Script 1.7.3+]
|
||||
//2.2 2022-01-28 - degelated some task to the super class [Require Abyte0_Script 1.7.4+]
|
||||
//2.3 2022-02-14 - Updated to work with abyte0_Script 1.8 [require abyte0_Script 1.8+]
|
||||
//2.3.1 2022-10-16 - Fixed need to move to only work in the paladin room + escale chest room when food
|
||||
//2.3.2 2024-03-09 - Fixed bug after server reboot that get stock on the other castle door
|
||||
//2.4.0 - 2024-05-01 - Fix botting word to add extras T to avoid triggering admins warning
|
||||
|
||||
public class Abyte0_Paladin extends Abyte0_Script
|
||||
{
|
||||
//============ CONFIG START ============//
|
||||
boolean eatFoodToPickMITH_BAR_ID = false; //change this to true if you want to eat food to be able to pick mith bar....
|
||||
boolean keepOneExtraInventorySpace = true; //This will try to leave bank with one remaining empty space
|
||||
boolean keepOneExtraInventorySpace = true; //This will try to leave inventory with one remaining empty space
|
||||
int fightMode = 3; //0 Controlled, 1 Strength, 2 Attack, 3 Defence
|
||||
//============= CONFIG END= ============//
|
||||
|
||||
private final String SCRIPT_VERSION = "2.3";
|
||||
private final String SCRIPT_VERSION = "2.4.0";
|
||||
|
||||
@Override
|
||||
public String[] getRandomQuotes()
|
||||
{
|
||||
String[] result = {
|
||||
"Thieving level?",
|
||||
"Nice wallet",
|
||||
"You got nice wallet in my picket",
|
||||
"Once a thief, always a thief",
|
||||
"give me that wallet!",
|
||||
"fking bots!",
|
||||
@@ -41,18 +44,18 @@ public class Abyte0_Paladin extends Abyte0_Script
|
||||
"I stole a million from that guy over there!",
|
||||
"I stole his keys, kill him you'll see he wont drop any!",
|
||||
"nice xp!",
|
||||
"yo!",
|
||||
"Sup!",
|
||||
"I am what I am, but I'm not a thief",
|
||||
"Nice hat bro",
|
||||
"is that a rune armore?",
|
||||
"what food do you use?",
|
||||
"this is so quick xp",
|
||||
"anyone here?",
|
||||
"anyone here not botting?",
|
||||
"why such low pid?",
|
||||
"so hard to thieve these with so many bots",
|
||||
"almost 92 thieving legit",
|
||||
"almost 96 thieving legit",
|
||||
"I bet your thief lvl is like 99?!",
|
||||
"bro"};
|
||||
"Welcome back bro"};
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -127,12 +130,6 @@ public class Abyte0_Paladin extends Abyte0_Script
|
||||
return 800;
|
||||
}
|
||||
|
||||
if(needToMove)
|
||||
{
|
||||
changePosition();
|
||||
return 500;
|
||||
}
|
||||
|
||||
if(getFatigue() > 90)
|
||||
{
|
||||
useSleepingBag();
|
||||
@@ -254,11 +251,17 @@ public class Abyte0_Paladin extends Abyte0_Script
|
||||
return eatFood();
|
||||
}
|
||||
//on regarde si on est dans la sale des paladins
|
||||
if(getX() >= 602 && getX() <= 615 && getY() >= 1548)
|
||||
if(getX() >= 602 && getX() <= 615 && getY() >= 1548 && getY() <= 2000)
|
||||
{
|
||||
int rareItemsFoundResult = pickupRareItems(4);
|
||||
if(rareItemsFoundResult > 0) return rareItemsFoundResult;
|
||||
|
||||
if(needToMove)
|
||||
{
|
||||
changePosition();
|
||||
return 500;
|
||||
}
|
||||
|
||||
//On regarde si on peut ramasser des mith bars
|
||||
if(getInventoryCount() < 30)
|
||||
{
|
||||
@@ -298,6 +301,13 @@ public class Abyte0_Paladin extends Abyte0_Script
|
||||
int[] doorObj;
|
||||
int[] stairs;
|
||||
|
||||
//Si on est en haut ou il y a le chest
|
||||
if(isAtApproxCoords(611,2491,10))
|
||||
{
|
||||
atObject(611,2495);
|
||||
return 2000;
|
||||
}
|
||||
|
||||
//Si pret a SORTIR de la BANQUE
|
||||
if(getX() == 551 && getY() == 612)
|
||||
{
|
||||
@@ -491,10 +501,10 @@ public class Abyte0_Paladin extends Abyte0_Script
|
||||
if(getX() >= 608 && getY() >= 597 && getY() <= 609)
|
||||
{
|
||||
//Passing the Wooden Door
|
||||
stairs = getObjectById(64);
|
||||
if(stairs[0] != -1 && isAtApproxCoords(stairs[1], stairs[2],5))
|
||||
{
|
||||
atObject(stairs[1], stairs[2]);
|
||||
int closedDoor = getObjectIdFromCoords(607,603); //Updated to avoid getting the other castle door if both are closed
|
||||
if(closedDoor == 64 && isAtApproxCoords(607, 603,5))
|
||||
{
|
||||
atObject(607, 603);
|
||||
return 800;
|
||||
}
|
||||
walkTo(607,604);
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,23 +1,34 @@
|
||||
import javax.swing.*;
|
||||
import java.io.*;
|
||||
import java.util.Scanner;
|
||||
import java.awt.*;
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Container;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.event.*;
|
||||
import javax.swing.*;
|
||||
|
||||
public class Abyte0_YanilleChaos extends Abyte0_Script {
|
||||
int fMode = 2;
|
||||
//2023-03-18 - 1.0 Added Cleaning basic herbs and mixing with water when available
|
||||
|
||||
public class Abyte0_YanilleChaos extends Abyte0_Script
|
||||
{
|
||||
private final String SCRIPT_VERSION = "1.0 - Mix Basic Herbs to save time";
|
||||
|
||||
int fMode = 2;
|
||||
int foodId = 373;
|
||||
int inventoryCount = 25;
|
||||
|
||||
|
||||
int mindRunes = 35;
|
||||
int chaosRunes = 41;
|
||||
|
||||
|
||||
int sinisterKey = 932;
|
||||
int halfKey1 = 526;
|
||||
int halfKey2 = 527;
|
||||
|
||||
|
||||
int WhiteBerries = 471;
|
||||
|
||||
|
||||
int HalfDragonSquareShield1 = 1276;
|
||||
int HalfDragonSquareShield2 = 1277;
|
||||
|
||||
|
||||
int FireRune = 31;
|
||||
int WaterRune = 32;
|
||||
int AirRune = 33;
|
||||
@@ -26,430 +37,483 @@ public class Abyte0_YanilleChaos extends Abyte0_Script {
|
||||
int nature = 40;
|
||||
int law = 42;
|
||||
int CosmicRune = 46;
|
||||
|
||||
int guam = 165;
|
||||
int tarromin = 436;
|
||||
int harralander = 437;
|
||||
|
||||
int irit = 439;
|
||||
int kwuarm = 441;
|
||||
int dwarfWeed = 443;
|
||||
int limpwrut = 220;
|
||||
|
||||
|
||||
int groundUnicornHorn = 473;
|
||||
|
||||
|
||||
int foodRequired = 1;
|
||||
|
||||
|
||||
int superDef1 = 497;
|
||||
int walkBx = 581;
|
||||
int walkBy = 3587;
|
||||
int emptyVial = 465;
|
||||
int waterVial = 464;
|
||||
|
||||
|
||||
int[] priorityItems = {HalfDragonSquareShield1,HalfDragonSquareShield2,sinisterKey,halfKey1,halfKey2, dirtyRanarr, irit, 440, kwuarm, 442, dwarfWeed, 815, 817, 819, 821, 823, 933};
|
||||
|
||||
int[] priorityItems = {HalfDragonSquareShield1, HalfDragonSquareShield2, sinisterKey, halfKey1, halfKey2, 438, irit, 440, kwuarm, 442, dwarfWeed, 815, 817, 819, 821, 823, 933};
|
||||
|
||||
int[] items = {law, deathRunes, CosmicRune, FireRune, AirRune, WhiteBerries, EarthRune, nature, WaterRune, superDef1, guam, tarromin, harralander, groundUnicornHorn, limpwrut, emptyVial, waterVial};
|
||||
|
||||
String[] fModeName = {"Attack", "Defence", "Strength", "Controlled"};
|
||||
int[] fModeIdList = {2, 3, 1, 0};
|
||||
|
||||
String[] foodName = {"None", "Tunas", "Lobs", "Swordfish", "Sharks", "Cake"};
|
||||
int[] foodIdList = {-1, 367, 373, 370, 546, 330};
|
||||
|
||||
int[] chaosDruids = {270, 555};
|
||||
int[] items = {law,deathRunes,CosmicRune,FireRune,AirRune,WhiteBerries,EarthRune,nature,WaterRune,superDef1, dirtyGuam, dirtyTarromin, dirtyHarralander, groundUnicornHorn, limpwrut, emptyVial, waterVial, unfinishGuam, unfinishTarromin, unfinishHarralander,unfinishRanarr, cleanGuam, cleanTarromin, cleanHarralander, cleanRanarr};
|
||||
|
||||
String[] fModeName = {"Attack","Defence","Strength", "Controlled"};
|
||||
int[] fModeIdList = {2,3,1,0};
|
||||
|
||||
String[] foodName = {"None","Tunas","Lobs","Swordfish","Sharks","Cake"};
|
||||
int[] foodIdList = {-1,367,373,370,546,330};
|
||||
|
||||
int[] chaosDruids = {270,555};
|
||||
|
||||
boolean devilMode = false;
|
||||
|
||||
public Abyte0_YanilleChaos(Extension e) {
|
||||
super(e);
|
||||
}
|
||||
|
||||
public void init(String params) {
|
||||
|
||||
public Abyte0_YanilleChaos(Extension e) { super(e); }
|
||||
public void init(String params)
|
||||
{
|
||||
Frame frame = new Frame("Select Fighting Mode");
|
||||
String choiceF = (String) JOptionPane.showInputDialog(frame, "Items:\n", "Fighting Mode Selection", JOptionPane.PLAIN_MESSAGE, null, fModeName, null);
|
||||
for (int i = 0; i < fModeName.length; i++) {
|
||||
if (fModeName[i].equals(choiceF)) {
|
||||
String choiceF = (String)JOptionPane.showInputDialog(frame, "Items:\n", "Fighting Mode Selection", JOptionPane.PLAIN_MESSAGE, null, fModeName, null);
|
||||
for(int i = 0; i < fModeName.length; i++)
|
||||
{
|
||||
if (fModeName[i].equals(choiceF))
|
||||
{
|
||||
fMode = fModeIdList[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
print("fMode = " + choiceF);
|
||||
print("--");
|
||||
|
||||
if (params.equals("alt")) {
|
||||
|
||||
if(params.equals("alt"))
|
||||
{
|
||||
print("ALT");
|
||||
walkBx = 584;
|
||||
walkBy = 3584;
|
||||
}
|
||||
|
||||
if (params.equals("dev")) {
|
||||
|
||||
if(params.equals("dev"))
|
||||
{
|
||||
print("DEV");
|
||||
devilMode = true;
|
||||
InitializeLastKnownPositions();
|
||||
}
|
||||
|
||||
|
||||
Frame frameFood = new Frame("Select Food");
|
||||
String choiceFood = (String) JOptionPane.showInputDialog(frameFood, "Items:\n", "Food Selection", JOptionPane.PLAIN_MESSAGE, null, foodName, null);
|
||||
for (int i = 0; i < foodName.length; i++) {
|
||||
if (foodName[i].equals(choiceFood)) {
|
||||
String choiceFood = (String)JOptionPane.showInputDialog(frameFood, "Items:\n", "Food Selection", JOptionPane.PLAIN_MESSAGE, null, foodName, null);
|
||||
for(int i = 0; i < foodName.length; i++)
|
||||
{
|
||||
if (foodName[i].equals(choiceFood))
|
||||
{
|
||||
foodId = foodIdList[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
print("Food = " + choiceFood);
|
||||
print("--");
|
||||
|
||||
|
||||
print("Yanille chaos druid killer by: Abyte0");
|
||||
print("Version 0");
|
||||
|
||||
print("Version " + SCRIPT_VERSION);
|
||||
}
|
||||
|
||||
public int main() {
|
||||
if (getFightMode() != fMode)
|
||||
public int main()
|
||||
{
|
||||
if(getFightMode() != fMode)
|
||||
setFightMode(fMode);
|
||||
if (getFatigue() > 90) {
|
||||
if(getFatigue() > 90)
|
||||
{
|
||||
useSleepingBag();
|
||||
return 3000;
|
||||
}
|
||||
|
||||
if (isBanking()) {
|
||||
for (int h = 0; h < priorityItems.length; h++) {
|
||||
if (getInventoryCount(priorityItems[h]) > 0) {
|
||||
if(isBanking())
|
||||
{
|
||||
for(int h = 0; h < priorityItems.length; h++)
|
||||
{
|
||||
if(getInventoryCount(priorityItems[h]) > 0)
|
||||
{
|
||||
deposit(priorityItems[h], getInventoryCount(priorityItems[h]));
|
||||
return random(1000, 1500);
|
||||
return random(1000, 1500);
|
||||
}
|
||||
}
|
||||
for (int h = 0; h < items.length; h++) {
|
||||
if (getInventoryCount(items[h]) > 0) {
|
||||
for(int h = 0; h < items.length; h++)
|
||||
{
|
||||
if(getInventoryCount(items[h]) > 0)
|
||||
{
|
||||
deposit(items[h], getInventoryCount(items[h]));
|
||||
return random(1000, 1500);
|
||||
return random(1000, 1500);
|
||||
}
|
||||
}
|
||||
|
||||
if (getInventoryCount(foodId) < foodRequired && foodId != -1) {
|
||||
|
||||
if(getInventoryCount(foodId) < foodRequired && foodId != -1)
|
||||
{
|
||||
withdraw(foodId, foodRequired);
|
||||
return random(1000, 1500);
|
||||
}
|
||||
closeBank();
|
||||
closeBank();
|
||||
}
|
||||
//If we need to go bank
|
||||
if (!isStillHavingFood() || getInventoryCount() == 30) {
|
||||
if(!IsStillHavingFood(foodId) || getInventoryCount() == 30)
|
||||
{
|
||||
//print("We must go Bank");
|
||||
//if we in small house near bank we mmust go outside
|
||||
if (getX() >= 589 && getX() <= 593 && getY() >= 761 && getY() <= 764) {
|
||||
if(getX() >= 589 && getX() <= 593 && getY() >= 761 && getY() <= 764)
|
||||
{
|
||||
//If not next to door we walk to it
|
||||
if (getX() != 591 && getY() != 764) {
|
||||
walkTo(591, 764);
|
||||
return random(100, 400);
|
||||
if(getX() != 591 && getY() != 764)
|
||||
{
|
||||
walkTo(591,764);
|
||||
return random(100,400);
|
||||
}
|
||||
//Else we open the door if open
|
||||
int[] doorObj = getWallObjectById(2);
|
||||
if (doorObj[0] != -1) {
|
||||
if (isAtApproxCoords(doorObj[1], doorObj[2], 2)) {
|
||||
if(doorObj[0] != -1)
|
||||
{
|
||||
if (isAtApproxCoords(doorObj[1], doorObj[2], 2))
|
||||
{
|
||||
atWallObject(doorObj[1], doorObj[2]);
|
||||
return random(200, 500);
|
||||
return random(200,500);
|
||||
}
|
||||
}
|
||||
//Else we walk outside
|
||||
walkTo(591, 765);
|
||||
walkTo(591,765);
|
||||
return random(100, 1500);
|
||||
}
|
||||
//IF WE NEAR BANK BUT OUTSIDE HOUSE
|
||||
if (isAtApproxCoords(585, 753, 30)) {
|
||||
if (!isQuestMenu()) {
|
||||
int[] banker = getNpcByIdNotTalk(95);
|
||||
if (banker[0] != -1) {
|
||||
talkToNpc(banker[0]);
|
||||
return random(2000, 2700);
|
||||
}
|
||||
return 1000;
|
||||
} else {
|
||||
answer(0);
|
||||
return 6000;
|
||||
}
|
||||
if(isAtApproxCoords(585, 753, 30))
|
||||
{
|
||||
if(!isQuestMenu())
|
||||
{
|
||||
int banker[] = getNpcByIdNotTalk(new int[]{95});
|
||||
if(banker[0] != -1)
|
||||
{
|
||||
talkToNpc(banker[0]);
|
||||
return random(2000, 2700);
|
||||
}
|
||||
return 1000;
|
||||
}
|
||||
else
|
||||
{
|
||||
answer(0);
|
||||
return 6000;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//downstair near bank we want to go upstair
|
||||
if (getX() >= 591 && getX() <= 596 && getY() >= 3590 && getY() <= 3597) {
|
||||
int[] stair = getObjectById(43);
|
||||
if (stair[0] != -1)
|
||||
if(getX() >= 591 && getX() <= 596 && getY() >= 3590 && getY() <= 3597)
|
||||
{
|
||||
int[] stair = getObjectById(43);
|
||||
if(stair[0] != -1)
|
||||
atObject(stair[1], stair[2]);
|
||||
return random(300, 400);
|
||||
return random(300,400);
|
||||
}
|
||||
|
||||
|
||||
//Chaos Druids JUNK SPOT
|
||||
if (getX() >= 582 && getX() <= 583 && getY() == 3589) {
|
||||
if(getX() >= 582 && getX() <= 583 && getY() == 3589)
|
||||
{
|
||||
//walk to center room
|
||||
walkTo(585, 3585);
|
||||
return random(300, 400);
|
||||
walkTo(585,3585);
|
||||
return random(300,400);
|
||||
}
|
||||
//Chaos Druids rooom
|
||||
if (getX() >= 576 && getX() <= 598 && getY() >= 3580 && getY() <= 3589) {
|
||||
if (getX() >= 585) {
|
||||
if(getX() >= 576 && getX() <= 598 && getY() >= 3580 && getY() <= 3589)
|
||||
{
|
||||
if(getX() >= 585)
|
||||
{
|
||||
//door side lest pick lock door
|
||||
int[] door = getWallObjectById(162);
|
||||
if (door[0] != -1)
|
||||
int[] door = getWallObjectById(162);
|
||||
if(door[0] != -1)
|
||||
atWallObject2(door[1], door[2]);
|
||||
return random(300, 400);
|
||||
} else {
|
||||
return random(300,400);
|
||||
}
|
||||
else
|
||||
{
|
||||
//Stair Side lest walk to center room
|
||||
walkTo(585, 3585);
|
||||
return random(300, 400);
|
||||
walkTo(585,3585);
|
||||
return random(300,400);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//we can go to war
|
||||
|
||||
|
||||
//Chaos Druids rooom
|
||||
if (getX() >= 576 && getX() <= 598 && getY() >= 3580 && getY() <= 3589) {
|
||||
if(getX() >= 576 && getX() <= 598 && getY() >= 3580 && getY() <= 3589)
|
||||
{
|
||||
//if we are low life and want to use food
|
||||
if (getHpPercent() < 60 && foodId != -1) {
|
||||
if (inCombat()) {
|
||||
if(getHpPercent() < 60 && foodId != -1)
|
||||
{
|
||||
if(inCombat())
|
||||
{
|
||||
RunFromCombat();
|
||||
return random(200, 400);
|
||||
return random(200,400);
|
||||
}
|
||||
EatFood();
|
||||
return random(400, 1000);
|
||||
} else if (getHpPercent() < 40 && foodId == -1) {
|
||||
if (inCombat()) {
|
||||
EatFood(foodId);
|
||||
return random(400,1000);
|
||||
}
|
||||
else if(getHpPercent() < 40 && foodId == -1)
|
||||
{
|
||||
if(inCombat())
|
||||
{
|
||||
RunFromCombat();
|
||||
print("You should use food parameter, waiting for heal to restore...");
|
||||
return random(2200, 4400);
|
||||
return random(2200,4400);
|
||||
}
|
||||
}
|
||||
if (getFatigue() > 80) {
|
||||
if(getFatigue() > 80)
|
||||
{
|
||||
useSleepingBag();
|
||||
return 3000;
|
||||
}
|
||||
|
||||
if (!inCombat()) {
|
||||
|
||||
|
||||
if(!inCombat())
|
||||
{
|
||||
|
||||
//We need to Pick Up the Item if any on floor
|
||||
for (int h = 0; h < priorityItems.length; h++) {
|
||||
for(int h = 0; h < priorityItems.length; h++)
|
||||
{
|
||||
int[] groundItems = getItemById(priorityItems[h]);
|
||||
if (groundItems[0] != -1) {
|
||||
if (isAtApproxCoords(groundItems[1], groundItems[2], 8)) {
|
||||
if(groundItems[0] != -1)
|
||||
{
|
||||
if(isAtApproxCoords(groundItems[1], groundItems[2], 8))
|
||||
{
|
||||
pickupItem(groundItems[0], groundItems[1], groundItems[2]);
|
||||
return random(1000, 1500);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (devilMode == true) {
|
||||
|
||||
if(devilMode == true)
|
||||
{
|
||||
GetNextNPC();
|
||||
return 300;
|
||||
}
|
||||
|
||||
|
||||
//int[] druids = getAllNpcById(salarinId);
|
||||
int[] druids = getNpcById(chaosDruids);
|
||||
if (druids[0] != -1 && druids[2] > 3581) {
|
||||
if(druids[0] != -1 && druids[2] > 3581)
|
||||
{
|
||||
attackNpc(druids[0]);
|
||||
return random(1200, 1400);
|
||||
}
|
||||
|
||||
|
||||
//We need to Pick Up the Item if any on floor
|
||||
for (int h = 0; h < items.length; h++) {
|
||||
for(int h = 0; h < items.length; h++)
|
||||
{
|
||||
int[] groundItems = getItemById(items[h]);
|
||||
if (groundItems[0] != -1) {
|
||||
if (isAtApproxCoords(groundItems[1], groundItems[2], 8)) {
|
||||
if(groundItems[0] != -1)
|
||||
{
|
||||
if(isAtApproxCoords(groundItems[1], groundItems[2], 8))
|
||||
{
|
||||
pickupItem(groundItems[0], groundItems[1], groundItems[2]);
|
||||
return random(1000, 1500);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (getX() != walkBx || getY() != walkBy) {
|
||||
if(getX() != walkBx || getY() != walkBy)
|
||||
{
|
||||
//walkback
|
||||
walkTo(walkBx, walkBy);
|
||||
return random(100, 350);
|
||||
return random(100,350);
|
||||
}
|
||||
if(doHerbMixing)
|
||||
{
|
||||
int potionResult = MakeUnfinishPotion();
|
||||
if(potionResult > -1) return potionResult;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//if we in front of the room door we want to open and enter
|
||||
if (getX() == 591 && getY() == 765) {
|
||||
if(getX() == 591 && getY() == 765)
|
||||
{
|
||||
//we open the door
|
||||
int[] doorObj = getWallObjectById(2);
|
||||
if (doorObj[0] != -1) {
|
||||
if (isAtApproxCoords(doorObj[1], doorObj[2], 2)) {
|
||||
if(doorObj[0] != -1)
|
||||
{
|
||||
if(isAtApproxCoords(doorObj[1], doorObj[2], 2))
|
||||
{
|
||||
atWallObject(doorObj[1], doorObj[2]);
|
||||
return random(200, 500);
|
||||
return random(200,500);
|
||||
}
|
||||
}
|
||||
//Else we walk inside
|
||||
walkTo(591, 764);
|
||||
walkTo(591,764);
|
||||
return random(100, 1500);
|
||||
}
|
||||
|
||||
|
||||
//if we in small house near bank we mmust go outside
|
||||
if (getX() >= 589 && getX() <= 593 && getY() >= 761 && getY() <= 764) {
|
||||
if(getX() >= 589 && getX() <= 593 && getY() >= 761 && getY() <= 764)
|
||||
{
|
||||
//we in the hosue so we need ot get downstairs
|
||||
int[] stairObj = getObjectById(42);
|
||||
if (stairObj[0] != -1) {
|
||||
if(stairObj[0] != -1)
|
||||
{
|
||||
atObject(stairObj[1], stairObj[2]);
|
||||
return random(200, 500);
|
||||
return random(200,500);
|
||||
}
|
||||
}
|
||||
//IF WE NEAR BANK BUT OUTSIDE HOUSE
|
||||
if (isAtApproxCoords(585, 753, 30)) {
|
||||
if(isAtApproxCoords(585, 753, 30))
|
||||
{
|
||||
//we want to walk to the house
|
||||
walkTo(591, 765);
|
||||
return random(400, 500);
|
||||
walkTo(591,765);
|
||||
return random(400,500);
|
||||
}
|
||||
|
||||
|
||||
//downstair near bank we want to get to chaos
|
||||
if (getX() >= 591 && getX() <= 596 && getY() >= 3590 && getY() <= 3597) {
|
||||
int[] door = getWallObjectById(162);
|
||||
if (door[0] != -1)
|
||||
if(getX() >= 591 && getX() <= 596 && getY() >= 3590 && getY() <= 3597)
|
||||
{
|
||||
int[] door = getWallObjectById(162);
|
||||
if(door[0] != -1)
|
||||
atWallObject2(door[1], door[2]);
|
||||
return random(300, 400);
|
||||
return random(300,400);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return random(200, 500);
|
||||
}
|
||||
|
||||
public final void EatFood() {
|
||||
if (foodId == -1) return;
|
||||
|
||||
if (foodId == 330) {
|
||||
EatCake();
|
||||
} else {
|
||||
int foodIndex = getInventoryIndex(foodId);
|
||||
useItem(foodIndex);
|
||||
}
|
||||
}
|
||||
|
||||
private void EatCake() {
|
||||
int part1 = getInventoryIndex(335);
|
||||
int part2 = getInventoryIndex(333);
|
||||
int part3 = getInventoryIndex(330);
|
||||
if (part1 != -1) {
|
||||
useItem(part1);
|
||||
} else if (part2 != -1) {
|
||||
useItem(part2);
|
||||
} else if (part3 != -1) {
|
||||
useItem(part3);
|
||||
}
|
||||
}
|
||||
|
||||
public void RunFromCombat() {
|
||||
walkTo(getX(), getY());
|
||||
}
|
||||
|
||||
private boolean isStillHavingFood() {
|
||||
if (foodId == -1) return true;
|
||||
if (foodId == 330)
|
||||
return getInventoryCount(foodId, 333, 335) > 0;
|
||||
else
|
||||
return getInventoryCount(foodId) > 0;
|
||||
}
|
||||
|
||||
|
||||
int maximumNpc = 5;
|
||||
int[][] lastKnownPositions = new int[maximumNpc][];
|
||||
int[] selectedNPC = {270};
|
||||
|
||||
private void GetNextNPC() {
|
||||
|
||||
private void GetNextNPC()
|
||||
{
|
||||
int[] availableNPC = getNpcById(selectedNPC);
|
||||
|
||||
if (availableNPC[0] != -1) {
|
||||
|
||||
if(availableNPC[0] != -1)
|
||||
{
|
||||
attackNpc(availableNPC[0]);
|
||||
}
|
||||
|
||||
if (lastKnownPositions[0][0] != -1 && getX() != lastKnownPositions[0][1] && getY() != lastKnownPositions[0][2]) {
|
||||
walkTo(lastKnownPositions[0][1], lastKnownPositions[0][2]);
|
||||
|
||||
if(lastKnownPositions[0][0] != -1 && getX() != lastKnownPositions[0][1] && getY() != lastKnownPositions[0][2])
|
||||
{
|
||||
walkTo(lastKnownPositions[0][1],lastKnownPositions[0][2]);
|
||||
}
|
||||
|
||||
|
||||
UpdateStack();
|
||||
}
|
||||
|
||||
private void UpdateStack() {
|
||||
|
||||
private void UpdateStack()
|
||||
{
|
||||
//print("UpdateStack");
|
||||
int[][] allNpc = getAllNpcsById(selectedNPC);
|
||||
|
||||
|
||||
//printHowmnayArentNull();
|
||||
|
||||
if (allNpc.length > 0) {
|
||||
|
||||
if(allNpc.length > 0)
|
||||
{
|
||||
//print("allNpc.length "+ allNpc.length);
|
||||
for (int i = 0; i < allNpc.length; i++) {
|
||||
if (allNpc[i] == null) continue;
|
||||
|
||||
//print("allNpc[i]="+allNpc[i]);
|
||||
//print("allNpc[i][1]="+allNpc[i][1]+" [2]="+allNpc[i][2]);
|
||||
for(int i = 0; i < allNpc.length; i++)
|
||||
{
|
||||
if(allNpc[i] == null) continue;
|
||||
|
||||
//print("allNpc[i]="+allNpc[i]);
|
||||
//print("allNpc[i][1]="+allNpc[i][1]+" [2]="+allNpc[i][2]);
|
||||
//print("last was = "+lastKnownPositions[maximumNpc-1][1]+","+lastKnownPositions[maximumNpc-1][2]);
|
||||
|
||||
if (lastKnownPositions[maximumNpc - 1][1] == allNpc[i][1] && lastKnownPositions[maximumNpc - 1][2] == allNpc[i][2])
|
||||
|
||||
if(lastKnownPositions[maximumNpc-1][1] == allNpc[i][1] && lastKnownPositions[maximumNpc-1][2] == allNpc[i][2])
|
||||
continue;
|
||||
|
||||
|
||||
boolean shifted = false;
|
||||
//print("i " + i + ", lastKnownPositions.length "+ lastKnownPositions.length);
|
||||
for (int epos = 0; epos < lastKnownPositions.length - 1; epos++) //We do not need to update if its last
|
||||
for(int epos = 0; epos < lastKnownPositions.length-1; epos++) //We do not need to update if its last
|
||||
{
|
||||
//print("lastKnownPositions[epos][1]="+lastKnownPositions[epos][1]+" [2]="+lastKnownPositions[epos][2]);
|
||||
if (isApproxCord(lastKnownPositions[epos], allNpc[i])) {
|
||||
if(isApproxCord(lastKnownPositions[epos],allNpc[i]))
|
||||
{
|
||||
SetNextAsFirst(epos);
|
||||
shifted = true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (!shifted)
|
||||
|
||||
if(!shifted)
|
||||
SetNextAsFirst(0);
|
||||
|
||||
|
||||
SetAsLast(allNpc[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private boolean isApproxCord(int[] saved, int[] npc) {
|
||||
|
||||
private boolean isApproxCord(int[] saved,int[] npc)
|
||||
{
|
||||
int difX = saved[1] - npc[1];
|
||||
int difY = saved[2] - npc[2];
|
||||
|
||||
return difX < 3 && difX > -3 && difY < 3 && difY > -3;
|
||||
}
|
||||
|
||||
|
||||
private void InitializeLastKnownPositions() {
|
||||
for (int epos = 0; epos < lastKnownPositions.length; epos++) {
|
||||
lastKnownPositions[epos] = new int[]{-1, -1, -1};
|
||||
|
||||
if(difX < 3 && difX > -3 && difY < 3 && difY > -3) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
private void InitializeLastKnownPositions()
|
||||
{
|
||||
for(int epos = 0; epos < lastKnownPositions.length; epos++)
|
||||
{
|
||||
lastKnownPositions[epos] = new int[]{-1,-1,-1};
|
||||
}
|
||||
}
|
||||
|
||||
private void printHowmnayArentNull() {
|
||||
|
||||
private void printHowmnayArentNull()
|
||||
{
|
||||
int cpt = 0;
|
||||
for (int epos = 0; epos < lastKnownPositions.length; epos++) {
|
||||
print("inv" + cpt + " : " + lastKnownPositions[epos][1] + "," + lastKnownPositions[epos][2]);
|
||||
for(int epos = 0; epos < lastKnownPositions.length; epos++)
|
||||
{
|
||||
print("inv"+ cpt + " : " +lastKnownPositions[epos][1]+"," +lastKnownPositions[epos][2]);
|
||||
cpt++;
|
||||
}
|
||||
}
|
||||
|
||||
private void ShiftUpFrom(int position) {
|
||||
print("---------- shift from " + position);
|
||||
for (int ep = position; ep < maximumNpc - 1; ep++) {
|
||||
lastKnownPositions[ep] = lastKnownPositions[ep + 1];
|
||||
|
||||
private void ShiftUpFrom(int position)
|
||||
{
|
||||
print("---------- shift from "+ position);
|
||||
for(int ep = position; ep < maximumNpc-1; ep++)
|
||||
{
|
||||
lastKnownPositions[ep] = lastKnownPositions[ep+1];
|
||||
}
|
||||
|
||||
lastKnownPositions[maximumNpc - 1] = new int[]{-1, -1, -1};
|
||||
|
||||
lastKnownPositions[maximumNpc-1] = new int[]{-1,-1,-1};
|
||||
}
|
||||
|
||||
private void SetNextAsFirst(int startPosition) {
|
||||
|
||||
private void SetNextAsFirst(int startPosition)
|
||||
{
|
||||
print("======");
|
||||
//printHowmnayArentNull();
|
||||
int cpt = 0;
|
||||
print("---------- Set from " + startPosition);
|
||||
for (int ep = startPosition; ep < maximumNpc - 1; ep++) {
|
||||
lastKnownPositions[cpt] = lastKnownPositions[ep + 1];
|
||||
print("---------- Set from "+ startPosition);
|
||||
for(int ep = startPosition; ep < maximumNpc-1; ep++)
|
||||
{
|
||||
lastKnownPositions[cpt] = lastKnownPositions[ep+1];
|
||||
cpt++;
|
||||
}
|
||||
for (int rest = cpt; rest < maximumNpc; rest++) {
|
||||
lastKnownPositions[rest] = new int[]{-1, -1, -1};
|
||||
for(int rest = cpt; rest < maximumNpc; rest++)
|
||||
{
|
||||
lastKnownPositions[rest] = new int[]{-1,-1,-1};
|
||||
}
|
||||
//printHowmnayArentNull();
|
||||
}
|
||||
|
||||
private void SetAsLast(int[] npc) {
|
||||
|
||||
private void SetAsLast(int[] npc)
|
||||
{
|
||||
//print("setting last npc to " + npc[1] + "," + npc[2]);
|
||||
lastKnownPositions[maximumNpc - 1] = npc;
|
||||
lastKnownPositions[maximumNpc-1] = npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChatMessage(String msg, String name, boolean pmod, boolean jmod) {
|
||||
|
||||
super.onChatMessage(msg, name, pmod, jmod);
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public String getSctiptVersion()
|
||||
{
|
||||
return SCRIPT_VERSION;
|
||||
}
|
||||
|
||||
}
|
||||
+1362
-1059
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user