Everything posted by FrostBug
-
Because object IDs change!?
PositionFilter<RS2Object> posFilter = new PositionFilter(pos); NameFilter<RS2Object> nameFilter = new NameFilter("Rock"); RS2Object rock = getObjects().closest(posFilter, nameFilter); _____ Alternatively, make your own filter that suits all of your needs (position / name / color etc. etc.)
-
Fruity Barrows (Frost Barrows)
ERROR: Cannot find item: Void knight robe ^ Bring the equipment you configured the script to use. That's pretty bad. Average is probably 3-4 chests per trip Reason for stopping is logged in client console and script log. Read the OP for help on setting up the script. No it isn't.
-
FrostHunter
Bot is down atm. But if you send me a PM when its back up I'll add it
-
Bank scrolling broken
None of the questions from the report template are really relevant here.. so.. Description: Banking uses a scroll button mouse-event to scroll in the bank. Mirror mode does not pick this event up, so it gets stuck scrolling. Can this be fixed already? Was reported ages ago
-
Fruity Barrows (Frost Barrows)
Put all of the potions up top or in a different tab (also 1-dose, 2-dose etc. variations) when using mirror mode. Mirror mode bank scrolling is broken.
-
Eclipse won't start?
I think this happened to me before, try uninstalling eclipse and installing netbeans instead
-
walking and stairs / obstacles
try changing to This ignores whatever Z value the area might have (probably 0)
-
Fruity Barrows (Frost Barrows)
Read the OP
-
getItems(); throws NullPointerException
The default instances of Bank, Inventory, Equipment etc. will never be null, so you don't need to nullcheck them. "getInventory()" versus "inventory" is a matter of personal preference/convention. getInventory merely returns the inventory instance. It is the exact same thing.
-
getItems(); throws NullPointerException
It would have worked even if it was an interface. But yeah, any method defined in the superclass can be invoked on the subclass instances, even if the static type is the superclass.
-
Why do my scripts get stuck in a state after I add paint?
Perhaps the walking distance threshhold is messing with you. There's a default distance threshhold in the localwalker (idr what it is exactly) at which it wont try walking to the destination if you're within that accepted distance (6 tiles for example) To see if this is the problem, try manually lowering the distance threshhold. Eg. WalkingEvent wEvt = new WalkingEvent(bankPos); wEvt.setMinDistanceThreshhold(0); execute(wExt); In any case, it's not related to your paint
-
Use an item in specific slot help
getItemInSlot simply returns an Item instance. Item does not contain any information about which slot it was retrieved from. So when you try to interact with that item, it will simply use the first one it finds. What you need to use is the overload of interact that takes a slot id as parameter eg. getInventory().interact(14, "Use");
-
Could someone help me with this error?
You're passing null to the invokeLater method, since initSettings returns null as a runnable. Just create a new runnable that invokes initSettings. eg. public void onStart() { EventQueue.invokeLater(() -> initSettings()); } ^ using a lambda expression, so make sure you're on source 8
-
Fruity Barrows (Frost Barrows)
D med helms should be fine once more.
-
getItems(); throws NullPointerException
Just use ItemContainer in the method signature. eg. public int getOreCount(ItemContainer container, int... ids) { return container.getAmount(ids); } and use it like so: int invCoal = getOreCount(inventory, 453, 454); int bankIron = getOreCount(bank, 440, 441); the methods getAmount, getItems, contains etc. etc. are defined in the superclass, however if overridden in the subclass, invoking the method will still work even if your reference has the superclass as static type. In other words, these are the same: getInventory().getAmount(id); ((ItemContainer)getInventory()).getAmount(id);
-
getItems(); throws NullPointerException
The getItems method is declared in the ItemContainer superclass. There's no need for generics Generics are generally bad for performance (unless the compiler sees that it's silly and removes it), so try avoiding them where they're redundant
-
getItems(); throws NullPointerException
That indentation gave me cancer Also, why are you using generics in that method? It's entirely redundant from what I can tell. Anyway; the problem is probably that you need to nullcheck the items here: for (Item i : Items) { if (i.getId() == 440 || i.getId() == 441) Regardless, using getInventory().getAmount(440, 441); would be quite a bit cleaner
-
Could someone help me with this error?
The class must be public in order for the Script Executor to access the default constructor. Add the public keyword to the class signature
-
Could someone help me with this error?
Yes, if you do that, you will be overriding the onStart method from the Script class. This overridden method will be invoked by the script executor on script start.
-
Could someone help me with this error?
Not sure where you've gotten this from; but onStart(Runnable runnable) isn't defined in script, and doesn't seem to be called at all. So your init stuff is never executed. That's a problem; tho I don't really know why the exception indicates the lack of a parameter-less constructor
-
getItems(); throws NullPointerException
Show us the stacktrace Are you certain that your itemContainer instance isn't null?
- Hotkeys
-
Sorc garden
It's pretty bad thieving XP tho
-
Fruity Barrows (Frost Barrows)
Be sure to reset your camera zoom to default before starting the script Reason for stopping is stated in the script log and client console.
-
Fruity Barrows (Frost Barrows)
So uh, there's a problem with using Dragon med helm right now it seems. If you're experiencing problems, use a different helm until I get this resolved