Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Osu! Spinner [Free Download]
#1
Due to me getting bored of physics revision and JustM3 taking down his I decided to make a auto spinner, it has quite a few features that JustM3's didn't.

VERSION 0.4 OUT

########## ~ THIS IS A WORK IN PROGRESS, READ THIS WHOLE POST AND USE AT YOUR OWN RISK! ~ ##########

• Checks for updates over the internet*.
• Support for left handed spinning.
• I can tweak the settings without you needing to redownload the whole program*.
• Possibly more realistic.

*I understand if it accessing the internet may be worrying but it only grabs a single page of txt off pastebin and when out of date it sends your browser to this thread.


Realistic Mode:
[Image: giphy.gif]


Ban me plz (477spm) Mode:
[Image: 1zdw7l1.jpg]
I don't have a graphics card atm so i cant use it with fraps running aswell.


WARNING: This will not be hard to detect (hopefully it will be less obvious later on) so dont use this on any account you would mind losing.

Know Bugs:
• The Shift Key must be the last key you press, so hold Z or X and THEN hold Shift.
The cursor jumps between spins when new angles are generated.
I will try to fix these at some point but i have exams this week so it may be after them.


Planned Features:
• To find the osu window when not full screen.
• Speed Scroll Bar.
• Non ugly UI.
• Customisable Hotkeys.
• Few others i cant think of atm.

MD5: 10084b1fc2828cf8fce69624959525b4
SHA-1: f49625cd2572123f84af1e2809c33209566a1ef8
SHA-256: 8fefec4a6086c41a64916477409a57f558b09cf5e68138955562c758f578af87
Virus Total: Here [1/55]

DOWNLOAD >> HERE << DOWNLOAD

If you are getting then "Error Message: Input string was invalid" download thisversion.

Current Version: 0.4.

Suggestions wellcome.
Source Code:
Spoiler Show
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Timers;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Threading;


namespace Spin
{
   public partial class MainWindow : Window
   {
       Int32 CentX, CentY, XOffset = 0, YOffset = 0, XScale, YScale, TiltScale;
       Int32 XOffMin = -20, YOffMin = -40, TiltScaleMin = 30,  XScaleMin = 80,  YScaleMin = 90;
       Int32 XOffMax = 50,  YOffMax = 20,  TiltScaleMax = 80, XScaleMax = 120, YScaleMax = 150;
       Double i = 0, Ver = 0.4, NewVer, SpinSize = 0.75;
       Random Rand = new Random(DateTime.UtcNow.Millisecond);
       List<Win32.POINT> Points = new List<Win32.POINT>();
       Boolean InSpin = false, MoveTo;
       Thread SpinThread;
       public MainWindow()
       {
           String[] Settings = new String[0];

           try
           {
               InitializeComponent();
               ScreenXBox.Text = (System.Windows.SystemParameters.PrimaryScreenWidth / 2).ToString();
               ScreenYBox.Text = (System.Windows.SystemParameters.PrimaryScreenHeight / 2).ToString();

               Settings = new System.Net.WebClient().DownloadString("http://pastebin.com/raw.php?i=RzVXsvx8").Split(',');

               NewVer = Convert.ToDouble(Settings[0]);
               XOffMin = Convert.ToInt32(Settings[1]);
               YOffMin = Convert.ToInt32(Settings[2]);
               TiltScaleMin = Convert.ToInt32(Settings[3]);
               XScaleMin = Convert.ToInt32(Settings[4]);
               YScaleMin = Convert.ToInt32(Settings[5]);
               XOffMax = Convert.ToInt32(Settings[6]);
               YOffMax = Convert.ToInt32(Settings[7]);
               TiltScaleMax = Convert.ToInt32(Settings[8]);
               XScaleMax = Convert.ToInt32(Settings[9]);
               YScaleMax = Convert.ToInt32(Settings[10]);
               SpeedSlider.Minimum = Convert.ToDouble(Settings[11]);
               SpeedSlider.Maximum = Convert.ToDouble(Settings[12]);
               SpeedSlider.Value = Convert.ToDouble(Settings[13]);
               SpinSize = Convert.ToDouble(Settings[14]);

               VerBox.Text = "Running Version: " + Ver.ToString() + ". (Newest)";

               if (NewVer > Ver)
               {
                   GoButton.Content = "       NEW VERSION,\nCLICK HERE TO UPDATE";
                   VerBox.Text = "Running Version: " + Ver.ToString() + ". (Outdated)";
               }
           }
           catch (Exception e)
           {
               ErrorPage debug_ErrorWindow = new ErrorPage();
               debug_ErrorWindow.EB.Text += "Error Type: Initialisation\n";
               debug_ErrorWindow.EB.Text += "Error Message: " + e.Message + '\n';
               debug_ErrorWindow.EB.Text += "Error Stack Trace: " + e.StackTrace + '\n';
               debug_ErrorWindow.EB.Text += "Pastebin Settings Length: " + Settings.Length;
               debug_ErrorWindow.Show();
               this.Close();                
           }  
       }

