Everything posted by Butters
-
[Dev Build] OSBot 2.4.117 - OOM + Other Patches
C:\Users\bot\Desktop>java -jar "osbot 2.4.117.jar" -debug 5011 Debug enabled on port 5011 [DEBUG][03/10 10:53:34 AM]: Injected 2 field list filters [DEBUG][03/10 10:53:34 AM]: Injected 2 field filters [DEBUG][03/10 10:53:34 AM]: Injected 2 method list filters [DEBUG][03/10 10:53:34 AM]: Injected 3 method filters In debug mode! Error occurred during initialization of VM Could not reserve enough space for 2097152KB object heap @Alek Got this JVM error after pressing "Launch"
-
Extreme CPU Usage
This ^ . Check if you're script isn't throwing any expections constantly.
-
Client not opening [ fixed]
launch it from cmd with java -jar . It should print out an error stacktrace if it doesn't load. Then you'll know what's wrong
-
CLI line for auto updating the client?
There isn't, though you can make a suggestion regarding this
-
Proxy
What I've done is I added IP checking on the script I'm running to check this exact thing. And yes, if it loads properly then it is using the proxy, if you've selected to use a proxy on the client and the proxy is super laggy or doesn't work then the client wont load properly. So in short, probably won't be able to check if it is using a proxy apart from network monitoring of script side checking, but as far as I've tested all with using proxies on OSBot is good.
-
Need help with Mirroring please :)
OSBot is currently down due to an RS update today. Need to wait out till the Devs update stuff.
-
Script information to other server
If my memory serves well, seen Alek saying some time ago that he doesn't really like constant stat updates to external servers (not illegal though) but has no problem with updating stats once when closing the client and etc.
-
Debug
Any idea how to do this? Cause I believe you're talking about debug messages which the scripter can place anywhere in a script, and op is talking about running a "debug tool" (dunno how it's called) on the script. Like pressing next next next and it jumps though code line by line.
-
A Simple Login Handler
Would like to know this also, cause I think we don't have access to all of the response codes?
-
Muling snippet?
A lil google won't hurt I've found these examples very useful. http://cs.lmu.edu/~ray/notes/javanetexamples/ Other options would be to use file system. Creating a file in OSbot directory and reading/writing info to it. Of course you can think of other methods also.
-
Anagram C++ Help
I'm no C++ guru, but first of all I would suggest you replace all ! ~ $ % and etc characters to nothing. Then as far as I understand histogram1 != histogram2 are two different arrays so they will never be equal even when the values are the same. Just loop though one of them and check if the second one has that letter and the same amount of letters as the first one. If you don't find at least one match - instantly break the loop.
-
Misclicking objects
Try to get your object by position. Write a filter something like RS2Object ladder = s.objects.closest(new Filter<RS2Object>() { @Override public boolean match(RS2Object obj) { return obj.getName().equals("Ladder") && obj.hasAction("Climb-Up") && obj.getPosition().getX() >= X_COORDINATE; } }); And also you can add a fail-safe if he accidentally still misclicks. Something like if you're in an area that you don't want to be in - climb back up and try again Lol they don't change id's each update But yeah, you're right, bad practice.
-
How do I get my account name and password set for automatic login?
This is accomplished by launching a script via CLI. Open a command line window or terminal if you're on Linux and go to the folder where OSbot is at. then type java -jar "osbot 2.4.107.jar" -login YOUR_LOGIN:YOUR_PASS if you want to launch a script type java -jar "osbot 2.4.107.jar" -login YOUR_LOGIN:YOUR_PASS -bot BOT_LOGIN_NAME:BOT_PASS:0000 -script SCRIPT_ID_OR_NAME:null or script parameters instead of null. Refer to CLI usage thread for more
-
[Stable] OSBot 2.4.107 - Bug Fixes + CLI
Just to let you know, this bug was present in stealth injection mode yesterday (about 30 hours ago). I've coppied the log in this thread http://osbot.org/forum/topic/113362-24107-entity-hover-debug/#entry1275112 . Though everything seems to be fine today, so dunno what happened. By the way thanks for constantly expanding CLI capabilities. Really usefull
-
2.4.107 entity hover debug
Had a very similar problem, though using stealth injection [ERROR][Bot #1][01/05 05:23:27 AM]: Error in bot executor! java.lang.AbstractMethodError: client.getTileVisibilityArray()[[Z at org.osbot.rs07.api.map.Position.isVisible(ti:150) at org.osbot.rs07.event.WebWalkEvent.execute(fp:761) at org.osbot.rs07.event.EventExecutor$2.run(xg:188) at org.osbot.rs07.event.EventExecutor.execute(xg:201) at org.osbot.rs07.script.MethodProvider.execute(rh:650)
-
A Simple Login Handler
Having exactly the same problem. Any idea how to fix this?
-
GUI checkbox wont disable other GUI options
/*chckbxAutoGE.addActionListener(e -> { if (chckbxAutoGE.isSelected()) { spinnerHides.setEnabled(true); } else { spinnerHides.setEnabled(false); } });*/ Why is this part commented out? Should work
-
GUI checkbox wont disable other GUI options
Maybe you're going the right way, but what I did is I used ActionListener instead of a ItemListener and everything worked fine private void muleCheckActionPerformed(java.awt.event.ActionEvent evt) { if (muleCheck.isSelected()) { fisherCheck1.setSelected(false); fisherPanel.setEnabled(false); mulePanel.setEnabled(true); for (java.awt.Component comp : mulePanel.getComponents()) { comp.setEnabled(true); } for (java.awt.Component comp : fisherPanel.getComponents()) { comp.setEnabled(false); } } } This disables/enables one of the two JPanels and all of it's components depending on which checkbox is selected. Code is for one checkBox only
-
How to avoid certain areas while webwalking
I've added a break condition if the bot is in an area that I don't want it to be and then redirect him around that area, so the web walking could resume. I do hope that there is a better solution
-
How to avoid certain areas while webwalking
Any idea how to avoid certain areas while webwalking? To be exact how to avoid going to the Dwarven mines from Falador by using the mining guild ladder? Another question would be how to check if a WebWalkEvent has was breaked?
-
Knowing when you are logged in
Damn, thanks and sorry. Slipped through my eyes.
-
Knowing when you are logged in
Thanks. How do to check what the "30" in getLoginStateValue() stands for? And isn't this if(getClient().getLoginState().equals(Client.LoginState.LOGGED_IN)) the same as client.isLoggedIn() ?
-
Idle timer
Problem could be the item not being null but the player not moving. Don't really know the specifics for this but what I usually do is: if (myPlayer().isMoving()) { // Reset the timer if the player is moving idleTime = System.currentTimeMillis(); } newTime = (System.currentTimeMillis() - idleTime); if (newTime >= 30000) { //stuff idleTime = (System.currentTimeMillis()); } If everything is going well, reset the idleTime. If things are not going well then it will do something after 30 seconds and reset the timer
-
Knowing when you are logged in
Great idea! Will test it
-
Knowing when you are logged in
What's the best way to definitely know if you are logged in? client.isLoggedIn() ^ This returns true as soon as I get to the welcome screen (or even sooner). Even after pressing "Play" on the welcome screen there's a delay where it loads the maps or something. The problem I get is that I get tons of null pointer exceptions and this skips at least one tick of my loop. Also, when world hopping I believe that you get logged out for a little while (correct me if I'm wrong) and this launches my login event handler, which of course spouts out a ton of errors. By the way, after logging in I use worlds.getCurrentWorld() to check if I'm on the world I need to be, and when I do worlds.hop() the previous method gives me nullPointers. I do understand that when hopping there's some time when you are not in a world, but would like to handle or even evade these errors. Maybe use LoginStages? http://osbot.org/api/org/osbot/rs07/api/Client.LoginStage.html or maybe use LoginStates? http://osbot.org/api/org/osbot/rs07/api/Client.LoginState.html If so, which combination of these two would let me know that I can do script specific stuff (logged in and ready to go), like open a bank booth.