November 25, 20178 yr If using states, put it as your first state so it will prioritze over everything
November 25, 20178 yr Author 8 hours ago, Sysm said: YEET yeet 8 hours ago, Juggles said: If using states, put it as your first state so it will prioritze over everything Thanks!
November 26, 20178 yr 16 hours ago, The Legman said: yeet Thanks! YEEEEEEEEEEEEEEEEEEEEEEETTTTTTTTTTTTTTTTTTTTTT u got my skype u know u can ask me code questions m8
November 26, 20178 yr I personally have a thread that checks for danger (players within x combat wearing x items etc) while running other tasks and then if a danger is found, activate a handlePker task that prioritises above all others to escape.
November 26, 20178 yr Author 12 hours ago, Sysm said: YEEEEEEEEEEEEEEEEEEEEEEETTTTTTTTTTTTTTTTTTTTTT u got my skype u know u can ask me code questions m8 no idea what your on about
November 27, 20178 yr On 24-11-2017 at 12:14 PM, The Legman said: This currently how I build my scripts. The issue is when it runs through a task, such as normalRocks ( a completely different script btw), it will never interrupt that task while it's mid way done - which is what I want it to do. Thus I will end up trying to put that code in the onLoop. Thanks! Stopscript == true?
November 30, 20178 yr If you're using conditional sleeps, your bot will be unresponsive to attacking players. Add a condition in your conditional sleep to check if you're under attack to break out of the sleep, and have your "under attack" case be first in your code so it takes priority. new ConditionalSleep(45000){ public boolean condition() throws InterruptedException { return myPlayer().isUnderAttack() || (other conditions); } }.sleep();
December 2, 20178 yr You can add multi threading support which would make it "constant" anti-pk. Teleblock detector should be done by adding a message listener and don't forget about the timing of the tb when it is off(parse that from the chatbox message)! Edited December 3, 20178 yr by progamerz
December 3, 20178 yr Just to expand on what HeyImJamie said. Only teleporting after you're under attack might be too late and hopping afterwards is impossible. You can iterate through the players that are loaded and check if their combat level can attack you(Example: Your combat level is 30, they're 45 and you're in 10 wilderness it won't hop or teleport. If they're 37, you would hop.). If you don't want to do that, an easier way to do it would be to check the size of local players and if it's greater than 2 it will hop(It counts your player). This will hop no matter what though, whether they can attack you or not. Then check for active tasks. P.S I would also recommend checking for teleblock with onMessage so that you don't have the bot spamming the teleport. And isUnderAttack so it's not trying to hop worlds.
Create an account or sign in to comment