Malcolm Posted December 10, 2018 Posted December 10, 2018 Just give this Diamond rings and watch how many girlfriends you can get! Bot spams "Buying gf" and waits for a trade. I told you @Juggles , I'd come up with a good meme to compete with your bot reporting bot. import java.awt.event.KeyEvent; import org.osbot.rs07.api.map.constants.Banks; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; @ScriptManifest(author = "Malcolm", info = "Buys GF", name = "BF Buyer", version = 1.0, logo = "") public class Main extends Script { long tradeTime; public int onLoop() throws InterruptedException { if (getInventory().contains("Diamond ring")) { if (!Banks.GRAND_EXCHANGE.contains(myPlayer())) { getWalking().webWalk(Banks.GRAND_EXCHANGE.getRandomPosition()); } else { if (!getTrade().isCurrentlyTrading()) { typeStringInstant("cyan: Buying gf!"); sleep(random(3000, 4000)); if (getTrade().getRequestListener() != null) { if (getTrade().getLastRequestingPlayer() != null) { if (getTrade().getLastRequestingPlayer().interact("Trade with")) { tradeTime = System.currentTimeMillis(); new ConditionalSleep(10000) { @Override public boolean condition() throws InterruptedException { return getTrade().isCurrentlyTrading(); } }.sleep(); } } } } else { if (getWidgets().getTrade().isFirstInterfaceOpen()) { if (System.currentTimeMillis() > (tradeTime + 30000)) { if (getTrade().declineTrade()) { new ConditionalSleep(10000) { @Override public boolean condition() throws InterruptedException { return !getTrade().isCurrentlyTrading(); } }.sleep(); } } else { long dringAmount = getInventory().getAmount("Diamond ring"); if (getTrade().offer("Diamond ring", 1)) { new ConditionalSleep(40000) { @Override public boolean condition() throws InterruptedException { return dringAmount != getInventory().getAmount("Diamong ring"); } }.sleep(); if (getTrade().acceptTrade()) { new ConditionalSleep(40000) { @Override public boolean condition() throws InterruptedException { return getTrade().isSecondInterfaceOpen(); } }.sleep(); } } } } else if (getTrade().isSecondInterfaceOpen()) { if (getTrade().didOtherAcceptTrade()) { mouse.move(220, 300); sleep(random(300, 600)); mouse.click(false); new ConditionalSleep(40000) { @Override public boolean condition() throws InterruptedException { return !getTrade().isSecondInterfaceOpen(); } }.sleep(); typeStringInstant("cyan: We are now married! Love you!"); } } } } } else { log("No more rings! Stopping script"); stop(); } return 1000; } private void typeStringInstant(String output) { for (int i = 0; i < output.length(); i++) { char c = output.charAt(i); int code = KeyEvent.getExtendedKeyCodeForChar(c); getBot().getKeyEventHandler().generateBotKeyEvent(400, System.currentTimeMillis(), 0, code, c); } getBot().getKeyEventHandler().generateBotKeyEvent(401, System.currentTimeMillis(), 0, 10, '\u0000'); getBot().getKeyEventHandler().generateBotKeyEvent(402, System.currentTimeMillis(), 0, 10, '\u0000'); } } NOTE: at the time of writing there was an issue with the API and it did not wan't to accept the second screen. This section: mouse.move(220, 300); sleep(random(300, 600)); mouse.click(false); Should be: if (getTrade().acceptTrade()) { 2
Malcolm Posted December 10, 2018 Author Posted December 10, 2018 1 minute ago, Tom said: my eyes you love it
Malcolm Posted December 10, 2018 Author Posted December 10, 2018 2 minutes ago, Sky said: I don't think this is the first one actually. I looked but I couldn’t find one so let’s just pretend it is. I wouldn’t be surprised if it’s not
fennecer Posted December 10, 2018 Posted December 10, 2018 I can assume the profit per hour is abysmal with this script.
Malcolm Posted December 10, 2018 Author Posted December 10, 2018 16 minutes ago, fennecer said: I can assume the profit per hour is abysmal with this script. Profit? Girls are a cash sink. 2 1
TutIslander Posted December 10, 2018 Posted December 10, 2018 3 hours ago, Malcolm said: Profit? Girls are a cash sink. Couldn't agree more. Nice work mate and thanks for the open source
Keyster99 Posted December 10, 2018 Posted December 10, 2018 (edited) Perfect Edited December 10, 2018 by Keyster99