Jump to content

[Open Source / Github Link] Pair of Powerskilling Scripts


Recommended Posts

Posted

https://github.com/YifanLi5/OttoGrottoFisher

  • ~20k-55k fishing xph, ~2.5-5.5k strength and agility xph. (Lvl Based)
  • Random inventory shift click drop orders.
    • If player stops fishing, may drop fish if inventory is almost full. (Can't AFK much if not many inventory freespace)
  • AFK simulation, different AFK timings every script run session
    • gaussian / random normal distribution / bell curve timings
    • triggered if inventory is full or if the fish npc moved.
  • Dragon Harpoon special (If equipped)
  • Saves Clue bottles
  • Stops on feather/bait shortage

https://github.com/YifanLi5/Mark-And-Chop

  • Random inventory shift click drop orders.
    • If player stops chopping, may drop logs if inventory is almost full to prepare for next AFK cycle.
    • Can't AFK much if not many inventory freespace
  • AFK simulation, different AFK timings every script run session
    • gaussian / random normal distribution / bell curve timings
    • triggered if inventory is full or if the tree was chopped down.
  • Dragon axe special (If equipped)
  • Picks up nests

 

Both uses fairly identical code as both activities are the same thing.
Interact -> Wait until inventory full or player stops animating -> drop all -> restart...

Chopping script can mark/chop any choppable tree, however that doesn't mean it is compatible with all situations or locations.
ex: Marking a tree in a valley and one on a cliff.

 

 

My takeaway from writing the above scripts...

1. I understand why the premium scripts use AREA instead of marking individual trees such as... 

 

Because an Area filter on trees (RS2Objects) is much more easier to do.

 

2. I needed a paint template to speed things along. Grid can display whatever info you want based on the String[][] data argument. See Paint/ScriptPaint.java for usage (Either github project). 

private void drawGrid(Graphics2D g, String[][] data, int cellWidth, int cellHeight) {
    g.setFont(font);
    g.setColor(GRID_BG); //Background Color of Grid
    int maxNumCols = 0;
    for (String[] row : data) {
        maxNumCols = Math.max(maxNumCols, row.length);
    }
    if (gridCanvas == null)
        gridCanvas = new Rectangle(cellWidth * maxNumCols, cellHeight * data.length);
    g.fill(gridCanvas);
    g.setColor(Color.WHITE); // Color of Text and Grid lines
    g.draw(gridCanvas);


    // draw the horizontal lines
    for (int i = 0; i <= data.length; i++) {
        int y = i * cellHeight;
        g.drawLine(0, y, cellWidth * maxNumCols, y);
    }

    for (int row = 0; row < data.length; row++) {
        int numElementsInRow = data[row].length;

        for (int col = 0; col < numElementsInRow; col++) {
            // draw the strings in the right positions
            int textX = col * (gridCanvas.width / numElementsInRow) + (gridCanvas.width / (numElementsInRow * 2) - g.getFontMetrics().stringWidth(data[row][col]) / 2);
            int textY = row * (gridCanvas.height / data.length) + (gridCanvas.height / (data.length * 2)) - g.getFontMetrics(font).getHeight() / 2 + g.getFontMetrics().getAscent();
            g.drawString(data[row][col], textX, textY);

            // draw the vertical lines. Dividing each row into {numElementsInRow} sections
            for (int i = 0; i < numElementsInRow - 1; i++) {
                int x = col * (gridCanvas.width / numElementsInRow);
                g.drawLine(x, row * cellHeight, x, row * cellHeight + cellHeight);
            }
        }
    }
}

 

  • Like 2

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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