News:

Up-to-date news?! Preposterous!

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Raymondbl

#1216
Forum Games / Re: The CTRL-V Game!
April 23, 2011, 01:07:16 PM
3.2808399

I was doing meter to foot conversion to see how tall I was, and see if anyone could guess my height, which no one has done yet. 
#1217
O_O  I'm one hour late to playing piano :P 

I really liked the story, just the romance in it was really weird (but interesting). 

The only thing I can criticize about this is that sometimes you put in too much detail, such as when the three were in the cave without Flash.  I make this mistsake often, but it's best without it  :D

I still don't completely understand the whole Strange Boy thing, though it was a nice addition. 

Great job!
#1218
Forum Games / Re: Would you rather...
April 23, 2011, 10:29:50 AM
B.  When I eat too much meat, my mouth feels dry-warm and my limbs get that robust feeling minus the strength, which is not a good feeling at all.  Plus, it's less healthy. 

Would You Rather:
A. be hated and insulted on the internet for being young
B. be shunned on the Internet for being old.
#1219
Forum Games / Re: Would you rather...
April 23, 2011, 08:57:57 AM
B. it's less disgusting.

Would you rather:

A.  be rich, and unknown to anyone but your friends/family.
B.  be world-famous, but have little money. 
#1220
Off-Topic / Re: NSM Reunion, I mean Gathering
April 15, 2011, 11:25:23 AM
I know the perfect place- my dad's garbage dump!
#1221
Off-Topic / Re: How do you handle stress?
April 15, 2011, 11:17:00 AM
Think of how to resolve the situation causing your stress.  Be optimistic.  play an instrument, I find sight-reading takes my mind off things quickly.  Work for the future, not current.  Whatever you do when you're stressed, do NOT play video games.  it makes life even worse after you're done exhausting time.  What exactly is causing you stress? 
#1222
Vancouver city or the island?  my aunt has a bakery at the city. 
#1223
Forum Games / Re: Would you rather...
April 15, 2011, 10:38:04 AM
A.  Countryside.... perfect for pokemon.  training, playing, enjoying the view, interact with wild pokemon, clean atmosphere, bliss...

WYR

A. Get smashed by an Infernape
B.  Get sat on by venosaur
C.  get blasted with toxic waste by Muk
#1224
Forum Games / Re: The CTRL-V Game!
April 12, 2011, 06:09:36 AM
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
import java.util.List;

import javax.imageio.ImageIO;
import javax.swing.JOptionPane;

import org.rsbot.event.events.MessageEvent;
import org.rsbot.event.listeners.MessageListener;
import org.rsbot.event.listeners.PaintListener;
import org.rsbot.script.Script;
import org.rsbot.script.ScriptManifest;
import org.rsbot.script.methods.Skills;
import org.rsbot.script.methods.GrandExchange.GEItem;
import org.rsbot.script.util.Filter;
import org.rsbot.script.wrappers.RSArea;
import org.rsbot.script.wrappers.RSGroundItem;
import org.rsbot.script.wrappers.RSItem;
import org.rsbot.script.wrappers.RSNPC;
import org.rsbot.script.wrappers.RSObject;
import org.rsbot.script.wrappers.RSPath;
import org.rsbot.script.wrappers.RSTile;
import org.rsbot.script.wrappers.RSTilePath;

