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;
- 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 P2P", 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 EManKillerp2p extends Script implements PaintListener {
- String version = "1.0.1";
- 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 ranarrprice;
- int kwuarmprice;
- int dwarfweedprice;
- int avantoeprice;
- int lantadymeprice;
- 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 boolean onStart(Map<String, String> args){
- if (getCurrentTab() != TAB_INVENTORY) {
- openTab(TAB_INVENTORY);
- wait(random(400, 600));
- }
- startTime = System.currentTimeMillis();
- ranarrprice = grandExchange.loadItemInfo(207).getMarketPrice();
- kwuarmprice = grandExchange.loadItemInfo(213).getMarketPrice();
- dwarfweedprice = grandExchange.loadItemInfo(217).getMarketPrice();
- avantoeprice = grandExchange.loadItemInfo(211).getMarketPrice();
- lantadymeprice = grandExchange.loadItemInfo(2485).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();
- }
- 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(50,150));
- tile = getGroundItemByID(207);
- if(tile != null){
- atTile(tile, "Take Grimy ranarr");
- wait(random(500,1000));
- profit = profit + ranarrprice;
- }
- tile = getGroundItemByID(213);
- if(tile != null){
- atTile(tile, "Take Grimy kwuarm");
- wait(random(500,1000));
- profit = profit + kwuarmprice;
- }
- tile = getGroundItemByID(217);
- if(tile != null){
- atTile(tile, "Take Grimy dwarf weed");
- wait(random(500,1000));
- profit = profit + dwarfweedprice;
- }
- tile = getGroundItemByID(211);
- if(tile != null){
- atTile(tile, "Take Grimy avantoe");
- wait(random(500,1000));
- profit = profit + avantoeprice;
- }
- tile = getGroundItemByID(2485);
- if(tile != null){
- atTile(tile, "Take Grimy lantadyme");
- wait(random(500,1000));
- profit = profit + lantadymeprice;
- }
- return true;
- }
- public boolean attackMan(){
- RSNPC man = getNearestFreeNPCToAttackByName("Man");
- if(man != null){
- atNPC(man, "Attack");
- wait(random(1000,1100));
- moveMouse(random(50,300),random(50,300));
- if(getMyPlayer().getInteracting() != null){
- while(getMyPlayer().getInteracting() != null){
- wait(random(50,200));
- if (skills.getCurrentSkillLevel(STAT_HITPOINTS) < 6) {
- eatFood();
- }
- }
- kills++;
- wait(random(2000,2500));
- takeLoot();
- }
- }else{
- RSObject ladder;
- do{
- ladder = getNearestObjectByID(26983);
- if(ladder != null){
- atObject(ladder, "Climb-down Ladder");
- wait(random(1200,1500));
- }
- }while(ladder != null);
- clicktoContinue();
- openTheDoor();
- 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(){
- if(getInterface(740, 0).getText().startsWith("Congratulations! You've just advanced a")){
- clickContinue();
- log("Click to Continue has just functioned.");
- }
- }
- 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(Color.blue);
- 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("Profit Made: " + profit, 360, 70);
- }
- }
- }
Add Comment
Please, Sign In to add comment