Jump to content

LCSPro

Members
  • Posts

    13
  • Joined

  • Last visited

  • Feedback

    0%

Profile Information

  • Gender
    Male

Recent Profile Visitors

679 profile views

LCSPro's Achievements

Newbie

Newbie (1/10)

0

Reputation

  1. package scripts;import java.awt.Color;import java.awt.Font;import java.awt.Graphics;import java.awt.Image;import java.awt.Rectangle;import java.awt.event.MouseEvent;import java.io.IOException;import java.net.URL;import javax.imageio.ImageIO;import org.Advertising other bots isn&#39;t allowed..api.General;import org.Advertising other bots isn&#39;t allowed..api.Timing;import org.Advertising other bots isn&#39;t allowed..api.input.Mouse;import org.Advertising other bots isn&#39;t allowed..api2007.ChooseOption;import org.Advertising other bots isn&#39;t allowed..api2007.GameTab;import org.Advertising other bots isn&#39;t allowed..api2007.GameTab.TABS;import org.Advertising other bots isn&#39;t allowed..api2007.Camera;import org.Advertising other bots isn&#39;t allowed..api2007.Inventory;import org.Advertising other bots isn&#39;t allowed..api2007.NPCs;import org.Advertising other bots isn&#39;t allowed..api2007.Objects;import org.Advertising other bots isn&#39;t allowed..api2007.Player;import org.Advertising other bots isn&#39;t allowed..api2007.Players;import org.Advertising other bots isn&#39;t allowed..api2007.Skills;import org.Advertising other bots isn&#39;t allowed..api2007.types.RSItem;import org.Advertising other bots isn&#39;t allowed..api2007.types.RSNPC;import org.Advertising other bots isn&#39;t allowed..api2007.types.RSPlayer;import org.Advertising other bots isn&#39;t allowed..api2007.types.RSTile;import org.Advertising other bots isn&#39;t allowed..script.Script;import org.Advertising other bots isn&#39;t allowed..script.ScriptManifest;import org.Advertising other bots isn&#39;t allowed..script.interfaces.Painting;@ScriptManifest(authors={"LCSPro"}, category="Combat", name="SuperYaks", description="Fights Yaks on the Island of Neitiznot", version=0.1D)public class SuperYaks extends Scriptimplements Painting{ long Start; private double ratioPerHour = (3600000D) / (System.currentTimeMillis() - Start); private final Font theFont = new Font("Trebuchet MS", Font.BOLD, 14); private final Image thePaint = getImage("http://i.imgur.com/9Pttd3b.png"); Rectangle hide = new Rectangle(491, 505, 20, 20); public boolean showPaint = true; int[] foodsInt = { 1891, 1893, 1895, 379, 329, 333, 2309, 361, 373, 385, 351 }; int startExperience; int currentExperience; int experienceGained; int yaksKilled; int yaksPerHour; int foodAte; String Yaks = "Yak"; String Status; public void run() { println("Welcome to SuperYaks"); println("Please post feedback, bugs & suggestions on Advertising other bots isn&#39;t allowed..org"); Mouse.setSpeed(400); Start = System.currentTimeMillis(); startExperience = (Skills.getXP("HITPOINTS") + Skills.getXP("ATTACK") + Skills.getXP("STRENGTH") + Skills.getXP("DEFENCE") + Skills.getXP("RANGED")); while (loop() > 0) { loop(); } } public int loop() { RSNPC[] theYaks = NPCs.findNearest(new String[] {"Yak"}); RSNPC[] theStrangePlant = NPCs.findNearest(new String[] { "Strange Plant" }); /* Logout Support */ if(!hasFood() && !inCombat()) { if(GameTab.getOpen() != GameTab.TABS.LOGOUT) { while(GameTab.getOpen() != GameTab.TABS.LOGOUT) { Status = ("Opening LOGOUT Tab"); GameTab.open(TABS.LOGOUT); sleep(300,600); } } if(GameTab.getOpen() == GameTab.TABS.LOGOUT) { RSTile thePlayerPosition = new RSTile(Player.getPosition().getX(), Player.getPosition().getY()); while(Player.getPosition().equals(thePlayerPosition)) { Status = ("Logging out"); Mouse.move(580 + General.random(0, 120), 365 + General.random(0, 20)); Mouse.click(1); } } stopScript(); return 0; } /* Combat Support */ if(!inCombat() && hasFood() && Skills.getCurrentLevel("Hitpoints") > 30) { if (theYaks.length > 0) { for (RSNPC free : theYaks) { if(!free.isInCombat()) { if(!inCombat() && !free.isInCombat()) { long timer = System.currentTimeMillis() + General.random(1000, 1200); while(!ChooseOption.isOptionValid("Attack") && System.currentTimeMillis() < timer) { Status = ("Finding Yak"); free.hover(); } while(ChooseOption.isOptionValid("Attack") && !free.isInCombat() && !inCombat()) { Status = ("Attacking Yak"); free.click("Attack"); } } } } } } /* inCombat Support */ while(inCombat()) { Status = ("Fighting Yaks"); currentExperience = (Skills.getXP("HITPOINTS") + Skills.getXP("ATTACK") + Skills.getXP("STRENGTH") + Skills.getXP("DEFENCE") + Skills.getXP("RANGED")); experienceGained = currentExperience - startExperience; yaksPerHour = (int)(ratioPerHour * getYaksKilled()); getYaksKilled(); /* Food Support */ if(Skills.getCurrentLevel("Hitpoints") <= General.random(20, 30) && hasFood()) { if(hasFood()) { RSItem[] ourFood = Inventory.find(foodsInt); Status = ("Eating, we're at: " + getHpPercent() + "% HP"); println("Health Percent: " + getHpPercent()); if(Skills.getCurrentLevel("Hitpoints") <= 30) { if(ourFood.length > 0) { for(RSItem theFood : ourFood) { while(!ChooseOption.isOptionValid("Eat")) { Status = ("Hovering Food ID:" + theFood.getID()); theFood.hover(); } if(ChooseOption.isOptionValid("Eat")) { theFood.click("Eat"); foodAte ++; sleep(300,600); } } } } } } } return 25; } private int getYaksKilled() { return experienceGained / 266; } public int getHpPercent() { return (int)(Skills.getCurrentLevel("Hitpoints") / Skills.getActualLevel("Hitpoints")) * 100; } public boolean hasArrows() { RSItem[] ironKnives = Inventory.find(893); if(ironKnives.length > 0) { return true; } return false; } public boolean hasFood() { RSItem[] foods = Inventory.find(foodsInt); if (foods.length > 0) { return true; } return false; } public boolean inCombat() { long t = System.currentTimeMillis() + General.random(500,800); while (System.currentTimeMillis() < t) { if (Player.getRSPlayer().getAnimation() != -1) { return true; } } return false; } private Image getImage(String url) { try { return ImageIO.read(new URL(url)); } catch (IOException e) {} return null; } private final float expPerHour() { return 1000.0F / ((float)((System.currentTimeMillis() - Start) / 60L / 60L) / (experienceGained)); } public void mouseClicked(MouseEvent e) { if (hide.contains(e.getPoint())) { showPaint = !showPaint; } } public void onPaint(Graphics Super) { if(showPaint) { Super.drawRect(491, 505, 20, 20); Super.setColor(Color.CYAN); Super.setFont(theFont); Super.drawImage(thePaint, 5, 305, null); Super.drawString(" " + Status, 78, 377); Super.drawString(" " + (int)(experienceGained), 187, 399); Super.drawString(" " + (int)(expPerHour()), 158, 419); Super.drawString(" " + getYaksKilled(), 118, 442); Super.drawString(" " + foodAte, 105, 463); Super.drawString("Runtime: " + Timing.msToString(System.currentTimeMillis() - Start), 335, 365); } else { //nothing } }}
  2. Just made me feel internet special, +1 Look forward to working with you too.
  3. Sent a PM yesterday, had no response. I look forward to hearing from you all.
×
×
  • Create New...