Currently there is only a GrandExchange#getItemId(Box) method which gets the items ID but i was wondering if it was possible to grab the name or is that not possible?
Not sure if the API is based on configs or widget data but would be nice to be able to extract name if the GE interface is open at least
All hop methods have been broken for a looong time now, usually ends up hovering the world widget. Use my snippy http://osbot.org/forum/topic/103917-hhopper-hop-to-a-specific-world-interrupt-condition/
if (inventory.contains("Pizza base") && inventory.contains("Tomato")) {
return State.MAKE_INCOMPLETE_PIZZA;
}
if (inventory.contains("Incomplete pizza") && inventory.contains("Cheese")) {
return State.MAKE_UNCOOKED_PIZZA;
}
if (getBank().contains("Pizza base") && getBank().contains("Tomato")) {
return State.WITHDRAW_BASE_TOMATO;
} else if (getBank().contains("Incomplete pizza") && getBank().contains("Cheese")) {
return State.WITHDRAW_INCOMPLETE_CHEESE;
an example
(don't forget to deposit the product item each time too)
But just yeah its a lot to explain. i think ima have to give up im really bad with patients.
Use my example use ititititit.
Make one Task to withdraw and one to combine. Determine which items to combine within the task.
That way you can fix code or append to each step of pizza making by editing it in one place
imo its bad to trigger interactions in a row assuming the previous one correctly executed.
hence why i told you on shitbox to return after each interaction and use the example i provided :p
Start writing you script the same way my example is written.
https://github.com/HouseMD/HMeltingBalls
In general the statement deciding logic seems iffy.
do something more like.
does my inventory have dough and tomatoes in it -> combine
else does my inventory have plain pizzas and cheese -> combine
else
...
...
bank.open()
if bank contains dough and tomatoes -> withdraw them.
else
if bank contains plain pizzas and cheese -> withdraw them.