Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Question Simple Fletching

Joined
Mar 23, 2018
Messages
97
So I'm having a little bit of an issue digging through the API to find all the correct methods I need to do this. This is my first bot and I wanted to make a simple Woodcutting and Arrow Shaft fletching bot as it seems none on the store work. I currently have it cutting wood and banking properly, but now I want it to fletch arrow shafts.

Code:
package com.dark57.bots.chopandfletch;

import com.runemate.game.api.script.framework.task.Task;
import com.runemate.game.api.hybrid.local.hud.interfaces.Inventory;

public class FletchArrowShaft extends Task {
    private String tree = "Logs";
    @Override
    public boolean validate() {
        if ( Inventory.isFull() && Inventory.contains(tree)) {
            return true;
        }
        return false;
    }

    @Override
    public void execute() {

    }
}

I'm looking in GameObjects and Inventory to figure out how to use an action on an item in the inventory, but I'm not really finding anything useful. Can anyone point me in the right direction or write up a quick example?

Thanks in advance,
Dark57
 
Joined
Mar 27, 2018
Messages
6
hey, im new to this here, but still want try to help you :) i would try something like:

Code:
        final SpriteItem logToFletch = Inventory.newQuery().names("logs").results().first();
        if(logToFletch != null) {
            logToFletch.interact("Craft");
            //more code balblabla
        } else {
            Environment.getBot().getLogger().info("logToFletch in XXX was null");
        }

in anything wrong correct me :)
 
Joined
Mar 11, 2014
Messages
450
So I'm having a little bit of an issue digging through the API to find all the correct methods I need to do this. This is my first bot and I wanted to make a simple Woodcutting and Arrow Shaft fletching bot as it seems none on the store work. I currently have it cutting wood and banking properly, but now I want it to fletch arrow shafts.

Code:
package com.dark57.bots.chopandfletch;

import com.runemate.game.api.script.framework.task.Task;
import com.runemate.game.api.hybrid.local.hud.interfaces.Inventory;

public class FletchArrowShaft extends Task {
    private String tree = "Logs";
    @Override
    public boolean validate() {
        if ( Inventory.isFull() && Inventory.contains(tree)) {
            return true;
        }
        return false;
    }

    @Override
    public void execute() {

    }
}

I'm looking in GameObjects and Inventory to figure out how to use an action on an item in the inventory, but I'm not really finding anything useful. Can anyone point me in the right direction or write up a quick example?

Thanks in advance,
Dark57
:( my arrow shafts work :(
 
Joined
Mar 23, 2018
Messages
97
I'm not sure what your bot is specifically, but I tried a wide variety of bots on the store for RS3 that advertised woodcutting and fletching together. None of them worked, instead of making arrow shafts they made shortbows and stopped running after one iteration.

So maybe I didn't try yours, but I tried enough to give up looking.
 
I got it working in the most simplest of forms, but I think I stumbled on to why it seems all the chop and fletch bots are having issues right now. I had to use getAt() instead of querying a container to properly interact with the interfaces. When I was using queries, it wouldn't select the arrow shaft properly and would indeed just try and fletch short bows.

Not the prettiest, but it works. I'm going to expand on some functionality, add a GUI and look to release it for free. Also, I plan on posting my working solution in this thread once I've prettied up my code.
 
Top