public class rena_bdkpro extends Script
{
// General walk
int step = 0;
int[] path = null;
int loop = 0;
private void useItemOnWall(int itemID, int x, int y) {
int slot = getInventoryIndex(new int[] { itemID });
int i = e.getWallObjectIndexByCoords(x, y);
int j = e.wallObjectIdArray()[i];
int k = e.wallObjectDirArray()[i];
if (k == -1) {
System.out.println("Error identifying wall object at coords: " + x + ":" + y);
return;
}
int m = x - e.getTileX();
int n = y - e.getTileY();
e.b(m, n, 56, k);
e.hh.a(161, (byte)93);
e.hh.c.a(x, (byte)54);
e.hh.c.a(y, (byte)77);
e.hh.c.c(9, k);
e.hh.c.a(slot, (byte)-59);
e.hh.c(0);
}
int[] npcID = new int[]
{
// All monsters in Dungeon Possibily Blocking our path
22, 190, 271, 295, 66, 108, 189
};
// Collect d bones, dstone, 2 half keys, dmed
int[] CollectIDs = {814,795,523,526,527};
int fightMode = 0;
// Loot reporting
int dbones =0;
int dstone =0;
int halfloop =0;
int halftooth =0;
int dmed =0;
// Items + Trips reporting
int trips =0;
int nooffood =0;
int noofpray =0;
int noofsap =0;
int noofssp =0;
// Path handling
boolean bankingnow;
boolean walkingaltarnow;
boolean walkingdragonsnow;
boolean fightingnow;
// Param Options handling
int aaa =0;
int bbb =0;
int ccc =0;
int ddd =0;
int eee =0;
int fff =0;
int ggg =0;
int hhh =0;
int iii =0;
int jjj =0;
int kkk =0;
int lll =0;
int mmm =0;
int nnn =0;
int ooo =0;
int ppp =0;
// Boolean Param options
boolean pray = false;
boolean attack = false;
boolean str = false;
boolean sleep = true;
boolean usingdmed = false;
int minmed =0;
//Dungeon Walk
boolean walk1 = false;
boolean walk2 = false;
boolean walk3 = false;
boolean walk4 = false;
boolean walk5 = false;
boolean walk6 = false;
boolean walk7 = false;
boolean walk8 = false;
boolean walk9 = false;
boolean walk10 = false;
boolean walk11 = false;
boolean walk12 = false;
boolean walk13 = false;
boolean walk14 = false;
boolean walk15 = false;
boolean walk16 = false;
boolean walk17 = false;
boolean walk18 = false;
boolean walk19 = false;
boolean walk20 = false;
boolean walk21 = false;
boolean walk22 = false;
boolean walk23 = false;
boolean walk24 = false;
private Extension e;
public rena_bdkpro(Extension e) {
super(e);
this.e = e;
}
public void init(String params)
{
System.out.println(" ");
System.out.println("[================== !~ RENAFOX'S SCRIPTS ~! ===================]");
System.out.println("[==============================================================]");
System.out.println("[=== !~ Thanks for purchasing this script ~! ===]");
System.out.println("[=== !~ Started Blue Dragon Killer Pro By Renafox ~! ===]");
System.out.println("[=== !~ Version 1.0 ~! ===]");
System.out.println(" ");
System.out.println("[==================== !~ INSCTRUCTIONS ~! ======================]");
System.out.println("[=== !~ rena_bdkpro <a>,<b>,<c>,<d>,<e>,<f>,<g>....<o> ~! ===]");
System.out.println("[=== !~ ~! ===]");
System.out.println("[---------------- !~ Param inputs available ~! -----------------]");
System.out.println("[=== !~ ~! ===]");
System.out.println("[=== !~ <a> = Fightmode (0=contrl, 1=str, 2=acc, 3=def) ~! ===]");
System.out.println("[--------------------- !~ Food options ~! ----------------------]");
System.out.println("[=== !~ <b> = Food id (cakes not supported) ~! ===]");
System.out.println("[=== !~ <c> = No. of food withdrawn from bank ~! ===]");
System.out.println("[=== !~ <d> = Hp to eat at ~! ===]");
System.out.println("[--------------- !~ Prayer potions Options ~! ------------------]");
System.out.println("[=== !~ <e> = Use prayer? (0=no, 1=yes)(Use Para Monster) ~! ===]");
System.out.println("[=== !~ <f> = No. of prayer pots withdrawn from bank ~! ===]");
System.out.println("[=== !~ <g> = Prayer lvl to drink dose of ppot at ~! ===]");
System.out.println("[--------------- !~ Attack potions Options ~! ------------------]");
System.out.println("[=== !~ <h> = Use Super attack potions? (0=no, 1=yes) ~! ===]");
System.out.println("[=== !~ <i> = No. of SAPs pots withdrawn from bank ~! ===]");
System.out.println("[=== !~ <j> = Attack lvl to drink dose of ppot at ~! ===]");
System.out.println("[--------------- !~ Strength potions Options ~! ----------------]");
System.out.println("[=== !~ <k> = Use Super Strength potions? (0=no, 1=yes) ~! ===]");
System.out.println("[=== !~ <l> = No. of SSP pots withdrawn from bank ~! ===]");
System.out.println("[=== !~ <m> = Strength lvl to drink dose of ppot at ~! ===]");
System.out.println("[---------------------- !~ Sleeping? ~! ------------------------]");
System.out.println("[=== !~ <n> = Use sleeping bag? (0=no, 1=yes) ~! ===]");
System.out.println("[=== !~ <o> = Wearing Dmed? (0=no, 1=yes) ~! ===]");
System.out.println("[=== !~ <p> = Your Actual Prayer level ~! ===]");
System.out.println("[===============================================================]");
System.out.println(" ");
System.out.println("[=== !~ Note that the scripts end trips when prayer = 0 ~! ===]");
System.out.println("[=== !~ Followed by when hp lower than <d> & out of <b> ~! ===]");
System.out.println("[=== !~ Or lastly, when inventory is full... ~! ===]");
System.out.println("[===============================================================]");
String[] pa = params.trim().split(",");
this.aaa = Integer.parseInt(pa[0]);
this.bbb = Integer.parseInt(pa[1]);
this.ccc = Integer.parseInt(pa[2]);
this.ddd = Integer.parseInt(pa[3]);
this.eee = Integer.parseInt(pa[4]);
this.fff = Integer.parseInt(pa[5]);
this.ggg = Integer.parseInt(pa[6]);
this.hhh = Integer.parseInt(pa[7]);
this.jjj = Integer.parseInt(pa[8]);
this.jjj = Integer.parseInt(pa[9]);
this.kkk = Integer.parseInt(pa[10]);
this.lll = Integer.parseInt(pa[11]);
this.mmm = Integer.parseInt(pa[12]);
this.nnn = Integer.parseInt(pa[13]);
this.ooo = Integer.parseInt(pa[14]);
this.ppp = Integer.parseInt(pa[15]);
// Params eee , hhh , kkk , nnn Are Booleans
if(eee == 1)
{
pray = true;
}
if(eee == 0)
{
pray = false;
}
if(hhh == 1)
{
attack = true;
}
if(hhh == 0)
{
attack = false;
}
if(kkk == 1)
{
str = true;
}
if(kkk == 0)
{
str = false;
}
if(nnn == 1)
{
sleep = true;
}
if(nnn == 0)
{
sleep = false;
}
if(ooo == 1)
{
usingdmed = true;
}
if(ooo == 0)
{
usingdmed = false;
}
System.out.println("[===============================================================]");
System.out.println("[Rena] Started Blue Dragon Killer Pro by Renafox");
System.out.println("[---------------------------------------------------------------]");
System.out.println("[Rena] Fighting with fightmode: "+aaa+" !");
System.out.println("[--------------------- !~ Food options ~! ----------------------]");
System.out.println("[Rena] Eating food id: "+bbb+" !");
System.out.println("[Rena] Withdrawing "+ccc+" no of food from bank!");
System.out.println("[Rena] Eating food at hp level: "+ddd+" !");
System.out.println("[--------------- !~ Prayer potions Options ~! ------------------]");
if(!pray)
{
System.out.println("[Rena] We are NOT USING prayer !");
}
if(pray)
{
System.out.println("[Rena] We are USING prayer !");
}
System.out.println("[Rena] Withdrawing "+fff+" no of Pray Pots from bank !");
System.out.println("[Rena] Drink dose of Pray Pot at level: "+ggg+" !");
System.out.println("[--------------- !~ Attack potions Options ~! ------------------]");
if(!attack)
{
System.out.println("[Rena] We are NOT USING Super Attack potions !");
}
if(attack)
{
System.out.println("[Rena] We are USING Super Attack potions !");
}
System.out.println("[Rena] Withdrawing "+iii+" no of Super Atk Pot from bank!");
System.out.println("[Rena] Drink dose of Super Atk pot at level: "+jjj+" !");
System.out.println("[--------------- !~ Strength potions Options ~! ----------------]");
if(!str)
{
System.out.println("[Rena] We are NOT USING Super Strength potions !");
}
if(str)
{
System.out.println("[Rena] We are USING Super Strength potions !");
}
System.out.println("[Rena] Withdrawing "+lll+" no of Super Str Pot from bank!");
System.out.println("[Rena] Drink dose of Super Str Pot at level: "+mmm+" !");
System.out.println("[---------------------- !~ Sleeping? ~! ------------------------]");
if(!sleep)
{
System.out.println("[Rena] We ARE NOT Sleeping !");
}
if(sleep)
{
System.out.println("[Rena] We ARE Sleeping !");
}
if(!usingdmed)
{
minmed =0;
System.out.println("[Rena] We ARE NOT wearing dmed !");
}
if(usingdmed)
{
minmed =1;
System.out.println("[Rena] We ARE wearing dmed !");
}
System.out.println("[Rena] Your actual prayer level is : "+ppp+" !");
System.out.println("[===============================================================]");
bankingnow = true;
walkingaltarnow = false;
walkingdragonsnow = false;
fightingnow = false;
}
public int main()
{
if(getFightMode() != aaa)
setFightMode(aaa);
if(getFatigue() > 55)
{
useSleepingBag();
return 2000;
}
if(bankingnow && !walkingaltarnow && !walkingdragonsnow && !fightingnow)
{
if(isBanking())
{
// Deposit loot
if(getInventoryCount(465) > 0)
{
deposit(465, getInventoryCount(465));
return random(900,1000);
}
if(getInventoryCount(814) > 0)
{
dbones += getInventoryCount(814);
deposit(814, getInventoryCount(814));
return random(1000,900);
}
if(getInventoryCount(523) > 0)
{
dstone += getInventoryCount(523);
deposit(523, getInventoryCount(523));
return random(1000,900);
}
if(getInventoryCount(527) > 0)
{
halfloop += getInventoryCount(527);
deposit(527, getInventoryCount(527));
return random(1000,900);
}
if(getInventoryCount(526) > 0)
{
halftooth += getInventoryCount(526);
deposit(526, getInventoryCount(526));
return random(1000,900);
}
if(getInventoryCount(795) > minmed)
{
dmed += getInventoryCount(795)-minmed;
deposit(795, getInventoryCount(795)-minmed);
return random(1000,900);
}
// Take items needed
if(getInventoryCount(42) > 1) //lawrune
{
deposit(42,getInventoryCount(42)-1);
return random(1900, 2000);
}
else if(getInventoryCount(42) < 1)
{
withdraw(42,1);
return random(1900, 2000);
}
if(getInventoryCount(33) > 3) //airrune
{
deposit(33,getInventoryCount(33)-3);
return random(1900, 2000);
}
else if(getInventoryCount(33) < 3)
{
withdraw(33,3-getInventoryCount(33));
return random(1900, 2000);
}
if(getInventoryCount(32) > 1) //waterrune
{
deposit(32,getInventoryCount(32)-1);
return random(1900, 2000);
}
else if(getInventoryCount(32) < 1)
{
withdraw(32,1);
return random(1900, 2000);
}
if(getInventoryCount(bbb) > ccc) //Food
{
deposit(bbb,getInventoryCount(bbb)-ccc);
return random(1900, 2000);
}
else if(getInventoryCount(bbb) < ccc)
{
withdraw(bbb,ccc);
return random(1900, 2000);
}
if(pray)
{
if(getInventoryCount(485) > 0) //Prayer pots
{
deposit(485,getInventoryCount(485));
return random(1900, 2000);
}
if(getInventoryCount(484) > 0) //Prayer pots
{
deposit(484,getInventoryCount(484));
return random(1900, 2000);
}
if(getInventoryCount(483) > fff)
{
deposit(483,getInventoryCount(483)-fff);
return random(2200, 3000);
}
else if(getInventoryCount(483) < fff)
{
withdraw(483,fff);
return random(2200, 2500);
}
}
if(attack)
{
if(getInventoryCount(488) > 0) //Super attack pots
{
deposit(488,getInventoryCount(488));
return random(1900, 2000);
}
if(getInventoryCount(487) > 0)
{
deposit(487,getInventoryCount(487));
return random(1900, 2000);
}
if(getInventoryCount(486) > iii)
{
deposit(486,getInventoryCount(486)-iii);
return random(2200, 2500);
}
else if(getInventoryCount(486) < iii)
{
withdraw(486,iii);
return random(2200, 2500);
}
}
if(str)
{
if(getInventoryCount(493) > 0) //Super str pots
{
deposit(493,getInventoryCount(493));
return random(1900, 2000);
}
if(getInventoryCount(494) > 0)
{
deposit(494,getInventoryCount(494));
return random(1900, 2000);
}
if(getInventoryCount(492) > lll)
{
deposit(492,getInventoryCount(492)-lll);
return random(2000, 2500);
}
else if(getInventoryCount(492) < lll)
{
withdraw(492,lll);
return random(2000, 2500);
}
}
bankingnow = false;
walkingaltarnow = true;
walkingdragonsnow = false;
fightingnow = false;
trips++;
if(getInventoryCount(bbb) > 0)
{
nooffood += getInventoryCount(bbb);
}
if(getInventoryCount(483) > 0)
{
noofpray += getInventoryCount(483);
}
if(getInventoryCount(486) > 0)
{
noofsap += getInventoryCount(486);
}
if(getInventoryCount(492) > 0)
{
noofssp += getInventoryCount(492);
}
closeBank();
System.out.println("=============== ~Status Reporting~ =================");
System.out.println("Did "+trips+" trips so far!");
System.out.println("----------------------------------------------------");
System.out.println("==================== ~Loots~ ======================");
System.out.println("Obtained "+dbones+" dragon bones so far!");
System.out.println("Obtained "+dstone+" dragonstones so far!");
System.out.println("Obtained "+halfloop+" half loop keys so far!");
System.out.println("Obtained "+halftooth+" half tooth keys so far!");
System.out.println("Obtained "+dmed+" dragon medium helmets so far!");
System.out.println("----------------------------------------------------");
System.out.println("===================== ~ROCKS~ ======================");
System.out.println("Used "+nooffood+" of Food so far!");
System.out.println("Used "+noofpray+" of Prayer Potions so far!");
System.out.println("Used "+noofsap+" of Super Attack Potions so far!");
System.out.println("Used "+noofssp+" of Super Strength Potions so far!");
System.out.println("----------------------------------------------------");
System.out.println("====================================================");
System.out.println(" ");
System.out.println("[Rena] Switching to Walking to Altar ... !");
return random(2000,2500);
}
// menu open
if(isQuestMenu())
{
answer(0);
return random(8000, 10000);
}
if(distanceTo(329,552) < 5) {
int banker[] = getNpcByIdNotTalk(95);
if(banker[0] != -1)
talkToNpc(banker[0]);
return 6000;
}
if(getY()<549)
{
walkTo(315,548);
return random(500, 800);
}
if(getY()>=548 && getX()<328)
{
walkTo(329,552);
return random(700, 800);
}
walkTo(329,552);
return 2000;
}
// Walking to Altar
if(!bankingnow && walkingaltarnow && !walkingdragonsnow && !fightingnow)
{
if(isAtApproxCoords(334,554,5))
{
walkTo(328,552);
return random(1500, 1750);
}
if(getX() == 328 && getY() == 552)
{
walkTo(326,552);
return random(2000,3000);
}
if(getY()>538&&getY()<=558)
{
walkTo(316,538);
return random(1500,2500);
}
if(getY()>520&&getY()<=538)
{
walkTo(315,520);
return random(2000,2500);
}
if(getY()>505&&getY()<=520&&getX()<=341)
{
walkTo(330,505);
return random(2000,2500);
}
if(getY()>487&&getY()<=505&&getX()<341)
{
walkTo(341,487);
return random(2000,2500);
}
if(getX() == 341 && getY() == 487)
{
int[] gate = getObjectById(137);
if(gate[0]!=-1){
atObject(gate[1],gate[2]);
return random(3500,4000);
}
}
if(getY()>474&&getY()<=488&&getX()>=342)
{
walkTo(354,474);
return random(2000,2500);
}
if(getY()>464&&getY()<=474)
{
walkTo(362,464);
return random(2000,2500);
}
if(isAtApproxCoords(362,464, 2))
{
if(getCurrentLevel(5) < ppp )
{
int[] altar = getObjectById(235); //recharge pray
if(altar[0] != -1)
{
atObject(altar[1], altar[2]);
return random(2500, 3500);
}
return 1500;
}
if(getCurrentLevel(5) == ppp)
{
System.out.println("[Rena] Prayer Recharged!");
bankingnow = false;
walkingaltarnow = false;
walkingdragonsnow = true;
fightingnow = false;
System.out.println("[Rena] Switching to Walking to Dragons ... !");
return 1000;
}
}
}
if(!bankingnow && !walkingaltarnow && walkingdragonsnow && !fightingnow)
{
// On surface
if(getY()<1500)
{
System.out.println("[Rena] On surface!");
System.out.println(" ");
if(getY()>=464&&getY()<478)
{
walkTo(365,478);
return random(1500,2500);
}
if(getY()>=478&&getY()<499)
{
walkTo(365,499);
return random(1500,2500);
}
if(getY()>=499&&getY()<521)
{
walkTo(372,521);
return random(1500,2500);
}
if(isAtApproxCoords(376,520,4))
{
int[] ladder = getObjectById(6); //ladder
if(ladder[0] != -1)
{
atObject(ladder[1], ladder[2]);
return random(1400, 1500);
}
return 1000;
}
}
// In dungeon
if(getY()>1499)
{
System.out.println("[Rena] In dungeon!");
System.out.println(" ");
//Detect if falador
if(isAtApproxCoords(312,552,2))
{
bankingnow = true;
walkingaltarnow = false;
walkingdragonsnow = false;
fightingnow=false;
System.out.println("[Rena] Switching to banking ... !");
}
//Eat food
if(getCurrentLevel(3) <= ddd )
{
if(getInventoryCount(bbb) == 0) // Ends trip if no food or see below
{
System.out.println("[Rena] Out of food and injured !");
System.out.println("[Rena] Banking for supplies !");
castOnSelf(18);
return 750;
}
if(getInventoryCount(bbb) > 0) // Eat food if have
{
if(inCombat())
{
walkTo(getX(), getY());
}
useItem(getInventoryIndex(bbb));
System.out.println("[Rena] HP below: "+bbb+" , eating food !");
return random(1900, 2200);
}
}
//Damn, remember to index 1 more layer down at the end of script
//If healthly, proceed
if(getCurrentLevel(3) > ddd )
{
if(inCombat())
{
walkTo(getX(), getY());
}
//At start of dung
if(isAtApproxCoords(376,3355,2))
{
step = 0;
path = new int[] {376,3338,376,3324,361,3320,348,3322,349,3337,343,3351,330,3363,330,3373,338,3371,341,3363,342,3369,343,3377,350,3375,348,3363,354,3353};
System.out.println("[Rena] Beginning long walk .. !");
}
if(isAtApproxCoords(356,3353,1))
{
bankingnow = false;
walkingaltarnow = false;
walkingdragonsnow = false;
fightingnow = true;
System.out.println("[Rena] Switch To fighting dragons.. !");
}
if(getX()== 354 && getY()== 3353 )
{
int[] door = getWallObjectById(84); //Open door
if(door[0] != -1)
{
useItemOnWall(596,door[1],door[2]);
return random(1500, 1600);
}
System.out.println("[Rena] Opening the door ... !");
}
}
}
}
if(!bankingnow && !walkingaltarnow && !walkingdragonsnow && fightingnow)
{
if(isAtApproxCoords(312,552,2))
{
bankingnow = true;
walkingaltarnow = false;
walkingdragonsnow = false;
fightingnow = false;
System.out.println("[Rena] Switching to banking...");
}
if(getCurrentLevel(3) <= ddd )
{
//The running
if(getHpPercent() < 30 )
{
System.out.println("[Rena] HP at Dangerous Levels Somehow... Escaping!");
System.out.println("[Rena] Time to go Home! (Fally)");
System.out.println(" ");
castOnSelf(18);
bankingnow = true;
walkingaltarnow = false;
walkingdragonsnow = false;
fightingnow = false;
step = 0;
loop = 0;
path = null;
return 2000;
}
if(getInventoryCount(bbb) == 0) // ends trip if no food or see below
{
System.out.println("[Rena] All out of food (ID: "+bbb+")!");
System.out.println("[Rena] Time to go Home! (Fally)");
System.out.println(" ");
castOnSelf(18);
bankingnow = true;
walkingaltarnow = false;
walkingdragonsnow = false;
fightingnow = false;
step = 0;
loop = 0;
path = null;
return 2000;
}
//Eating
if(getInventoryCount(bbb) > 0) {
if(inCombat()) {
walkTo(getX(), getY());
}
useItem(getInventoryIndex(bbb));
System.out.println("[Rena] HP below "+ddd+" , eating food (ID: "+bbb+")!");
System.out.println(" ");
return random(2600, 2800);
}
}
// Drink Super Attack
if(attack && getInventoryCount(486) > 0 || getInventoryCount(487) > 0 || getInventoryCount(488) > 0&& getCurrentLevel(0) <= jjj )
{
if(inCombat())
{
walkTo(getX(), getY());
}
if(getInventoryCount(488) >0)
{
useItem(getInventoryIndex(488));
System.out.println("[Rena] Attack Level at/below "+jjj+" , drinking SAP!");
System.out.println(" ");
return random(3400, 3800);
}
if(getInventoryCount(487) >0)
{
useItem(getInventoryIndex(487));
System.out.println("[Rena] Attack Level at/below "+jjj+" , drinking SAP!");
System.out.println(" ");
return random(3400, 3800);
}
if(getInventoryCount(486) >0)
{
useItem(getInventoryIndex(486));
System.out.println("[Rena] Attack Level at/below "+jjj+" , drinking SAP!");
System.out.println(" ");
return random(3400, 3800);
}
return random(2600, 2800);
}
// Drink Super Str
if(str && getInventoryCount(494) > 0 || getInventoryCount(493) > 0 || getInventoryCount(492) > 0 && getCurrentLevel(2) <= mmm )
{
if(inCombat())
{
walkTo(getX(), getY());
}
if(getInventoryCount(494) >0)
{
useItem(getInventoryIndex(494));
System.out.println("[Rena] Str Level at/below "+mmm+" , drinking SSP!");
System.out.println(" ");
return random(3400, 3800);
}
if(getInventoryCount(493) >0)
{
useItem(getInventoryIndex(493));
System.out.println("[Rena] Str Level at/below "+mmm+" , drinking SSP!");
System.out.println(" ");
return random(3400, 3800);
}
if(getInventoryCount(492) >0)
{
useItem(getInventoryIndex(492));
System.out.println("[Rena] Str Level at/below "+mmm+" , drinking SSP!");
System.out.println(" ");
return random(3400, 3800);
}
return random(2600, 2800);
}
if(getInventoryCount(465) > 0) // Drop vials (empty)
{
if(inCombat())
{
walkTo(getX(), getY());
}
dropItem(getInventoryIndex(465));
System.out.println("[Rena] Dropping those empty vials!");
System.out.println(" ");
return random(1900, 2200);
}
if(getInventoryCount() ==30)
{
if(getInventoryCount(bbb) > 0) // Eats food to make space for drops when you still have food
{
if(inCombat())
{
walkTo(getX(), getY());
}
useItem(getInventoryIndex(bbb));
System.out.println("[Rena] Inventory full and still packed with food...");
System.out.println("[Rena] Eating food to make space...");
System.out.println(" ");
return random(2600,2800);
}
if(getInventoryCount(bbb) == 0) // Full inventory but no food? Trip finished!
{
bankingnow = true;
walkingaltarnow = false;
walkingdragonsnow = false;
fightingnow = false;
System.out.println("[Rena] All out of food (ID: "+bbb+")!");
System.out.println("[Rena] Trip finished successfully with Max Efficiency!");
System.out.println("[Rena] Time to go Home! (Fally)");
System.out.println(" ");
castOnSelf(18);
return random(2600, 2800);
}
}
int[] aa = getItemById(814);
if(aa[0]!=-1)
{
if(inCombat())
{
walkTo(getX(), getY());
}
walkTo(aa[1], aa[2]);
pickupItem(814, aa[1], aa[2]);
System.out.println("[Rena] Picking up dragon bones at "+aa[1]+","+aa[2]+" ...");
System.out.println(" ");
return random(1200,1300);
}
if(getInventoryCount(814) > 0) {
useItem(getInventoryIndex(814));
return 1000;
}
int[] bb = getItemById(795);
if(bb[0]!=-1)
{
if(inCombat())
{
walkTo(getX(), getY());
}
walkTo(bb[1], bb[2]);
pickupItem(795, bb[1], bb[2]);
System.out.println("[Rena] Picking up dragon medium helmet at "+bb[1]+","+bb[2]+" ...");
System.out.println(" ");
return random(1200,1300);
}
int[] cc = getItemById(523);
if(cc[0]!=-1)
{
if(inCombat())
{
walkTo(getX(), getY());
}
walkTo(cc[1], cc[2]);
pickupItem(523, cc[1], cc[2]);
System.out.println("[Rena] Picking up Dragonstone at "+cc[1]+","+cc[2]+" ...");
System.out.println(" ");
return random(1200,1300);
}
int[] dd = getItemById(526);
if(dd[0]!=-1)
{
if(inCombat())
{
walkTo(getX(), getY());
}
walkTo(dd[1], dd[2]);
pickupItem(526, dd[1], dd[2]);
System.out.println("[Rena] Picking up half key tooth at "+dd[1]+","+dd[2]+" ...");
System.out.println(" ");
return random(1200,1300);
}
int[] ee = getItemById(527);
if(ee[0]!=-1)
{
if(inCombat())
{
walkTo(getX(), getY());
}
walkTo(ee[1], ee[2]);
pickupItem(527, ee[1], ee[2]);
System.out.println("[Rena] Picking up half key loop at "+ee[1]+","+ee[2]+" ...");
System.out.println(" ");
return random(1200,1300);
}
if(getFatigue() > 60 && sleep)
{
if(inCombat())
{
walkTo(getX(), getY());
}
useSleepingBag();
System.out.println("[Rena] Fatigue %: 60 reached! Sleeping... ");
System.out.println(" ");
return 2000;
}
// Dragon Fighting
int[] npc;
npc = getNpcInRadius(202,364,3349,10);
if(npc[0] != -1 && !inCombat())
{
attackNpc(npc[0]);
System.out.println("[Rena] Blue Dragon spotted in Zone ... Attacking ... ");
System.out.println(" ");
return random(1000, 1200);
}
else if(npc[0] == -1 && !inCombat())
{
walkTo(370,3354);
System.out.println("[Rena] Dont see any Blue dragons around here :/");
System.out.println("[Rena] Walking back to Blue dragons spawn point !");
System.out.println(" ");
return random(1900, 2100);
}
if(!isAtApproxCoords(364,3349,10) && !inCombat())
{
walkTo(370,3354);
System.out.println("[Rena] Went outside Blue Dragons Zone ... Walking back!");
System.out.println(" ");
return random(1900, 2100);
}
return random(1900, 2200);
}
// general walk
if((step + 1) < path.length) {
if(isAtApproxCoords(path[step], path[step + 1], 0))
step = step + 2;
walkTo(path[step] , path[step + 1] );
System.out.println("[Rena] Running . . . ! ");
return random(850, 1200);
}
loop++;
if(loop > 10)
{
step = 0;
loop = 0;
}
return random(800, 1000);
}
}