Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.osbot.rs07.api.Interfaces;
- import org.osbot.rs07.api.Keyboard;
- import org.osbot.rs07.api.Mouse;
- import org.osbot.rs07.api.Trade;
- import org.osbot.rs07.api.Trade.OfferContainer;
- import org.osbot.rs07.api.ui.RS2InterfaceChild;
- import org.osbot.rs07.input.mouse.InterfaceDestination;
- import org.osbot.rs07.script.Script;
- import org.osbot.rs07.script.ScriptManifest;
- @ScriptManifest(author="Chad0ck", info="Dances for money!", name="Master Dancer", version=1.00, logo="")
- public class DancingForMoney
- extends Script
- {
- public void onStart()
- {
- this.mouse.click(new InterfaceDestination(this.bot, this.interfaces.getChild(548, 22)));
- this.mouse.click(new InterfaceDestination(this.bot, this.interfaces.getChild(548, 36)));
- }
- private static enum State
- {
- Spam, Accept;
- }
- private DancingForMoney.State getState()
- {
- if (this.interfaces.getChild(137, 4).interact(new String[] { "Accept trade" })) {
- return DancingForMoney.State.Accept;
- }
- return DancingForMoney.State.Spam;
- }
- public int onLoop()
- throws InterruptedException
- {
- switch (getState())
- {
- case Spam:
- sleep(500L);
- for (int counter = 0; counter < 15; counter++) {
- if (this.trade.getTheirOffers().isEmpty())
- {
- sleep(1000L);
- }
- else
- {
- for (int counter2 = 0; counter2 < 15; counter2++)
- {
- if (this.trade.isFirstInterfaceOpen()) {
- this.trade.acceptTrade();
- }
- sleep(1000L);
- }
- if (!this.trade.isSecondInterfaceOpen()) {
- break;
- }
- sleep(1500L);
- for (int counter2 = 0; counter2 < 15; counter2++) {
- if (this.trade.isSecondInterfaceOpen())
- {
- this.mouse.click(new InterfaceDestination(this.bot, this.interfaces.getChild(334, 20)));
- sleep(1000L);
- }
- }
- sleep(1000L);
- this.mouse.click(new InterfaceDestination(this.bot, this.interfaces.getChild(464, 13)));
- sleep(4000L);
- this.mouse.click(new InterfaceDestination(this.bot, this.interfaces.getChild(464, 14)));
- sleep(3000L);
- this.mouse.click(new InterfaceDestination(this.bot, this.interfaces.getChild(464, 16)));
- sleep(2500L);
- this.mouse.click(new InterfaceDestination(this.bot, this.interfaces.getChild(464, 15)));
- counter = 15;
- }
- }
- break;
- case Accept:
- this.keyboard.typeString("Dancing for Money!");
- sleep(5000L);
- }
- return random(150, 250);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment