Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int fighting(){
- if(skills.getCurrentSkillLevel(Constants.STAT_HITPOINTS) < Calculations.random(30, 40)){
- InventoryItem eat = inventory.findItem(food);
- eat.click("Eat");
- return rand;
- }else if(itemOnGround() && !players.getCurrent().isInCombat()){
- GroundItem item = groundItems.getByID(loot);
- if(item.isOnScreen() && !players.getCurrent().isMoving()){
- item.click();
- return rand;
- }else if(!players.getCurrent().isMoving()){
- players.getCurrent().walkTile(item.getLocation());
- return rand;
- }else{
- antiBan();
- return rand;
- }
- }else if(!itemOnGround() && !players.getCurrent().isInCombat()){
- try{
- NPC kill = npcs.getNearestByID(cockroach);
- if(kill.isOnScreen() && inHole.contains(kill.getLocation())){
- Input.wait(rand*4);
- kill.click();
- return rand;
- }else if(inHole.contains(kill.getLocation())){
- players.getCurrent().walkTileMM(kill.getLocation());
- return rand;
- }else{
- antiBan();
- return rand;
- }
- }catch(Exception e){
- antiBan();
- }
- return rand;
- }else if(!players.getCurrent().isInCombat()){
- Location back = newTile(3153, 4278, 1);
- if(calculations.getDistanceTo(back) > 2){
- players.getCurrent().walkTileMM(back);
- return rand;
- }else{
- antiBan();
- return rand;
- }
- }else{
- antiBan();
- return rand;
- }
- }
Add Comment
Please, Sign In to add comment