Jump to content

buying items from ge


flikrrrr

Recommended Posts

hey so i was using chatgpt to see if it understands stuff like this and i want to script to buy dismantle sell and repeat on bracelet of eth pls help 

import org.osbot.rs07.api.Bank;
import org.osbot.rs07.api.Inventory;
import org.osbot.rs07.api.GrandExchange;
import org.osbot.rs07.api.model.Item;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

@ScriptManifest(author = "Your Name", info = "A script for making money in Old School RuneScape", name = "OSRS Money Maker", version = 1.0, logo = "")
public class Main extends Script {

    private static final int BRACELET_OF_ETHEREUM = 11069;
    private static final int REVENANT_ETHER = 11074;

    private Bank bank;
    private Inventory inventory;
    private GrandExchange ge;

    @Override
    public void onStart() {
        bank = getBank();
        inventory = getInventory();
        ge = getGrandExchange();
    }

    @Override
    public int onLoop() throws InterruptedException {
        if (!inventory.isFull()) {
            if (!ge.isOpen()) {
                ge.isOpen();
            } else {
                Item bracelet = inventory.getItem(BRACELET_OF_ETHEREUM);
                if (bracelet == null || bracelet.getAmount() == 0) {
                    buyBraceletOfREVENANT_ETHEReum();
                } else {
                    dismantleBracelet();
                }
            }
        } else {
            if (!bank.isOpen()) {
                bank.open();
            } else {
                depositAll();
                withdrawAll();
            }
        }
        return 200;
    }

    private void buyBraceletOfREVENANT_ETHEReum() {
        ge.buyItem(BRACELET_OF_ETHEREUM, 250, 45000);
    }

    private void dismantleBracelet() throws InterruptedException {
        inventory.getItem(BRACELET_OF_ETHEREUM).interact("Dismantle");
        sleep(random(1500, 2000));
        sellREVENANT_ETHER();
    }

    private void sellREVENANT_ETHER() throws InterruptedException {
        ge.sellItem(REVENANT_ETHER, 62500, 1);
        sleep(random(1500, 2000));
    }

    private void depositAll() {
        bank.depositAll();
    }

    private void withdrawAll() {
        bank.withdrawAll(REVENANT_ETHER);
    }

}

 

Link to comment
Share on other sites

package core;

import org.osbot.rs07.api.Bank;
import org.osbot.rs07.api.Inventory;
import org.osbot.rs07.api.GrandExchange;
import org.osbot.rs07.api.model.Item;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

@ScriptManifest(author = "Your Name", info = "A script for making money in Old School RuneScape", name = "OSRS Money Maker", version = 1.0, logo = "")
public class Main extends Script {

    private static final int BRACELET_OF_ETHEREUM = 11069;
    private static final int REVENANT_ETHER = 11074;

    private Bank bank;
    private Inventory inventory;
    private GrandExchange ge;

    @Override
    public void onStart() {
        bank = getBank();
        inventory = getInventory();
        ge = getGrandExchange();
    }

    @Override
    public int onLoop() throws InterruptedException {
        if (!inventory.isFull()) {
            if (!ge.isOpen()) {
                ge.isOpen();
            } else {
                Item bracelet = inventory.getItem(BRACELET_OF_ETHEREUM);
                if (bracelet == null || bracelet.getAmount() == 0) {
                    buyBraceletOfREVENANT_ETHEReum();
                } else {
                    dismantleBracelet();
                }
            }
        } else {
            if (!bank.isOpen()) {
                bank.open();
            } else {
                depositAll();
                withdrawAll();
            }
        }
        return 200;
    }

    private void buyBraceletOfREVENANT_ETHEReum() {
        ge.buyItem(BRACELET_OF_ETHEREUM, IiiiIiIiiiI(null), 250, 45000);
    }

    private void dismantleBracelet() throws InterruptedException {
        inventory.getItem(BRACELET_OF_ETHEREUM).interact("Dismantle");
        sleep(random(1500, 2000));
        sellREVENANT_ETHER();
    }

    private void sellREVENANT_ETHER() throws InterruptedException {
        ge.sellItem(REVENANT_ETHER, 62500, 1);
        sleep(random(1500, 2000));
    }

    private void depositAll() {
        bank.depositAll();
    }

    private void withdrawAll() {
        bank.withdrawAll(REVENANT_ETHER);
    }

}

 

updated a bit but now it just logs in and does nothing

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...