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 Finding Interfaces (RS3)

Hey look! It's That Guy!
Joined
Sep 5, 2017
Messages
14
Hello Everyone.

I'm having a hard time finding the right interface.
I have used the Developer Toolkit to see all the available interfaces, but there are so many. Do i have to manualy go through every option?
I now they have id's, but that one isn't part of MakeXInterface(As far as i get it.).
Choose_ATool.png

This is the one i'm looking for. Do i need to use the "newQuary()" or am i just missing something simple.
Not asking for a tutorial, just a hint where should i be looking for it.
If there is a thread about it allready, i apologise.
 
Joined
Mar 26, 2014
Messages
33
I will be looking at it. Kinda forgot it existed. Thank you.

Widget container is 1179, then search by contained item id depending on the tool you want

Code:
package org.overflow.api.tree.impl.game.make;

import org.overflow.api.context.Context;
import org.overflow.api.context.blackboard.lang.Variable;
import org.overflow.api.context.condition.blackboard.var.NotNullVariable;
import org.overflow.api.tree.impl.game.interaction.widget.WidgetNode;

public class ChooseToolNode extends WidgetNode {

    public ChooseToolNode(Context ctx, String name, int priority) {
        super(ctx, name, priority);
        this.readyOpenAndValid(new NotNullVariable(Tool.VAR, this));
        this.filter(widget -> widget.getContainer().getIndex() == 1179 && this.<Tool>getVar(Tool.VAR).id() == widget.getContainedItemId());
    }

    public enum Tool {
        TINDERBOX(590),
        KNIFE(946),
        BONFIRE(24291);

        private final int id;

        Tool(int id) {
            this.id = id;
        }

        public int id() {
            return this.id;
        }

        public static final Variable VAR = new Variable() {
            @Override
            public <T> T def(Context ctx) {
                return null;
            }
        };
    }
}
 
Top