Jump to content

Bobrocket

Members
  • Posts

    1664
  • Joined

  • Last visited

  • Days Won

    4
  • Feedback

    100%

Everything posted by Bobrocket

  1. So does every scripter here. What's your point?
  2. easy medium rare medium hard NO MERCY
  3. You could have something like this: import org.osbot.rs07.script.MethodProvider; public class ConditionalTimer { private int time, step, elapsed; private TimerCondition condition; public ConditionalTimer(int t, TimerCondition cond, int s) { time = t; condition = cond; step = s; } public boolean run() throws InterruptedException { elapsed = 0; while (time <= elapsed) { if (condition.condition()) return true; MethodProvider.sleep(step); } return false; } public int getElapsed() { return elapsed; } } interface TimerCondition { public boolean condition(); } Example: if (new ConditionalTimer(3000, () -> (myPlayer().isAnimating()), 50).run()) { //we're animating } else { //we're not animating (we haven't been animating for 3000 ms) }
  4. I think onPaint (in this context) would be called 50 times per second (syncing with the RS client). The reason we add our listeners in onStart is because otherwise we're creating a new listener 50 times per second (every 20ms), as well as assigning it to the bot to listen. When we click then, something along this would occur: //when clicked for (MouseListener ml : listeners) ml.onClick(mouseArgs); So that means your mouse listeners will also be executing many times in tandem.
  5. Why don't you understand that if someone wants to get all of your data, they will. All I need to do is just turn on wireshark, look at my connections, and grab the data. You don't sanitise any data in the update page, you use deprecated MySQL in signature.php, you rely solely on mysql_real_escape_string (which will not escape certain characters like \ and \x00). At least you mask errors, that's a start.
  6. $setResult = mysqli_query ( $conn, "SELECT * FROM Data WHERE Username='$nametemp'" ); // Selects all fields from the Data table, based on the username supplied What happens when $nametemp is ' OR '1'='1'? Look into parametised queries or sanitise your input properly :/
  7. Oh boy, I love me some delicious motherfucking SQLi! It's a good learning point, but don't ever use this in a production environment. Yes, there's only user data, but data and you don't even sanitise it!
  8. To understand why this fully works, you need to (somewhat) understand how OSRS works as well as how the OSBot API works. I'll explain both the theory and the solution, but I'll put the theory in a spoiler so you don't have to read it. Theory: Your solution would be to tag your tree in a variable, like so: //Global var Entity tree; //onLoop if (tree == null || !tree.exists()) { tree = getObjects().closest("Tree"); if (!tree.isVisible()) getCamera().toEntity(tree); tree.interact("Chop down"); }
  9. This is (somewhat) wrong. It is possible to route to disallow your VPN for certain IPs, however it is extremely tricky and going to be a huge pain for everything non-RS. A better solution would be to use the VPN on your router, that way you can allow certain ports/IPs/pcs to use the vpn.
  10. String abbysorby = (Absorbpts == null ? "-1" : Absorbpts.getMessage());
  11. Remember to perform instanceof Girl, because both Boy and Girl extend the abstract Person class
  12. I'm being forced to do this Happy birthday dubz please send help This boy is now 20 years young what a geez
  13. The idea is that when you mine the rock, the osrs client replaces the object with its depleted version meaning it is no longer there. You need to make sure they aren't null and that they have the actions Mine and Prospect so that they are valid rocks.
  14. Someone's put your name on one of those stupid Skype directory sites. Mines on like 25 of em so I get these daily
  15. I'm on my phone here so forgive any typos. You should look into something called a Node system, which is essentially an object oriented way of handling numerous tasks. The idea is to have an abstract base class (let's call it Node) and have all of your nodes (eat, fight, loot) extend our Node class. public abstract class NodeIn the abstract node clasa there should also be two abstract methods (let's call them canProcess and process). Each of our nodes will override this method with our own code.We can store each node in a List<Node> since they all extend our abstract Node class, and then call our abstract methods (canProcess and process) because they are defined in our Node class In our onLoop, we want to see if we can process each node and then run it. You want do loop through every node, see if canProcess returns true, and if it does run process. Hope this helped, I believe there is a tutorial somewhere in the forums for it
  16. Alternatively.. npc = (minotaur.interact("Attack") ? minotaur : null);
  17. List<RS2Object> objects = getObjects().getAll();
×
×
  • Create New...