gorgas8 Posted November 24, 2015 Share Posted November 24, 2015 Hello, i was creating my very first script by tutorials and free source scripts i found in this forum. I ran it few times to see where it will fail and the next day my account got banned. Well all skills was botted in 1 week, but i believe they detected my script. So i have a question, does mouse moves randomly, human like by default or do i have to make it move like that? Also my path wasnt randomized and had too big gaps, but bot was able to click beyond minimap, maybe this was the case? Quote Link to comment Share on other sites More sharing options...
Nitrousek Posted November 24, 2015 Share Posted November 24, 2015 (edited) Hello, i was creating my very first script by tutorials and free source scripts i found in this forum. I ran it few times to see where it will fail and the next day my account got banned. Well all skills was botted in 1 week, but i believe they detected my script. So i have a question, does mouse moves randomly, human like by default or do i have to make it move like that? Also my path wasnt randomized and had too big gaps, but bot was able to click beyond minimap, maybe this was the case? Mouse moves randomly by default. You do not get banned by clicking on minimap beyond, path randomization (or rather lack of it) might affect your ban, but mostly, probably you were just unlucky. In debugging window select mouse-position to see your script cursor, you should see how the mouse moves Edited November 24, 2015 by Nitrousek Quote Link to comment Share on other sites More sharing options...
gorgas8 Posted November 26, 2015 Author Share Posted November 26, 2015 (edited) Can someone help me to make this case to wait till character is not attacked anymore, everything i try results to errors.. Also it should change world if totalStuff is less than 1. case BUY: sleep(random(2400, 2800)); if (myPlayer().isAnimating() || myPlayer().getInteracting() != null) sleep(random(1400, 2800)); { NPC shopOwner = npcs.closest("Owner"); if (shopOwner != null){ shopOwner.interact("Trade"); sleep(random(2400, 2800)); RS2Widget item = getWidgets().get(300, 2, 4); if (item != null){ int totalStuff = item.getItemAmount(); if (totalStuff >1){ item.interact(false, "Buy 10"); sleep(random(220, 420)); item.interact(false, "Buy 10"); sleep(random(220, 420)); item.interact(false, "Buy 10"); sleep(random(1500, 2500)); } } else{ if (Worlds != null && Worlds[worldCounter] != -1){ worlds.hop(Worlds[worldCounter]); log("World hop."); worldCounter++; } else{ log("int array is null"); } if (worldCounter == 7){ worldCounter = 0; } sleep(random(11700, 13000)); sleep(random(2400, 2800)); } break; } } Edited November 26, 2015 by gorgas8 Quote Link to comment Share on other sites More sharing options...
Explv Posted November 26, 2015 Share Posted November 26, 2015 (edited) Can someone help me to make this case to wait till character is not attacked anymore, everything i try results to errors.. Also it should change world if totalStuff is less than 1. case BUY: sleep(random(2400, 2800)); if (myPlayer().isAnimating() || myPlayer().getInteracting() != null) sleep(random(1400, 2800)); { NPC shopOwner = npcs.closest("Owner"); if (shopOwner != null){ shopOwner.interact("Trade"); sleep(random(2400, 2800)); RS2Widget item = getWidgets().get(300, 2, 4); if (item != null){ int totalStuff = item.getItemAmount(); if (totalStuff >1){ item.interact(false, "Buy 10"); sleep(random(220, 420)); item.interact(false, "Buy 10"); sleep(random(220, 420)); item.interact(false, "Buy 10"); sleep(random(1500, 2500)); } } else{ if (Worlds != null && Worlds[worldCounter] != -1){ worlds.hop(Worlds[worldCounter]); log("World hop."); worldCounter++; } else{ log("int array is null"); } if (worldCounter == 7){ worldCounter = 0; } sleep(random(11700, 13000)); sleep(random(2400, 2800)); } break; } } Do everyone a favour when you post code, post it using the code tool, and make sure it is properly formatted. Otherwise it is a headache to read. https://gyazo.com/5819a6c62741a431cb9fa7113d3f6dc9 Also there is a method in the API for determining if the player is under attack myPlayer().isUnderAttack() Edited November 27, 2015 by Explv Quote Link to comment Share on other sites More sharing options...
gorgas8 Posted November 27, 2015 Author Share Posted November 27, 2015 (edited) Thank you, this worked. Edited November 27, 2015 by gorgas8 Quote Link to comment Share on other sites More sharing options...