All pastes #573446 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-06-18 04:51 UTC
rendered paste body
import impsoft.nexus.bots.color.*;
import impsoft.nexus.bots.color.util.*;
import impsoft.nexus.bots.color.scriptable.*;
import impsoft.nexus.bots.color.scriptable.interfaces.*;
import impsoft.nexus.bots.color.scriptable.objects.*;
import impsoft.nexus.bots.color.structures.*;

import impsoft.nexus.bots.reflection.objects.*;
import impsoft.nexus.bots.reflection.structures.*;

import java.awt.*;

public class AdvancedAutoFighter extends ColorScript implements AutoPaint {
	public static double version = 1.0;
	public static String[] commands = new String[] {
			"Rock Crabs (Under Development)", "Guards", "Goblins",
			"Barbarians", "Al-Kharid Guards" };

	public String author = "Beezkneez";
	public String description = "Advanced Auto Fighter v1.0";
	public int Kills;
	public Timer StartTimer;
	public String status = "Starting Script";
	boolean on = true;




	// Declare tiles and paths.
	AryanTile rockCrabLoc1 = new AryanTile(2685, 3728, 5);
	AryanTile rockCrabLoc2 = new AryanTile(2683, 3720, 5);
	AryanTile GuardsCirlce = new AryanTile(2671, 3716, 5);
	AryanTile GoblinsHut = new AryanTile(2671, 3716);
	AryanTile BarbariansCircle = new AryanTile(2671, 3716);
	AryanTile KaridRoom = new AryanTile(3284, 3172);

	// Solars method of random sleep time.
	private long rsleep(int min, int max) throws InterruptedException {
		long time = random(min, max);
		sleep(time);
		return time;
	}

    public void paint(Graphics g)
    {
        g.setFont(new Font("Arial", 0, 12));
        g.setColor(Color.green);
        g.drawString((new StringBuilder("Status : ")).append(status).toString(), 5, 30);
        g.drawString("Total Time Running: " + StartTimer.timePassed(), 5, 45);
        g.drawString("Total Kills: " + (Kills), 5, 60);
    }

int location = 0;
	private void walkToTile(AryanTile t) throws InterruptedException {
		new AryanPath(t, this).walkToEnd();
	}
	public AdvancedAutoFighter(ColorBot b, String cmd, String args[]) {
		super(b);
		log("******** Advanced Auto Fighter v1.0 ********");
		log("******* By: Beezkneez *******");
		log("****** Questions/Comments? ******");
		log("*** MSN: Beezkneez2007@hotmail.com ***");
		log("***********************************");
		cmd.contains("Rock Crabs (Under Development)");}
		{
location = 1;
			{
	}
}
public void script() throws InterruptedException
{
if(location = 1)
{
			while (true) {
				/*rsleep(1000, 1500);
				walkToTile(rockCrabLoc1);
				waitTillMovingStop();
				attackCrabs();*/
				log("Still Under Development, Shutting Down");
				shutDown();
			}
}
}
/*	private RGBCluster CrabColor1 = new RGBCluster(new RGB[] { new RGB(160,
			151, 128) }, this);

	public void attackCrabs() throws InterruptedException {
		rsleep(1000, 1500);
		if (theHPBars.failSafeInCombat()) {
			status = "fighting";
			log("In Fight");
			rsleep(3000,3200);
		} else {
			log("Looking for more crabs");
			status = "Finding Crabs";
			walkToTile(rockCrabLoc1);
			waitTillMovingStop();
			CrabColor1.doTopTextAndMenu("Attack", "Rock Crab");
			status = "Fighting";
		}
	}

	public void attackCrabs2() throws InterruptedException {
		rsleep(1000, 1500);
		if (theHPBars.failSafeInCombat()) {
			status = "fighting";
			log("In Fight");
			rsleep(3000,3200);
		} else {
			log("Looking for more crabs");
			status = "Finding Crabs";
			walkToTile(rockCrabLoc2);
			waitTillMovingStop();
			CrabColor1.doTopTextAndMenu("Attack", "Rock Crab");
			status = "Fighting";
		}
	}

	public void attackCrabs3() throws InterruptedException {
		rsleep(1000, 1500);
		if (theHPBars.failSafeInCombat()) {
			status = "fighting";
			log("In Fight");
			rsleep(3000,3200);
		} else {
			log("Looking for more crabs");
			status = "Finding Crabs";
			walkToTile(rockCrabLoc2);
			waitTillMovingStop();
			CrabColor1.doTopTextAndMenu("Attack", "Rock Crab");
			status = "Fighting";
		}
	}
*/
	public void AttackGoblins() throws InterruptedException {
		RGB goblin1 = new RGB(156, 162, 59);
		RGB goblin2 = new RGB(105, 125, 85);
		RGB goblin3 = new RGB(118, 158, 90);
		RGB findGolbins[] = { goblin1, goblin2, goblin3 };
		sleep(1000L);
		if (theHPBars.failSafeInCombat()) {
			log("In Fight");
			rsleep(3000,3200);
		} else {
			log("Looking for Goblins");
			theSimpleRGBCluster.doActionAtRGBCluster(findGolbins,
					"Attack Goblin", "Attack Goblin");
		}
	}

	public void attackGuards() throws InterruptedException {
		RGB Guard1 = new RGB(156, 162, 59);
		RGB Guard2 = new RGB(105, 125, 85);
		RGB Guard3 = new RGB(118, 158, 90);
		RGB findGuard[] = { Guard1, Guard2, Guard3 };
		rsleep(1000, 1500);
		if (theHPBars.failSafeInCombat()) {
			log("In Fight");
			rsleep(3000,3200);
		} else {
			log("Looking for Guards");
			theSimpleRGBCluster.doActionAtRGBCluster(findGuard, "Attack Guard",
					"Attack Guard");
		}
	}

	public void attackBarbarians() throws InterruptedException {
		RGB Barbarians1 = new RGB(156, 162, 59);
		RGB Barbarians2 = new RGB(105, 125, 85);
		RGB Barbarians3 = new RGB(118, 158, 90);
		RGB findBarbarians[] = { Barbarians1, Barbarians2, Barbarians3 };
		rsleep(1000, 1500);
		if (theHPBars.failSafeInCombat()) {
			log("In Fight");
			rsleep(3000,3200);
		} else {
			log("Looking for Barbarians");
			theSimpleRGBCluster.doActionAtRGBCluster(findBarbarians,
					"Attack Barbarian", "Attack Barbarian");
		}
	}

	public void attackAlKharidGuards() throws InterruptedException {
		RGB AlKharidGuards1 = new RGB(115, 13, 114);
		RGB AlKharidGuards2 = new RGB(119, 13, 118);
		RGB AlKharidGuards3 = new RGB(127, 13, 126);
		RGB findAlKharidGuards[] = { AlKharidGuards1, AlKharidGuards2, AlKharidGuards3 };
		rsleep(1000, 1500);
		if (theHPBars.failSafeInCombat()) {
			log("In Fight");
			rsleep(3000,3200);
		} else {
			log("Looking for Al-Karid Guards");
			theSimpleRGBCluster.doActionAtRGBCluster(findAlKharidGuards,
					"Attack Al-Kharid", "Attack Al-Kharid");
		}
	}
}