@ScriptManifest(authors = "MrSharingan", name = "Sharingan Hill Giants", keywords = "Combat", description = "Kills Hill Giants with the option of Resource Dung", version = 5.27)
public class SharinganHillGiants extends Script implements PaintListener,
MouseListener, MessageListener {

   private int foodWithdraw = -1;
   private int withdrawAmount = 1;
   private int startBones, startLimp, startFire, startNat;
   private final int doorID = 1804;
   private final int keyID = 983;
   private final int ladderDownID = 12389;
   private final int resDoorID = 52853;
   private final int[] npcID = { 4692, 4691, 4690, 4693, 4689, 117 };
   private int[] lootID;
   private int safeTileSpot;
   private int bonesBuried;
   private final int bigBonesID = 532;
   private final int resDoorExitID = 52868;
   final int[] foodID = { 1895, 1893, 1891, 4293, 2142, 291, 2140, 3228, 9980,
         7223, 6297, 6293, 6295, 6299, 7521, 9988, 7228, 2878, 7568, 2343,
         1861, 13433, 315, 325, 319, 3144, 347, 355, 333, 339, 351, 329,
         3381, 361, 10136, 5003, 379, 365, 373, 7946, 385, 397, 391, 3369,
         3371, 3373, 2309, 2325, 2333, 2327, 2331, 2323, 2335, 7178, 7180,
         7188, 7190, 7198, 7200, 7208, 7210, 7218, 7220, 2003, 2011, 2289,
         2291, 2293, 2295, 2297, 2299, 2301, 2303, 1891, 1893, 1895, 1897,
         1899, 1901, 7072, 7062, 7078, 7064, 7084, 7082, 7066, 7068, 1942,
         6701, 6703, 7054, 6705, 7056, 7060, 2130, 1985, 1993, 1989, 1978,
         5763, 5765, 1913, 5747, 1905, 5739, 1909, 5743, 1907, 1911, 5745,
         2955, 5749, 5751, 5753, 5755, 5757, 5759, 5761, 2084, 2034, 2048,
         2036, 2217, 2213, 2205, 2209, 2054, 2040, 2080, 2277, 2225, 2255,
         2221, 2253, 2219, 2281, 2227, 2223, 2191, 2233, 2092, 2032, 2074,
         2030, 2281, 2235, 2064, 2028, 2187, 2185, 2229, 6883, 1971, 4608,
         1883, 1885, 15272 };
   private RSTile[] bankToHouse = { new RSTile(3182, 3444),
         new RSTile(3186, 3446), new RSTile(3180, 3447),
         new RSTile(3171, 3450), new RSTile(3165, 3451),
         new RSTile(3160, 3450), new RSTile(3151, 3448),
         new RSTile(3148, 3446), new RSTile(3146, 3443),
         new RSTile(3138, 3443), new RSTile(3131, 3445),
         new RSTile(3126, 3446), new RSTile(3119, 3446),
         new RSTile(3115, 3449) };
   private RSTile[] ladderToEntrance = { new RSTile(3115, 9852),
         new RSTile(3113, 9848), new RSTile(3112, 9843),
         new RSTile(3111, 9836), new RSTile(3108, 9832),
         new RSTile(3104, 9826) };
   private RSTile houseTileOut = new RSTile(3115, 3449);
   private RSTile ladderTile = new RSTile(3116, 9851);
   private RSTile bankTile = new RSTile(3182, 3444);
   private RSTile dungExitTile = new RSTile(1134, 4589);
   private boolean waitForDeath = false;
   boolean waitedLost = false;
   ArrayList<Integer> lootItems;
   RSNPC npc;
   RSArea bankArea;
   RSArea houseArea;
   RSArea giantArea;
   RSArea resDungArea;
   States state;

   // ITEMS
   GEItem bone;
   GEItem fire;
   GEItem nat;
   GEItem limp;
   int bonesID = 532;
   int fireID = 554;
   int natID = 561;
   int limpID = 225;
   int bonePrice;
   int firePrice;
   int natPrice;
   int limpPrice;
   int currentBones;
   int currentFire;
   int currentNat;
   int currentLimp;
   int totalBones;
   int totalFire;
   int totalNat;
   int totalLimp;

   // Paint
   private long startTime = System.currentTimeMillis();
   private int startXPAttack = 0, startXPDefense = 0, startXPStrength = 0,
   startXPHP = 0, startXPRange = 0;

   public boolean onStart() {
      try {
         log("Checking for Updates, Please wait");
         URLConnection url = new URL(
         "http://sharinganscripting.webs.com/version.txt")
         .openConnection();
         BufferedReader in = new BufferedReader(new InputStreamReader(url
               .getInputStream()));
         double newVersion = Double.parseDouble(in.readLine());
         if (newVersion > getVersion()) {
            JOptionPane
            .showMessageDialog(
                  null,
                  "An Update is Available (Version "
                  + newVersion
                  + ")\nPlease go to the HillGiant Thread to Update");
            stopScript();
            log.severe("PLEASE UPDATE!");
            return false;
         } else {
            JOptionPane.showMessageDialog(null,
            "You have the Latest Version");
         }
         if (in != null)
            in.close();
      } catch (IOException e) {
         log("Problem getting version (IOException)");

      } catch (NumberFormatException e) {
         log("Problem getting version (NumberFormatException)");
      }
      log("Loading up Variables, please wait");
      bankArea = new RSArea(new RSTile(3182, 3433), new RSTile(3189, 3446));
      houseArea = new RSArea(new RSTile(3113, 3450), new RSTile(3117, 3453));
      giantArea = new RSArea(new RSTile(3129, 9859), new RSTile(3095, 9824));
      resDungArea = new RSArea(new RSTile(1141, 4594), new RSTile(1098, 4558));
      if (!inventory.contains(keyID)) {
         log.severe("Didn't start with Brass Key, Shutting Down");
         game.logout(true);
         stopScript();
      }
      if (game.isLoggedIn()) {
         startXPAttack = skills.getCurrentExp(0);
         startXPDefense = skills.getCurrentExp(1);
         startXPStrength = skills.getCurrentExp(2);
         startXPHP = skills.getCurrentExp(3);
         startXPRange = skills.getCurrentExp(4);
      }
      log("Loading up Prices, please wait, this may take a while");
      bone = grandExchange.lookup(532);
      log("Loaded 1/4");
      fire = grandExchange.lookup(554);
      log("Loaded 2/4");
      nat = grandExchange.lookup(561);
      log("Loaded 3/4");
      limp = grandExchange.lookup(225);
      log("Loaded 4/4");
      bonePrice = bone.getGuidePrice();
      firePrice = fire.getGuidePrice();
      natPrice = nat.getGuidePrice();
      limpPrice = limp.getGuidePrice();
      log("Complete");
      startBones = inventory.getCount(532);
      startFire = inventory.getCount(554);
      startNat = inventory.getCount(561);
      startLimp = inventory.getCount(225);
      log("Loaded, loading Images, Please Wait");
      img1 = getImage("http://img28.imageshack.us/img28/7425/hillgiants.png");
      img2 = getImage("http://img20.imageshack.us/img20/9528/clicky.png");
      img3 = getImage("http://img10.imageshack.us/img10/6854/clickmen.png");
      img4 = getImage("http://img202.imageshack.us/img202/9029/foodgui.png");
      img5 = getImage("http://img248.imageshack.us/img248/7950/blankbox.png");
      log("Loaded images");
      safeTileSpot = 0;
      if (random(1, 50) < 25) {
         safey = new RSTile(3098, 9837);
      } else {
         safey = new RSTile(3115, 9829);
      }
      mouse.setSpeed(random(3, 5));
      return true;
   }

   int gamble;
   RSTile safey;

   @Override
   public int loop() {
      if (start) {
         state = getState();
         if(interfaces.canContinue()) {
            interfaces.clickContinue();
            sleep(500, 700);
         }
         switch (state) {
         case IN_BANK:
            inBankYeah();
            waitedLost = false;
            break;
         case IN_GIANT:
            inGiantYeah();
            waitedLost = false;
            break;
         case IN_DUNG:
            inDungYeah();
            waitedLost = false;
            break;
         case IN_WORLD:
            inWorldYeah();
            waitedLost = false;
            break;
         case IN_HOUSE:
            inHouseYeah();
            randTile();
            waitedLost = false;
            break;
         case LOST:

            break;
         }
      }
      return 0;
   }

   // Enums :)
   public enum States {
      IN_BANK, IN_GIANT, IN_DUNG, IN_WORLD, FIGHT, LOOT, IN_HOUSE, LOST;
   }

   public States getState() {
      npc = newNPC();
      setRun();
      getCurrentCount();
      if (wereFighting()) {
         waitForDeath = true;
      } else if (!wereFighting() && waitForDeath) {
         sleep(2500, 3000);
         waitForDeath = false;
      }

      if (inventory.getCount(foodID) > 0 && yesFood || !inventory.isFull()
            && !yesFood) {
         if (bankArea.contains(playerPos())) {
            return States.IN_BANK;
         } else if (houseArea.contains(playerPos())) {
            return States.IN_HOUSE;
         } else if (giantArea.contains(playerPos()) || playerPos().equals(new RSTile(3098, 9837))) {
            return States.IN_GIANT;
         } else if (resDungArea.contains(playerPos())) {
            return States.IN_DUNG;
         } else {
            return States.IN_WORLD;
         }
      } else if (inventory.getCount(foodID) == 0 && yesFood
            || inventory.isFull() && !yesFood) {
         if (bankArea.contains(playerPos())) {
            return States.IN_BANK;
         } else if (houseArea.contains(playerPos())) {
            return States.IN_HOUSE;
         } else if (giantArea.contains(playerPos())) {
            return States.IN_GIANT;
         } else if (resDungArea.contains(playerPos()) || playerPos().equals(new RSTile(3098, 9837))) {
            return States.IN_DUNG;
         } else {
            return States.IN_WORLD;
         }
      }
      return States.LOST;
   }

   private void doBank() {
      if (!bank.isOpen()) {
         bank.open();
         sleep(1000, 1200);
      } else {
         addRefresh();
         bank.depositAllExcept(keyID);
         sleep(750, 1000);
         if (yesFood) {
            if (bank.getCount(foodWithdraw) < withdrawAmount) {
               log("Out of Food");
               stopScript();
            }
            if (inventory.getCount(foodWithdraw) == 0
                  && bank.getCount(foodWithdraw) >= withdrawAmount) {
               bank.withdraw(foodWithdraw, withdrawAmount);
               sleep(1000, 1200);
               bank.close();
            }
         } else {

         }
      }
   }

   private void randTile() {
      if (random(1, 50) < 25) {
         safey = new RSTile(3098, 9837);
      } else {
         safey = new RSTile(3115, 9829);
      }
   }

   public void inWorldYeah() {
      RSObject door = objects.getNearest(doorID);
      if (inventory.getCount(foodID) > 0 && yesFood || !inventory.isFull()
            && !yesFood) {
         if (calc.distanceTo(houseTileOut) > 4) {
            walkPath(bankToHouse);
         } else if (calc.distanceTo(houseTileOut) < 4 && door != null
               && !door.isOnScreen()) {
            walking.walkTileMM(houseTileOut, 2, 2);
            sleep(1000, 1500);
         } else if (calc.distanceTo(houseTileOut) < 4 && door != null
               && door.isOnScreen() && door != null) {
            door.doAction("Open");
            sleep(1000, 1500);
         }
      } else if (inventory.getCount(foodID) == 0 && yesFood
            || inventory.isFull() && !yesFood) {
         if (calc.distanceTo(bankTile) > 4) {
            walkPathReverse(bankToHouse);
            sleep(1000, 1200);
         } else if (calc.distanceTo(bankTile) < 4 && bankTile != null) {
            walking.walkTileMM(bankTile);
            sleep(1000, 1200);
         }
      }
   }

   public void inBankYeah() {
      if (inventory.getCount(foodID) > 0 && yesFood || !inventory.isFull()
            && !yesFood) {
         walkPath(bankToHouse);
      } else if (inventory.getCount(foodID) == 0 && yesFood
            || inventory.isFull() && !yesFood) {
         doBank();
      }
   }

   public void inHouseYeah() {
      RSObject door = objects.getNearest(doorID);
      RSObject ladderDown = objects.getNearest(ladderDownID);
      if (inventory.getCount(foodID) > 0 && yesFood || !inventory.isFull()
            && !yesFood) {
         if (ladderDown != null) {
            ladderDown.doAction("Climb");
            sleep(1000, 1500);
         }
      } else if (inventory.getCount(foodID) == 0 && yesFood
            || inventory.isFull() && !yesFood) {
         if (door != null && door.isOnScreen()) {
            door.doAction("Open");
            sleep(1000, 1200);
         }
      }
   }

   public void inGiantYeah() {
      RSObject ladderUp = objects.getNearest(29355);
      if (resDung) {
         if (inventory.getCount(foodID) > 0 && yesFood
               || !inventory.isFull() && !yesFood) {
            RSObject resDoor = objects.getNearest(resDoorID);
            if (resDoor != null && resDoor.isOnScreen()) {
               resDoor.doAction("Enter");
               sleep(1000, 1200);
            } else if (resDoor != null && !resDoor.isOnScreen()) {
               walkPath(ladderToEntrance);
               sleep(1000, 1200);
            } else {
               walkPath(ladderToEntrance);
               sleep(1000, 1200);
            }
         } else if (inventory.getCount(foodID) == 0 && yesFood
               || inventory.isFull() && !yesFood) {
            if (ladderUp != null && calc.distanceTo(ladderTile) > 4
                  && !ladderUp.isOnScreen()) {
               RSPath toLadder = walking.getPath(ladderTile);
               toLadder.traverse();
               sleep(1000, 1500);
            } else if (ladderUp != null && ladderUp.isOnScreen()) {
               ladderUp.doAction("Climb");
               sleep(1000, 1200);
            } else if (calc.distanceTo(ladderTile) < 4 && ladderUp != null) {
               ladderUp.doAction("Climb");
               sleep(1000, 1200);
            }
         }
      } else {
         if (inventory.getCount(foodID) > 0 && yesFood
               || !inventory.isFull() && !yesFood) {
            if (needHeal()) {
               RSItem food = inventory.getItem(foodID);
               if (food != null) {
                  food.doAction("Eat");
                  sleep(750, 1000);
               }
               if (!yesFood) {
                  log.severe("Were not using food but we need to heal");
                  log.severe("Script stopping");
                  stopScript();
               }
            } else {
               if (!lootThere()) {
                  dominate();
               } else {
                  if (!wereFighting()) {
                     loot();
                  }
               }
            }
         }  else if(inventory.getCount(foodID) == 0 && yesFood && lootThere()) {
            loot();
         } else if (inventory.getCount(foodID) == 0 && yesFood && !lootThere()
               || inventory.isFull() && !yesFood) {
            if (ladderUp != null && calc.distanceTo(ladderTile) > 4
                  && !ladderUp.isOnScreen()) {
               RSPath toLadder = walking.getPath(ladderTile);
               toLadder.traverse();
               sleep(1000, 1500);
            } else if (ladderUp != null && ladderUp.isOnScreen()) {
               ladderUp.doAction("Climb");
               sleep(1000, 1200);
            } else if (calc.distanceTo(ladderTile) < 4 && ladderUp != null) {
               ladderUp.doAction("Climb");
               sleep(1000, 1200);
            }
         }
      }
   }

   public void inDungYeah() {
      if (resDung) {
         if (inventory.getCount(foodID) > 0 && yesFood
               || !inventory.isFull() && !yesFood) {
            if (needHeal()) {
               RSItem food = inventory.getItem(foodID);
               if (food != null) {
                  food.doAction("Eat");
                  sleep(750, 1000);
               }
               if (!yesFood) {
                  log.severe("Were not using food but we need to heal");
                  log.severe("Script stopping");
                  stopScript();
               }
            } else {
               if (!lootThere()) {
                  dominate();
               } else {
                  if (!wereFighting()) {
                     loot();
                  }
               }
            }
         } else if (inventory.getCount(foodID) == 0 && yesFood
               || inventory.isFull() && !yesFood) {
            RSObject exitDoor = objects.getNearest(resDoorExitID);
            if (calc.distanceTo(dungExitTile) > 4 && exitDoor != null) {
               walking.getPath(dungExitTile).traverse();
               sleep(1000, 1200);
            } else if (calc.distanceTo(dungExitTile) < 4
                  && exitDoor != null && exitDoor.isOnScreen()) {
               exitDoor.doAction("Exit");
               sleep(1000, 1200);
            } else if (exitDoor != null && exitDoor.isOnScreen()) {
               exitDoor.doAction("Exit");
               sleep(1000, 1200);
            } else {
               walking.getPath(dungExitTile).traverse();
               sleep(1000, 1200);
            }
         }
      } else {
         if (inventory.getCount(foodID) > 0 && yesFood
               || !inventory.isFull() && !yesFood) {
            if (inventory.getCount(foodID) > 0 && yesFood
                  || !inventory.isFull() && !yesFood) {
               if (needHeal()) {
                  RSItem food = inventory.getItem(foodID);
                  if (food != null) {
                     food.doAction("Eat");
                     sleep(750, 1000);
                  }
                  if (!yesFood) {
                     log
                     .severe("Were not using food but we need to heal");
                     log.severe("Script stopping");
                     stopScript();
                  }
                  if (!lootThere()) {
                     dominate();
                  } else {
                     if (!wereFighting()) {
                        loot();
                     }
                  }
               }
            }

         } else if (inventory.getCount(foodID) == 0 && yesFood
               || inventory.isFull() && !yesFood) {
            RSObject exitDoor = objects.getNearest(resDoorExitID);
            if (calc.distanceTo(dungExitTile) > 4 && exitDoor != null) {
               walking.getPath(dungExitTile).traverse();
               sleep(1000, 1200);
            } else if (calc.distanceTo(dungExitTile) < 4
                  && exitDoor != null && exitDoor.isOnScreen()) {
               exitDoor.doAction("Exit");
               sleep(1000, 1200);
            } else if (exitDoor != null && exitDoor.isOnScreen()) {
               exitDoor.doAction("Exit");
               sleep(1000, 1200);
            } else {
               walking.getPath(dungExitTile).traverse();
               sleep(1000, 1200);
            }
         }
      }
   }

   boolean safeSpot = false;
   RSTile[] safeSpotTiles = { new RSTile(3098, 9837), new RSTile(3115, 9829) };

   public void dominate() {
      if (!safeSpot || resDung) {
         if (npc != null && npc.isOnScreen() && !wereFighting()) {
            fight();
            antiBan();
         } else if (npc != null && !npc.isOnScreen() && !wereFighting()
               && npc.getInteracting() == null
               && !getMyPlayer().isMoving()) {
            walking.walkTileMM(npc.getLocation());
            sleep(1000, 1500);
         } else if (npc != null && !npc.isOnScreen()
               && npcs.getNearest(npcID) != null
               && !npcs.getNearest(npcID).isOnScreen()) {
            if (!wereFighting()) {
               if (inventory.contains(bigBonesID) && yesBury) {
                  if (getMyPlayer().getAnimation() == -1) {
                     inventory.getItem(bigBonesID).doAction("Bury");
                     sleep(500, 750);
                  }
               }
               RSPath toMiddle = walking.getPath(npcs.getNearest(npcID)
                     .getLocation());
               toMiddle.traverse();
               sleep(1000, 1200);
               antiBan();
            }
         }
      } else {
         if (playerPos().equals(safey)) {
            if (npc != null && npc.isOnScreen() && !wereFighting()) {
               fight();
               antiBan();
            } else if (npc != null && !npc.isOnScreen()
                  && npcs.getNearest(npcID) != null
                  && !npcs.getNearest(npcID).isOnScreen()) {
               if (!wereFighting()) {
                  if (inventory.contains(bigBonesID) && yesBury) {
                     if (getMyPlayer().getAnimation() == -1) {
                        inventory.getItem(bigBonesID).doAction("Bury");
                        sleep(500, 750);
                     }
                  }
               }
            } else {
               antiBan();
            }
         } else {
            walkSafeTile();
         }
      }
   }

   private void walkSafeTile() {
      if (!playerPos().equals(safey)) {
         if (calc.distanceTo(safey) > 3) {
            walking.getPath(safey).traverse();
            sleep(1000, 1200);
         } else {
            walking.walkTileOnScreen(safey);
            sleep(1000, 1200);
         }
      }
   }

   private RSTile playerPos() {
      return getMyPlayer().getLocation();
   }

   private void walkPath(RSTile[] path) {
      RSTilePath dest = walking.newTilePath(path);
      dest.traverse();
      sleep(1000, 1500);
   }

   private void walkPathReverse(RSTile[] path) {
      RSTilePath dest = walking.newTilePath(path);
      dest.reverse();
      dest.traverse();
      sleep(1000, 1500);
      dest.reverse();
   }

   private void fight() {
      npc = newNPC();
      if (npc != null && (getMyPlayer().getInteracting() == null)) {
         npc.doAction("Attack");
         sleep(750, 1000);
      }
   }

   private boolean needHeal() {
      if (combat.getLifePoints() < (skills.getRealLevel(Skills.CONSTITUTION) * 10) / 2) {
         return true;
      }
      return false;
   }

   RSArea lootArea;

   public int loot() {
      lootID = convertIntegers(lootItems);
      RSGroundItem loot = groundItems.getNearest(lootID);
      if (resDung) {
         lootArea = resDungArea;
      } else {
         lootArea = giantArea;
      }
      if (!safeSpot) {
         if (loot != null && lootArea.contains(loot.getLocation())
               && !waitForDeath) {
            if (players.getMyPlayer().isMoving()) {
               return random(400, 600);
            }
            if (!inventory.isFull()) {
               if (!loot.isOnScreen()) {
                  camera.turnToTile(loot.getLocation(), 15);
                  if (!loot.isOnScreen()) {
                     walking.walkTileMM(walking.getClosestTileOnMap(loot
                           .getLocation()));
                     return random(900, 1200);
                  }
               }
               loot.doAction("Take " + loot.getItem().getName());
               sleep(random(1000, 1500));
               return random(900, 1100);
            } else {
               if (!yesBury) {
                  RSItem food = inventory.getItem(foodID);
                  if(food != null) {
                     food.doAction("Eat");
                     sleep(750, 1000);
                  }
               } else {
                  if (inventory.contains(bigBonesID)) {
                     if (getMyPlayer().getAnimation() == -1) {
                        inventory.getItem(bigBonesID).doAction("Bury");
                        sleep(500, 750);
                     }
                  }
               }
            }
         }
      } else {
         if (loot != null && lootArea.contains(loot.getLocation())
               && !waitForDeath) {
            if (players.getMyPlayer().isMoving()) {
               return random(400, 600);
            }
            if (!inventory.isFull()) {
               if (loot.isOnScreen()) {
                  loot.doAction("Take " + loot.getItem().getName());
                  sleep(random(1000, 1500));
               }
               return random(900, 1100);
            } else {
               if (!yesBury) {
                  RSItem food = inventory.getItem(foodID);
                  food.doAction("Eat");
                  sleep(750, 1000);
               } else {
                  if (inventory.contains(bigBonesID)) {
                     if (getMyPlayer().getAnimation() == -1) {
                        inventory.getItem(bigBonesID).doAction("Bury");
                        sleep(500, 750);
                     }
                  }
               }
            }
         }
      }
      return random(500, 600);
   }

   public void getCurrentCount() {
      int bonesCount = inventory.getCount(bonesID);
      currentBones = bonesCount - startBones;
      int fireCount = inventory.getCount(fireID);
      currentFire = fireCount - startFire;
      int natCount = inventory.getCount(natID);
      currentNat = natCount - startNat;
      int limpCount = inventory.getCount(limpID);
      currentLimp = limpCount - startLimp;
   }

   public void addRefresh() {
      totalBones += currentBones;
      currentBones = 0;
      startBones = 0;
      totalFire += currentFire;
      currentFire = 0;
      startFire = 0;
      totalNat += currentNat;
      currentNat = 0;
      startNat = 0;
      totalLimp += currentLimp;
      currentLimp = 0;
      startLimp = 0;
   }

   public boolean lootThere() {
      lootID = convertIntegers(lootItems);
      RSGroundItem loot = groundItems.getNearest(lootID);
      if (!safeSpot) {
         if (loot != null) {
            return true;
         }
      } else {
         if (loot != null && loot.isOnScreen()) {
            return true;
         }
      }
      return false;
   }

   /**
    * Returns the nearest NPC, specified by ID, that is not in combat.
    *
    * @param npcID
    *            ID of NPC
    * @return A RSNPC object with the given ID that is not in combat, else
    *         null.
    */
   // CREDITS TO GRAPES
   public RSNPC getNearestFree(final int npcID) {
      return npcs.getNearest(new Filter<RSNPC>() {
         public boolean accept(RSNPC npc) {
            return npc.getID() == npcID && !npc.isInCombat()
            && npc.getHPPercent() > 0;
         }
      });
   }

   public static int[] convertIntegers(List<Integer> integers) {
      int[] ret = new int[integers.size()];
      for (int i = 0; i < ret.length; i++) {
         ret = integers.get(i).intValue();
      }
      return ret;
   }

   private boolean wereFighting() {
      if (getMyPlayer().getInteracting() != null) {
         return true;
      }
      return false;
   }

   private RSNPC newNPC() {
      RSNPC interacting = interactingNPC();
      return interacting != null ? interacting : npcs
            .getNearest(new Filter<RSNPC>() {
               public boolean accept(RSNPC n) {
                  if (npcID == null) {
                     return false;
                  }
                  for (int i : npcID) {
                     if (n.getID() != i || n.getHPPercent() == 0
                           || n.isInCombat()) {
                        continue;
                     }
                     return true;
                  }
                  return false;
               }
            });
   }

   private RSNPC interactingNPC() {
      return npcs.getNearest(new Filter<RSNPC>() {
         public boolean accept(RSNPC n) {
            if (n.getInteracting() == null) {
               return false;
            }
            String[] acts = n.getActions();
            if (acts == null) {
               return false;
            }
            for (String a : acts) {
               if (a == null || !a.contains("Attack")) {
                  continue;
               }
               return n.getInteracting().equals(players.getMyPlayer());
            }
            return false;
         }
      });
   }

   public void setRun() {
      if (walking.getEnergy() > random(60, 100)) {
         walking.setRun(true);
      }
   }

   public void antiBan() {
      if (random(0, 15) == 0) {
         final char[] LR = new char[] { KeyEvent.VK_LEFT, KeyEvent.VK_RIGHT };
         final char[] UD = new char[] { KeyEvent.VK_DOWN, KeyEvent.VK_UP };
         final char[] LRUD = new char[] { KeyEvent.VK_LEFT,
               KeyEvent.VK_RIGHT, KeyEvent.VK_UP, KeyEvent.VK_UP };
         final int random2 = random(0, 2);
         final int random1 = random(0, 2);
         final int random4 = random(0, 4);

         if (random(0, 3) == 0) {
            mouse.moveSlightly();
            keyboard.pressKey(LR[random1]);
            sleep(random(100, 400));
            keyboard.pressKey(UD[random2]);
            sleep(random(300, 600));
            keyboard.releaseKey(UD[random2]);
            sleep(random(100, 400));
            keyboard.releaseKey(LR[random1]);

            if (random(0, 8) == 0) {
               if (game.getCurrentTab() != 1) {
                  game.openTab(1);
                  mouse.move(new Point(583, 252), 29, 11);
                  sleep(random(2000, 3000));
               }
               if (interfaces.getComponent(744, 9).isValid()) {
                  interfaces.getComponent(744, 9).doClick();
               }
               if (interfaces.getComponent(449, 29).isValid()) {
                  interfaces.getComponent(449, 29).doClick();
               }
            }

      
#1225
Forum Games / Re: Ironic Wish Granting
April 12, 2011, 06:07:07 AM
Granted, except you play them all like crap and someone vomits if they hear you play them. 

I wish I had a bow and arrow.
#1226
Forum Games / Re: Would you rather...
April 11, 2011, 11:12:05 AM
a.  b's much more embarrassing, besides, I don't go outside anymore. 

drpamplemousse and ruto:  it's the opposite with me.  my hands are my life (piano), and friends are nothing (currently I have none). 
#1227
Forum Games / Re: Would you rather...
April 06, 2011, 06:19:17 PM
b. 

WYR
A. have a nine foot steinway (considering you have room in your house for it to fit nicely)
B. have a stradivari violin/viola/cello that costs a few million dollars
C. have a million dollars (the instruments cost more)
#1228
*dies at seeing too much awesomeness*
#1229
Forum Games / Re: Would you rather...
March 29, 2011, 06:36:18 AM
hm I can do both I use the safari web browser to shop on amazon :P   go on an adventure in the amazon.  I wanna meet some cannibals!

Would you rather:
a. have crappy internet and awesome computer
b. have crappy computer but awesome internet
#1230
Off-Topic / Re: Eye color
January 03, 2011, 11:29:45 AM
My eyes are so dark brown that they're almost black.  And Ruto, who is that?