

liverare
Scripter II-
Posts
1300 -
Joined
-
Last visited
-
Days Won
3 -
Feedback
0%
Everything posted by liverare
-
Thank you for the notice, I will look into this.
-
I don't keep track of spam threads. I literally only posted this to get a read of the data posted to the server.
-
You can have a billion proxies, but if you created all of those accounts from the same flagged IP Address, guess what, your accounts are flagged. Never taint your accounts by creating/logging onto them from a flagged IP Address.
-
How do I check if my player is in a certain Position, not Area?
liverare replied to imancity's topic in Scripting Help
If you're checking a specific Position, don't use Area and don't compare objects using "==". Keep it simple: Position myPos = myPosition(); Position targetPos = new Position(1000, 1000, 3); if (myPos.equals(targetPos)) { // You're at position } else { // You're not at position } Edit: After reading your first post, you can simply do this: Position myPos = myPosition(); if (someArea.contains(myPos) && myPos.getZ() == 3) { // You're in an area AND on the 3rd floor } else { // You're not... } You can set a plane for the Area, but that's only useful if the Area location is unique to whichever plane you're checking. For instance, if I'm in Lumbridge Castle, my Area will cover the entire castle and I will check the plane using my character's Z value, instead of setting the plane of the Area. Otherwise, I will have to constantly set that value to check what floor I'm on, which is just terrible. Example of how I would handle Lumbridge Castle's many floors to spin flax: Position myPos = myPosition(); if (lumbridgeCastle.contains(myPos)) { switch(myPos.getZ()) { case 0: // Ground floor // Climb staircase UP break; case 1: // First floor // Use spinning wheel, or go bank // upstairs break; case 2: // Second floor // Withdraw flax, or go to // spinning wheel downstairs break; } } -
Why do you think front-end is seen as less value than back-end developers
liverare replied to Qubit's topic in Spam/Off Topic
Both ends are complimentary. Without a front-end, a layman would be clueless as to how to use a programme. Conversely, without a functioning back-end, you simply have a pretty package but no actual content. Just out of pure bias I would say back-end requires more effort, but there can be some really stunning and beautifully designed front-ends too. -
Run (with down arrow) -> run configuration -> java applications Remove the redundant ones Then run your program again whilst having the class file opened
-
-
http://osbot.org/forum/topic/88391-my-advice-on-guis/ I went for a 'JS-callback-like' approach in the link, but now I'm switching my methods up to a more professional MVC (model view controller) approach.
-
The problem with JTables is that they're tabular (surprise). While other Swing components are using generic types to make life easier, JTables remain annoying to implement. But don't worry, I am working on a solution!
-
weird thing happening with gui not showing up correctly.
liverare replied to roguehippo's topic in Scripting Help
GUI gui; @Override public void onStart() throws InterruptedException { gui = new GUI(); } :edit: if that doesn't fix it, then I'll need to see your code. -
Yes, the onPaint runs independently from the onLoop. However, if some while loop is preventing the updating of a variable--which the onPaint is calling--then the variable won't change. int count = 0; @Override public int onLoop() throws InterruptedException { count = 0; while (SOME_CONDITION_SOON_TO_END) { ... } count++; return 100; } @Override public void onPaint(Graphics2D g) { g.drawString("Count: " + count, 25, 25); } The counter is being updated AFTER the loop. The onPaint doesn't receive a new value until then.
-
Pseudo code: ... WHERE ($proxy IS NULL OR proxy_id = $proxy) AND ($sub_category IS NULL OR category_id = $sub_category) Your WHERE logic may be wrong. I haven't done PHP in a while, but here's my understanding: If A is valid, then we'll filter results by comparing A to B. Otherwise, if A is invalid, we're not filtering results for B, so display results. That's pretty much the logic being used for both proxy and sub category. It should work.
-
You should avoid using while loops, because poorly coded ones can result in an infinite loop. You'd have to show us your code before we can get a better understanding of your problem. Where exactly did you place the while loop?
-
[Snippet] Item prices and other metadata from the Grand Exchange API
liverare replied to Disposition's topic in Snippets
Nice work. Caching the results is good practice, but not unless those cached results get updated too. Otherwise the information (such as price) will be out-of-date for the more volatile items. -
>cannon script cannot identify when it's interacting with someone else's cannon Holy shit.
-
I edited main post and already replied to somebody explaining the problem (post above yours).
-
Hello, thank you for your report. I've hit a bit of a problem regarding this script: the OSBot developers have disabled reflection. The core feature of this bot was to use reflection to super-exploit the select item interaction in RuneScape to achieve the massive fletching gains. However, this script will now need to be reworked to work using mouse-keys, but I fear the gains won't be nearly as great as they once were. I won't be able to work on this script until next week (uni exams) and I hope to have everything working ASAP. Sorry for the inconvenience.
-
Okay it should be working again.
-
To reproduce future generations into a fragile system of ever-increasing, Tumblr safe space levels of comfort, which'll leave them wholly depend on the system and unable to survive if it ever were to collapse. These vulnerable degenerates will be the last generation to reproduce.
-
Focus your anguish towards something constructive: learn to write your own scripts. It's how I started scripting.
-
I'm working on something that might be of interest: JObjectTable.
-
Well that's new to me.
-
Don't use that code. At no point is the Item defined, so he's having to constantly retrieve a single item from the Inventory class multiple times. This is very inefficient. The parameters are also a limitation too. There may be other conditions you wish to set before dropping anything. I'd go for something like this: // From int[] to Integer[] because Arrays.asList(Object) doesn't work with primitive type arrays public static final Integer[] VERTICAL_DROP = { 0, 4, 8, 12, 16, 20, 24, 1, 5, 9, 13, 17, 21, 25, 2, 6, 10, 14, 18, 22, 3, 7, 11, 15, 19, 23 }; public static final List<Integer> VERTICAL_DROP_AS_LIST = Arrays.asList(VERTICAL_DROP); public void dropAll(Predicate<Item> filter) { VERTICAL_DROP_AS_LIST.forEach((index) -> { // Acquire item once, store it as a variable Item item = getInventory().getItemInSlot(index); // Validate the item before interacting with it, also only use filter if one exists if (item != null && item.hasAction("Drop") && (filter != null && filter.test(item))) { item.interact("Drop"); /* * Item#interact(String...) returns a boolean, which you could * wrap in a selector (IF) for better handling */ } }); } public void dropFish() { // Lambda this shit the fuck up! dropAll((item) -> item.getName().equals("Trout") && !item.isNote()); } I haven't actually tested this, but it should work. If you want to go full autist you could have the Integer array explicitly defined within the parameters of the Arrays#asList(Object) method. This would just mean you wouldn't need to define VERTICAL_DROP as a global constant. It's justified too, since VERTICAL_DROP is only ever likely to be referenced once. However having VERTICAL_DROP as mostly dead code isn't going to rip holes in time and space.