Everything posted by Theorems
-
calling methods between classes extending method provider
I have just spent hours trying to figure out why I cannot call methods defined in one class which extends method provider in another class that extends method provider. Is that just something which cannot be done? I can use my methods from my classes which extend method provider in my main class because there I can use .exchangeContext(getBot()); but that only seems to exist for Script. If I call a method from a class extending method provider in another class extending method provider it gives me a nullpointer error (even if it is just a setter or getter)... I could just work around this in my program design but if there is a way to call methods across classes extending method provider I would much rather do that for the sake of having a structured program.
-
osMiner
It would be great if you could add support for gem rocks in Shilo village
-
Extending method provider and nullpointerexception
Thanks, that worked. (although .exchangeContext() has line through it in eclipse because it's deprecated I guess).
-
Extending method provider and nullpointerexception
well that code works in my 'Main' class so I don't think that would be causing any issue. I'm just building the skeleton of my script right now so my action methods just look like this: public void bank() { log("bank"); } public void idle() { log("idle"); } public void fish() { log("fish"); }
-
Extending method provider and nullpointerexception
I'm new to java & scripting and I'm gonna have to ask stuff here until I get verified on discord I have a class with this method: public class ActionStates extends MethodProvider { public State getState() { if(getInventory().isFull()) { // nullPointerException return State.BANK; }else if(myPlayer().isAnimating()) { return State.IDLE; }else { return State.FISH; } } As you can see, I commented the line that throws the nullPointerException The thing is, that code works when I put it in my main class which extends from Script... Is there something else I need to be able to do in order to use osbot methods in other classes? It looks like it works in eclipse but then I get that when it runs which doesn't make sense to me because getInventory().isFull() should only be returning true or false (not null) shouldn't it?
-
Using gaussian randoms
@dreameo Okay thanks, that makes more sense, although with my example (600 mean, 300 deviation) I think the numbers should still cluster around the mean of 600 even if I only accept numbers within a range which would still make 600 more likely to be generated than 300 or 900. So it wouldn't be a fully normal distribution, but neither would it be flat, if I am understanding correctly.
-
Using gaussian randoms
See my edit from my last comment. Also at a mean of 600 and deviation of 300 I was getting some numbers below 0 rarely, but I wouldn't say almost never. Thanks for helping me understand this.
-
Using gaussian randoms
Yeah so it would destroy the Gaussian distribution, that's what I kinda thought might happen. The whole reason I was trying to do it like that in the first place is that I wanted to use it as the return value of my script, which I didn't want to be a zero. edit: was doing some reading and saw this "There is theoretically no absolute minimum and maximum value that can occur in a normal distribution." So would it really become a flat distribution if you were to just "cut" off the tips of the bell curve of random numbers generated? Doesn't quite make sense to me..
-
Using gaussian randoms
Interesting, I have not seen anything done like that before. Doesn't .nextGaussian() give you a Gaussian distribution all by itself without you adding multiple deviations?
-
Computer Science Masters?
Do you mean a major in computer science? to get a masters you need to already have a bachelor degree, no?
-
Using gaussian randoms
Hello, I am trying to add gaussian randoms to my script. I started using: int dynamicReturn = (int) ((rand.nextGaussian()*deviation)+mean); but the issue with that is the Gaussian random will not always stay within the deviation variable. To fix this I did: int dynamicReturn; do { dynamicReturn = (int) ((rand.nextGaussian()*deviation)+mean); }while(dynamicReturn < (mean-deviation) || dynamicReturn > (mean+deviation)); which works but because that would make it skip generated numbers outside of the range, I'm wondering if that would throw off my gaussian distribution? If so, what would be a better approach to use that would still lock all the values within my deviation?
-
PPOSB - AIO Hunter
Looks amazing, any chance of a trial?
-
Graduated!
True, and you would be a fool to hold zero weight on a master in cs when hiring. It's not like you can just fuck around and expect to get through a degree like that.
-
99 Combat stats tips
The best tip is to only bot afk type training methods...doing anything else is pointless. sand/ammonite crabs or nmz. reason being the ban rate is probably 5 times higher on non afk methods so good luck making it to 99 without afk botting unless you plan on doing an hour a day.
-
Fruity NMZ
Bought it anyways Do you think you could add a random sleep time before reacting instead of instantly using the rock cake as soon as I hit 2 hp? Also mouse off screen would be nice.
-
dragon killers
Quick boys make a script that pks/endlessly harasses all bots who aren't on a whitelist of names.
-
Fruity NMZ
@Fruity Could I get a trial, please?
-
When you wake up to your whole farm banned.
- Botting near a pmod
If you are about to bot some pest control and you see a pmod in the boat should you still bot? or does it really matter?- If statement without boolean?
I believe that sleeps until the condition myPlayer.isUnderAttack() is true or the 5000 milliseconds has expired. Not actually sure about the .sleep() I copy pasted that example from the open afk splasher script, maybe take a look at that code.- If statement without boolean?
were you using sleepWhile or sleepUntil ? Those are conditional sleeps as far as I'm aware. edit: actually that's from another api I think osbot uses conditionalSleep() new ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return myPlayer().isUnderAttack(); } }.sleep();- Regarding osrs gp prices.
Probably has something to do with how bond prices have gone up a lot over the last little while so people who buy gold with irl money are less tempted to rwt.- APA Rooftop Agility
Probably the account you were developing with never lost its energy due to its high agility level. At lvl 30 I am dropping to 0. Awesome script though- APA Rooftop Agility
Yay finally released! stamina potion support would be nice also- osFletcher
Hey, do you think you could make the bot press spacebar instead of clicking on the make all option? It's just one less mouse movement the bot has to make. edit: actually nvm that would only work with arrow shafts. - Botting near a pmod