Guest User

Untitled

a guest
Jul 22nd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. public int fighting(){
  2. if(skills.getCurrentSkillLevel(Constants.STAT_HITPOINTS) < Calculations.random(30, 40)){
  3. InventoryItem eat = inventory.findItem(food);
  4. eat.click("Eat");
  5. return rand;
  6. }else if(itemOnGround() && !players.getCurrent().isInCombat()){
  7. GroundItem item = groundItems.getByID(loot);
  8. if(item.isOnScreen() && !players.getCurrent().isMoving()){
  9. item.click();
  10. return rand;
  11. }else if(!players.getCurrent().isMoving()){
  12. players.getCurrent().walkTile(item.getLocation());
  13. return rand;
  14. }else{
  15. antiBan();
  16. return rand;
  17. }
  18. }else if(!itemOnGround() && !players.getCurrent().isInCombat()){
  19. try{
  20. NPC kill = npcs.getNearestByID(cockroach);
  21. if(kill.isOnScreen() && inHole.contains(kill.getLocation())){
  22. Input.wait(rand*4);
  23. kill.click();
  24. return rand;
  25. }else if(inHole.contains(kill.getLocation())){
  26. players.getCurrent().walkTileMM(kill.getLocation());
  27. return rand;
  28. }else{
  29. antiBan();
  30. return rand;
  31. }
  32. }catch(Exception e){
  33. antiBan();
  34. }
  35. return rand;
  36. }else if(!players.getCurrent().isInCombat()){
  37. Location back = newTile(3153, 4278, 1);
  38. if(calculations.getDistanceTo(back) > 2){
  39. players.getCurrent().walkTileMM(back);
  40. return rand;
  41. }else{
  42. antiBan();
  43. return rand;
  44. }
  45. }else{
  46. antiBan();
  47. return rand;
  48. }
  49.  
  50. }
Add Comment
Please, Sign In to add comment