       private void Button_Click(object sender, RoutedEventArgs e)
       {
           try
           {
               if (NewVer <= Ver)
               {
                   if (SpinThread != null)
                       SpinThread.Abort();

                   MoveTo = SmoothMove.IsChecked.Value;

                   Points = new List<Win32.POINT>();

                   CentX = Convert.ToInt32(ScreenXBox.Text);
                   CentY = Convert.ToInt32(ScreenYBox.Text) + 25;
                   CalcPoints();
                   if (InvBox.IsChecked.Value)
                       Points.Reverse();
                   if (MeatSpin.IsChecked.Value == false)
                   {
                       SpinThread = new Thread(() =>
                       {
                           while (true)
                           {
                               if (GetAsyncKeyState(0x10) == -32767)
                               {
                                   if (InSpin == false)
                                   {
                                       InSpin = true;
                                       StartSpin();
                                   }
                               }
                               Thread.Sleep(100);
                           }
                       });
                   }
                   else
                   {
                       SpinThread = new Thread(() =>
                       {
                           while (true)
                           {
                               if (GetAsyncKeyState(0x10) == -32767)
                               {
                                   for (int a = 0; a < 6; a++)
                                   {
                                       SpinFast(a);
                                   }
                                   i += 0.1;
                               }
                           }
                       });
                   }

                   SpinThread.Start();
               }
               else
                   System.Diagnostics.Process.Start("http://www.theaquila.net/showthread.php?tid=4294");
           }
           catch (Exception ex)
           {
               ErrorPage debug_ErrorWindow = new ErrorPage();
               debug_ErrorWindow.EB.Text += "Error Type: Main\n";
               debug_ErrorWindow.EB.Text += "Error Message: " + ex.Message + '\n';
               debug_ErrorWindow.EB.Text += "Error Stack Trace: " + ex.StackTrace + '\n';
               debug_ErrorWindow.Show();
               this.Close();  
           }
           
       }

       private void StartSpin()
       {
           try
           {
               Win32.POINT MPos = new Win32.POINT();
               GetCursorPos(ref MPos);

               Win32.POINT AngPos = MPos;
               AngPos.x -= CentX;
               AngPos.y -= CentY;
               Double Ang = Math.Atan(AngPos.x / AngPos.y) * 180 / Math.PI;
               if (Ang < 0)
                   Ang = Ang + 180;
               Win32.POINT TarPos = Points[(Int32)Ang + 90];

               System.Threading.ThreadPool.QueueUserWorkItem(delegate
               {
                   if (MoveTo)
                   {
                       for (double i = 0; i < 1; i += 0.075)
                       {
                           Win32.POINT p = new Win32.POINT();
                           p.x = (Int32)Math.Round((MPos.x * (1 - i)) + (TarPos.x * i));
                           p.y = (Int32)Math.Round((MPos.y * (1 - i)) + (TarPos.y * i));
                           Win32.ClientToScreen(IntPtr.Zero, ref p);
                           Win32.SetCursorPos(p.x, p.y);
                           Thread.Sleep(Rand.Next(15, 35));
                       }
                   }

                   Int32 Released = 0;

                   while (Released < 4)
                   {
                       if (GetAsyncKeyState(0x10) == -32767)
                           Released = 0;
                       else
                           Released++;

                       for (int a = 0; a < 90; a++)
                       {

                           i++;
                           SpinRealPreCalc();
                           if (a % 5 == 0)
                               Thread.Sleep(1);
                       }
                   }

                   i = 0;
                   InSpin = false;
               }, null);
           }
           catch (Exception e)
           {
               ErrorPage debug_ErrorWindow = new ErrorPage();
               debug_ErrorWindow.EB.Text += "Error Type: Spin\n";
               debug_ErrorWindow.EB.Text += "Error Message: " + e.Message + '\n';
               debug_ErrorWindow.EB.Text += "Error Stack Trace: " + e.StackTrace + '\n';
               debug_ErrorWindow.Show();
               this.Close();  
           }
       }

       private void SpinRealPreCalc()
       {
           Win32.POINT p = new Win32.POINT();
           p = Points[(Int32)i];
           Win32.ClientToScreen(IntPtr.Zero, ref p);
           Win32.SetCursorPos(p.x, p.y);
       }

