Everything posted by Explv
-
Private Script isn't showing up in client
So it was you that dun a goof! Changing the .jar name doesn't change the script name. The script name is set inside the code, and you can't have two scripts with the same name. Just move the old version to a different folder.
-
Private Script isn't showing up in client
Either you dun goofed Or he dun goofed
-
Explv's OSBot Manager
Yes, you will be notified of an update in the app though.
- Explv's Walker
-
Selecting ALL npcs or ground items.
Simplest way would be: List<NPC> warriors = getNpcs().filter(new NameFilter<>("Al-Kharid warrior"));
-
Explv's Walker
I know, I did a goof I already pushed a fix. It should hopefully be resolved tonight or tomorrow. The script only works currently if started from the command line.
-
Membership status test
Only way I can think of right now is to try hopping to a members world and seeing if you can.
-
Widget Action Filter
1. Not necessarily true, you could call the match function yourself with an invalid widget outside of the OSBot methods 2. I am using a foreach loop, I don't need to check if the array is empty 3. I personally think that this convention is purely personal preference and ancient history. I find code much more legible if I have early return conditions. If your code has many many return statements in a single function, then probably it is not as object oriented as it should be, in this case I do not think it applies. 4. If you look at how my loops are structured I only loop the widget's actions once, and the match actions are stored in a variable.
- Gaussian Function Help
-
Explv's Walker
Done. Will be available when the SDN is next updated. UPDATES: These will be available when the SDN is updated: Added CLI parameters Alphabetically sorted location drop down list Display error message on screen when web walking fails
-
Explv's Walker
Done, it will be alphabetically sorted when the SDN is next updated.
-
Widget Action Filter
Updated the code here, previously could cause NPE if RS2Widget.getInteractActions() contains a null value. Changed if (widgetAction.equals(matchAction)) To if (matchAction.equals(widgetAction)) Thanks for the bug report @The Undefeated
-
Explv's AIO [13 skill AIO in 1 script]
It's my bad really, that but has been around for quite a while, I have been taking a break from working on this script. Got a lot of shit to fix!
-
Any scripters know how to make an external ESP for fps games?
Depends what game
-
C# Hw
You could have Googled that and found a million examples, it's an extremely common question. Either way you should have been able to figure it out, especially if you're scripter Juan. Idk how you could not understand that question, it's a fookin for loop bro. Time to start expanding your brain fam. Although the for loop method is preferred, it can also be done recursively: int Factorial(int i) { if (i <= 1) return 1; return i * Factorial(i - 1); }
-
Explv's AIO [13 skill AIO in 1 script]
I have a bunch of things I need to update and fix, will do it as soon as I can
-
Whitelisting more than 1 item?
???? Look at the API bro https://osbot.org/api/org/osbot/rs07/api/Inventory.html#dropAllExcept-org.osbot.rs07.api.filter.Filter...- It can take more than one filter as a parameter, or you can just add an OR condition to your existing filter. getInventory().dropAllExcept(item -> item.getName().contains("fishing") || item.getName().equals("Blah")); getInventory().dropAllExcept(item -> item.getName().contains("fishing"), new NameFilter<>("Blah"));
-
Need help Scripting
1. Scripts are written in Java 2. Whatever you want 3. Learn how to use Google 4. Learn how to program 5. Mac works fine 6. See no. 3
-
My internet broke.
Relax guys Here's a picture of a dog wearing a hat
-
My internet broke.
Did you try wrapping it in tin foil?
- Can someone update my script for me please
-
RS Unit Format
Ok well, if you don't want to round then you can just do Math.floor(doubleValue * 100) / 100 to get the value to 2dp To achieve your super weird format you can use the Java class "DecimalFormat" with the format ".0#" # is an optional value (if it is 0 it won't be displayed), 0 is a digit public static String formatValue(final long value) { String suffix; double convertedValue; if (value >= 1_000_000_000) { convertedValue = ((double) value / 1_000_000_000); suffix = "b"; } else if (value >= 1_000_000) { convertedValue = ((double) value / 1_000_000); suffix = "m"; } else if (value >= 1000) { convertedValue = ((double) value / 1000); suffix = "k"; } else { return String.valueOf(value); } convertedValue = Math.floor(convertedValue * 100) / 100; return new DecimalFormat(".0#").format(convertedValue) + suffix; } Test cases: assert formatValue(559546000000L).equals("559.54b"); assert formatValue(19546000000L).equals("19.54b"); assert formatValue(1954600000L).equals("1.95b"); assert formatValue(155400000L).equals("155.4m"); assert formatValue(70000000L).equals("70.0m"); assert formatValue(5400000L).equals("5.4m"); assert formatValue(450000L).equals("450.0k"); assert formatValue(12000L).equals("12.0k"); assert formatValue(8000L).equals("8.0k"); assert formatValue(600L).equals("600"); assert formatValue(50L).equals("50"); assert formatValue(2L).equals("2");
-
RS Unit Format
Simplest way you wieners: This will also ensure whole numbers are not printed with .0 at the end: public static String formatValue(final long value) { String suffix = ""; double convertedValue; if (value >= 1_000_000_000) { convertedValue = ((double) value / 1_000_000_000); suffix = "b"; } else if (value >= 1_000_000) { convertedValue = ((double) value / 1_000_000); suffix = "m"; } else if (value >= 1000) { convertedValue = ((double) value / 1000); suffix = "k"; } else { convertedValue = value; } if (convertedValue % 1 == 0) { return String.format("%d%s", (long) convertedValue, suffix); } return String.format("%.2f%s", convertedValue, suffix); } Test cases: assert formatValue(559546000000L).equals("559.55b"); assert formatValue(19546000000L).equals("19.55b"); assert formatValue(1954600000L).equals("1.95b"); assert formatValue(155400000L).equals("155.40m"); assert formatValue(70000000L).equals("70m"); assert formatValue(5400000L).equals("5.40m"); assert formatValue(450000L).equals("450k"); assert formatValue(12000L).equals("12k"); assert formatValue(8000L).equals("8k"); assert formatValue(600L).equals("600"); assert formatValue(50L).equals("50"); assert formatValue(2L).equals("2");
-
Explv's OSBot Manager
If there aren't any then just leave it blank, it should auto fill it to "none".
-
Which proxies use?
Great tutorial, I learned a lot, thanks!