-
Posts
1664 -
Joined
-
Last visited
-
Days Won
4 -
Feedback
100%
Everything posted by Bobrocket
-
After you attack minotaur, set him into a global variable (say, npc) private NPC npc; public int onLoop() throws InterruptedException { if (npc == null || !npc.exists() || npc.getHealth() == 0) { //find new npc NPC minotaur = getNpcs().closest("Minotaur"); //minotaur checks minotaur.interact("Attack"); npc = minotaur; } }
-
It's very nice, I'd recommend using pictures instead of text for status etc as it looks nicer.
-
If you want to walk multiple paths, you could have a data structure like so: public class Path { private List<Position> path; public Path(List<Position> ourPath) { path = ourPath; } public List<Position> getPath() { return path; } } And then you can have something like this: List<Path> ourPaths = new ArrayList<Path>(); ourPaths.add(new Path(Arrays.asList(new Position[]{ new Position(x, y, z), new Position(x, y, z) })); Then, you wouldn't even need a switch/case selection. You could just do: getLocalWalker().walkPath(ourPaths.get(random(1, 5)).getPath());
-
Lads, you're giving him all the wrong information, he's asking for how he can detect if the NPC is knocked out. When the thug is knocked out, the height will decrease. Log npc#getHeight() before and after you attempt to knockout,
-
There's no need, but personally I think it looks cleaner. I am of course biased since I'm using Pascal at college and the IDE I'm using actually requires a DOS emulator. It's always good to get into some good conventions, and obviously now that you can view types in an IDE by hovering over the variable it has more or less become redundant. Notation overall is just up to preference, after all.
-
The paint code itself looks alright, the rest is a bit messy. A few tips: Learn some proper variable notation. I would personally recommend hungarian notation, as this will become more useful in larger programs. public int xVal = 0; public int intXCoordinate = 0; Which one of those is easier to read? Hungarian notation simply implies that you write your data type in lower case at the start, and then you give the variable a meaningful name. With modern IDEs the need for hungarian notation doesn't apply so much, but it's still useful and easy to read. On top of this note, rename your variables as it is very confusing to read. As far as paints are concerned, I would recommend trying something such as my PaintLib. It easily allows the manipulation of paint components in an OOP manner, and is also fairly easy to read in the long run. Good to see people learning though, good job!
-
If our NPC is evaluated to NULL, we can't run #exists() on it. If those conditions evaluate to true, our Minotaur is dead and thus we need a new one.
-
Prove me wrong atheists. Just thought you guys would want to know :^)
-
EDIT: If you PM valkyr about it then he'll be glad to help
-
You could just have a List<enum> which is loaded in the same order as your combobox and then just grab the selected index eg list.get(myCombo.getSelectedIndex());
-
If you have any more questions feel free to PM me
-
Happy birthday bro!
-
You were botting woodcutting, what did you expect? GG son
-
To elaborate on why you were having those issues: if (x == y); return z; The idea with the if block is that it tests logic. Now, what you want to do after the if block (if it returns true) is to execute all the code in that block. When you use the semicolon, you're effectively terminating the block. It would look something like this: if (x == y) { } return z; //Note how this is outside the block //Any code after here is UNREACHABLE because we already return z So to fix, we remove the semicolons from our if statements to look like this: if (x == y) return z; Which would look more like this: if (x == y) { return z; } //Code here is only executed when (x == y) evaluates to FALSE (or in better words, when (x != y)) Hope this makes some sense
-
[RELEASE] AIO Hunter by ProjectPact is ready for release! <3 <3 <3
Bobrocket replied to ProjectPact's topic in Spam/Off Topic
Congrats on the release! About time -
This is the video that got me into papa franku, no regrets
-
I edited a little bit of it so it actually clicks in a square radius 1 around dst, it would offset in the older one (consider just editing my quote )
-
If you had a gift card you could probably exchange it to someone.
-
Thanks for this. I'm still getting my head around lambdas and I didn't realise you could have comparators as lambdas, I'll add that in the thread at some point
-
I support your java mentor idea simply because you need to be recognised for the work you do around here. Of course, others should be recognised too, but you're the prime example. You've helped me (no doubt others too) so much with java and putting up with all of my stupid questions and even that deserves a rank on its own! My phone seems to not use a phone layout though, it just uses the desktop layout. Resolution is pretty high, using a Moto G second gen for reference
-
Those messages mean that the proxy is either off (refusing connections), is under heavy load (timed out), or there is some wrong information.
-
This song is (legally) my beat. Thanks for the congratulations everyone! It's good to be blue
-
Refactor node to something like _Node, it's a problem because osbot thinks you're trying to initalise an OSBot node. You could also specify it's a core.Node rather than just a Node
-
Show us your package structure.