-
Posts
410 -
Joined
-
Last visited
-
Days Won
2 -
Feedback
100%
Everything posted by dreameo
-
calling methods between classes extending method provider
dreameo replied to Theorems's topic in Scripting Help
A - Main Class B: Some Class Extends MethodProvidor C: Some Class Extends MethodProvider If creating an instance of C in B, then you have to call exchangeContext and pass the bot reference. If you do this, you have to make sure that class B is instantiated in class A doing the same thing, exchangeContext. That way, there is a complete reference. A -> B -> C Think I understood what you're asking lol Zzz, Think I know now what you mean When you do this, the original one in Main has no correlation to this one. It's a separate instance and therefore, it has not been initialized. -
Extending method provider and nullpointerexception
dreameo replied to Theorems's topic in Scripting Help
You reference MethodProvider from 'Main class' that extends Script to all of your other classes. -
Extending method provider and nullpointerexception
dreameo replied to Theorems's topic in Scripting Help
Yea that might be his preferred method which is deprecated -
Extending method provider and nullpointerexception
dreameo replied to Theorems's topic in Scripting Help
When you're extending MethodProvider, some inherited fields must be initialized. That is the only reason why you're getting null. What those fields are, i'm not sure (take a look in Script class and see how it handles it). There are different ways on dealing this situation. @Alek Can tell you the preferred way. I think he mentioned it before in the forums. -
MyEtherWallet--- o rip blockchain.info
-
Yea, I tested this. Looks to be true. Numbers closer to the mean are more likely to be generated regardless if they are within the same std. What I described would be a normal distribution with flat tops lol.
-
Yea so that's fairly high lol. 0 Is within 2 SD which is (97-68 = 27/2 = 13.5) 13.5% probability of occurring. I think this math is wrong actually but you get the idea. You're only accepting a range of elements to whom all have the same odds of being selected. So let me demonstrate: 0 mean, 1 std. -1 and 1 have the same odds of being generated. (1 std vs 1 std) -1 and 2 don't have the same odds of being generated. (1 std vs 2 std) Therefore, any element within 1 std has the same odds of being generated. Since you are confining them to being within 1 std, then it goes to a flat distribution. lol, someone can double check on my work tho
-
Well, unless your standard deviation is incredibly high (relative to the mean), it would almost never be 0.
-
That's what nextGaussian() does @op Just wondering why you are trying to force your values to be within one SD? To further explain, if you're forcing all the 'random' values to be within one SD, then that 68 % of the population all have an equal chance of being selected which goes back to a flat distribution (each element has same probability of being selected)
-
Yea return percentage is what matters. ICO's are the best option for newcomers. High risk/high reward. Edit: Saw that you have chart analysis. It doesn't mean anything. I can easily get older 'chart analysis' and just show how wrong they today.
-
Majority of the coins aren't of any use. But don't let that persuade you in thinking blockchain isn't something revolutionary. Not that in the sense that's brand new, but it offers a new infrastructure where the future will be built on. BTC may just be a currency and could fail, but that's not important. What something like ETH is doing, is what's important. It's not distributed computing that ETH offers, it's an entire infrastructure to build on. From the man himself: Blockchain is providing value to many different companies right now. With blockchain being so successful, cryptocoins will be essential.
-
90 90 90 Rule: 90 percent of traders lose 90 percent of their wealth in 90 days. I wouldn't bother with stocks unless you've learned from a professional. There are very few equity traders (typical joe) who do well. The reality of the game is that you're competing against bots who are competing against other bots.
-
It will only create it if it enters the block. webwalkers I think might be a bit expensive in creating. That's just the part of the code you showed so that's the only advice I could offer lol. Making a path is more efficient then a web walker. Just use the Walking class and do walkPath.
-
If you think this walking method might be the cause, then just comment it out and run the bot. Take a look at the usage and see if there's any difference. Anyways, you could try setting it as a global value and initiating it during onStart. That way you just call execute instead of creating it every time. (edit: ^ the walking event)
-
something like: getGroundItems.getAll() then just iterate through the items and pick up the ones with ur req
-
So he finishes one task, goes to a second but needs certain gear. If he cached his bank, he will know whether to buy or go to bank.
-
Your suggesting to just check in this order: equipment --> bank --> go buy from ge Caching it would just eliminate the step of having to check the bank since you'd already know what you don't have.
-
Well, he's looking for equipment. So in this case, the list contains it or not, the quantity is implied.
-
Yea pretty much anytime you close the bank, update arraylist of items in the bank before you close (or finished with bank). That way you don't need to go and check every time. Make sure the items are updated before you check them tho, so like depending on where you start your script, the bank cache might not be initialized.
-
I think in this context, having things that are global would mean some nodes rely on others (dependencies) which then defeats the purpose of self contained nodes.
-
If you're using just 'this', then it's referencing the instance of the class. class Hi{ Hi thisCurrentObject = this; Hi(){} } Other times of using this is for ambiguity between local params and params taken from a method,constructor... w.e
-
lol im guessing fr is the instance of the class and hes calling onMessage?
-
Try this: List<NPC> t = getNpcs().getAll().stream().filter((n) -> n.getName().equals("al-kharid warrior")).collect(Collectors.toList()); I suggest tho doing it out long way before doing this one ^.
-
I think you have the jar within the directory and intelliJ has access to that, maybe that's why it thinks the .jar is being used and can't be deleted or updated.