Everything posted by Explv
-
POST YOUR DESKTOPS
- Explv's Scripting 101
- Rune Essence Portal Help
This is what I used: Stream.concat(getObjects().getAll().stream(), getNpcs().getAll().stream()) .filter(entity -> entity.getName().contains("Portal")) .findAny() .ifPresent(portal -> { if (portal.interact("Use", "Exit")) { Sleep.sleepUntil(() -> !portal.isVisible(), 10_000); } });- Explv's Scripting 101
In the onStart() method, set a global Position variable to myPosition()- How to determine if an item is a "Members object"
Ok I see the issue, I'll take a look when I'm home.- How to determine if an item is a "Members object"
In what way does it break? Did you make sure to null check before comparing IDs like in the updated getTabSlot() method I just posted?- How to determine if an item is a "Members object"
Ah, good catch. Yes it looks like getBank().getItems() returns new instances of Item each time, so using == will not work. In that case if you are using ids, you can use the following code: Item item = getBank().getItem("Yew logs"); if (item != null) { getBank().scrollToSlot(getTabSlot(item.getId()), getBank().getSlot(item.getId())); } private int getTabSlot(final int itemId) { int tabForItem = getBank().getTabForItem(itemId); if (tabForItem == -1) { return -1; } Item[] itemsInTab = getBank().getItemsInTab(tabForItem); for(int i = 0; i < itemsInTab.length; i++) { if(itemsInTab[i] != null && itemsInTab[i].getId() == itemId) { return i; } } return -1; }- How to determine if an item is a "Members object"
Did you check that the item you are passing to the methods is not null? If you have, then I will take a look at this when I get home from work- How to determine if an item is a "Members object"
There is a private method in the Bank class for getting the tab slot, not sure why it is not public.- How to determine if an item is a "Members object"
// See next page for updated solution- How to determine if an item is a "Members object"
You need to make sure there is an item in the slot (in my example the first slot), otherwise it will throw an NPE. You will also need to check that the hover() method was successful, because if the mouse is not hovering over the item, then the tooltip will be null. No problem. What exactly is your use case for this?- Novice Software Developer - Script Help
There are a lot of things incorrect here. As mentioned by @wwwat you have two functions that achieve nothing, and are also infinitely recursive, which will just break. It also looks like you have some of your conditions in the wrong place.- How to determine if an item is a "Members object"
I'm not sure if there is a better solution, but this would work: getInventory().getItemInSlot(0).hover(); if (getMenuAPI().getTooltip().contains("Members object")) { // item is members } Essentially, it hovers the mouse over the item, then checks the tooltip message- Abort all Grand Exchange Offers
- Help Please
Item item = getInventory().getItemInSlot(28); If (item != null) item.interact(); Sorry about the formatting, on my phone- How to walk to the closest Bank?
Create an array of bank areas that you want to include, and then call getWalking().webWalk(area[]). The documentation states: So: getWalking().webWalk(Banks.VARROCK_WEST, Banks.LUMBRIDGE_UPPER, Banks.FALADOR_EAST); Would walk to the closest bank out of those three- Explv's AIO [13 skill AIO in 1 script]
I'll take a look Yep, this is an issue with finding the exit portal, I will fix it soon See above- Explv's AIO [13 skill AIO in 1 script]
I'll take a look, thanks I did update the script so that it should upgrade pickaxes, I will take a look if it is not working Is this only an issue in mirror mode? If it is not walking to the gnome stronghold then that is a webwalking issue, post in the client bugs section. I am aware of the rooftop mark of grace issue, I will fix it when I have the time I still need to fix GUI saving/loading. Once that is fixed I will add a CLI option to load a saved configuration- Explv's AIO [13 skill AIO in 1 script]
890- Obfuscating your local scripts
Try: cd C:\Users\admin\Downloads\proguard5.3.2\proguard_configs\ Followed by: java -jar C:\Users\admin\Downloads\proguard5.3.2\proguard5.3.2\lib\proguard.jar @nmz.pro- Obfuscating your local scripts
You are running the command incorrectly. It should be: java -jar path_to_proguard.jar @path_to_config.pro Where config.pro is your .pro file and the jar you run is the proguard.jar file- Explv's Tutorial Island [Free] [Random Characters]
Perhaps I should make it hover WC xp- Explv's Walker
Those are issues with web walking, and should be posted in client bugs. I believe haunted tree has now been fixed (don't quote me on that)- Do... While Loops
If you don't understand the code, you should either learn how it works or not use it. I would recommend you start off learning the basics of Java and building up from there. I would recommend you continue with your original code, and add a while loop to get your desired functionality rather than adding a GUI at this point- Explv's OSBot Manager
If the script has a GUI and no CLI support, then the GUI will open when the script starts just like when you run it normally. - Explv's Scripting 101