-
Posts
1664 -
Joined
-
Last visited
-
Days Won
4 -
Feedback
100%
Everything posted by Bobrocket
-
Right, my apologies.
-
I'm pretty certain that getWidgets().get(x, y); will actually return a NullPointerException if the widget is not open (citation needed) Fix: if (getWidgets().isVisible(x, y)) { RS2Widget widget = getWidgets().get(x, y); }
-
As long as you understand the logic, it can take as little as a month to learn enough Java to make your first script. If you want to learn a language quickly, do not bother learning methods. Learn the syntax and conventions, and learn some basic functions such as comparisons. After that, anything you need can be googled and your knowledge will build as you go.
-
Thank you.
-
What I mean is initiate a trade when I am traded. I know how to accept the trade, but when someone requests a trade. Sorry for being confusing.
-
In short, I want to be able to accept a trade when someone sends it. Is there any way to do this without using onMessage? Thanks
-
Can you try the fix here? Afterwards, type sudo reboot to reboot your machine.Then try to run the jar via CLI again.
-
Can you run the following commands: java -version If you can, try running OSBot like so: java -jar /path/to/osbot.jar If you cannot, you must install the latest Java. If you can run java -version but you cannot run the jar, you must install the latest Java too (instructions below). Step 1. Download the latest RPM from Oracle - type this in your CLI window: wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-i586.rpm" It is a long command, but it is needed. Run it and it should download the latest RPM. Step 2. Compile and install the RPM - type this in your CLI window: rpm -ivh jdk-8u45-linux-i586.rpm Press "y" at any prompts. Step 3. Make sure it is installed - type this in your CLI window: java -version If you get the following message: java version "1.8.0_45" Java SE Runtime Environment (build 1.8.0_45-b14) Java HotSpot 64-Bit Server VM (build 25.45-b02, mixed mode) You have installed Java correctly.
-
You do post some really good stuff dude, keep up the good work
-
Here's a better example: <?php $username = ""; $password = ""; $database = ""; $host = ""; $sql = new SQLe($host, $username, $password, $database); if (isset($_GET['script'])) { $name = (isset($_GET['user']) ? $_GET['user'] : "all"; $q = $sql -> select($_GET['script'], array("username" => $name)); if ($sql -> num_rows($q) == 1) { $row = $sql -> fetch($q); //Call data like $row['value'] //Image stuff here } } ?> SQLe class: <?php define("SQLE_DATETIME_NOW", 40966); define("SQLE_NULL", 400968); class SQLe { protected $pdo = null; protected $last_query = ""; protected $last_params = array(); protected $last_err = ""; protected $verb; public function __construct($host, $user, $password, $db, $verbosity = 1, $emulate = true) { $this -> verb = $verbosity; try { $p = new PDO("mysql:host=" . $host . ";dbname=" . $db, $user, $password); $p -> setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $p -> setAttribute(PDO::ATTR_EMULATE_PREPARES, $emulate); $this -> pdo = $p; } catch (PDOException $e) { $this -> last_err = $e -> getMessage(); $this -> verb_error(); } } public function query($query, $params = array()) { if (!is_array($params) || !is_string($query)) { $this -> last_err = "You must pass a string and an array to query()!"; $this -> verb_error(); } try { $stmt = $this -> pdo -> prepare($query); $stmt -> execute($params); $this -> last_query = $query; $this -> last_params = $params; return $stmt; } catch (PDOException $e) { $this -> last_err = $e -> getMessage(); $this -> verb_error(); } return false; } public function num_rows($stmt) { return $stmt -> rowCount(); } public function fetch($stmt) { return $stmt -> fetch(); } public function insert_id() { return $this -> pdo -> lastInsertId(); } public function insert($table, $arr) { try { $keys = array_keys($arr); $string = "INSERT INTO " . "`" . $table . "` " . "(`" . implode("`, `", $keys) . "`) VALUES ("; $params = array(); foreach ($arr as $key => $val) { $temp = ":" . $key; if ($val== SQLE_DATETIME_NOW) $string .= "NOW(), "; else if ($val == SQLE_NULL) $string .= "NULL, "; else { $string .= $temp . ", "; $params[$temp] = $val; } } $string = substr($string, 0, -2); $string .= ")"; return $this -> query($string, $params); } catch (PDOException $e) { $this -> last_err = $e -> getMessage(); $this -> verb_error(); } return false; } public function select($table, $arr, $other = NULL) { try { $string = "SELECT * FROM " . "`" . $table . "` " . "WHERE "; $i = 0; $params = array(); foreach ($arr as $key => $val) { if ($i > 0) $string .= " AND "; $temp = ":" . $key; $i++; $string .= "`" . $key . "`=" . $temp; $params[$temp] = $val; } if (isset($other)) $string .= " " . $other; return $this -> query($string, $params); } catch (PDOException $e) { $this -> last_err = $e -> getMessage(); $this -> verb_error(); } return false; } public function verb_error() { if ($this -> verb == 3) die($this -> last_err); if ($this -> verb == 2) echo $this -> last_err; } public function error() { return $this -> last_err; } public function querystring() { return $this -> last_query; } public function close($stmt) { $stmt = null; } } ?>
-
It's an assumption (hence the word could) which I am testing. In theory, it would work just like any other antipattern. Jagex probably doesn't directly check if a player is focused, but moreso if the player is constantly reacting within a certain time frame. Having focus would break the patterns and probably help those who suicide bot. This is unfinished because people write scripts differently to how I do. Personally, I use sleep between most interactions to simulate human responses, so I have modified my sleeps to use a focus level (see above). Others could use this as a factor in eating health or the time to drink a potion or whatever.
-
Been running this script on and off on my tablet with mirror mode, really great script! Got 130k in a few hours total! (From 36 to 47 mining) Thanks for letting me test this Khal, will definitely buy it when I can get the money
-
I actually have a refurbished poweredge SC1425 under my bed, was considering getting it to work but damn it's loud af
-
I have added you, I will write content for you if required. Will send examples of my work over Skype.
-
You're being bruteforced. What you should do: (any or all of these will help) Change your SSH port Require a keypair on SSH login Disable your "root" user Changing your SSH port Run this command: vi /etc/ssh/sshd_config Your screen should come up with the default sshd configuration. Press a and then press enter, and type "Port <THE PORT YOU WANT TO RUN ON>" Press esc, then :x. This will save the file and exit vim. Remember the port you chose; you need this to connect via SSH. Type service sshd restart and then close the PuTTY tab. Change the port to the new port and connect. Keypairs via SSH This is not recommended unless you know what you're doing. Tutorial here. Disabling your "root" user First, create a new user. Type useradd <YOUR SPECIFIED USERNAME> Then type passwd <YOUR SPECIFIED USERNAME> and type your desired password twice (for confirmation) Now, type visudo and scroll down to the line that says # User privilege specification (use down arrow to scroll down) Look for the line that says root ALL=(ALL) ALL. Below that line, type <YOUR SPECIFIED USERNAME> ALL=(ALL) ALL and exit. Now, we will disable the root user. Type vi /etc/ssh/sshd_config and press a and then type "PermitRootLogin no" then press esc and then :x. Type service sshd restart to complete this. Good luck!
-
What I do in my scripts is set a timer of a random value between 18 and 45 minutes (thinking about TV and stuff here), and I change a variable for normal and unfocused (my scripts wouldn't exactly have consequences where spam clicking is required). I also have a method that wraps random number functions for negative skew and a normal distribution (see below) public int normalDistributionRandom(int min, int max) { int n; int mean = (min + max) / 2; int std = (max - mean) / 3; Random r = new Random(); do { double val = r.nextGaussian() * std + mean; n = (int) Math.round(val); } while (n < min || n > max); return n; } This means that people remain unfocused for 18-45 minutes and then resumes normally. If you think about it, focus could very well be seen as bannable. You aren't going to have the same distribution for 24 hours, are you? It shouldn't be too hard to implement, just change any sleep values you use to incorporate the focus of the bot.
-
This is very interesting. In all of my years of programming, I've never come across stuff like this.
-
One hour proggy: Thanks for a great script
-
Focus can play a very important factor in your script; it could be the difference between a ban or not. As a result, I have found a way to simulate the idea of focus. Take this graph as an example: This graph shows the distributions of 3 response profiles: focused (in red), playing normally (in orange), and unfocused (in blue) Please note that this graph is not based on any statistical evidence. If you are focused (for example you're being PK'd), you are more likely to click faster and respond faster. If you are playing the game normally, you will click at an average-ish time. If you aren't focused (for example watching TV), you are more likely to click slower. This graph shows that the graph for being focused is a positive distribution. This means that the majority of the data will be clustered towards the negative end (closer to 0) than the positive end. It also shows that not being focused has a negative distribution, which means that the majority of the data is clustered towards the positive end (closer to 100 or wherever the graph ends) than 0. Playing normally has a normal distribution, which means that the data clusters around the midpoint of the data (in this scenario it would likely be symmetrical too, meaning that mean = mode = median) Below is some code that I found on Stackoverflow and slightly modified it. public int positiveSkewedRandom(int min, int max) { return skewedRandom((double) min, (double) max, 2.55, -1.68); } public int negativeSkewedRandom(int min, int max) { return skewedRandom((double) min, (double) max, 2.55, 1.68); } public int skewedRandom(double min, double max, double skew, double bias) { Random r = new Random(System.currentTimeMillis()); double range = max - min; double mid = min + range / 2.0; double unitGaussian = r.nextGaussian(); double biasFactor = Math.exp(bias); double retval = mid + (range * (biasFactor / (biasFactor + Math.exp(-unitGaussian / skew)) - 0.5)); return (int) retval; } The params for skewedRandom: min - the minimum possible value max - the maximum possible value skew - how close the data would be clustered together (higher = tighter clustering) bias - the tendency for the mode to approach the min/max/midpoint of the data; negative = positive bias, positive = negative bias Usage: boolean focused = true; if (focused) { sleep(positiveSkewedRandom(100, 750)); } else { sleep(negativeSkewedRandom(100, 750)); } If the data is not skewed enough, you can change the skew and bias settings in the respective method. Good luck, and happy botting!
-
It means you have to enter the proxy username and password. If you don't know what it is, ask your proxy provider.
-
Maybe have two tiers of mules: Tier 2 mule - trades with your bots (random items/gp on both sides + the items you want) Tier 1 mule - trades with tier 2 mule (random items/gp on both sides + items wanted) then sells the items and trades with your main for the gp and some random items