swiffyp Posted December 2, 2016 Share Posted December 2, 2016 (edited) Lately I've noticed that some random events aren't properly dismissed by the bot client. So I added this simple snippet into my script to ensure that they are. onLoop: if(dismissRandom()) { sleep(random(600, 800)); while(myPlayer().isMoving()) { sleep(600); } sleep(400); } boolean: private boolean dismissRandom() { for(NPC npc : npcs.getAll()) { if(npc == null || npc.getInteracting() == null || npc.getInteracting() != myPlayer()) { continue; } if(npc.hasAction("Dismiss")) { npc.interact("Dismiss"); return true; } } return false; } This basically checks if there are any npcs with the "dismiss" option interacting with you and if so, they'll be dismissed. Edited December 2, 2016 by swiffyp Quote Link to comment Share on other sites More sharing options...
Sysm Posted December 2, 2016 Share Posted December 2, 2016 why dissmiss then lol, most " legit" players just let then disappear sometimes to Quote Link to comment Share on other sites More sharing options...
swiffyp Posted December 2, 2016 Author Share Posted December 2, 2016 why dissmiss then lol, most " legit" players just let then disappear sometimes to Highly doubt that it's okay to not dismiss/attend random events. Quote Link to comment Share on other sites More sharing options...
Explv Posted December 2, 2016 Share Posted December 2, 2016 Highly doubt that it's okay to not dismiss/attend random events. I'm pretty sure the built in solver does the same thing as your code, have you tested this with the same random events that the built in solver doesn't work for? Did you file a bug report detailing the case where it didn't work so that the devs can fix it? Quote Link to comment Share on other sites More sharing options...
Precise Posted December 2, 2016 Share Posted December 2, 2016 When I sometimes play legit I cba to dismiss them, and I'm pretty sure the built in Random solver does this already and would override any script anyways (if enabled). Quote Link to comment Share on other sites More sharing options...
swiffyp Posted December 2, 2016 Author Share Posted December 2, 2016 (edited) I'm pretty sure the built in solver does the same thing as your code, have you tested this with the same random events that the built in solver doesn't work for? Did you file a bug report detailing the case where it didn't work so that the devs can fix it? The built-in solver is not always triggered. It happens to me very often, which is why I decided to write this quickly. I haven't filed a bug report but I will do that. Now if you don't like this, don't use it. It's that simple. Edited December 2, 2016 by swiffyp Quote Link to comment Share on other sites More sharing options...
DocMatson Posted December 2, 2016 Share Posted December 2, 2016 this is a really handy snippet. but i would add a tiny piece of logic to prevent the very awkward snap run to dismiss issue. where your bot is say running to the bank. the random spawns 50 feet back and your bot clicks "dismiss" and sprint turns and runs back to the now far away random NPC to dismiss them. its always been a behavior that bothered me. Unless you have a long run back to the bank this change should be of little consequence. if(npc == null || npc.getInteracting() == null || npc.getInteracting() != myPlayer() && !api.myPlayer.isMoving()) Quote Link to comment Share on other sites More sharing options...
kushad Posted December 2, 2016 Share Posted December 2, 2016 i let them follow me like a little bitch fuck dismissing 3 Quote Link to comment Share on other sites More sharing options...
IHB Posted December 2, 2016 Share Posted December 2, 2016 i let them follow me like a little bitch fuck dismissing Lol But nice snippet have noticed the built in one doesnt work 75% of the time Quote Link to comment Share on other sites More sharing options...
Chris Posted December 2, 2016 Share Posted December 2, 2016 randoms dont do anything Quote Link to comment Share on other sites More sharing options...
qverkk Posted December 2, 2016 Share Posted December 2, 2016 randoms dont do anything they follow u Quote Link to comment Share on other sites More sharing options...