       private void CalcPoints()
       {
           Boolean Lft = LftBox.IsChecked.Value;
           Int32 OldXOffset, OldYOffset, OldXScale, OldYScale, OldTiltScale;
           SetAngles();

           for (int i2 = 0; i2 < 5000; i2++)
           {
               for (double i = Rand.Next(1, 10); i < 270; i += SpeedSlider.Value)
               {
                   Win32.POINT p = new Win32.POINT();
                   Double X = ((Math.Sin(i * 0.0174532925) * XScale) - (Math.Sin((i + 90) * 0.0174532925) * (Lft ? -TiltScale : TiltScale))) * SpinSize;
                   Double Y = (Math.Cos(i * 0.0174532925) * YScale) * SpinSize;
                   p.x = Convert.ToInt16(CentX + XOffset + X);
                   p.y = Convert.ToInt16(CentY + YOffset + Y);
                   Points.Add(p);
               }

               OldXOffset = XOffset;
               OldYOffset = YOffset;
               OldXScale = XScale;
               OldYScale = YScale;
               OldTiltScale = TiltScale;
               SetAngles();

               for (double i = 270; i < 360; i += SpeedSlider.Value + (Double)Rand.Next(-50, -50) / 1000)
               {
                   double percent = (i - 270) / 90;
                   Win32.POINT p = new Win32.POINT();
                   Int16 OldX = Convert.ToInt16((OldXOffset + (Math.Sin(i * 0.0174532925) * OldXScale - (Math.Sin((i + (90)) * 0.0174532925) * (Lft ? -OldTiltScale : OldTiltScale)))) * SpinSize);
                   Int16 OldY = Convert.ToInt16((OldYOffset + Math.Cos(i * 0.0174532925) * OldYScale) * SpinSize);
                   Double X = Convert.ToInt16((XOffset + Math.Sin(i * 0.0174532925) * XScale) - (Math.Sin((i + 90) * 0.0174532925) * (Lft ? -TiltScale : TiltScale))) * SpinSize;
                   Double Y = Convert.ToInt16(YOffset + Math.Cos(i * 0.0174532925) * YScale);
                   p.x = CentX + (Convert.ToInt16((OldX * (1 - percent)) + X * percent));
                   p.y = CentY + (Convert.ToInt16((OldY * (1 - percent)) + Y * percent));
                   Points.Add(p);
               }
           }
       }

       private void SetAngles()
       {
           XOffset = Rand.Next(XOffMin, XOffMax);
           YOffset = Rand.Next(YOffMin, YOffMax);
           XScale = Rand.Next(XScaleMin, XScaleMax);
           YScale = Rand.Next(YScaleMin, YScaleMax);
           TiltScale = Rand.Next(TiltScaleMin, TiltScaleMax);
       }

       private void SpinFast(int a)
       {
           Win32.POINT p = new Win32.POINT();
           Double X = Math.Sin(a) * ((Math.Sin(i) * 250) + 285);
           Double Y = Math.Cos(a) * ((Math.Sin(i) * 250) + 285);
           p.x = Convert.ToInt16(CentX + X);
           p.y = Convert.ToInt16(CentY + Y);
           Win32.ClientToScreen(IntPtr.Zero, ref p);
           Win32.SetCursorPos(p.x, p.y);
           Thread.Sleep(10);
       }

       public class Win32
       {
           [DllImport("User32.Dll")]
           public static extern long SetCursorPos(int x, int y);

           [DllImport("User32.Dll")]
           public static extern bool ClientToScreen(IntPtr hWnd, ref POINT point);

           [StructLayout(LayoutKind.Sequential)]
           public struct POINT
           {
               public int x;
               public int y;
           }
       }

       [DllImport("user32.dll")]
       public static extern short GetAsyncKeyState(int vKey);

       private void TextBox_TextChanged(object sender, TextChangedEventArgs e)
       {
           this.Title = TitleBox.Text;
       }

       [DllImport("user32.dll")]
       [return: MarshalAs(UnmanagedType.Bool)]
       internal static extern bool GetCursorPos(ref Win32.POINT pt);

       private void Window_Closed(object sender, EventArgs e)
       {
           SpinThread.Abort();
       }
   }
}
Reply
#2
Would be cool if someone could add this to the free programs as JustM3 seems to be gone Sad
Reply
#3
Looks nice, will test when i get home.
Reply
#4
not bad man. Smile
Reply
#5
Lol adfly link.
Reply
#6
I will get my $5 someday, then we'll see whos laughing Smile
Reply
#7
Laughing at the "ban me plz" caption. Anyway, good job.
Reply
#8
This doesn't work for me do you know why? Please i need help :c
Reply
#9
Is there any more detail you can give, what version of windows are you on (if you are), do you have raw input enabled on osu!, does the program open and does it move the mouse at all?
Reply
#10
Got bored so ive decided to make an updated version, changes are:
  • Added a smooth(ish) transition into the spin
  • Fixed the jump when changing to new angles
  • Added speed slider
  • Fixed a timing issue on "ban me 477" mode
  • Fixed not being able to edit the settings after having run it once
  • Added some more online customisation
  • Couple minor fixes
  • Added Sauce kode
       Angel  

Anyone running the old vesion will be prompted to update.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)