|
Registered User
Last Online: Today 10:36 AM
Join Date: Jul 2009
Posts: 137
Rep Power: 1 Rep Points: 12
Points: 1,160.10
Bank: 9,384.59
Total Points: 10,544.69
|
BTekksCrabs V.24
This is just an advertisement for the BTekksCrabs V.24.
Requirements:
TortoiseSVN
WinRAR
Good knowledge
BTekksCrabs v2.4
This script is based on TekksCrabs script(a script made by Tekk). I asked and i had the premission to use his script for further updating.
So what did i have changed ?
- Fixed bug when crabs aren't aggressive
- Fixed NW corner bug
- Made it more random
- Added antiban
- Added pickup charms feature
- Added faster attack method
- Made it more failsafe
- Added xp/hour and status to paint
Features
- Food eating
- Banking
- Pickup charms
- Pickup seawead
- Arrow pickup
- Own build-in Antiban
- Own build-in Breakhandler
- Runs south and back north when needed
- Works flawless for me
- Power training (wont pickup items or look if theire are items and faster att method)
Change Log - Current Version is 2.4
- 2.4 fixed full inventory bug
- 2.3 made attack methods even faster
- 2.2 After some updates my fast att methods begin to become slow so have improved them again
- 2.1 Fixed some grammar and little login bug when not using randoms
- 2.0 Added Banking
- 1.6 Added random eating option (watch youre bot the first couple minutes I didnt test it but normally it shoud work)
- 1.52 Fixed bug of multiple crabs
- 1.51 Fixed breaktime bug
- 1.5 Added Breakhandler it works now !!!
- 1.41 Disabled breakhandler button until it works
- 1.4 Made some methods better and tried to add breakhandler but doenst work because of the LoginBot
- 1.32 Fixed Eating bug
- 1.31 Changed Antiban abit
- 1.3 Updated Antiban + (normaly)All Food support(let me know if you have a food thats not working)
- 1.2 Added Seaweed pickup feature and redone paint
- 1.1 Added powertraining
- 1.0 Release
Where to start script!

