Trying to make a script that buys from an npc and not sure how to get the clause right. I know how to steal from a stall(below), how would i change it to get it into trading and buying from an npc?
private State getState() {
Entity stall = object.closest("Tea Stall")
if (!inventory.isEmpty())
return State.DROP;
if (stall != null)
return State.STEAL;
return State.WAIT;
}
Also how would i make it ao when the script as finished opening feather packs that it wont drop the gold stack?
What I have so far...
private State getState() {
Entity npc = object.closest("NPC NAME")
Not even sure if this is right lol.
private enum State {
TRADE, OPEN
};
Thank you