Jump to content

colby__

Trade With Caution
  • Posts

    20
  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by colby__

  1. Is there any way that I can setup OSBot so that upon windows starting, it will automatically run and start a script with a specified account? I know I can put it in startup, but after that I am lost on how to get it automated without using other programs. If this feature is not available, please move this to the suggestion forum thanks
  2. colby__

    Logger

    Well, I do.. Now I have to write boilerplate code because they feel the need to obfuscate loggers :'( Thanks nevertheless
  3. colby__

    Logger

    1. How can I log an exception so that the entire stack trace is printed? 2. Why is the logger class obfuscated and undocumented? For example: logger.log(<what the fuck goes here>, <and here>, throwable);
  4. You have many options available here. One way would be to pass a reference to your "CheckBox" to your GUI class so you can use it from there. For example: in your gui class public GUI(Script s) { this.s=s; } private Script s; in your main class where you create the GUI: GUI g = new GUI(this); then anywhere inside your gui class, you can work like you are inside the main class, like so: s.yourCheckBox.doSomething(); Another option would to be to simply put the GUI class inside of the main class. Like so: public class Main extends Script { CheckBox cb = .. private class GUI { void someMethod() { cb.doSomething(); } } } Which way you use just depends on how you plan on modifying the script in the future and what is the most sustainable. Make sense? For elite haxors only: http://docs.oracle.com/javase/tutorial/java/javaOO/index.html
  5. Here is the code I have so far: public void click(int x, int y, int xT, int yT, boolean button) { x = mX = dev(x, xT); y = mY = dev(y, yT); int b0 = button ? MouseEvent.BUTTON1 : MouseEvent.BUTTON2; long t0 = System.currentTimeMillis(), t1 = t0; t0 -= dev(1, 80F); Component c = bot.getCanvas(); MouseEvent evt = new MouseEvent(c, MouseEvent.MOUSE_MOVED, t0, 0, x, y, 1, false, b0); bot.getMouseEventHandler().mouseMoved(evt); evt = new MouseEvent(c, MouseEvent.MOUSE_PRESSED, t0, 0, x, y, 1, false, b0); bot.getMouseEventHandler().mousePressed(evt); evt = new MouseEvent(c, MouseEvent.MOUSE_RELEASED, t1, 0, x, y, 1, false, b0); bot.getMouseEventHandler().mouseReleased(evt); evt = new MouseEvent(c, MouseEvent.MOUSE_CLICKED, t1, 0, x, y, 1, false, b0); bot.getMouseEventHandler().mouseClicked(evt); } I am painting mX and mY and it's definitely on the game screen yet it is not registering as a click, not walking or even showing hover options when the mouse event is fired over an object. Any ideas? EDIT: The code DOES work but only when human input is ENABLED in the gui. Upon disabling human input, the code no longer clicks. How can I bypass this?
  6. What would be a popup trigger? When would it be true? Also do you know which component I should pass?
  7. Well see why I am asking is because the That works in theory however if some payer stands where I am right clicking, it will change where the Open index is in the menu, no? How would I know what to pass for "getMenuBounds(int index)" index if it is changing based on the amount of players standing around the object? Do you know how to make the above method work with functionality like the following code below public int getMenuIndex(Entity entity, java.lang.String[] actions, java.lang.String[] names) Where I can select a specific action on a specific entity?
  8. Can you elaborate? For example I would already have a reference to the RS2Object that I want to use the Open option on, so searching for it again seems like an inefficient way to do it, no? So say I have the RS2Object, I already right clicked on the object, what would be the code to get the bounding box for the option of the chest I already have a reference to? Thanks!
  9. Thanks guys great help! One last question. The method to move the mouse outside of the screen has a lot of extra functionality I do not want, such as actually moving the mouse to get it outside of the screen, so I assume I can just use mouseExited and mouseClicked etc and it will fire directly to the client correct? Also what is the botInput popupTrigger and time variables for exactly? The API is blank haha
  10. So how can I make the mouse move instantly to a location? Also, how can I make the client think that the mouse has left the game window? IE someone actually playing runescape would be using other apps at the same time in this day and age. But the mouse seems to stop at the bounds. of the client.
  11. Uhh mouse detection is the core of their bot detection system no? Where did you hear they do not analyze mouse movements? How else would they detect bots? Also I want to simulate a different type of mouse input, some cases it will need to move instantly across the screen which this mouse arbitrarily does not support as far as I can tell. Where is the ClientMouseEventHandler instance ? The class is obfuscated.. lol
  12. I need it, otherwise this bot is totally useless to me as I need to implement my own mouse methods to get the ban rate down to something acceptable There is always a way.. Can I get direct access to the robot osbot already uses?
  13. Thanks guys! So how do I do this for at an object at a particular X, Y since there are multiple chests with the same Id and options in the same area? What if my goal is to remove mouse movements?
  14. I am writing an alternate mouse movement/clicking method. How can I get the bounding box for a context option? For example, if I right click on a chest, how would I get the on screen coordinates of the "Open" option so that I can use a Robot to move the mouse to that position? thanks! public java.awt.Rectangle getOptionRectangle(int index) Is that what will give me the bounding box for the "Open" option? It's named different from every other bounding box lol Also, I notice that this method that lets me select a specific entity is deprecated. Why? How do i select a specific object to open? @Deprecated public int getMenuIndex(Entity entity, java.lang.String[] actions, java.lang.String[] names)
×
×
  • Create New...