ULTIMATE GUIDE

LoG iN

ULTIMATE GUIDE


    IvyDrizzt Cuts Ivy 69kxp/h

    Share

    Turk4life321
    Admin

    Posts : 41
    Join date : 2009-08-09
    Location : In Saims Room *cough*

    IvyDrizzt Cuts Ivy 69kxp/h

    Post  Turk4life321 on Fri Jan 01, 2010 4:49 am

    import java.awt.*;
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.net.URL;
    import java.util.*;
    import java.util.List;
    import java.util.logging.Level;
    import javax.accessibility.*;
    import javax.swing.*;

    import org.rsbot.bot.Bot;
    import org.rsbot.script.*;
    import org.rsbot.script.wrappers.*;
    import org.rsbot.script.wrappers.RSInterface;
    import org.rsbot.script.wrappers.RSNPC;
    import org.rsbot.script.wrappers.RSObject;
    import org.rsbot.accessors.*;
    import org.rsbot.event.listeners.PaintListener;
    import org.rsbot.event.listeners.ServerMessageListener;
    import org.rsbot.event.events.ServerMessageEvent;
    import org.rsbot.util.ScreenshotUtil;

    @ScriptManifest(authors = {"Drizzt1112"}, category = "Woodcutting", name = "IvyDrizzt", version = 1.73,
    description = "<html>" +
    "<head>" +
    "<style type=\"text/css\"> hr {color: sienna} p {margin-left: 20px} body {background-image: url(\"http://i40.tinypic.com/2je4pyp.jpg\")}</style>" +
    "</head>" +
    "<body>" +
    "<center>" +
    "<body color=red>" +
    "<font color=red>" +
    "<h2><font color=red>IvyDrizzt v" + 1.73 + "</h2><br>" +
    "<b><font color=red>Author: </b>" + "<font color=red>Drizzt1112<br>\n" +
    " <h1><font color=red>Don't get banned =)</h1>" +
    "<font color=red>Start at Castle Wars<br>" +
    "<br>" +
    "<font color=red>Make sure you've read the forum post.<br>" +
    "<br>" +
    "<font color=red>Options: " +
    "<b><font color=red>&nbsp;&nbsp;&nbsp;Debug? <input type=\"checkbox\" name=\"debug\" value=\"no\" ><br>" +
    "<b><font color=red>Antiban value: </b><br>" +
    "<input type=\"text\" name=\"AntiBan\" value=\"1000\"><br>" +
    "<b><font color=red>Multiplier value</b><br>" +
    "<input type=\"text\" name=\"Multiplier\" value=\"45\"><br>" +
    "</center>" +
    "</body>" +
    "</html>")
    public class IvyDrizzt extends Script implements PaintListener,
    ServerMessageListener {

    private final ScriptManifest properties = getClass().getAnnotation(
    ScriptManifest.class);
    //////////////////////////////////////////////
    //////CONTROLS HOW FAR THE MOUSE GOES SEARCHING!
    public int Multiplier = 45;
    /////////CONTROLS HOW OFTEN THE ANTIBAN ACTIVATES
    /////////BIGGER NUMBER = LESS OFTEN. KEEP IT OVER 12
    public int AntibanControl = 1000;
    //////////////////////////////////////////////
    public final boolean CheckUpdate = true;
    //////////////////////////////////////////////
    //////////////////////////////////////////////
    static double version = 1.73;
    boolean Debug = false;
    public int[] BirdNest = {5070, 5071, 5072, 5073, 5074, 5075, 5076, 7413,
    11966};
    int BirdNests = 0;
    private long lastTry = 0;
    private int tryCount = 0;
    private RSTile lastDoor = null;
    String UpdateMSG = "This shouldn't happen???";
    boolean Wait = false;

    public boolean onStart(Map<String, String> args) {
    Multiplier = Integer.parseInt(args.get("Multiplier"));
    AntibanControl = Integer.parseInt(args.get("AntiBan"));
    if (args.get("debug") != null) {
    Debug = true;
    }
    if (CheckUpdate) {
    CheckUpdate();
    if (Debug) {
    log("Version = " + Version);
    }
    if (Version != version) {
    log(MSG);
    log("The newest version is " + Version);
    log(LastUpdate);
    if (!Debug) {

    }
    }
    if (Version == version) {
    log("Your script is up to date =)");
    log("This version is " + Version);
    log(LastUpdate);
    }
    }
    return true;
    }

    public int loop() {
    RSItemTile Nest = getGroundItemByID(BirdNest);
    if (Nest != null && !isInventoryFull()) {
    atTile(Nest, "Take");
    BirdNests++;
    wait(random(750, 1500));
    }
    /*if (Wait) {
    wait(random(20000, 40000));
    Wait = false;
    }*/
    if (CheckAnimation() || getMyPlayer().isMoving()) {
    AntiBan(random(1, AntibanControl), false);
    wait(random(400, 700));
    return random(100, 300);
    }

    RSObject IvyO = getNearestObjectByID(36411);
    if (IvyO != null) {
    RSTile Ivy1 = new RSTile(2425, 3068);
    RSTile Ivy2 = new RSTile(2425, 3069);
    atIvy(Ivy1, Ivy2);
    wait(random(500, 1000));
    }
    return random(200, 500);
    }

    public void serverMessageRecieved(final ServerMessageEvent arg0) {
    final String serverString = arg0.getMessage();
    if (serverString.toLowerCase().contains("level to use")) {
    log("No axe?");
    logout();

    }
    if (serverString.toLowerCase().contains("at the ivy")) {
    Wait = true;
    }
    }
    public int startLevel = 0;
    public int startXP = 0;
    public long startTime = System.currentTimeMillis();
    public long time = System.currentTimeMillis();
    int checkTime;
    long lastCheck;
    boolean powerMode = false;
    int randomRun = random(40, 75);
    int rockCount;
    int oldRockCount; // /////////CREDS TO AELIN
    int xpPerRock;
    long avoidedCombat;
    long avoidedSmokingRocks;
    int startExp = 0;
    int oldExp;
    int countToNext;
    int oldLevels;
    long lastAvgCheck;
    int avgPerHour;
    int Points = 0;
    int StartPoints = 0;
    String PointsString = "LuLWuT?";
    String Status = "Starting.";

    public void onRepaint(Graphics g) {
    if (!isLoggedIn() || isLoginScreen()) {
    return;
    }
    RSInterface Planks = RSInterface.getInterface(766);

    // Ty to AELIN for these
    // local objects:
    int index = STAT_WOODCUTTING;
    int exp = 0;
    int levels;
    long hours = 0, minutes = 0, seconds = 0;
    long time;

    // Has start time been previously set?
    if (startTime == 0) {
    startTime = System.currentTimeMillis();
    }

    // Calculate hours, minutes and seconds.
    time = System.currentTimeMillis() - startTime;
    seconds = time / 1000;
    if (seconds >= 60) {
    minutes = seconds / 60;
    seconds -= minutes * 60;
    }
    if (minutes >= 60) {
    hours = minutes / 60;
    minutes -= hours * 60;
    }

    // Has variables been previously defined?
    if (startLevel == 0 || startExp == 0) {
    // No, so define them now.
    startLevel = skills.getCurrentSkillLevel(STAT_WOODCUTTING);
    startExp = skills.getCurrentSkillExp(STAT_WOODCUTTING);
    oldExp = 0;
    }

    // Calculate catches based on experience changes.
    exp = skills.getCurrentSkillExp(STAT_WOODCUTTING) - startExp;
    if (exp > oldExp) {
    xpPerRock = exp - oldExp;
    oldExp = exp;
    rockCount++;
    countToNext = skills.getXPToNextLevel(STAT_WOODCUTTING) / xpPerRock + 1;
    }

    // Calculate levels gained.
    levels = skills.getCurrentSkillLevel(index) - startLevel;
    if (levels > oldLevels) {
    oldLevels = levels;
    }

    //
    if (System.currentTimeMillis() - lastAvgCheck >= 60000) {
    lastAvgCheck = System.currentTimeMillis();
    avgPerHour = (rockCount - oldRockCount) * 60;
    oldRockCount = rockCount;
    }

    Color BG = new Color(0, 0, 0, 125); // Creds to killa for the color -.-
    Color RED = new Color(255, 0, 0, 255);
    Color GREEN = new Color(0, 255, 0, 255);
    Color BLACK = new Color(0, 0, 0, 255);

    int GotPoints = Points - StartPoints;
    int type = STAT_WOODCUTTING;
    long millis = System.currentTimeMillis() - startTime;
    millis -= hours * 1000 * 60 * 60;
    millis -= minutes * 1000 * 60;
    int XPChange = skills.getCurrentSkillExp(type) - startXP;
    int Kills = XPChange / 240;
    int KillsToLvl = skills.getXPToNextLevel(type) / 288;
    int LevelChange = skills.getCurrentSkillLevel(type) - startLevel;
    int perNextLvl = skills.getPercentToNextLevel(type);
    int nextLvl = skills.getCurrentSkillLevel(type) + 1;
    g.setColor(BG);
    g.fill3DRect(5, 25, 205, 163, true);
    g.setColor(Color.white);
    g.drawString("IvyDrizzt v." + version + " by Drizzt1112", 10, 40);
    g.drawString("Running for: " + hours + "h " + minutes + "m " + seconds + "s", 10, 60);
    g.drawString("XP Gained: " + exp, 10, 80);
    g.drawString("XP To next lvl: " + skills.getXPToNextLevel(type), 10,
    100);
    g.drawString("Progress to next lvl:", 10, 120);
    g.setColor(RED);
    g.fill3DRect(10, 130, 100, 10, true);
    g.setColor(GREEN);
    g.fill3DRect(10, 130, perNextLvl, 10, true); // This is how progress
    // bars are made
    g.setColor(BLACK);
    g.drawString(perNextLvl + "% to " + nextLvl, 40, 139);
    g.setColor(Color.white);
    g.drawString("Levels Gained: " + LevelChange, 10, 160);
    g.drawString("Bird Nests: " + BirdNests, 10, 180);
    if (Debug) {
    g.drawString("Rotation " + getCameraAngle(), 10, 210);
    }
    }

    public void onFinish() {
    ScreenshotUtil.takeScreenshot(true);
    }

    public boolean atIvy(RSTile a, RSTile b) {
    //
    if (random(0, 10) < random(2, 4)) {
    setCameraRotation(getCameraAngle() + (random(0, 9) < random(6, Cool ? random(-20, 20)
    : random(-360, 360)));
    }
    if (random(0, 14) < random(0, 2)) {
    setCameraAltitude(random(0, 100));
    }
    // if (tryCount > 100) {
    // log("Problems finding jobboard....");

    // }
    if (!tileOnScreen(a) || !tileOnScreen(b) || distanceTo(a) > random(4, 7)) {
    if (tileOnMap(a)) {
    walkTileMM(randomizeTile(a, 3, 3));
    wait(random(750, 1250));
    } else {
    log("Problems finding Ivy tiles.");
    return false;
    }
    } else {
    final ArrayList<RSTile> theObjs = new ArrayList<RSTile>();
    theObjs.add(a);
    theObjs.add(b);
    try {
    final Point[] thePoints = new Point[theObjs.size()];
    for (int c = 0; c < theObjs.size(); c++) {
    thePoints[c] = Calculations.tileToScreen(theObjs.get(c));
    }
    float xTotal = 0;
    float yTotal = 0;
    for (final Point thePoint : thePoints) {
    xTotal += thePoint.getX();
    yTotal += thePoint.getY();
    }
    final Point location = new Point(
    (int) (xTotal / thePoints.length),
    (int) (yTotal / thePoints.length) - random(0, 40)); // -
    // 40
    if (location.x == -1 || location.y == -1) {
    return false;
    }

    if (Math.sqrt(Math.pow((getMouseLocation().getX() - location.getX()), 2) + Math.pow(
    (getMouseLocation().getY() - location.getY()),
    2)) < random(20, 30)) {
    final ArrayList<String> commands = getMenuItems();
    for (int c = 0; c < commands.size(); c++) {
    if (commands.get(c).contains("Chop Ivy")) {
    if (atMenu("Chop Ivy")) {
    lastTry = 0;
    tryCount = 0;
    return true;
    }
    }
    }
    }
    int ii = 0;
    while (!atMenu("Chop Ivy") && ii < 10) {
    int aa = ii * Multiplier;
    moveMouse(location, aa, 15);
    wait(random(20, 80));
    ii++;
    }
    moveMouse(location, 7, 7);
    if (atMenu("Chop Ivy")) {
    lastTry = 0;
    tryCount = 0;
    return true;
    }
    } catch (final Exception e) {
    return false;
    }
    }
    return false;
    }

    public boolean CheckAnimation() {
    for (int i = 0; i < 5; i++) {
    if (getMyPlayer().getAnimation() != -1) {
    return true;
    }
    wait(random(80, 180));
    }
    return false;
    }
    boolean AntiBanDebug = true;

    public void AntiBan(int r, boolean Random) { //Made By Drizzt1112
    if (Random) {
    r = random(0, 15);
    }
    if (Debug) {

    log("Antiban Case: " + r);
    }
    switch (r) { //Ewww i am using case -.-
    case 1:
    setCameraRotation(random(310, 360));
    return;
    case 2:
    setCameraAltitude(random(1.0, 99.0));
    return;
    case 3:
    moveMouse(random(1, 760), random(1, 499));
    return;
    case 4:
    openTab(random(0, 14));
    return;
    case 5:
    setCameraRotation(random(310, 360));

    setCameraAltitude(random(1.0, 99.0));
    return;
    case 6:
    int x = input.getX();
    int y = input.getY();
    moveMouse(x + random(-70, 70), y + random(-70, 70));
    x = input.getX();
    y = input.getY();
    moveMouse(x + random(-70, 70), y + random(-70, 70));
    x = input.getX();
    y = input.getY();
    moveMouse(x + random(-70, 70), y + random(-70, 70));
    x = input.getX();
    y = input.getY();
    moveMouse(x + random(-70, 70), y + random(-70, 70));
    wait(random(50, 150));
    return;
    case 7:
    if (getCurrentTab() != TAB_STATS) {
    openTab(TAB_STATS);
    }
    clickMouse(random(716, 721), random(415, 430), true);
    moveMouse(random(613, 633), random(421, 441));
    wait(random(1000, 2000));
    return;
    case 8:
    int x2 = input.getX();
    int y2 = input.getY();
    moveMouse(x2 + random(-80, 80), y2 + random(-80, 80));
    wait(random(50, 150));
    return;
    case 9:
    int x3 = input.getX();
    int y3 = input.getY();
    moveMouse(x3 + random(-80, 80), y3 + random(-80, 80));
    wait(random(50, 150));
    return;
    case 10:
    int x4 = input.getX();
    int y4 = input.getY();
    moveMouse(x4 + random(-80, 80), y4 + random(-80, 80));
    wait(random(50, 150));
    return;
    case 11:
    int x5 = input.getX();
    int y5 = input.getY();
    moveMouse(x5 + random(-80, 80), y5 + random(-80, 80));
    wait(random(50, 150));
    return;
    case 12:
    int x6 = input.getX();
    int y6 = input.getY();
    moveMouse(x6 + random(-80, 80), y6 + random(-80, 80));
    wait(random(50, 150));
    return;
    case 13:
    setCameraRotation(random(310, 360));
    return;
    case 14:
    setCameraRotation(random(310, 360));
    return;
    default:
    return;
    }
    }
    double Version = 1.6;
    String MSG = "";
    String LastUpdate = "";

    public boolean CheckUpdate() {
    try {
    URL url = new URL("http://koti.mbnet.fi/antsomer/ivyversion.txt");
    BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));

    String line;

    while ((line = reader.readLine()) != null) {
    if (line.contains("Version")) {
    String[] line1 = line.split("=");
    Version = Double.parseDouble(line1[1]);
    }
    if (line.contains("MSG=")) {
    String[] line2 = line.split("=");
    MSG = line2[1];
    }
    if (line.contains("LastUpdate=")) {
    String[] line3 = line.split("=");
    LastUpdate = line3[1];
    }
    if (line.contains("end")) {
    return true;
    }
    }
    } catch (Exception e) {
    }
    return false;
    }
    }

      Current date/time is Sat Nov 18, 2017 3:17 pm