Juggles Posted November 25, 2017 Share Posted November 25, 2017 If using states, put it as your first state so it will prioritze over everything Quote Link to comment Share on other sites More sharing options...
The Legman Posted November 25, 2017 Author Share Posted November 25, 2017 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! Quote Link to comment Share on other sites More sharing options...
Sysm Posted November 26, 2017 Share Posted November 26, 2017 16 hours ago, The Legman said: yeet Thanks! YEEEEEEEEEEEEEEEEEEEEEEETTTTTTTTTTTTTTTTTTTTTT u got my skype u know u can ask me code questions m8 1 Quote Link to comment Share on other sites More sharing options...
HeyImJamie Posted November 26, 2017 Share Posted November 26, 2017 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. Quote Link to comment Share on other sites More sharing options...
The Legman Posted November 26, 2017 Author Share Posted November 26, 2017 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 Quote Link to comment Share on other sites More sharing options...
The Undefeated Posted November 27, 2017 Share Posted November 27, 2017 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? Quote Link to comment Share on other sites More sharing options...
toxicity959 Posted November 30, 2017 Share Posted November 30, 2017 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(); Quote Link to comment Share on other sites More sharing options...
progamerz Posted December 2, 2017 Share Posted December 2, 2017 (edited) 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, 2017 by progamerz Quote Link to comment Share on other sites More sharing options...
ByteStack Posted December 3, 2017 Share Posted December 3, 2017 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. Quote Link to comment Share on other sites More sharing options...