Jump to content

Reveance

Members
  • Posts

    108
  • Joined

  • Last visited

  • Feedback

    100%

Profile Information

  • Gender
    Male

Recent Profile Visitors

2089 profile views

Reveance's Achievements

Steel Poster

Steel Poster (4/10)

37

Reputation

  1. I should expect the bot to be down at thursdays? awesome
  2. Upon adding a bot immediately gives a 'Bot initialization error' with no additional information in the log
  3. You switched one param as mean is the second one, but correct :P... so gRandom(10, 50, 0, 100). This will result in the heigest chance to roll between 40 and 60. 99.7% of the values will lie between 20 and 80. It might be easier to use gRandomBetween though, this automatically calculates the mean and deviation so that the above example would be equivalent to gRandomBetween(20, 80) with the difference of having a cap between 20, 80 instead of 0, 100
  4. Correct, however overloading his method won't work in this case since he'll first need to cast to whatever more specific object it is first, before calling the method, in order for that to work. I think the easiest solution, especially as you only have like 3 or 4 instances to check, would be to use instanceof. I doubt you'd want something fancier in this case...
  5. Entity is an interface...so you could easily check what object you're dealing with: entity instanceof Player entity instanceof RS2Object But why are you getting entities in the first place? Why not use the Players, Objects classes to get the entities you want instead?
  6. It doesn't click because you're wasting your index on moving to the slot :P then the next loop it will come in the first else again, moving to the next...but the first if statement never gets executed... for (i = 0; i < 28; i++) { if (InventorySlotDestination.getSlot(i).contains(getMouse().getPosition())) { //...never gets in here, because this is the next slot...why would the mouse already be there? } else { //...always executes this to move to the next } } so basically you want something like for (i = 0; i < 28; i++) { if (!InventorySlotDestination.getSlot(i).contains(getMouse().getPosition())) { Rectangle rect = InventorySlotDestination.getSlot(i); if (getMouse().move(rect.x + (rect.width / 2), rect.y + (rect.height / 2))) { sleep(random(100, 125)); } } if (InventorySlotDestination.getSlot(i).contains(getMouse().getPosition())) { if (getMouse().click(false)) { // i++; this one isn't necessary unless you want to skip // items sleep(random(100, 125)); } } } But anyways, as Stimpack already said, it's easier to let the osbot api do all that for you by using getMouse().click(getInventory().getMouseDestination(i))
  7. gRandom is broken, if you want to use a random with normal distribution you can use But yeah, gRandom uses normal distribution which is one random distribution that very simplified basically gives more chance to numbers around the center (mean) and the deviation says how wide the field of more chance is :p. Normal random uses uniform distribution which means there's an even chance for every number
  8. The most important thing to understand with threads is that they run concurrently. Imagine you have a program that has a GUI with a button in it. If the button is pressed and you'd execute some heavy calculation (or wait for something) in the same thread (the GUI is running on and being repainted in) ... the whole application would go unresponsive. By using another thread to do the calculation it will keep responsive. It's generally much better to work with Runnables instead of threads as it's much more flexible. Also look up ExecutorService to run them properly.
  9. Yes, if you want to communicate with multiple accounts you should have one server application that is using ServerSocket, like Token said. You can then use Socket to connect to that server application (hosted on some server) in which you wanna have logic that can relay a message to the client you want. E.g. Client1 -> Server -> Client2. I'd probably use some small framework though, that already handles all connections etc. otherwise it's pretty time consuming to write. You could use kryonet for this in which you want to send with TCP, or you can use another protocol entirely, called websocket (which is especially useful if you ever want to build a webinterface around it): https://github.com/TooTallNate/Java-WebSocket
  10. Why does everybody assume to know what the logic behind that status is? From a still picture no less :P?
  11. Ah okay, I thought you were only talking about casting the ints since you only mentioned the integer methods and because tbh what else is there? :"D The only thing left then is the min max check
  12. It's not really unnecessary though...your between methods return integers outside of the min and max values specified. But tbh I think I just don't really understand why you posted it in the first place then
  13. I wouldn't recommend using that code since basically all the important stuff from the class I posted is stripped off... Your command regarding the 68-95-99.7 rule doesn't make sense, since the rule is only used for capping the value, which your method does not do. In theory you could get an infinite wait with your method which you do not want in regards to botting. Then the way in which you convert to int by casting is horrible in this scenario...since casting a double to an int is always rounding down, so 5.9 will become 5. This means you will have a more likely chance to get min and you'll almost never get max since it has to be exactly max as a double.
  14. Awesome, you might have fixed a whole lot with that discovery
  15. This is a class containing the 'what would have been' gRandom's replacement that was mostly created by @Alek following my bug report. I figured I'd share it as a snippet so it's easier to find in case people need it, since Alek just announced a new release in which it is deprecated because of it not functioning correctly and too many dependencies on it to fix. Code: Usage:
×
×
  • Create New...