Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.Color;
- import java.awt.Graphics;
- import java.util.Map;
- import com.speljohan.rsbot.bot.Bot;
- import com.speljohan.rsbot.event.listeners.PaintListener;
- import com.speljohan.rsbot.script.Constants;
- import com.speljohan.rsbot.script.Script;
- import com.speljohan.rsbot.script.wrappers.RSNPC;
- import com.speljohan.rsbot.script.wrappers.RSObject;
- public class btpmakerpro extends Script implements PaintListener {
- public int lectern = 13648;
- public int softclay = 1761;
- public int studyAnimation = 3652;
- public int dButler = 4243;
- public int materials[] = {561, 995};
- public int tabs = 8015;
- Color BG = new Color(123, 123, 123, 100);
- Color GREEN = new Color(0, 255, 0, 255);
- Color RED = new Color(255, 0, 0, 255);
- Color BLACK = new Color(0, 0, 0, 255);
- int startingxp = -1;
- int startingtabs = -1;
- long startTime = -1;
- public String getName(){
- return "Peach Boner";
- }
- public String getAuthor(){
- return "Jope";
- }
- public String getScriptCategory(){
- return "Money";
- }
- public double getVersion(){
- return 1.1;
- }
- public String getScriptDescription() {
- String send = " <html> <head> <style> body {text-align:center; } i {color: blue;} h2 {text-align:right; color: red;} </style> </head> <body> <h2>" + getName() + " v"+getVersion()+"</h2> <br/>";
- send += " Setup at start: <br/> ";
- send += " Stand in front of the lectern with coins, nats and 26 clays in inventory. <br/> ";
- send += " Have 25 clays on Demon butler next to you and move camera behind you as high as it goes. <br/>";
- send += " Close all the doors so the butler spawns in the room. <br/>";
- return send;
- }
- @Override
- public boolean onStart(final Map<String, String> args) {
- startingxp = -1;
- startTime = -1;
- return true;
- }
- @Override
- public void onFinish() {
- Bot.getEventManager().removeListener(PaintListener.class, this);
- }
- public int loop() {
- if(getMyPlayer().isMoving()){
- if(getInventoryCount(softclay) >= 1)
- wait(random(4000, 5000));
- RSObject molo2 = findObject(lectern);
- if(molo2 == null) return 800;
- atObject(molo2, null);
- clickMouse(true);
- wait(random(4500, 5000));
- moveMouse(random(501, 506), random(17, 20));
- wait(random(50, 150));
- clickMouse(true);
- wait(random(250, 500));
- return 800;
- }
- if(getMyPlayer().getAnimation() == studyAnimation){
- return 800;
- }
- if(getInventoryCount(materials) < 10){
- log("outta materials, logging out");
- logout();
- stopAllScripts();
- return 800;
- }
- RSObject molo = findObject(lectern);
- if(molo == null) return 800;
- atObject(molo, null);
- wait(random(20, 50));
- clickMouse(true);
- wait(random(1550, 1650));
- moveMouse(random(402, 418), random(268, 253));
- wait(random(150, 200));
- clickMouse(true);
- if(getInventoryCount(softclay) == 1){
- wait(random(500, 1000));
- RSNPC butler = getNearestFreeNPCByID(dButler);
- if(butler == null) return 800;
- atNPC(butler, null);
- clickMouse(true);
- wait(random(3250, 3500));
- RSNPC butler2 = getNearestFreeNPCByID(dButler);
- if(butler2 == null) return 800;
- atNPC(butler2, null);
- clickMouse(true);
- wait(random(800, 1100));
- if(getInventoryCount(softclay) == 0){
- moveMouse(random(274, 336), random(455, 457));
- clickMouse(true);
- moveMouse(random(225, 301), random(397, 396));
- wait(random(1200, 1500));
- clickMouse(true);
- RSNPC butler3 = getNearestFreeNPCByID(dButler);
- if(butler3 == null) return 800;
- atNPC(butler3, null);
- clickMouse(true);
- wait(random(800, 950));
- RSNPC butler4 = getNearestFreeNPCByID(dButler);
- if(butler4 == null) return 800;
- atNPC(butler4, null);
- clickMouse(true);
- wait(random(20, 150));
- moveMouse(random(275, 337), random(456, 458));
- wait(random(900, 1200));
- clickMouse(true);
- wait(random(900, 1300));
- moveMouse(random(240, 273), random(406, 407));
- clickMouse(true);
- wait(random(900, 1300));
- moveMouse(random(214, 302), random(434, 436));
- clickMouse(true);
- wait(random(900, 1300));
- moveMouse(random(186, 243), random(456, 455));
- clickMouse(true);
- wait(random(900, 1300));
- moveMouse(random(266, 336), random(456, 457));
- clickMouse(true);
- wait(random(900, 1300));
- moveMouse(random(246, 271), random(458, 457));
- clickMouse(true);
- wait(random(900, 1300));
- moveMouse(random(241, 274), random(390, 391));
- clickMouse(true);
- wait(random(1200, 1500));
- input.sendKeys("25", true);
- wait(random(1300, 1600));
- moveMouse(random(257, 340), random(456, 455));
- clickMouse(true);
- wait(random(200, 300));
- RSObject molo2 = findObject(lectern);
- if(molo2 == null) return 800;
- atObject(molo2, null);
- clickMouse(true);
- wait(random(4500, 5000));
- moveMouse(random(501, 506), random(17, 20));
- wait(random(50, 150));
- clickMouse(true);
- wait(random(2750, 3250));
- } else {
- moveMouse(random(275, 337), random(456, 458));
- wait(random(300, 400));
- clickMouse(true);
- wait(random(900, 1300));
- moveMouse(random(240, 273), random(406, 407));
- clickMouse(true);
- wait(random(900, 1300));
- moveMouse(random(214, 302), random(434, 436));
- clickMouse(true);
- wait(random(900, 1300));
- moveMouse(random(186, 243), random(456, 455));
- clickMouse(true);
- wait(random(900, 1300));
- moveMouse(random(266, 336), random(456, 457));
- clickMouse(true);
- wait(random(900, 1300));
- moveMouse(random(246, 271), random(458, 457));
- clickMouse(true);
- wait(random(900, 1300));
- moveMouse(random(241, 274), random(390, 391));
- clickMouse(true);
- wait(random(1300, 1600));
- input.sendKeys("25", true);
- wait(random(1400, 1700));
- moveMouse(random(257, 340), random(456, 455));
- clickMouse(true);
- wait(random(100, 200));
- RSObject molo3 = findObject(lectern);
- if(molo3 == null) return 800;
- atObject(molo3, null);
- clickMouse(true);
- wait(random(100, 300));
- moveMouse(random(501, 506), random(17, 20));
- wait(random(4500, 5000));
- clickMouse(true);
- wait(random(2750, 3250));
- }
- }
- return 700;
- }
- public void onRepaint(final Graphics g) {
- if (isLoggedIn()) {
- if (startingxp == -1) {
- startingxp = skills.getCurrentSkillExp(Constants.STAT_MAGIC);
- startTime = System.currentTimeMillis();
- }
- if (startingtabs == -1) {
- startingtabs = getInventoryCount(tabs);
- startTime = System.currentTimeMillis();
- }
- long millis = System.currentTimeMillis() - startTime;
- final long seconds2 = millis / 1000;
- final long hours = millis / (1000 * 60 * 60);
- millis -= hours * 1000 * 60 * 60;
- final long minutes = millis / (1000 * 60);
- millis -= minutes * 1000 * 60;
- final long seconds = millis / 1000;
- String hoursString = "";
- String minutesString = "";
- String secondsString = seconds + "";
- String type = "seconds";
- if (minutes > 0) {
- minutesString = minutes + ":";
- type = "minutes";
- }
- if (hours > 0) {
- hoursString = hours + ":";
- type = "hours";
- }
- if (minutesString.length() == 1) {
- minutesString = "0" + minutesString;
- }
- if (hoursString.length() == 1) {
- hoursString = "0" + hoursString;
- }
- if (secondsString.length() == 1) {
- secondsString = "0" + secondsString;
- }
- final int x = 18;
- int y = 18;
- g.setColor(BG);
- g.fill3DRect(14, 25, 210, 140, true);
- g.setColor(BLACK);
- g.drawString(
- getName() + " v" + getVersion() + " by " + getAuthor(), x,
- y += 20);
- g.drawString("Running for " + hoursString + minutesString
- + secondsString + " " + type + ".", x, y += 20);
- g.setColor(BLACK);
- g
- .drawString(
- "Gained "
- + (skills
- .getCurrentSkillExp(Constants.STAT_MAGIC) - startingxp)
- + " experience.", x, y += 20);
- g.setColor(RED);
- if (seconds2 != 0) {
- g
- .drawString(
- "Averaging "
- + (skills
- .getCurrentSkillExp(Constants.STAT_MAGIC) - startingxp)
- * 3600 / seconds2
- + " experience per hour.", x, y += 20);
- }
- g.setColor(RED);
- g
- .drawString(
- "Averaging "
- + (getInventoryCount(tabs) - startingtabs)
- * 3600 / seconds2
- + " tabs per hour.", x, y += 20);
- g.setColor(RED);
- g
- .drawString(
- "Averaging "
- + (getInventoryCount(tabs) - startingtabs) * 417
- * 3600 / seconds2
- + " gps per hour.", x, y += 20);
- g.setColor(BLACK);
- g.drawString("Tabs: " + (getInventoryCount(tabs) - startingtabs) + (" | Profit: ") + (getInventoryCount(tabs) - startingtabs) * 417 + " gps.", x, y += 20);
- }
- }
- }
Add Comment
Please, Sign In to add comment