Jump to content

T3 Pizza-baser


Tw3nty

Recommended Posts

  • 3 months later...
  • 1 month later...
  • 4 weeks later...
  • 2 months later...
  • 1 year later...

thanks for sharing the source,

i made a mod for it.. i was too lazy to cut diamonds into bolt tips

so made this

hope it helps someone

since it takes about 1:20 to complete the inv, i added simple antiban, move screen after making all, and moves the mouse outside of screen, to appear more afk

package Skeleton;

import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
import java.text.DecimalFormat;
import org.osbot.rs07.api.ui.RS2Widget;

import java.awt.*;
import java.util.concurrent.TimeUnit;

@ScriptManifest(author = "Tw3nty - mod by iz0n", info = "cuts diamonds to bolt tips", name = "diamond cutter", version = 0.2, logo = "")
public class T3Pizzabaser extends Script {

    private long timeBegan;
    private long timeRan;
    private int itemsMade;
    private int itemsMadehr;

    @Override
    public void onStart() {
        log("Let's make some motherfucking Diamond Bolt Tips!");
        timeBegan = System.currentTimeMillis();
        itemsMade = 0;
    }

    private enum State {
        MAKE, BANK, IDLE, STOP;
    }

    private State getState() throws InterruptedException {
        if (inventory.contains("Chisel") && inventory.contains("Diamond")) {
            return State.MAKE;
        }
        else if (bank.open()) {
            if (bank.contains("Chisel") && bank.contains("Diamond")) {
                return State.BANK;
            }
            else {
                return State.STOP;
            }
        }
        else {
            return State.IDLE;
        }
    }

    @Override
    public int onLoop() throws InterruptedException {
        switch (getState()) {
            case MAKE:
                if (bank.isOpen()) {
                	getBank().close();
                    sleep(random(110, 320));
                }
                log("Case == MAKE");
                inventory.interact("Use", "Chisel");
                log("Interacting BoW...");
                sleep(random(110, 320));
                if (inventory.isItemSelected()) {
                    inventory.interact("Use", "Diamond");
                    log("Interacting PoF...");
                    sleep(random(970, 1975));
                }
                if (getDialogues().isPendingOption()) {

                    RS2Widget pizzaBase = widgets.get(309,2);
                    if (pizzaBase != null) {
                        pizzaBase.interact("Make All");
                        log("Interacting widget...");
                        camera.movePitch(random (20,130)+15);
                        camera.moveYaw(random (20,130)+25);
                        mouse.moveOutsideScreen();
                        sleep(random(83000, 85000));
                        itemsMade += 27;
                    }
                }
                break;
            case BANK:
                log("Case == BANK");
                if (inventory.contains("Chisel", "Diamond")) {
                    bank.depositAllExcept("Chisel","Diamond");
                    sleep(random(110, 320));
                }
                else if (!inventory.isEmpty()) {
                    bank.depositAllExcept("Chisel");
                    sleep(random(110, 320));
                }
                if (!inventory.contains("Diamond")) {
                    bank.withdraw("Diamond", 27);
                    sleep(random(110, 320));
                }
                
                break;
            case IDLE:
                sleep (random(9100,11320));
                break;
            case STOP:
                stop();
                break;
        }
        return random(200, 300);
    }

    @Override
    public void onExit() {
        log("ENJOY Diamond YOUR BOLT TIPS!");
    }

    @Override
    public void onPaint(Graphics2D g) {
        timeRan = System.currentTimeMillis() - this.timeBegan;
        itemsMadehr = (int)(itemsMade / ((System.currentTimeMillis() - timeBegan) / 3600000.0D));
        g.drawString("Time ran: " + ft(timeRan), 10, 35);
        DecimalFormat df = new DecimalFormat("#");
        g.drawString("Diamonds cut: " + df.format(itemsMade), 10,50);
        g.drawString("Diamonds per hour: " + df.format(itemsMadehr), 10,65);
    }

    private String ft(long duration)
    {
        String res = "";
        long days = TimeUnit.MILLISECONDS.toDays(duration);
        long hours = TimeUnit.MILLISECONDS.toHours(duration)
                - TimeUnit.DAYS.toHours(TimeUnit.MILLISECONDS.toDays(duration));
        long minutes = TimeUnit.MILLISECONDS.toMinutes(duration)
                - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS
                .toHours(duration));
        long seconds = TimeUnit.MILLISECONDS.toSeconds(duration)
                - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS
                .toMinutes(duration));
        if (days == 0) {
            res = (hours + ":" + minutes + ":" + seconds);
        } else {
            res = (days + ":" + hours + ":" + minutes + ":" + seconds);
        }
        return res;
    }
} 

 

Edited by iz0n
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...