Currently working on:
- Looking in for spec
If you find some bug tell me and i will try to fix them
- If you want extra features tell me and i will take a look to it
Script:
Code:
/** BTekksCrabs.java 2.4
* Kills the eastern rock crabs.
* Have fun and report bugs to me as this is my first script.
*/
- import java.awt.*;
import java.util.*;
import org.rsbot.script.*;
import org.rsbot.bot.*;
import org.rsbot.script.wrappers.*;
import org.rsbot.event.listeners.*;
import org.rsbot.script.ScriptManifest;
- @ScriptManifest (authors = { "Tekk & B-Warrior" },
category = "Combat",
name = "BTekksCrabs",
version = 2.4,
description = "<i><b>BTekksCrabs v2.4</b> By Tekk & B-Warrior</i><br /><b>Start at the eastern crabs. </b>")
- public class BTekksCrabs extends Script implements PaintListener {
RSTile[] northToSouth = new RSTile[] { new RSTile(2707, 3717), new RSTile(2708, 3708), new RSTile(2706, 3697), new RSTile(2705, 3690), new RSTile(2706, 3685) };
RSTile[] southToNorth = reversePath(northToSouth);
RSTile[] westTocenter = new RSTile[] {new RSTile(2703,3718), new RSTile(2701, 3723), new RSTile(2702, 3721), new RSTile(2708, 3719), new RSTile(2701, 3729), new RSTile(2707, 3725), new RSTile(2703, 3721) };
RSTile[] TeleSpotToBank = new RSTile[] {new RSTile(2749,3477), new RSTile(2739,3481), new RSTile(2728,3485), new RSTile(2726,3491)};
RSTile[] BankToCrabs = new RSTile[] {new RSTile(2727,3484), new RSTile(2727,3484), new RSTile(2735,3492), new RSTile(2741,3502), new RSTile(2741,3511), new RSTile(2741,3525) , new RSTile(2738,3537) , new RSTile(2728,3543), new RSTile(2720,3544), new RSTile(2711,3544) , new RSTile(2702,3543), new RSTile(2694,3545) , new RSTile(2685,3546), new RSTile(2674,3551), new RSTile(2668,3558) , new RSTile(2660,3562) , new RSTile(2657,3572), new RSTile(2654,3581) , new RSTile(2654,3589), new RSTile(2654,3602), new RSTile(2663,3615), new RSTile(2667,3624), new RSTile(2681,3629), new RSTile(2685,3630), new RSTile(2692,3631), new RSTile(2704,3636), new RSTile(2707,3655), new RSTile(2706,3662), new RSTile(2705,3673), new RSTile(2706,3679)};
int expStart;
int hitpointsExpStart;
int statBeingTrained;
int status;
int test;
private RSNPC killingID = null;
public long starttime = System.currentTimeMillis();
public long millis;
public long seconds;
public long minutes;
public long hours;
public long Bseconds;
public long Bminutes;
public long Bhours;
private long GainedExp;
private long nextBreakTime;
private long BreakBtw;
private int BreakBtwMin;
private int BreakBtwMax;
private long BreakDur;
private int BreakDurMin;
private int BreakDurMax;
private long BreakInMili;
private long BreakIsbussy;
private long randMin;
private int randomWTC ;
private int bankFoodID;
private int bankTab;
private int bankCurrentTab;
private gui gui;
private int minEnergy;
private int maxEnergy;
public boolean startScript = false;
public boolean useantiban = false;
public boolean eating = false;
public boolean pickingupcharms = false;
public boolean powertraining = false;
public boolean pickingupseaweed = false;
public boolean takingbreaks = false;
public boolean isTakingBreak = false;
public boolean optBanking = false;
public boolean isBanking = false;
public boolean isUsingRandomHP = false;
public boolean wannaStore = false;
public boolean allTabs = false;
public boolean useAllFood = false;
public boolean useOwnEnergy = false;
public boolean justHaveBeenFighting = false;
private int[] pickupID;
private int pickupArrowID;
private String pickupName;
private String pickupArrowName;
private String crabhp;
public final int[] charms = { 12158, 12159, 12160, 12163 };
public final int[] BankNPCsID = {495,494};
public final int seaweed = 402;
public final int cammytab = 8010;
public final int BankBoothID = 25808;
public static final int[] foodID = { 1161, 1965, 1969, 1967, 1895, 1893,
1891, 1971, 4293, 2142, 4291, 2140, 3228, 9980, 7223, 6297, 6293,
6295, 6299, 7521, 9988, 7228, 2878, 7568, 2343, 1861, 13433, 315,
325, 319, 3144, 347, 355, 333, 339, 351, 329, 3381, 361, 10136,
5003, 379, 365, 373, 7946, 385, 397, 391, 3369, 3371, 3373, 2309,
2325, 2333, 2327, 2331, 2323, 2335, 7178, 7180, 7188, 7190, 7198,
7200, 7208, 7210, 7218, 7220, 2003, 2011, 2289, 2291, 2293, 2295,
2297, 2299, 2301, 2303, 1891, 1893, 1895, 1897, 1899, 1901, 7072,
7062, 7078, 7064, 7084, 7082, 7066, 7068, 1942, 6701, 6703, 7054,
6705, 7056, 7060, 2130, 1985, 1993, 1989, 1978, 5763, 5765, 1913,
5747, 1905, 5739, 1909, 5743, 1907, 1911, 5745, 2955, 5749, 5751,
5753, 5755, 5757, 5759, 5761, 2084, 2034, 2048, 2036, 2217, 2213,
2205, 2209, 2054, 2040, 2080, 2277, 2225, 2255, 2221, 2253, 2219,
2281, 2227, 2223, 2191, 2233, 2092, 2032, 2074, 2030, 2281, 2235,
2064, 2028, 2187, 2185, 2229 };
private int eatAtHP = random(18,23);
private int eatAtRandomHP;
private int eatmin;
private int eatmax;
-
@SuppressWarnings("deprecation")
public boolean onStart(Map<String, String> args) {
// Bot.getEventManager().addListener(PaintListener.class, this);
gui = new gui();
gui.setVisible(true);
- while (!startScript) {
wait(10);
}
if(gui.chbCharms.isSelected()) {
pickingupcharms = true;
}
if(gui.chbOwnEnergy.isSelected()) {
useOwnEnergy = true;
}
if(gui.chbStore.isSelected()) {
wannaStore = true;
}
if(gui.chbAllTabs.isSelected()) {
allTabs = true;
}
if(gui.chbRandomEating.isSelected()) {
isUsingRandomHP = true;
}
if(gui.chbBank.isSelected()) {
optBanking = true;
}
if(gui.chbBreaks.isSelected()) {
takingbreaks = true;
}
if(gui.chbSeaweed.isSelected()) {
pickingupseaweed = true;
}
if(gui.chbPowerTraining.isSelected()) {
powertraining = true;
}
if(gui.chbAntiban.isSelected()) {
useantiban = true;
}
if(gui.chbEat.isSelected()){
eating = true;
}
if(!gui.tfEatMin.getText().equals("")) {
try {
eatmin = Integer.parseInt(gui.tfEatMin.getText());
} catch (NumberFormatException e) {
log("Nummers only");
stopAllScripts();
}
}
if(!gui.tfEatMax.getText().equals("")) {
try {
eatmax = Integer.parseInt(gui.tfEatMax.getText());
} catch (NumberFormatException e) {
log("Nummers only");
stopAllScripts();
}
}
if(!gui.tfBreakbtwMin.getText().equals("")) {
try {
BreakBtwMin = Integer.parseInt(gui.tfBreakbtwMin.getText());
} catch (NumberFormatException e) {
log("Nummers only");
stopAllScripts();
}
}
if(!gui.tfBreakforMin.getText().equals("")) {
try {
BreakDurMin = Integer.parseInt(gui.tfBreakforMin.getText());
} catch (NumberFormatException e) {
log("Nummers only");
stopAllScripts();
}
}
if(!gui.tfBreakforMax.getText().equals("")) {
try {
BreakDurMax = Integer.parseInt(gui.tfBreakforMin.getText());
} catch (NumberFormatException e) {
log("Nummers only");
stopAllScripts();
}
}
if(!gui.tfBreakbtwMax.getText().equals("")) {
try {
BreakBtwMax = Integer.parseInt(gui.tfBreakbtwMax.getText());
} catch (NumberFormatException e) {
log("Nummers only");
stopAllScripts();
}
}
if(!gui.tfBreakbtwMax.getText().equals("")) {
try {
BreakBtwMax = Integer.parseInt(gui.tfBreakbtwMax.getText());
} catch (NumberFormatException e) {
log("Nummers only");
stopAllScripts();
}
}
if(!gui.tfArrowID.getText().equals("")) {
try {
pickupArrowID = Integer.parseInt(gui.tfArrowID.getText());
} catch (NumberFormatException e) {
log("Enter arrow pickup item as an ID, not name!");
stopAllScripts();
}
}
if(!gui.tfArrowName.getText().equals("")) {
pickupArrowName = gui.tfArrowName.getText();
}
if(!gui.tfEatAt.getText().equals("")) {
try {
eatAtHP = Integer.parseInt(gui.tfEatAt.getText());
} catch (NumberFormatException e) {
log("You entered the Eat At HP wrong.");
stopAllScripts();
}
}
if(optBanking){
if(!gui.tfBankingFoodID.getText().equals("")) {
try {
bankFoodID = Integer.parseInt(gui.tfBankingFoodID.getText());
} catch (NumberFormatException e) {
log("You entered the foodid wrong.");
stopAllScripts();
}
}else{
log("You need to fill in a FoodID if you are useing banking option");
stopAllScripts();
}
if(!gui.tfBankTab.getText().equals("")) {
try {
bankTab = Integer.parseInt(gui.tfBankTab.getText());
} catch (NumberFormatException e) {
log("You entered the Tab wrong.");
stopAllScripts();
}
}else{
log("You need to fill in a Tab if you are useing banking option");
stopAllScripts();
}
}
if(useOwnEnergy){
if(!gui.tfMaxEnergy.getText().equals("")) {
try {
maxEnergy = Integer.parseInt(gui.tfMaxEnergy.getText());
} catch (NumberFormatException e) {
log("You did the energy wrong wrong.");
stopAllScripts();
}
}else{
log("You need to fill in the energy if you are useing Own Energy option");
stopAllScripts();
}
if(!gui.tfMinEnergy.getText().equals("")) {
try {
minEnergy = Integer.parseInt(gui.tfMinEnergy.getText());
} catch (NumberFormatException e) {
log("You did the energy wrong wrong.");
stopAllScripts();
}
}else{
log("You need to fill in the energy if you are useing Own Energy option");
stopAllScripts();
}
}else{
minEnergy = 20;
maxEnergy = 25;
}
if (gui.rbRanged.isSelected()) {
statBeingTrained = Constants.STAT_RANGE;
} else if (gui.rbAttack.isSelected()) {
statBeingTrained = Constants.STAT_ATTACK;
} else if (gui.rbStrength.isSelected()) {
statBeingTrained = Constants.STAT_STRENGTH;
} else if (gui.rbDefence.isSelected()) {
statBeingTrained = Constants.STAT_DEFENSE;
}
while (!isLoggedIn()) {
wait(10);
}
random(6000,8000);
if(takingbreaks){
BreakBtw = random(BreakBtwMin,BreakBtwMax) ;
randMin = random(1000,60000);
BreakBtw = BreakBtw * 1000 * 60 ;
nextBreakTime = BreakBtw + randMin + System.currentTimeMillis() - starttime ;
- }
if(isUsingRandomHP){
eatAtRandomHP = random(eatmin,eatmax);
}else{
eatAtRandomHP = eatAtHP;
}
expStart = skills.getCurrentSkillExp(statBeingTrained);
hitpointsExpStart = skills.getCurrentSkillExp(Constants.STAT_HITPOINTS);
if(!isAutoRetaliationOn()) {
toggleAutoRetaliation();
}
return true;
}
public void onFinish(){
Bot.getEventManager().removeListener(PaintListener.class, this);
}
/*
##########################################################################
Loop
##########################################################################
*/
public int loop() {
randomWTC = random(0,6) ;
if(needToTakeABreak()){
gonnatakebreak();
}
if(isTakingBreak){
BreakIsbussy = nextBreakTime - (System.currentTimeMillis() - starttime);
while (BreakIsbussy > 0) {
BreakIsbussy = nextBreakTime - (System.currentTimeMillis() - starttime);
if(isLoggedIn()){
logout();
}
wait(random(500,700));
}
}
if(!isTakingBreak && isLoggedIn()){
if(isFightingCrab()) {
if(eating) {
eatFood();
}
if(useantiban) {
antiban() ;
}
justHaveBeenFighting = true;
return random(20,40);
}
if(walkingToCrab()) {
return random(500,700);
}
if(needToWalkSouth()) {
walkSouth();
return random(200,400);
}
if(needToWalkNorth()) {
walkNorth();
return random(200,400);
}
if (!powertraining) {
if(needToPickUpItems()) {
pickUpItems();
return random(50,70);
}
}
if(eating) {
eatFood();
}
if(isLoggedIn() && !inCrabArea() && !isBanking ) {
log("You are not in the Crab Area anymore");
stopAllScripts();
}
// we're not doing anything
findAndAttackCrabs();
}
return random(20,40);
}
- private int antiban() {
final int random = random(1, 700);
final Point rndPoint = new Point(random(580, 704), random(250,442));
final Point strPoint = new Point(random(565, 601), random(268,290));
final Point attPoint = new Point(random(564, 601), random(240,256));
final Point defPoint = new Point(random(564, 601), random(300,319));
final Point ranPoint = new Point(random(564, 601), random(334,351));
final Point cbPoint = new Point(random(564, 601), random(240,351));
final Point hpPoint = new Point(random(612, 654), random(236,253));
if (random == 1) {
setCameraRotation(random(1, 60));
}
if (random == 233) {
setCameraRotation(random(1, 400));
}
if (random == 23) {
setCameraAltitude(true);
}
if (random == 230) {
setCameraAltitude(true);
}
if (random == 320) {
setCameraAltitude(true);
}
if (random == 200) {
setCameraAltitude(true);
}
if (random == 140){
Point randomMouse = null;
final int rndMovement = random(1, 5);
for (int a = 0; a < rndMovement; a++) {
randomMouse = new Point(random(15, 730), random(15, 465));
moveMouse(randomMouse);
wait(random(50, 800));
}
return random(130, 810);
}
if(random == 456){
int currentAngle = getCameraAngle();
Bot.getClient().getCamPosZ();
switch (random(0, 1)) {
case 0:
setCameraRotation(currentAngle + random(0, 230));
return random(434, 578);
case 1:
setCameraRotation(currentAngle - random(0, 230));
return random(434, 678);
}
}
if(random == 360){
int currentAngle = getCameraAngle();
Bot.getClient().getCamPosZ();
switch (random(0, 1)) {
case 0:
setCameraRotation(currentAngle + random(0, 630));
setCameraAltitude(random(20, 80));
return random(434, 678);
case 1:
setCameraRotation(currentAngle - random(0, 630));
setCameraAltitude(random(20, 80));
return random(434, 678);
}
}
if (random == 388) {
final int skillrandom = random(1,5);
if (skillrandom == 1 && gui.rbRanged.isSelected() ){
if (getCurrentTab() != Constants.TAB_STATS) {
openTab(Constants.TAB_STATS);
wait(random(310, 610));
}
moveMouse(ranPoint);
wait(random(1500, 4100));
return random(400, 2300);
}
if (skillrandom == 2 && gui.rbAttack.isSelected()){
if (getCurrentTab() != Constants.TAB_STATS) {
openTab(Constants.TAB_STATS);
wait(random(310, 610));
}
moveMouse(attPoint);
wait(random(1500, 4100));
return random(400, 2300);
}
if (skillrandom ==3 && gui.rbDefence.isSelected()){
if (getCurrentTab() != Constants.TAB_STATS) {
openTab(Constants.TAB_STATS);
wait(random(310, 610));
}
moveMouse(defPoint);
wait(random(1500, 4100));
return random(400, 2300);
}
if (skillrandom == 4 && gui.rbStrength.isSelected()){
if (getCurrentTab() != Constants.TAB_STATS) {
openTab(Constants.TAB_STATS);
wait(random(310, 610));
}
moveMouse(strPoint);
wait(random(1500, 4100));
return random(400, 2300);
}
if (skillrandom == 5){
final int rndskill = random (0,5);
if (rndskill == 2) {
final int rndskill2 = random(0,10);
if(rndskill2 == 5){
if (getCurrentTab() != Constants.TAB_STATS) {
openTab(Constants.TAB_STATS);
wait(random(310, 610));
}
moveMouse(rndPoint);
wait(random(1500, 4100));
return random(400, 2300);
}
}
if (rndskill == 5) {
if (getCurrentTab() != Constants.TAB_STATS) {
openTab(Constants.TAB_STATS);
wait(random(310, 610));
}
moveMouse(cbPoint);
wait(random(1500, 4100));
return random(400, 2300);
}
if (rndskill == 3) {
if (getCurrentTab() != Constants.TAB_STATS) {
openTab(Constants.TAB_STATS);
wait(random(310, 610));
}
moveMouse(hpPoint);
wait(random(1500, 4100));
return random(400, 2300);
}
}
- }
- return -1;
}
-
private boolean needToTakeABreak(){
if(takingbreaks){
if((System.currentTimeMillis() - starttime) > nextBreakTime){
return true;
}
return false;
}
return false;
}
private boolean needToPickUpItems() {
RSItemTile arrowToPickUp = getGroundItemByID(3, pickupArrowID);
if(getMyPlayer().getLocation().getY() >= 3710) {
if(arrowToPickUp != null && !isInventoryFull()) {
status = 3;
return true;
}
}
if(pickingupcharms) {
RSItemTile charmToPickUp = getGroundItemByID(3, charms);
if(getMyPlayer().getLocation().getY() >= 3710) {
if(charmToPickUp != null && !isInventoryFull()) {
status = 3;
return true;
}
}
}
if(pickingupseaweed) {
RSItemTile seaweedToPickUp = getGroundItemByID(3, seaweed);
if(getMyPlayer().getLocation().getY() >= 3710) {
if(seaweedToPickUp != null && !isInventoryFull()) {
status = 3;
return true;
}
}
}
return false;
}
public boolean isAutoRetaliationOn() {
if (getSetting(172) == 0) {
return true;
} else {
return false;
}
}
private boolean justwokeacrab(){
if(getMyPlayer().isMoving() && getNearestNPCByID(1265, 1267) != null && distanceTo(getNearestNPCByID(1265, 1267)) <= 2){
wait(random(600,900));
if(getNearestNPCByID(1265, 1267) != null && distanceTo(getNearestNPCByID(1265, 1267)) <= 2){
return true;
}
return false;
}
return false;
}
- public void openBankScreen(){
status = 7;
RSObject bankBooth = getNearestObjectByID(BankBoothID);
RSTile BankBoothTile = bankBooth.getLocation();
if(tileOnScreen(BankBoothTile)){
if(!bank.isOpen()){
atObject(bankBooth, "uickly");
wait(random(1500, 2000));
}
if(!bank.isOpen()){
openBankScreen();
}
}else{
walkTileMM(BankBoothTile,2,2);
while (getMyPlayer().isMoving()){
wait(10);
}
openBankScreen();
}
}
public void withdrawnFood() {
if(!inventoryContains(cammytab) && allTabs){
log("stopping script just used last tab");
stopAllScripts();
}
if(!bank.isOpen()){
openBankScreen();
}
RSInterfaceComponent bankFood = bank.getItemByID(bankFoodID);
RSInterfaceComponent bankCammyID = bank.getItemByID(cammytab);
if(bankFood == null){
log("out of food stopping script");
stopAllScripts();
}
if(bankCammyID == null && !allTabs){
log("out of tabs stopping script");
stopAllScripts();
}
bank.setWithdrawModeToItem();
bankCurrentTab = bank.getCurrentTab() + 2;
if(wannaStore){
if(allTabs){
bank.depositAllExcept(cammytab);
if(bankCurrentTab != bankTab){
bank.openTab(bankTab);
}
bank.atItem(bankFoodID , "Withdraw-All");
bank.close();
}else{
bank.depositAll();
if(bankCurrentTab != bankTab){
bank.openTab(bankTab);
}
bank.atItem(cammytab , "Withdraw-1");
bank.atItem(bankFoodID , "Withdraw-All");
bank.close();
}
}else{
if(allTabs){
bank.depositAllExcept(12158, 12159, 12160, 12163,cammytab,seaweed);
if(bankCurrentTab != bankTab){
bank.openTab(bankTab);
}
bank.atItem(bankFoodID , "Withdraw-All");
bank.close();
}else{
bank.depositAllExcept(12158, 12159, 12160, 12163,seaweed);
if(bankCurrentTab != bankTab){
bank.openTab(bankTab);
}
bank.atItem(cammytab , "Withdraw-1");
bank.atItem(bankFoodID , "Withdraw-All");
bank.close();
}
}
}
- public void toggleAutoRetaliation() {
if (getCurrentTab() != Constants.TAB_ATTACK) {
openTab(TAB_ATTACK);
}
clickMouse(random(579, 706), random(363, 395), true);
wait(random(600, 800));
return;
}
private boolean inCrabArea() {
if(getMyPlayer().getLocation().getY() >= 3645 && getMyPlayer().getLocation().getY() <= 3736 && getMyPlayer().getLocation().getX() >= 2690 && getMyPlayer().getLocation().getX() <= 2735 ) {
return true;
}else{
return false ;
}
}
private boolean inCamelot() {
if(getMyPlayer().getLocation().getY() >= 3474 && getMyPlayer().getLocation().getY() <= 3481 && getMyPlayer().getLocation().getX() >= 2755 && getMyPlayer().getLocation().getX() <= 2760 ) {
return true;
}else{
return false ;
}
}
private void gonnatakebreak(){
if(!isTakingBreak){
while (getMyPlayer().isInCombat() || justwokeacrab() ) {
wait(10);
}
wait(random(10000,12000));
if(!isFightingCrab()){
logout();
log("Taking Break");
BreakDur = random(BreakDurMin,BreakDurMax) ;
randMin = random(1000,60000);
BreakDur = BreakDur * 1000 * 60 ;
nextBreakTime = BreakDur + randMin + System.currentTimeMillis() - starttime ;
- isTakingBreak = true;
return;
}
if(isFightingCrab()){
walkSouth();
logout();
log("Taking Break");
BreakDur = random(BreakDurMin,BreakDurMax) ;
randMin = random(1000,60000);
BreakDur = BreakDur * 1000 * 60 ;
nextBreakTime = BreakDur + randMin + System.currentTimeMillis() - starttime ;
isTakingBreak = true;
return;
}
}else{
login() ;
BreakBtw = random(BreakBtwMin,BreakBtwMax) ;
randMin = random(1000,60000);
BreakBtw = BreakBtw * 1000 * 60 ;
nextBreakTime = BreakBtw + randMin + System.currentTimeMillis() - starttime ;
isTakingBreak = false;
}
}
private void pickUpItems() {
status = 3;
RSItemTile arrowToPickUp = getGroundItemByID(3, pickupArrowID);
atTile(arrowToPickUp, pickupArrowName);
if(pickingupcharms) {
RSItemTile charmToPickUp = getGroundItemByID(3, charms);
atTile(charmToPickUp, "charm");
wait(random(500,800));
}
if(pickingupseaweed) {
RSItemTile seaweedToPickUp = getGroundItemByID(3, seaweed);
atTile(seaweedToPickUp, "Seaweed");
wait(random(500,800));
}
wait(random(200,400));
if(inventoryContains(pickupArrowID)) atInventoryItem(pickupArrowID, "Wield");
return;
}
- private boolean clickInventoryItem(int itemID, boolean click) { // Unknown
// author
if (getCurrentTab() != TAB_INVENTORY
&& !RSInterface.getInterface(INTERFACE_BANK).isValid()
&& !RSInterface.getInterface(INTERFACE_STORE).isValid()) {
openTab(TAB_INVENTORY);
}
int[] items = getInventoryArray();
int slot = -1;
for (int i = 0; i < items.length; i++) {
if (items[i] == itemID) {
slot = i;
break;
}
}
if (slot == -1) {
return false;
}
Point t = getInventoryItemPoint(slot);
clickMouse(t, 5, 5, click);
return true;
}
-
private void eatFood() {
int currentHP = skills.getCurrentSkillLevel(STAT_HITPOINTS);
if(currentHP <= eatAtRandomHP) {
if (getInventoryCount(foodID) >= 1) {
for (int i : foodID) {
if (getInventoryCount(i) == 0) {
continue;
}
clickInventoryItem(i, true);
}
if(isUsingRandomHP){
eatAtRandomHP = random(eatmin,eatmax);
}else{
eatAtRandomHP = eatAtHP;
}
return;
} else {
if(optBanking){
if(inventoryContains(cammytab)) atInventoryItem(cammytab, "");
while(!inCamelot()){
wait(10);
}
setCameraAltitude(true);
setCompass('N');
isBanking = true ;
moveMouseSlightly();
wait(random(500,800));
walkToBank();
openBankScreen();
withdrawnFood();
walkToCrabs();
isBanking = false ;
return;
}else{
log("No food and we are almost dead, stopping script.");
walkSouth();
stopAllScripts();
}
}
}
return;
}
-
public boolean clickItem(RSItem item){
if (getCurrentTab() != Constants.TAB_INVENTORY) {
openTab(Constants.TAB_INVENTORY);
}
return atInventoryItem(item.getID(), "");
}
-
private void walkNorth() {
status = 5;
RSTile[] randomSTNPath = randomizePath(southToNorth, 2, 2);
for(int i = 0; i<randomSTNPath.length; i++) {
while(distanceTo(randomSTNPath[i]) > 5){
walkTileMM(randomSTNPath[i]);
moveMouseSlightly();
wait(random(300,600));
}
}
return;
}
private void walkToBank() {
status = 6;
RSTile[] randomTTBPath = randomizePath(TeleSpotToBank, 1, 1);
if(getEnergy() > random(maxEnergy,maxEnergy) && isRunning() == false) {
setRun(true);
}
for(int i = 0; i<randomTTBPath.length; i++) {
walkTileMM(randomTTBPath[i]);
while(distanceTo(randomTTBPath[i]) > 3){
wait(random(300,600));
}
}
return;
}
private void walkToCrabs() {
status = 8;
RSTile[] randomBTCPath = randomizePath(BankToCrabs, 1, 1);
for(int i = 0; i<randomBTCPath.length; i++) {
if(getEnergy() > random(maxEnergy,maxEnergy) && isRunning() == false) {
setRun(true);
}
walkTileMM(randomBTCPath[i]);
while(distanceTo(randomBTCPath[i]) > 4){
if(!getMyPlayer().isMoving()){
walkTileMM(randomBTCPath[i]);
}
wait(random(300,600));
}
}
return;
}
- private boolean needToWalkNorth() {
if(getMyPlayer().getLocation().getY() < 3710) {
status = 5;
return true;
}
return false;
}
- private void walkSouth() {
status = 4 ;
RSTile[] randomNTSPath = randomizePath(northToSouth, 2, 2);
for(int i = 0; i<randomNTSPath.length; i++) {
while(distanceTo(randomNTSPath[i]) > 5){
walkTileMM(randomNTSPath[i]);
moveMouseSlightly();
wait(random(300,600));
}
}
return;
}
- private boolean needToWalkSouth() {
if(getNearestNPCByID(1266,1268) != null) {
if(distanceTo(getNearestNPCByID(1266, 1268)) < 2 ) {
wait(random(2000,3000));
if(!getMyPlayer().isInCombat()){
status = 4;
return true;
}
}
}
return false;
}
private void findAndAttackCrabs() {
status = 2 ;
RSNPC newCrab = getNearestFreeNPCByID(1266, 1268);
RSNPC newCrab2 = getNearestFreeNPCByID(1265, 1267);
RSTile[] randomWTCPath = randomizePath(westTocenter, 2, 2);
if(!justHaveBeenFighting){
if(getNearestNPCByID(1265, 1267) != null && distanceTo(getNearestNPCByID(1265, 1267)) <= 2 ) {
wait(random(1000, 1500));
- }
}
if(newCrab != null && newCrab.getLocation().getX() > 2691 && !isFightingCrab() && getMyPlayer().getAnimation() == -1 && !justwokeacrab()) {
RSTile crabLocation = newCrab.getLocation();
if(getEnergy() > random(20,25) && isRunning() == false) {
setRun(true);
}
walkTileMM(crabLocation);
moveMouseSlightly();
justHaveBeenFighting = false;
}
if(getMyPlayer().isInCombat() && getNearestNPCByID(1265, 1267) != null && distanceTo(getNearestNPCByID(1265, 1267)) <= 2){
wait(random(800, 1200));
}
if(newCrab != null && newCrab.getLocation().getX() < 2691 && !isFightingCrab() && getMyPlayer().getAnimation() == -1 && !justwokeacrab()) {
wait(random(2000, 3000));
if (!isFightingCrab()){
if(getEnergy() > random(20,25) && isRunning() == false) {
setRun(true);
}
walkTileMM(randomWTCPath[randomWTC]);
moveMouseSlightly();
justHaveBeenFighting = false;
}
}
return;
}
- private boolean walkingToCrab() {
if(getMyPlayer().isMoving()) {
status = 2 ;
return true;
}
return false;
}
- private boolean isFightingCrab() {
if(!powertraining) {
if(getMyPlayer().isInCombat() && getNearestNPCByID(1265, 1267) != null && distanceTo(getNearestNPCByID(1265, 1267)) <= 2 ) {
status = 1;
return true;
}
return false;
}
if(powertraining){
if (getMyPlayer().getInteracting() != null && getMyPlayer().getInteracting().getHPPercent() != 0) {
status = 1;
return true;
}
return false;
}
return false;
}
- public class gui extends javax.swing.JFrame {
- /** Creates new form guipublic class gui extends javax.swing.JFrame {
*/
public gui() {
initComponents();
}
- /** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
- jTabbedPane3 = new javax.swing.JTabbedPane();
buttonGroup1 = new javax.swing.ButtonGroup();
jTabbedPane1 = new javax.swing.JTabbedPane();
buttonGroup2 = new javax.swing.ButtonGroup();
jRadioButton1 = new javax.swing.JRadioButton();
jTabbedPane2 = new javax.swing.JTabbedPane();
jPanel1 = new javax.swing.JPanel();
rbAttack = new javax.swing.JRadioButton();
rbStrength = new javax.swing.JRadioButton();
rbDefence = new javax.swing.JRadioButton();
rbRanged = new javax.swing.JRadioButton();
jLabel1 = new javax.swing.JLabel();
chbCharms = new javax.swing.JCheckBox();
btStart = new javax.swing.JButton();
jLabel3 = new javax.swing.JLabel();
tfArrowID = new javax.swing.JTextField();
jLabel4 = new javax.swing.JLabel();
tfArrowName = new javax.swing.JTextField();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
tfEatAt = new javax.swing.JTextField();
chbPowerTraining = new javax.swing.JCheckBox();
chbSeaweed = new javax.swing.JCheckBox();
chbEat = new javax.swing.JCheckBox();
jPanel3 = new javax.swing.JPanel();
chbBreaks = new javax.swing.JCheckBox();
tfBreakbtwMin = new javax.swing.JTextField();
jLabel2 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
tfBreakbtwMax = new javax.swing.JTextField();
jLabel9 = new javax.swing.JLabel();
jLabel10 = new javax.swing.JLabel();
tfBreakforMin = new javax.swing.JTextField();
jLabel11 = new javax.swing.JLabel();
tfBreakforMax = new javax.swing.JTextField();
jLabel12 = new javax.swing.JLabel();
jLabel13 = new javax.swing.JLabel();
chbAntiban = new javax.swing.JCheckBox();
chbRandomEating = new javax.swing.JCheckBox();
tfEatMin = new javax.swing.JTextField();
jLabel14 = new javax.swing.JLabel();
jLabel15 = new javax.swing.JLabel();
tfEatMax = new javax.swing.JTextField();
jLabel16 = new javax.swing.JLabel();
jPanel4 = new javax.swing.JPanel();
chbBank = new javax.swing.JCheckBox();
chbStore = new javax.swing.JCheckBox();
chbAllTabs = new javax.swing.JCheckBox();
tfBankingFoodID = new javax.swing.JTextField();
jLabel17 = new javax.swing.JLabel();
jLabel18 = new javax.swing.JLabel();
tfBankTab = new javax.swing.JTextField();
chbOwnEnergy = new javax.swing.JCheckBox();
jLabel19 = new javax.swing.JLabel();
jLabel20 = new javax.swing.JLabel();
tfMinEnergy = new javax.swing.JTextField();
jLabel21 = new javax.swing.JLabel();
tfMaxEnergy = new javax.swing.JTextField();
jPanel2 = new javax.swing.JPanel();
jScrollPane1 = new javax.swing.JScrollPane();
jTextArea1 = new javax.swing.JTextArea();
- jRadioButton1.setText("jRadioButton1");
- setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("BTekksCrabs");
setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
- buttonGroup1.add(rbAttack);
rbAttack.setText("Attack");
- buttonGroup1.add(rbStrength);
rbStrength.setSelected(true);
rbStrength.setText("Strength");
- buttonGroup1.add(rbDefence);
rbDefence.setText("Defence");
rbDefence.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
rbDefenceActionPerformed(evt);
}
});
- buttonGroup1.add(rbRanged);
rbRanged.setText("Ranged");
- jLabel1.setText("Wich skill are your training ? ");
- chbCharms.setText("Want to pickup Charms ?");
- btStart.setText("Start");
btStart.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btStartActionPerformed(evt);
}
});
- jLabel3.setText("Arrow ID:");
- jLabel4.setText("Arrow name:");
- jLabel5.setForeground(new java.awt.Color(255, 0, 0));
jLabel5.setText("Warning! Arrow name is case sensitive");
- jLabel6.setForeground(new java.awt.Color(255, 0, 0));
jLabel6.setText("bronze arrow is not the same as Bronze arrow");
- jLabel7.setText("Eat at:");
- chbPowerTraining.setText("Power training? (only use this if you dont want pickup items)");
- chbSeaweed.setText("Want to pickup seaweed ?");
- chbEat.setText("Eat ?");
- javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel6)
.addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 216, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 82, Short.MAX_VALUE)
.addComponent(btStart, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(22, 22, 22)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(chbEat)
.addContainerGap())
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(chbSeaweed)
.addContainerGap())
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(chbCharms)
.addContainerGap())
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(chbPowerTraining)
.addContainerGap())
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel1)
.addComponent(rbAttack)
.addComponent(rbStrength)
.addComponent(rbDefence)
.addComponent(rbRanged))
.addGap(104, 104, 104)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel7)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(tfArrowName, javax.swing.GroupLayout.DEFAULT_SIZE, 99, Short.MAX_VALUE)
.addComponent(jLabel4)
.addComponent(tfArrowID, javax.swing.GroupLayout.DEFAULT_SIZE, 99, Short.MAX_VALUE)
.addComponent(jLabel3))
.addComponent(tfEatAt, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(46, Short.MAX_VALUE)))))))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel1)
.addComponent(jLabel3))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(rbAttack)
.addComponent(tfArrowID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(rbStrength, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel4))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(tfArrowName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(rbDefence))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel7)
.addComponent(rbRanged))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tfEatAt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(17, 17, 17)
.addComponent(chbEat)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(chbSeaweed)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(chbCharms)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(chbPowerTraining)
.addGap(53, 53, 53)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jLabel5)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel6))
.addComponent(btStart, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(16, 16, 16))
);
- jTabbedPane2.addTab("Settings", jPanel1);
- chbBreaks.setText("Do you wish to take breaks ?");
- tfBreakbtwMin.setText("70");
- jLabel2.setText("Take breaks between");
- jLabel8.setText("and");
- tfBreakbtwMax.setText("130");
- jLabel9.setText("minutes");
- jLabel10.setText("Take a break for");
- tfBreakforMin.setText("5");
- jLabel11.setText("-");
- tfBreakforMax.setText("15");
- jLabel12.setText("minutes");
- jLabel13.setFont(new java.awt.Font("Tahoma", 0, 18));
jLabel13.setForeground(new java.awt.Color(255, 0, 0));
jLabel13.setText("If using start logged in!");
- chbAntiban.setSelected(true);
chbAntiban.setText("Use own build-in Antiban ?");
- chbRandomEating.setText("Eat at random HP");
chbRandomEating.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
chbRandomEatingActionPerformed(evt);
}
});
- jLabel14.setText("Eat between");
- jLabel15.setText("and");
- jLabel16.setText("HP");
- javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(chbBreaks)
.addGroup(jPanel3Layout.createSequentialGroup()
.addGap(21, 21, 21)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel2)
.addComponent(jLabel10))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(tfBreakbtwMin, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(tfBreakforMin, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(jLabel8)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tfBreakbtwMax, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel9))
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(jLabel11)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tfBreakforMax, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel12))))))
.addGroup(jPanel3Layout.createSequentialGroup()
.addGap(89, 89, 89)
.addComponent(jLabel13))
.addGroup(jPanel3Layout.createSequentialGroup()
.addContainerGap()
.addComponent(chbAntiban))
.addGroup(jPanel3Layout.createSequentialGroup()
.addContainerGap()
.addComponent(chbRandomEating))
.addGroup(jPanel3Layout.createSequentialGroup()
.addGap(33, 33, 33)
.addComponent(jLabel14)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(tfEatMin, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel15)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tfEatMax, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel16)))
.addContainerGap(131, Short.MAX_VALUE))
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addGap(17, 17, 17)
.addComponent(chbBreaks)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel2)
.addComponent(tfBreakbtwMin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel8)
.addComponent(tfBreakbtwMax, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel9))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(tfBreakforMin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel11)
.addComponent(tfBreakforMax, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel12)
.addComponent(jLabel10))
.addGap(18, 18, 18)
.addComponent(jLabel13)
.addGap(18, 18, 18)
.addComponent(chbAntiban)
.addGap(18, 18, 18)
.addComponent(chbRandomEating)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel14)
.addComponent(tfEatMin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel15)
.addComponent(tfEatMax, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel16))
.addContainerGap(119, Short.MAX_VALUE))
);
- jTabbedPane2.addTab("AntiBans", jPanel3);
- chbBank.setText("Do you want to bank for food ?");
- chbStore.setText("Do you want to deposit all ?");
- chbAllTabs.setText("Have you got your tele tabs with you ?(Camelot Teletabs)");
- jLabel17.setText("Enter food ID (The one that is withdrawn from bank):");
- jLabel18.setText("In which slot can the script find your food at ?(First slot = 1) :");
- chbOwnEnergy.setText("Use built-in random run energy");
- jLabel19.setText("This means if youre run energy is gone when may the script activate it again");
- jLabel20.setText("Between: ");
- jLabel21.setText("and");
- javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
jPanel4.setLayout(jPanel4Layout);
jPanel4Layout.setHorizontalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(chbOwnEnergy)
.addComponent(chbBank)
.addComponent(chbStore)
.addComponent(chbAllTabs)
.addGroup(jPanel4Layout.createSequentialGroup()
.addComponent(jLabel17)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tfBankingFoodID, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel4Layout.createSequentialGroup()
.addComponent(jLabel18)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tfBankTab, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel4Layout.createSequentialGroup()
.addComponent(jLabel20)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tfMinEnergy, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel21)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tfMaxEnergy, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel4Layout.createSequentialGroup()
.addGap(21, 21, 21)
.addComponent(jLabel19)))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addContainerGap()
.addComponent(chbBank)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(chbStore)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(chbAllTabs)
.addGap(39, 39, 39)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel17)
.addComponent(tfBankingFoodID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel18)
.addComponent(tfBankTab, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(27, 27, 27)
.addComponent(chbOwnEnergy)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel19)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel20)
.addComponent(tfMinEnergy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel21)
.addComponent(tfMaxEnergy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(103, Short.MAX_VALUE))
);
- jTabbedPane2.addTab("Banking", jPanel4);
- jTextArea1.setColumns(20);
jTextArea1.setEditable(false);
jTextArea1.setRows(5);
jTextArea1.setText("Version 1.0\n- Release\n\nVersion 1.1\n- Added Power Training\n\nVersion 1.2 \n- Added Seaweed pickup option\n- Changed looks of paint\n\nVersion 1.3\n- Made antiban better\n- Normaly it supports all types of food \n\nVersion 1.4\n- Made some methods better\n- Added Breakhandler\n\nVersion 1.5\n- Breakhandler is working now\n\nVersion 1.6\n- Added random eating option\n\nVersion 2.0\n- Added banking\n\nVersion 2.1\n- Fixed some grammar (credits for Jozhua)\n- Fixed login when not using randoms (normally)\n\nVersion 2.2\n- Imporved fast att method again(sinds some updates it getted back slower)\n\nVersion 2.3\n- Made attack method even faster\n\nVersion 2.4\n- Fixed full inventory bugg");
jScrollPane1.setViewportView(jTextArea1);
- javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 387, Short.MAX_VALUE)
.addContainerGap())
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 329, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(21, Short.MAX_VALUE))
);
- jTabbedPane2.addTab("Info", jPanel2);
- javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jTabbedPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 412, Short.MAX_VALUE)
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jTabbedPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 389, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
- pack();
}// </editor-fold>
- private void btStartActionPerformed(java.awt.event.ActionEvent evt) {
startActionPerformed(evt);
}
- private void rbDefenceActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
- private void chbRandomEatingActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
- public void startActionPerformed(java.awt.event.ActionEvent evt) {
- setVisible(false);
startScript = true;
- }
-
// Variables declaration - do not modify
private javax.swing.JButton btStart;
private javax.swing.ButtonGroup buttonGroup1;
private javax.swing.ButtonGroup buttonGroup2;
private javax.swing.JCheckBox chbAllTabs;
private javax.swing.JCheckBox chbAntiban;
private javax.swing.JCheckBox chbBank;
private javax.swing.JCheckBox chbBreaks;
private javax.swing.JCheckBox chbCharms;
private javax.swing.JCheckBox chbEat;
private javax.swing.JCheckBox chbOwnEnergy;
private javax.swing.JCheckBox chbPowerTraining;
private javax.swing.JCheckBox chbRandomEating;
private javax.swing.JCheckBox chbSeaweed;
private javax.swing.JCheckBox chbStore;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel12;
private javax.swing.JLabel jLabel13;
private javax.swing.JLabel jLabel14;
private javax.swing.JLabel jLabel15;
private javax.swing.JLabel jLabel16;
private javax.swing.JLabel jLabel17;
private javax.swing.JLabel jLabel18;
private javax.swing.JLabel jLabel19;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel20;
private javax.swing.JLabel jLabel21;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel jLabel9;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel3;
private javax.swing.JPanel jPanel4;
private javax.swing.JRadioButton jRadioButton1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTabbedPane jTabbedPane1;
private javax.swing.JTabbedPane jTabbedPane2;
private javax.swing.JTabbedPane jTabbedPane3;
private javax.swing.JTextArea jTextArea1;
private javax.swing.JRadioButton rbAttack;
private javax.swing.JRadioButton rbDefence;
private javax.swing.JRadioButton rbRanged;
private javax.swing.JRadioButton rbStrength;
private javax.swing.JTextField tfArrowID;
private javax.swing.JTextField tfArrowName;
private javax.swing.JTextField tfBankTab;
private javax.swing.JTextField tfBankingFoodID;
private javax.swing.JTextField tfBreakbtwMax;
private javax.swing.JTextField tfBreakbtwMin;
private javax.swing.JTextField tfBreakforMax;
private javax.swing.JTextField tfBreakforMin;
private javax.swing.JTextField tfEatAt;
private javax.swing.JTextField tfEatMax;
private javax.swing.JTextField tfEatMin;
private javax.swing.JTextField tfMaxEnergy;
private javax.swing.JTextField tfMinEnergy;
// End of variables declaration
}
@Override
public void onRepaint(Graphics render) {
BreakInMili = nextBreakTime - (System.currentTimeMillis() - starttime);
if(BreakInMili < 0){
BreakInMili = 0;
}
Bhours = BreakInMili / (1000 * 60 * 60);
BreakInMili -= Bhours * (1000 * 60 * 60);
Bminutes = BreakInMili / (1000 * 60);
BreakInMili -= Bminutes * (1000 * 60);
Bseconds = BreakInMili / 1000;
millis = System.currentTimeMillis() - starttime;
hours = millis / (1000 * 60 * 60);
millis -= hours * (1000 * 60 * 60);
minutes = millis / (1000 * 60);
millis -= minutes * (1000 * 60);
seconds = millis / 1000;
Color background = new Color(0, 0, 0, 115);
render.setColor(background);
render.fill3DRect(10, 10, 175, 115, true);
render.setColor(Color.white);
render.drawString("BTekksCrabs v2.4", 15, 25);
render.drawString("Time running: " + hours + ":" + minutes + ":" + seconds, 15, 40);
render.drawString("XP gained: " + (skills.getCurrentSkillExp(statBeingTrained) - expStart), 15, 55);
render.drawString("XP to level " + (skills.getCurrentSkillLevel(statBeingTrained) + 1) + " : " + skills.getXPToNextLevel(statBeingTrained), 15, 70);
render.drawString("Hitpoints XP gained: " + (skills.getCurrentSkillExp(STAT_HITPOINTS) - hitpointsExpStart), 15, 85);
if(takingbreaks){
if(isTakingBreak){
render.drawString("Time untill Break is ending: " + Bhours + ":" + Bminutes + ":" + Bseconds, 15, 115);
}else{
render.drawString("Time till Break: " + Bhours+ ":" + Bminutes + ":" + Bseconds , 15, 115);
}
}
GainedExp = (skills.getCurrentSkillExp(statBeingTrained) - expStart);
float xpsec = 0;
if ((minutes > 0 || hours > 0 || seconds > 0) && GainedExp > 0) {
xpsec = ((float) GainedExp)/(float)(seconds + (minutes*60) + (hours*60*60));
float xpmin = xpsec * 60;
float xphour = xpmin * 60;
render.drawString("XP/hour: " + (int)xphour, 15, 100);
}
if(!isBanking){
if (status == 1){
render.setColor(Color.red);
}else{
render.setColor(background);
}
render.fill3DRect(10, 320, 80, 20, true);
render.setColor(Color.white);
render.drawString("Fighting", 30, 335);
if (status == 2){
render.setColor(Color.red);
}else{
render.setColor(background);
}
render.fill3DRect(100, 320, 80, 20, true);
render.setColor(Color.white);
render.drawString("Searching", 110, 335);
if (status == 3){
render.setColor(Color.red);
}else{
render.setColor(background);
}
render.fill3DRect(200, 320, 80, 20, true);
render.setColor(Color.white);
render.drawString("Picking up", 210, 335);
if (status == 4){
render.setColor(Color.red);
}else{
render.setColor(background);
}
render.fill3DRect(300, 320, 80, 20, true);
render.setColor(Color.white);
render.drawString("Going South", 305, 335);
if (status == 5){
render.setColor(Color.red);
}else{
render.setColor(background);
}
render.fill3DRect(400, 320, 80, 20, true);
render.setColor(Color.white);
render.drawString("Going North", 405, 335);
}else{
if (status == 6){
render.setColor(Color.red);
}else{
render.setColor(background);
}
render.fill3DRect(10, 320, 80, 20, true);
render.setColor(Color.white);
render.drawString("Going Bank", 15 , 335);
if (status == 7){
render.setColor(Color.red);
}else{
render.setColor(background);
}
render.fill3DRect(100, 320, 80, 20, true);
render.setColor(Color.white);
render.drawString("Banking", 120, 335);
if (status == 8){
render.setColor(Color.red);
}else{
render.setColor(background);
}
render.fill3DRect(200, 320, 80, 20, true);
render.setColor(Color.white);
render.drawString("Going Crabs", 205, 335);
}
}
}
Progress Reports:




|