Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.Color;
- import java.awt.Graphics;
- import java.awt.Graphics2D;
- import java.awt.Rectangle;
- import org.dynamac.bot.api.methods.Client;
- import org.dynamac.bot.api.methods.Mouse;
- import org.dynamac.bot.api.methods.NPCs;
- import org.dynamac.bot.api.wrappers.NPC;
- import org.dynamac.bot.script.ScriptDef;
- import org.dynamac.bot.api.methods.Skills;
- public class LinearGuildPickpocketer extends ScriptDef {
- public static int STUN_ANIM;
- public static int TRAINER_ID;
- private final long timeStarted;
- private String Status;
- public LinearGuildPickpocketer() {
- System.out
- .println("[ - Welcome To Linear Guild Pickpocketer for Dynamac - ]");
- System.out.println("[ - Created By Linear - ]");
- Mouse.setSpeed(0);
- timeStarted = System.currentTimeMillis();
- }
- @Override
- public void run() {
- while (true) {
- try {
- if (Client.getMyPlayer() != null) {
- NPC Trainer = NPCs.getNearest(TRAINER_ID);
- if (Trainer.getAnimationID() == -1) { // psuedo for now
- pickPocket();
- } else {
- sophiPause();
- }
- }
- sleep(10);
- } catch (Exception e) {
- }
- }
- }
- int startExp = Skills.getSkillExperience(Skills.THIEVING_INDEX);
- public void pickPocket() {
- NPC Trainer = NPCs.getNearest(TRAINER_ID);
- Status = "Picking Pockets";
- while (Trainer.getAnimationID() == -1) {
- // trainer.click
- }
- }
- public void sophiPause() {
- Status = "Sophisticated Sleeping";
- }
- @Override
- public void repaint(Graphics g) {
- long timeElapsed = System.currentTimeMillis() - this.timeStarted;
- // Elapsed time
- int seconds = (int) (timeElapsed / 1000) % 60;
- int minutes = (int) ((timeElapsed / (1000 * 60)) % 60);
- int hours = (int) ((timeElapsed / (1000 * 60 * 60)) % 24);
- g.drawString(hours + ":" + minutes + ":" + seconds, 20, 20);
- // Stuff per hr
- int stuffPerHour = (int) ((Skills.THIEVING_INDEX - startExp * 3600000D) / timeElapsed);
- g.drawString("Stuff per hour: " + stuffPerHour, 20, 40);
- /*
- * int xpHour = (int) ((float) (Skills.THIEVING_INDEX - startExp) /
- * (float) runTime.getElapsed() * 3600000);
- */
- final Graphics2D g2d = (Graphics2D) g;
- Rectangle bg = new Rectangle(5, 20, 260, 150);
- g2d.setColor(Color.CYAN);
- g2d.fill(bg);
- g2d.setColor(Color.PINK);
- g2d.fill(new Rectangle(4, 2, 15, 30));
- g2d.fill(new Rectangle(2, 16, 2, 30));
- g2d.setColor(Color.BLACK);
- g2d.drawString("Linear Guild Pickpocketer!", 80, 35);
- g2d.drawString(
- "Thieving Level:" + Skills.getLevel(Skills.THIEVING_INDEX), 20,
- 60);
- g2d.drawString(
- "Thieving Experience gained:"
- + (Skills.getSkillExperience(Skills.THIEVING_INDEX) - startExp),
- 20, 80);
- g2d.drawString("Runtime: UNDER CONSTRUCTION", 20, 100); // +
- // runTime.toElapsedString(),
- // 20, 100);
- // g2d.drawString("XP/Hr: " + xpHour, 20, 120);
- g2d.drawString("Status: " + Status, 20, 140);
- }
- }
Add Comment
Please, Sign In to add comment