ULTIMATE GUIDE

LoG iN

ULTIMATE GUIDE


    KuzoxiSpliter

    Share

    Turk4life321
    Admin

    Posts : 41
    Join date : 2009-08-09
    Location : In Saims Room *cough*

    KuzoxiSpliter

    Post  Turk4life321 on Fri Jan 01, 2010 4:46 am

    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.util.*;
    import javax.swing.*;
    import org.rsbot.bot.Bot;
    import org.rsbot.script.*;
    import org.rsbot.script.wrappers.RSInterface;
    import org.rsbot.script.wrappers.RSObject;
    import org.rsbot.event.events.*;
    import org.rsbot.event.listeners.PaintListener;
    import org.rsbot.event.listeners.ServerMessageListener;
    @ScriptManifest(authors = { "Rui" }, category = "Money", name = "KuzoxiSpliter", version = 1.0, description = "<html>" +
    "<head></head><body>Get millions of cash with my Granite Spliter =D" +
    "<br>You just need a chisel in the first slot of your inventory, and the granite (5kg or 2kg) in the first slot in your bank. I Recomend you bot this script in Pest control bank becouse there are almost no people and there you have less probability of bugs or something. enjoy it and good luck =)" +
    "" +
    "" +
    "" +
    "<br>" +
    "</body></html\n")
    public class KuzoxiSpliter extends Script implements PaintListener, ActionListener, ServerMessageListener {
    JLabel lblType = new JLabel("Type");
    JRadioButton granite5kg = new JRadioButton("5kg");
    JRadioButton granite2kg = new JRadioButton("2kg");
    JButton buttonStart = new JButton("Start");
    JFrame frame;
    boolean start;
    int count = 0;
    int count1 = 0;
    int count2 = 0;
    static int[] bankBooth = { 36831, 25808, 2213, 35647, 11758, 34752, 11402, 26972, 14367, 2213};
    int granite;
    int granite2;
    int chisel = 1755;
    String KG;
    int[] allGranite = { 6979, 6981, 6983 };
    public long startTime = System.currentTimeMillis();
    public int itemCount2 = 0;
    public int itemCount = 0;
    public final int graniteZero = 6979;
    public int inventoryItem = graniteZero;
    public int inventoryItem2 = granite;
    int g5kgMarketPrice = 0;
    int g5gMarketPrice = 0;
    public GEItemInfo graniteZeroInfo = grandExchange.loadItemInfo(graniteZero);
    public GEItemInfo graniteInfo = grandExchange.loadItemInfo(granite);
    public String getName(){
    return "KuzoxiSpliter";
    }
    public String getAuthor(){
    return "Kuzoxi";
    }
    public String getScriptCategory(){
    return "Kuzoxi";
    }
    public double getVersion(){
    return 2.21;
    }
    public boolean onStart(Map<String, String> args)
    {
    log("Getting market prices for Granite 5kg, and Granite 500g.");
    GEItemInfo price5kg = grandExchange.loadItemInfo(6983);
    GEItemInfo price500g = grandExchange.loadItemInfo(6979);
    g5kgMarketPrice = price5kg.getMarketPrice();
    g5gMarketPrice = price500g.getMarketPrice();
    log("Done getting market prices!");
    log(" -Granite 5kg: " + g5kgMarketPrice + "gp");
    log(" -Granite 500g: " + g5gMarketPrice + "gp");
    count = g5kgMarketPrice;
    count1 = g5gMarketPrice;
    start = false;
    return createGUI();
    }
    public void onFinish(){
    Bot.getEventManager().removeListener(PaintListener.class, this);
    return;
    }
    public boolean clickInventoryItem(int itemID, boolean click) {
    if (getCurrentTab() != TAB_INVENTORY
    && !RSInterface.getInterface(INTERFACE_BANK).isValid()
    && !RSInterface.getInterface(INTERFACE_STORE).isValid()) {
    openTab(TAB_INVENTORY);
    }
    int[] items = getInventoryArray();
    java.util.List<Integer> possible = new ArrayList<Integer>();
    for (int i = 0; i < items.length; i++) {
    if (items[i] == itemID) {
    possible.add(i);
    }
    }
    if (possible.size() == 0) return false;
    int idx = possible.get(random(0, possible.size()));
    Point t = getInventoryItemPoint(idx);
    clickMouse(t, 5, 5, click);
    return true;
    }
    public boolean needToBank(){
    return isInventoryFull();
    }
    public boolean openBank(){
    RSObject bank = findObject(bankBooth);
    if(bank == null) return false;
    return atObject(bank, "Use-quickly");
    }
    public boolean depositGranite(){
    if(!bank.isOpen()) return false;
    itemCount += getInventoryCount( inventoryItem );
    bank.depositAllExcept(chisel, granite2);
    wait (random(800, 1000));
    if (!inventoryContains(granite) && bank.getCount(granite) == 0) {
    bank.close();
    stopAllScripts();
    }
    if(bank.atItem(granite, "Withdraw-" + KG) == true)
    {
    wait (random(1000, 1200));
    }else{
    bank.atItem(granite, "Withdraw-X");
    wait (random(800, 1000));
    if(RSInterface.getInterface(752).isValid()){
    Bot.getInputManager().sendKeys(KG, true);
    wait (random(800, 1000));
    }else{
    wait(random(800, 1000));
    Bot.getInputManager().sendKeys(KG, true);
    }
    }
    itemCount2 += getInventoryCount( inventoryItem2 );
    bank.close();
    return true;
    }
    public boolean cut2kg(){
    clickInventoryItem(chisel, true);
    wait(random(300, 500));
    clickInventoryItem(granite2, true);
    wait(random(300, 500));
    if(RSInterface.getInterface(228).isValid()){
    clickMouse(255 + random(-5, 5), 404 + random(-5, 5), true);
    }else{
    wait(random(300, 500));
    clickMouse(255 + random(-5, 5), 404 + random(-5, 5), true);
    }
    count2 = count2 + 4;
    return true;
    }
    public boolean cut5kg(){
    clickInventoryItem(chisel, true);
    wait(random(300, 500));
    clickInventoryItem(granite, true);
    wait(random(300, 500));
    if(RSInterface.getInterface(228).isValid()){
    clickMouse(255 + random(-5, 5), 404 + random(-5, 5), true);
    }else{
    wait(random(300, 500));
    clickMouse(255 + random(-5, 5), 404 + random(-5, 5), true);
    }
    count2 = count2 + 2;
    return true;
    }
    public boolean getChisel(){
    if(!bank.isOpen()) return false;
    bank.atItem(chisel, "Withdraw-1");
    bank.close();
    return true;
    }
    public int loop(){
    if(getInventoryCount(chisel) == 0){
    if(bank.isOpen()){
    getChisel();
    return 800;
    }
    if(!bank.isOpen()){
    openBank();
    return 800;
    }
    }
    if(!isInventoryFull()){
    if(getInventoryCount(6981) >= 1){
    if(getInventoryCount() <= 24){
    cut2kg();
    return 1000;
    }else{
    if(bank.isOpen()){
    depositGranite();
    return 800;
    }
    if(!bank.isOpen()){
    openBank();
    return 800;
    }
    }
    }
    if(getInventoryCount(6983) >= 1){
    if(getInventoryCount() <= 25){
    cut5kg();
    return 1000;
    }else{
    if(bank.isOpen()){
    depositGranite();
    return 800;
    }
    if(!bank.isOpen()){
    openBank();
    return 800;
    }
    }
    }
    }else{
    if(bank.isOpen()){
    depositGranite();
    return 800;
    }
    if(!bank.isOpen()){
    openBank();
    return 800;
    }
    }
    if(!inventoryContains(granite)){
    if(bank.isOpen()){
    depositGranite();
    return 800;
    }
    if(!bank.isOpen()){
    openBank();
    return 800;
    }
    }
    return random(800, 1000);
    }
    public void onRepaint(final Graphics g) {
    long profit = count2 *(((count1*10)-count)/10);
    if (isLoggedIn()) {
    long millis = System.currentTimeMillis() - startTime;
    long hours = millis / (1000 * 60 * 60);
    millis -= hours * (1000 * 60 * 60);
    long minutes = millis / (1000 * 60);
    millis -= minutes * (1000 * 60);
    long seconds = millis / 1000;
    int x = 326;
    int y = 27;
    int y2 = 42;
    int y3 = 57;
    int y4 = 72;
    g.setColor(new Color(0, 0, 0, 175));
    g.fillRoundRect(320, 12, 155, 70, 10, 10);
    g.setColor(Color.CYAN);
    g.drawString("KuzoxiSpliter", x, y);
    g.setColor(Color.CYAN);
    g.drawString("Granite split(500g): "+ itemCount, x, y2);
    g.setColor(Color.CYAN);
    g.drawString("Profit: " + profit , x, y3);
    g.setColor(Color.CYAN);
    g.drawString("Time running: " + hours + ":" + minutes + ":" + seconds + ".", x, y4);
    }
    }
    public void serverMessageRecieved(ServerMessageEvent e) {
    }
    public String getScriptDescription()
    {
    String html = "<hmtl>";
    html += "<center>";
    html += "<p>All settings can be set on the GUI, select your character and Start!";
    html += "</center>";
    html += "</html>";
    return html;
    }
    public boolean createGUI() {
    frame = new JFrame("KuzoxiSpliter v" + getVersion());
    frame.setLayout(null);
    frame.setResizable(false);
    frame.setSize(170, 220);
    frame.setLocationRelativeTo(null);
    buttonStart.setBounds(45, 124, 100, 30);
    granite5kg.setBounds(60, 44, 100, 22);
    granite2kg.setBounds(60, 71, 100, 20);
    lblType.setBounds(70, 17, 100, 25);
    frame.add(buttonStart);
    frame.add(granite5kg);
    frame.add(granite2kg);
    frame.add(lblType);
    buttonStart.addActionListener(this);
    frame.setVisible(true);
    while (!start) {
    wait(100);
    }
    return true;
    }
    public void actionPerformed(ActionEvent e) {
    if (isOkay()) {
    if (e.getActionCommand().contains("art")) {

    if (granite2kg.isSelected() == true) {
    KG = "6";
    granite=6981;
    granite2=6981;
    } else if (granite5kg.isSelected() == true) {
    KG = "3";
    granite=6983;
    granite2=6981;
    }
    JOptionPane.showMessageDialog(frame,
    "I hoppe you like it, its my first script, and I just want you enjoy it. Happy botting!" +
    "Credits: 100% to me");

    log("Starting KuzoxiSpliter v" + getVersion());
    frame.dispose();
    start = true;
    frame.setVisible(false);
    }
    }
    }
    public boolean isOkay() {
    if (granite5kg.isSelected() && granite2kg.isSelected()) {
    JOptionPane.showMessageDialog(frame,
    "You can only choose 5kg or 2kg!!!");
    return false;
    }
    return true;
    }
    }

      Current date/time is Sat Nov 18, 2017 3:08 pm