Everything posted by Token
-
My first attempt to get back into scripting :)
You could make the code look a bit cleaner if you avoid instantiating the INodeRouteFinder and WebWalkEvent and just use the default webWalk method. Good luck with the script The comment above refers to the Java naming conventions which state that class names begin with uppercase letters and field/method names begin with lowercase letters. Every first letter in the following word is to be capitalized and multiword method/class/field labels are to be written without any spaces or underscores.
-
Generating straight path
What is this used for?
-
Closest Object
public RS2Object getClosestObject(Script script, Position position) { List<RS2Object> allObjects = script.objects.getAll(); if (allObjects.size() == 0) { script.log("No objects found"); return null; } else if (allObjects.size() == 1) { return allObjects.get(0); } allObjects.sort(new Comparator<RS2Object>() { @Override public int compare(RS2Object obj1, RS2Object obj2) { return obj1.getPosition().distance(position) - obj2.getPosition().distance(position); } }); return allObjects.get(0); } If it returns the furthest object, reverse the operation in the Comparator.
-
Returning wrong state for no reason?
Remove players. from players.inventory as the inventory field is inherited in your class that extends Script, that would be first step. Try posting more code as I don't think that's the only issue in there.
-
can not create a text file
Read the last updates on the dev builds from .54 to .57 and .58. IO is no longer allowed outside the user.home\OSBot\Data directory.
-
Aplicación del veterano por Scotty
Detener el correo basura cotizaciones al azar en esta solicitud . Es un puesto muy serio.
-
Aplicación del veterano por Scotty
Dejar de arrastre.
-
Aplicación del veterano por Scotty
Estoy muy castana. El señor @Scotty es mi gran castana personal. Me gusta muchísimo este señor @Scotty. Siempre voy a apoyar a @Scotty para el veterano. Siempre he tenido una buena opinión sobre el señor @Scotty. Desde que lo conocí, él probó a sí mismo como un líder capaz. Vivo señor larga @Scotty.
-
how and when to use filters with npc's
There are generally 2 ways to filter the NPC/Objects/GroundItems collections. 1. Using OSBot Filter interface NPC monster = npcs.closest(new NameFilter<NPC>(NAME), new AreaFilter<NPC>(AREA), new PositionFilter<NPC>(POSITON), new ActionFilter<NPC>(ACTION)); You can add as many filters as you want in the above expression. There are some other classes that inherit Filter and can be used but you can also create your own. Filter<NPC> levelFilter = new Filter<NPC>() { @Override public boolean match(NPC n) { return n.getLevel() < 30; } }; NPC monster = npcs.closest(levelFilter); Which will find only NPCs having a combat level under 30. 2. Using Java 8 streams NPC monster = npcs.getAll().stream().filter(n -> n.getName().equals(NAME) && AREA.contains(n) && n.getLevel() < 30).findFirst().get(); These offer more flexibility but you will have to check the Optional returned by findFirst() otherwise you will get a java.lang.NoSuchElementException, so I advise you to use the OSBot Filter.
-
Team Logo For Genii
Transparent background is better
- Last letter, first letter
-
inventory.interact question
inventory.getItem("Basket").interact("Fill");
-
AHK
Start script. Go to the supermarket. Walk your dog. Get a new haircut. Play some League of Legends. Eat pizza. Come back, the script is still running. :ditto: :ditto:
-
AHK
I botted 99 herb with AHK... That wasnt 1:1, not even 1:10000.
-
Error Using GUI [Client Crashing]
You might want to post the whole code as what you posted does not raise any exception Your state variable is definately null though.
-
Error Using GUI [Client Crashing]
So line 56 in MainHandler.java is treeSelector.addActionListener(e -> selectedTree = treeSelector.getSelectedItem().toString()); ?
-
Error Using GUI [Client Crashing]
Open your logger when running the script and read the error it prints
- Close
-
Dragon Script Loader - (including Zulrah)
First like
-
Risk of Buying/Selling Accounts
Accounts can always be recovered by their original owner. That's the only risk.
-
ConditionalSleep and ConditionalLoop
Does anyone know why these disappeared from the API docs? This happened before, like 3 months ago and I had a thread about it, then they suddenly appeared. Now they are gone again, but there is something called ExtendedConditionalSleep...
-
Loading GUI
By load the GUI, you mean display it?
-
I demand bears
I'll write you a merching script for some bears
-
I demand bears
OSBot needs more bears. They are just so cute on skype... why don't we have this emoticon on OSBot?????? It's actually my favourite emoticon on skype, I guess everyone who has added me on skype has figured this out already. #OSBOT#NEEDS#BEARS#EMOTICON#CUTE#2k16
-
script analyzer is annoying for me.
Remove the troublesome local scripts from your OSBot/Scripts/ folder. It only pops up when one of your local scripts is malicious/outdated.