Everything posted by Explv
-
WTF?
W̴̧̧͚̘̩̳̜̬͈̽̇̓͋̓͝͠h̴̙̠̫̊̈́̈́̃̓̕̕å̵̹̬͈͈̆̽͑̄̄̇̀̑̇́̏̇̚̚t̸̛̙̠̪͑͋̊̽͛̈́͋͑͋̽ͅ'̴̧̡͉̣̘̱̥̬͎͉̱̗̽s̴̢͖̞̗̥̽ͅ ̴̝͂͌̎̿̿́͊̉̍͘͘̕͝w̷̢̥̹̞͈̬̗̥͈̩̟̮͈̔͐̽̊̕r̶̢̧̛̜̯͖͖̪͍̩͍̱̱̝͚͑̑̎͐͌̈́ö̶̮̝̱̜̥͐ͅn̵͎̯̲̣̹̣̄͊g̸̨̪̯͉̦̘̯̪̐͌̓̂͌́͆̂̑̂̚͠?̷̡͕̱̩̪̫̟̱̮̠̱̤̜̺̾̃̉̌̐̂
- Number 1 doger
-
String appending only existing as last appended object
ohHeyAString.replace("Cheese", "Eggs"); Will not change the contents of the existing ohHeyAString, it will return a new one instead, as Strings in Java are immutable. It should be: ohHeyAString = ohHeyAString.replace("Cheese", "Eggs");
-
String appending only existing as last appended object
I highly doubt it is as simple as that. Java isn't broken, it's your logic/code. If you aren't going to show what you have written, this thread seems pretty pointless
- String appending only existing as last appended object
-
Explv's Tutorial Island [Free] [Random Characters]
Will take a look
-
Linux CLI - timeout [x]
sleep x Where x is in seconds by default
-
Click to continue
I believe getWidgetContainingText ignores widgets in the chatbox (with root 162). You should use your own filter instead
-
Naming classes
Perhaps you should learn what public and static mean?
-
Does it matter where methods go?
Best practice is to place a method below the method that is calling it. So that you can follow the code more easily from top to bottom.
- Staff resignation
-
Who can fix my code?
@Override is just an annotation. It improves readability and helps compiler checks, but is not essential.
-
DOWNLOAD FILE
Make sure you have Java installed. Then download the .jar file And open the .jar file with Java I can't explain it any simpler than that.
-
DOWNLOAD FILE
First you need Java 8. You can download and install it from here: http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html Then, download the OSBot .jar from http://osbot.org/mvc/get Open the OSBot .jar file with Java, do not extract it.
- Control script from within script
- Control script from within script
-
Recursive depth first search
There are tonnes of algorithms you can use... Just do some research on Google.
-
Trade players with a space in username
That will replace them all
-
Trade players with a space in username
Try: name = name.replace(' ', '\u00A0');
-
Mouse teleport
Just to add though, that method I wrote uses the random method to choose a point to move the mouse to. That isn't very human like, although nor is moving the mouse instantly.
-
initiating combat
Doesn't make sense to put it in the if statement though. It should be before you retrieve the closest chicken. Why look for a chicken if you aren't going to attack it?
-
Reachable Item checking
So your snippet is just the API method: getMap().canReach() ?... I think most people are already aware of the existence of that method Also you probably want to put the null check before the call to canReach()
-
initiating combat
Well yes, obviously you will need to check your player isn't already attacking a chicken. I just didn't think it was necessary to write out the entire script
-
Explv's OSBot Manager
Are you just trying to download the .jar file? If so, the latest file can be found here: https://github.com/Explv/osbot_manager/releases/download/7.4/explv_osbot_manager_7.4.jar
-
initiating combat
What if the closest chicken is not attackable? Your script will just sit there and do nothing. It should be something more like: NPC chicken = getNpcs().closest(npc -> npc.getName().equals("Chicken") && npc.isAttackable()); if (chicken != null && chicken.interact("Attack")) { new ConditionalSleep(5000) { @Override public boolean condition() { return !chicken.isAttackable() || myPlayer().isInteracting(chicken); } }.sleep(); } If that doesn't work it is something else in your script that is broken.