Well I thought today I would release some of my private collection of different classes/snippets hopefully help new writers learn a little bit, and to maybe see a rise in quality of scripts throughout this forum. For my fifth release is another great learning experience I undertook last month, creating a mouse movement algorithm using a bézier curve algorithm I created with the help of Google, a tutorial on here, and @Merccy & @Swizzbeat helping me understand how the mouse interacts with the canvas, how to send my own events to the canvas. The reason I'm releasing this is because of the rise in bans as of recent, and I feel mouse movement plays a significant role in bans, though some people doubt this. I have to admit I didn't always think this was true either, and like some that still don't believe, I thought of profiling mouse movements as completely impossible due too the extensive resources that it would take to profile each player, though I will post some quotes from respected members of RS Hacking community that completely changed my thoughts about this. (Posting in text to avoid subliminal advertisement) #1
#2
#3
Those excerpts from above are some of the better material I have found regarding bans, but there is much much more on the topic, just a matter of digging deep enough to find it! Though a mouse change alone won't completely remove the chances of a ban, it gives you a better chance of going undetected. Now lets get started! What does this actually do? Well simply make your mouse completely different, using a bézier curve algorithm I created using a framework Swizzbeat and Merccy supplied me with. The final result, should look somewhat like this:
Though this could be highly improved upon, it is a huge improvement to the default, and there are also other mouse controllers such as the SRL Mouse and WindMouse which are available on Google, just may require some porting over. How does is work? Well when creating this instead of starting by looking through RS examples, I instead went and study the math behind bézier curves, to find out they were quite simple to grasp. Then after seeing a idea for a mouse controller posted that I thought would be suited perfect for my use, I decided to replicate it. This is the basic guideline I followed when creating this.
Finally, how the hell do I use this?: Well even though I took out most of the work, it still takes some on your side, just mostly copy/pasting, thought I recommend that you edit this mouse algorithm because the more similar patterns the more chances of you being detected. Well this tutorial will partially coincide with @Merccy's tutorial on Creating your own Mouse Controller, though I have made edits and extended some other areas he did not.
First off we need to create a interface which we can use later to create new mouse algorithms easily and making changing them a snap.
In Merccy's tutorial he creates a MouseController class which handles moveMouse and moveMouseTo methods, though this is also where we assign our new MouseController as well.
We are adding this class becasue it seems that Merccy didn't mention it, though we need a class that can send our new mouse events to the canvas to have it move the mouse.
Now we Object hold this new mouse we created, so for this I created ModMouse, which basically reflects and sets our mouse controller to replace the original. This is similar to Merccy's though we also set our MouseEvent as well.
Finally we have everything we need to set use our own mouse algorithm, but we need a Mouse algorithm to use it! I named this NotoriousMouse purely to change the name other a Mouse controller sent by Swizz beat, which I then ripped all the internals out and rewrote using the new found knowledge I learned while studying bézier curves! This may not be the best, but it's a big step up!
So we have all these files ready to go, and you should have something looking like this:
For the hardest part of all is implementing it, please pay attention as this may be difficult for some to understand.
@Override
public void onStart() {
new ModMouse(this);
}
Done. If you manage to follow all the directions and copy/pasted everything just right you should have a whole new mouse in your script! You now are on the road to having a more diverse mouse controller, though please be warned this is only for OSBot1, I have already tried implementing this into OSBot2 but the mouse methods are now declared as final and are no longer able to be overridden (If there's another way please let me know). I really hope you enjoyed the read, and I hope it helps all of you! I would post my sources and references but I withheld from doing so in fear of ban due to accidentally advertising, though I'm sure could be found with someone interested in the subject.
Questions/Comments?: If you see anything I messed up on, or should be improved, please let me know, but be respectful about it, we have too many keyboard warriors thinking their hot shit, yet do nothing but bash others and never give any useful resources. Even if you have a question, free to ask me, just please refrain from asking me blatant obvious questions, or ones you did little to no research on before asking, I'm not here to spoon feed you, though I am willing to help someone is trying.