Skip to content

Commit

Permalink
Improved Randomization
Browse files Browse the repository at this point in the history
  • Loading branch information
Pickleft committed Aug 1, 2022
1 parent 4267480 commit 68a1fe8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
12 changes: 6 additions & 6 deletions Swift/Clicker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ protected override void WndProc(ref Message m)
}
base.WndProc(ref m);
}


private void Clickvent(object sender, System.Timers.ElapsedEventArgs e)
{
Expand All @@ -131,7 +131,7 @@ private void Clickvent(object sender, System.Timers.ElapsedEventArgs e)
else
{
Core.leftclick(javah, leftlock);

}
}

Expand All @@ -156,12 +156,12 @@ private void RightClickvent(object sender, System.Timers.ElapsedEventArgs e)
Core.rightclick(javah, rightlock);
}
}

public static Random rnd = new Random(Guid.NewGuid().GetHashCode());
private void randomvent(object sender, System.Timers.ElapsedEventArgs e)
{
double randominterval = leftcps + new Random().Next(250, 500);
double randominterval = rnd.Next(550, 950);
randomizer.Interval = randominterval;
int randomint = new Random().Next(-3, 12);
int randomint = rnd.Next(-3, 6);
double rndcps = Mods.Randomize.rnddouble(randomint);
leftcps = 1000 / (cps - rndcps);
}
Expand Down Expand Up @@ -284,7 +284,7 @@ private void breakblock_CheckedChanged(object sender, EventArgs e)
}
}


private void cpsdrop_CheckedChanged(object sender, EventArgs e)
{
if (cpsdrop.Checked)
Expand Down
7 changes: 3 additions & 4 deletions Swift/Mods/Randomize.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ namespace Swift.Mods
{
internal class Randomize
{
static Random RND = new Random();
public static double rnddouble(int max)
{
Random RND = new Random();
double RNDD = RND.NextDouble() * (max * 7 / 9);
return RNDD;
double fixmax = RND.NextDouble() + max;
return fixmax;
}

}
}
6 changes: 4 additions & 2 deletions Swift/Swift.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,17 @@
</Reference>
<Reference Include="Guna.UI2, Version=2.0.0.6, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\Desktop\Desktop\Coding\Guna.UI2.dll</HintPath>
<HintPath>..\..\GunaUI-Key\Crack\Guna.UI2.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Win32.Primitives, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Win32.Primitives.4.3.0\lib\net46\Microsoft.Win32.Primitives.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="System" />
<Reference Include="System">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.dll</HintPath>
</Reference>
<Reference Include="System.AppContext, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.AppContext.4.3.0\lib\net463\System.AppContext.dll</HintPath>
<Private>True</Private>
Expand Down

0 comments on commit 68a1fe8

Please sign in to comment.