-
Java Timer loop execution?
Just do what the assignment asks for. Storing the data in an array isn't necessary for the results are quite obvious. Just use a new thread to determine what amount of time you'd like execution to occur on. import java.util.Random; /** * Created by Archon */ public class VehicleSimulator { private static final Random RANDOM = new Random(); public static void main(String[] args) { VehicleSimulator camry = new VehicleSimulator(1, 100, 20, 1); camry.start(); } /** * Separator */ private int passengers, fuelCap, mpg, gear; private boolean acc, running; public VehicleSimulator(int passengers, int fuelCap, int mpg, int gear) { this.passengers = passengers; this.fuelCap = fuelCap; this.mpg = mpg; this.gear = gear; this.running = true; } private void start() { new Thread(new Runnable() { @Override public void run() { while(running) { accDec(); changeGears(); debug(); try { Thread.sleep(1000L); } catch(InterruptedException e) { e.printStackTrace(); } } } }, this.getClass().getName()).start(); } private void accDec() { if(gear == 1) { /** * Cannot decelerate at this point! */ acc = true; return; } acc = RANDOM.nextBoolean(); } private void changeGears() { int change = acc ? +1 : -1; gear += change; } private void debug() { System.out.println("Accelerate: " + acc + " Gear: " + gear); } }
-
FIX MY ACCOUNT
I have no idea who you are, are you new? I've contacted several of the administrators such as Maxi, Laz, and Zach. Also, you never replied to me when I brought it up to you. I don't live off of this site, I can care less about my reputation. It's either my scripts are purchased or they are not.
-
FIX MY ACCOUNT
I'm tired of not being able to see my scripts from the sales page. I'm tired of being ignored by the administration team. I have no reason to update my scripts when I get this kind of treatment.
-
More human like scrolling [BANK]
OSBot's scrolling to an item from the bank interface isn't the greatest and is buggy. Also, who honestly scrolls with the tiny up and down arrows? Anyways, this will scroll more human like. Feel free to use it. private boolean scrollToItem(String name) throws InterruptedException { RS2Interface bankInterface = client.getInterface(12); if(bankInterface == null || !bankInterface.isVisible()) return false; Item[] bankItems = bankInterface.getItems(6); if(bankItems == null || bankItems.length < 400) { log("Invalid items container child id!"); return false; } int itemSlot; Item bankItem = null; for(itemSlot = 0; itemSlot < bankItems.length; itemSlot++) { Item item = bankItems[itemSlot]; if(item == null || !item.getName().equalsIgnoreCase(name)) continue; bankItem = item; break; } if(bankItem == null) { log(name + " not found in bank!"); return false; } if(client.getBank().isSlotVisible(itemSlot)) return true; int row = itemSlot > 8 ? itemSlot / 8 : 0; System.out.println("Scrolling to row: " + row); int x = 482; int y = 75 + (int) (row * 3.5); int width = 14; int height = 10; return client.moveMouseTo(new RectangleDestination(x, y, width, height), false, true, false); }
-
Raflesia
you're lucky i dont want to get you banned ......... i wont dispute you Clearly I was joking, but feel free to dispute.
-
Raflesia
No offense, but I couldn't see you being a good administrator regardless of the community.
-
Looking for main!
I have a 60 atk 79 str 39 def acc with mith gloves interested? (username login)
-
Let's talk about MySQL Connection Pooling
Firstly, this is probably not the correct section but hopefully the ones who visit this section have better knowledge on the subject. I understand that pooling connections allows for connections to be 'recycled' but whenever I read about the action of pooling connections there is always something that states: "Make sure you close the connection when you're finished with it to put it back into the pool." Now, I've also read that having to re-open a connection is very costly, so I don't see how a pool helps if the connection is always being closed and re-opened. Someone help me better understand this subject, Archon
-
so jagex can detect the osbot client?
Yes, RuneScape has bot a bot detection system as I've said before. They just don't auto-ban yet. I'm sure they are implementing the same system they use on RS3 which has got rid of almost all bots.
-
This one is for the haters.
If you're a hater click the spoiler you *%@$!!
-
Personal SDN Scripts
Not sure if it was intentional but now I can't even see my Pest Control script on the page where you are supposed to be able to see your own scripts. Not nice.
-
Personal SDN Scripts
Not sure if it was intentional but now I can't even see my Pest Control script on the page where you are supposed to be able to see your own scripts. Not nice.
-
Personal SDN Scripts
Once again, I wasn't complaining simply asking a question directed towards the staff members.
-
why doesn't jagex just.....
@The people who say Jagex isn't entirely against bots. http://services.runescape.com/m=news/jagex-vs-ibot--anti-bot-update If that was so, they wouldn't of had a 2 year lawsuit with a botting company that originated in the US. You know how much money that probably cost them?
-
Personal SDN Scripts
Yeah and the thing is I wasn't ranting about OSBot not paying, all I did was ask when they do actually pay because I haven't yet received a payment. Kids blew everything way out of proportion.