Guest User

Untitled

a guest
Jul 21st, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.78 KB | None | 0 0
  1. import java.awt.*;
  2. import java.util.*;
  3. import java.util.List;
  4. import java.util.logging.Level;//I thought u said 200k per hour... and picks up bones/. thats p2p
  5. import javax.accessibility.*;
  6. import javax.swing.*;
  7.  
  8. import org.rsbot.bot.Bot;
  9. import org.rsbot.script.*;
  10. import org.rsbot.script.wrappers.*;
  11. import org.rsbot.event.listeners.PaintListener;
  12. import org.rsbot.event.listeners.ServerMessageListener;
  13. import org.rsbot.event.events.ServerMessageEvent;
  14. import org.rsbot.util.ScreenshotUtil;
  15. import org.rsbot.script.wrappers.RSTile;
  16. import org.rsbot.script.wrappers.RSNPC;
  17. import org.rsbot.script.wrappers.RSObject;
  18. import org.rsbot.script.Script;
  19.  
  20. @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)")
  21. public class EManKiller extends Script implements PaintListener {
  22.  
  23. String version = "1.0.4";
  24.  
  25. int items[] = {995,526,1440};
  26. 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.
  27. int mostfood;
  28. int kills = 0;
  29. int collected = 0;
  30. int profit = 0;
  31. int startCoins;
  32. int boneprice;
  33. int talismanprice;
  34. int randum;
  35. public long startTime = System.currentTimeMillis();
  36. RSItemTile tile;
  37. RSTile banktile;
  38. RSTile middle;
  39. public RSTile doorTile1 = new RSTile(3101,3509);
  40. public RSTile doorTile2 = new RSTile(3100,3509);
  41. public Color randomColor = new Color(random(50,255), random(50,255), random(50,255));
  42.  
  43.  
  44.  
  45. public boolean onStart(Map<String, String> args){
  46. if (getCurrentTab() != TAB_INVENTORY) {
  47. openTab(TAB_INVENTORY);
  48. wait(random(400, 600));
  49. }
  50. startTime = System.currentTimeMillis();
  51. talismanprice = grandExchange.loadItemInfo(1440).getMarketPrice();
  52. boneprice = grandExchange.loadItemInfo(526).getMarketPrice();
  53. log("Edgeville Mankiller " + version);
  54.  
  55. return true;
  56. }
  57.  
  58. public void onFinish(){
  59. log("Thanks for using Edgeville Mankiller " + version);
  60. }
  61.  
  62. //Methods
  63.  
  64.  
  65.  
  66.  
  67. public void walkToBank(){
  68. while(isInventoryFull()){
  69. walkToMen();
  70. wait(100);
  71. openTheDoor();
  72. banktile = new RSTile(3094, 3498);
  73. middle = new RSTile(3093,3504);
  74.  
  75. setCameraRotation(random(1,360));
  76. walkTo(middle);
  77. wait(random(1000,1500));
  78. walkTo(banktile);
  79. wait(750);
  80. while (getMyPlayer().isMoving()) {
  81. wait(random(1000,1500));
  82. }
  83. wait(random(2000,2500));
  84.  
  85. bank.open();
  86. bank.depositAllExcept(food);
  87. bank.close();
  88. wait(random(500,1000));
  89. }
  90. walkTo(banktile);
  91. wait(random(1100,1290));
  92. walkTo(middle);
  93. wait(random(1600,2000));
  94. while (getMyPlayer().isMoving()) {
  95. wait(random(200,600));
  96. }
  97. }
  98.  
  99. public void openTheDoor(){
  100. atDoorTiles(doorTile1, doorTile2);
  101. RSObject door1 = getNearestObjectByID(26910);
  102. if(door1 != null){
  103. atObject(door1, "Open Large door");
  104. wait(random(1200,1500));
  105. }
  106. }
  107. public void walkToMen(){
  108. RSTile menTile = new RSTile(3102,random(3509,3510));
  109. RSTile menTile2 = new RSTile(3097,3510);
  110. walkTo(menTile);
  111. wait(random(600,700));
  112. while (getMyPlayer().isMoving()) {
  113. wait(random(200,600));
  114. }
  115. wait(random(1000,2000));
  116. openTheDoor();
  117. walkTileMM(menTile2);
  118. wait(random(600,700));
  119. if (getMyPlayer().isMoving()) {
  120. while (getMyPlayer().isMoving()) {
  121. wait(random(20, 60));
  122. }
  123. wait(random(600,1000));
  124. }
  125. }
  126.  
  127.  
  128.  
  129.  
  130. public boolean takeLoot(){
  131. wait(random(150,200));
  132. tile = getGroundItemByID(526);
  133. if(tile != null){
  134. atTile(tile, "Take Bones");
  135. wait(500);
  136. while(getMyPlayer().isMoving() == true){
  137. wait(random(100,200));
  138. }
  139.  
  140. profit = profit + boneprice;
  141. }
  142. tile = getGroundItemByID(1440);
  143. if(tile != null){
  144. atTile(tile,"Take Earth talisman");
  145. wait(500);
  146. while(getMyPlayer().isMoving() == true){
  147. wait(random(100,200));
  148. }
  149.  
  150. profit = profit + talismanprice;
  151. }
  152.  
  153. return true;
  154. }
  155. public boolean attackMan(){
  156. RSNPC man = getNearestFreeNPCToAttackByName("Man");
  157. atNPC(man, "Attack");
  158. wait(random(1500,2000));
  159. moveMouse(random(50,300),random(50,300));
  160. if(getMyPlayer().getInteracting() != null && getMyPlayer().getInteracting() instanceof RSNPC){
  161. while(getMyPlayer().getInteracting() != null){
  162. wait(random(50,200));
  163. if (skills.getCurrentSkillLevel(STAT_HITPOINTS) < 6) {
  164. eatFood();
  165. }
  166.  
  167. }
  168. kills++;
  169. wait(random(2700,3000));
  170. takeLoot();
  171.  
  172. }else{
  173. openTheDoor();
  174. clicktoContinue();
  175. Ladder();
  176. wait(random(50,500));
  177. }
  178. return true;
  179. }
  180. public void eatFood(){
  181. for(int i = 0; i<12; i++){
  182. if (getInventoryCount(food[i]) > 0 && skills.getCurrentSkillLevel(STAT_HITPOINTS) < 20) {
  183. atInventoryItem(food[i], "Eat");
  184. wait(random(3000,5000));
  185. }
  186. }
  187. }
  188.  
  189. public void clicktoContinue(){
  190. clickContinue();
  191. }
  192.  
  193. public void Ladder(){
  194. RSObject ladder;
  195. do{
  196. ladder = getNearestObjectByID(26983);
  197. if(ladder != null){
  198.  
  199. atObject(ladder, "Climb-down Ladder");
  200. wait(random(1200,1500));
  201. setCameraRotation(random(1,360));
  202. }
  203. }while(ladder != null);
  204. }
  205. public void antiban(){
  206. randum = random(1,100);
  207. if(randum > 89){
  208. if(getCurrentTab() != TAB_STATS){
  209. openTab(TAB_STATS);
  210. wait(random(400,650));
  211. moveMouse(random(558, 598),random(235, 257));
  212. wait(random(750,1600));
  213. openTab(TAB_INVENTORY);
  214. wait(random(400,650));
  215. }else{
  216. moveMouse(100,200);
  217. wait(random(750,1600));
  218. openTab(TAB_INVENTORY);
  219. wait(random(400,650));
  220. }
  221.  
  222. }
  223. randum = random(1,100);
  224. if(randum > 90){
  225. setCameraRotation(random(1,360));
  226. }
  227. }
  228.  
  229. //Loop
  230. public int loop(){
  231. if(isInventoryFull()){
  232. walkToBank();
  233. walkToMen();
  234. }else{
  235.  
  236.  
  237. attackMan();
  238. wait(random(50,1000));
  239. antiban();
  240.  
  241. }
  242.  
  243. return 0;
  244. }
  245.  
  246.  
  247.  
  248. public void onRepaint(Graphics g) {
  249. if (isLoggedIn()) {
  250. long millis = System.currentTimeMillis() - startTime;
  251. long hours = millis / (1000 * 60 * 60);
  252. millis -= hours * (1000 * 60 * 60);
  253. long minutes = millis / (1000 * 60);
  254. millis -= minutes * (1000 * 60);
  255. long seconds = millis / 1000;
  256. long minutes2 = minutes + (hours * 60);
  257. Bot.getEventManager().addListener(PaintListener.class, this);
  258. g.setColor(Color.white);
  259. g.drawRoundRect(359, 9, 156, 101, 10, 10);
  260. g.setColor(randomColor);
  261. g.fillRoundRect(360, 10, 155, 100, 10, 10);
  262. g.setColor(Color.white);
  263. g.setFont(new Font("Calibri", Font.PLAIN, 13));
  264. g.drawString("Edgeville Man Killer " + version, 360, 25);
  265. g.drawString("Time Running: " + (int) hours + ":" + (int) minutes + ":" + (int) seconds, 360, 40);
  266. g.drawString("Men Killed: " + kills, 360, 55);
  267. g.drawString("Bone Price: " + boneprice, 360, 70);
  268. g.drawString("Talisman Price: " + talismanprice, 360, 85);
  269. g.drawString("Profit Made: " + profit, 360, 100);
  270.  
  271. }
  272. }
  273. }
Add Comment
Please, Sign In to add comment