Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.*;
- import java.util.*;
- import java.util.List;
- import java.util.logging.Level;//I thought u said 200k per hour... and picks up bones/. thats p2p
- import javax.accessibility.*;
- import javax.swing.*;
- import org.rsbot.bot.Bot;
- import org.rsbot.script.*;
- import org.rsbot.script.wrappers.*;
- import org.rsbot.event.listeners.PaintListener;
- import org.rsbot.event.listeners.ServerMessageListener;
- import org.rsbot.event.events.ServerMessageEvent;
- import org.rsbot.util.ScreenshotUtil;
- import org.rsbot.script.wrappers.RSTile;
- import org.rsbot.script.wrappers.RSNPC;
- import org.rsbot.script.wrappers.RSObject;
- import org.rsbot.script.Script;
- @ScriptManifest(authors = { "Gobs" }, category = "Combat", name = "EdgeVille Man Killer", version = 1.00, description = "<html><head><style type='text/css'> body {text-align:center; background-color: black; color: blue;}</style>Start in either:<br></br> 1)Edgeville Bank<br></br> 2)House with men<br></br><br></br>Make sure you have armor on, a weapon on, and food in inventory, and bank.(if needed)")
- public class EManKiller extends Script implements PaintListener {
- String version = "1.0.4";
- int items[] = {995,526,1440};
- int food[] = {319, 2140, 2142, 329, 325, 315, 373, 333, 361, 379, 351, 2309 };//anchovies, bread, cooked chicken, cooked meat, lobster, pike, salmon, sardine, shrimp, sword fish, trout, and tuna.
- int mostfood;
- int kills = 0;
- int collected = 0;
- int profit = 0;
- int startCoins;
- int boneprice;
- int talismanprice;
- int randum;
- public long startTime = System.currentTimeMillis();
- RSItemTile tile;
- RSTile banktile;
- RSTile middle;
- public RSTile doorTile1 = new RSTile(3101,3509);
- public RSTile doorTile2 = new RSTile(3100,3509);
- public Color randomColor = new Color(random(50,255), random(50,255), random(50,255));
- public boolean onStart(Map<String, String> args){
- if (getCurrentTab() != TAB_INVENTORY) {
- openTab(TAB_INVENTORY);
- wait(random(400, 600));
- }
- startTime = System.currentTimeMillis();
- talismanprice = grandExchange.loadItemInfo(1440).getMarketPrice();
- boneprice = grandExchange.loadItemInfo(526).getMarketPrice();
- log("Edgeville Mankiller " + version);
- return true;
- }
- public void onFinish(){
- log("Thanks for using Edgeville Mankiller " + version);
- }
- //Methods
- public void walkToBank(){
- while(isInventoryFull()){
- walkToMen();
- wait(100);
- openTheDoor();
- banktile = new RSTile(3094, 3498);
- middle = new RSTile(3093,3504);
- setCameraRotation(random(1,360));
- walkTo(middle);
- wait(random(1000,1500));
- walkTo(banktile);
- wait(750);
- while (getMyPlayer().isMoving()) {
- wait(random(1000,1500));
- }
- wait(random(2000,2500));
- bank.open();
- bank.depositAllExcept(food);
- bank.close();
- wait(random(500,1000));
- }
- walkTo(banktile);
- wait(random(1100,1290));
- walkTo(middle);
- wait(random(1600,2000));
- while (getMyPlayer().isMoving()) {
- wait(random(200,600));
- }
- }
- public void openTheDoor(){
- atDoorTiles(doorTile1, doorTile2);
- RSObject door1 = getNearestObjectByID(26910);
- if(door1 != null){
- atObject(door1, "Open Large door");
- wait(random(1200,1500));
- }
- }
- public void walkToMen(){
- RSTile menTile = new RSTile(3102,random(3509,3510));
- RSTile menTile2 = new RSTile(3097,3510);
- walkTo(menTile);
- wait(random(600,700));
- while (getMyPlayer().isMoving()) {
- wait(random(200,600));
- }
- wait(random(1000,2000));
- openTheDoor();
- walkTileMM(menTile2);
- wait(random(600,700));
- if (getMyPlayer().isMoving()) {
- while (getMyPlayer().isMoving()) {
- wait(random(20, 60));
- }
- wait(random(600,1000));
- }
- }
- public boolean takeLoot(){
- wait(random(150,200));
- tile = getGroundItemByID(526);
- if(tile != null){
- atTile(tile, "Take Bones");
- wait(500);
- while(getMyPlayer().isMoving() == true){
- wait(random(100,200));
- }
- profit = profit + boneprice;
- }
- tile = getGroundItemByID(1440);
- if(tile != null){
- atTile(tile,"Take Earth talisman");
- wait(500);
- while(getMyPlayer().isMoving() == true){
- wait(random(100,200));
- }
- profit = profit + talismanprice;
- }
- return true;
- }
- public boolean attackMan(){
- RSNPC man = getNearestFreeNPCToAttackByName("Man");
- atNPC(man, "Attack");
- wait(random(1500,2000));
- moveMouse(random(50,300),random(50,300));
- if(getMyPlayer().getInteracting() != null && getMyPlayer().getInteracting() instanceof RSNPC){
- while(getMyPlayer().getInteracting() != null){
- wait(random(50,200));
- if (skills.getCurrentSkillLevel(STAT_HITPOINTS) < 6) {
- eatFood();
- }
- }
- kills++;
- wait(random(2700,3000));
- takeLoot();
- }else{
- openTheDoor();
- clicktoContinue();
- Ladder();
- wait(random(50,500));
- }
- return true;
- }
- public void eatFood(){
- for(int i = 0; i<12; i++){
- if (getInventoryCount(food[i]) > 0 && skills.getCurrentSkillLevel(STAT_HITPOINTS) < 20) {
- atInventoryItem(food[i], "Eat");
- wait(random(3000,5000));
- }
- }
- }
- public void clicktoContinue(){
- clickContinue();
- }
- public void Ladder(){
- RSObject ladder;
- do{
- ladder = getNearestObjectByID(26983);
- if(ladder != null){
- atObject(ladder, "Climb-down Ladder");
- wait(random(1200,1500));
- setCameraRotation(random(1,360));
- }
- }while(ladder != null);
- }
- public void antiban(){
- randum = random(1,100);
- if(randum > 89){
- if(getCurrentTab() != TAB_STATS){
- openTab(TAB_STATS);
- wait(random(400,650));
- moveMouse(random(558, 598),random(235, 257));
- wait(random(750,1600));
- openTab(TAB_INVENTORY);
- wait(random(400,650));
- }else{
- moveMouse(100,200);
- wait(random(750,1600));
- openTab(TAB_INVENTORY);
- wait(random(400,650));
- }
- }
- randum = random(1,100);
- if(randum > 90){
- setCameraRotation(random(1,360));
- }
- }
- //Loop
- public int loop(){
- if(isInventoryFull()){
- walkToBank();
- walkToMen();
- }else{
- attackMan();
- wait(random(50,1000));
- antiban();
- }
- return 0;
- }
- public void onRepaint(Graphics g) {
- if (isLoggedIn()) {
- long millis = System.currentTimeMillis() - startTime;
- long hours = millis / (1000 * 60 * 60);
- millis -= hours * (1000 * 60 * 60);
- long minutes = millis / (1000 * 60);
- millis -= minutes * (1000 * 60);
- long seconds = millis / 1000;
- long minutes2 = minutes + (hours * 60);
- Bot.getEventManager().addListener(PaintListener.class, this);
- g.setColor(Color.white);
- g.drawRoundRect(359, 9, 156, 101, 10, 10);
- g.setColor(randomColor);
- g.fillRoundRect(360, 10, 155, 100, 10, 10);
- g.setColor(Color.white);
- g.setFont(new Font("Calibri", Font.PLAIN, 13));
- g.drawString("Edgeville Man Killer " + version, 360, 25);
- g.drawString("Time Running: " + (int) hours + ":" + (int) minutes + ":" + (int) seconds, 360, 40);
- g.drawString("Men Killed: " + kills, 360, 55);
- g.drawString("Bone Price: " + boneprice, 360, 70);
- g.drawString("Talisman Price: " + talismanprice, 360, 85);
- g.drawString("Profit Made: " + profit, 360, 100);
- }
- }
- }
Add Comment
Please, Sign In to add comment