Skip to content

Commit

Permalink
Finalize Update Stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
kgsensei committed May 6, 2023
1 parent 231ff50 commit 8a3c828
Show file tree
Hide file tree
Showing 22 changed files with 11,150 additions and 27 deletions.
4 changes: 2 additions & 2 deletions NTH2/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ public async static void simulateTypingText(string Text, int typingDelay, int ac
if (thingsorwhatever.randomize)
{
var gen = new Random();
accuracy = accuracy - (int)gen.NextDouble() * 10;
typingDelay = typingDelay - (int)gen.NextDouble() * 10;
accuracy = accuracy - ((int)gen.NextDouble() * 10);
typingDelay = typingDelay - ((int)gen.NextDouble() * 10);
}
// Calculate the number of characters to miss based on accuracy
int toMiss = (int)Math.Floor(letters.Length * ((decimal)(100 - accuracy) / 100));
Expand Down
Binary file added NTH2/Header_Capsule.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added NTH2/Library_Logo_Transparent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 18 additions & 25 deletions NTH2/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
xmlns:cef="clr-namespace:CefSharp;assembly=CefSharp.Core"
x:Class="NitroType2.MainWindow"
mc:Ignorable="d"
Title="NitroType AutoTyper v3_DEV_BUILD [kgsensei]"
Title="NitroType AutoTyper v4 [kgsensei]"
WindowState="Maximized"
AllowsTransparency="False"
MinWidth="700"
MinHeight="450"
Icon="favicon.ico">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="85*" MinWidth="500"/>
<ColumnDefinition Width="15*" MinWidth="200"/>
<ColumnDefinition Width="79*" MinWidth="500"/>
<ColumnDefinition Width="16*" MinWidth="200"/>
</Grid.ColumnDefinitions>


Expand All @@ -30,39 +30,32 @@
Width="200" Height="37" FontSize="16" Click="Button_Click" Name="startCheatBtn"/>


<Slider Grid.Column="1" HorizontalAlignment="Left" Margin="10,52,0,0" VerticalAlignment="Top" Width="200" Value="100"
Maximum="250" Minimum="35" ValueChanged="Slider_ValueChanged" Name="cheatTypeSpeedSlider" Panel.ZIndex="99"/>
<Label Grid.Column="1" Content="[Cheat Typing Speed]" HorizontalAlignment="Left" Margin="10,64,0,0" VerticalAlignment="Top"
Height="34" Width="200" FontSize="15"/>
<Slider Grid.Column="1" HorizontalAlignment="Left" Margin="10,52,0,0" VerticalAlignment="Top" Width="240" Value="100"
Maximum="300" Minimum="30" ValueChanged="Slider_ValueChanged" Name="cheatTypeSpeedSlider" Panel.ZIndex="99"/>
<Label Grid.Column="1" Content="[Typing Speed][60 WPM±15] (?)" HorizontalAlignment="Left" Margin="10,64,0,0" VerticalAlignment="Top"
Height="34" Width="300" FontSize="15" Name="CT_WPM" ToolTip="This gets more inaccurate as the slider goes up."/>


<Slider Grid.Column="1" HorizontalAlignment="Left" Margin="10,98,0,0" VerticalAlignment="Top" Width="200" Value="100"
Maximum="100" Minimum="0" ValueChanged="cheatTypeAccSlider_ValueChanged" x:Name="cheatTypeAccSlider" Panel.ZIndex="99"/>
<Label Grid.Column="1" Content="[Cheat Typing Accuracy]" HorizontalAlignment="Left" Margin="10,110,0,0" VerticalAlignment="Top"
Height="34" Width="200" FontSize="15"/>
<Slider Grid.Column="1" HorizontalAlignment="Left" Margin="10,98,0,0" VerticalAlignment="Top" Width="240" Value="100"
Maximum="100" Minimum="50" ValueChanged="cheatTypeAccSlider_ValueChanged" x:Name="cheatTypeAccSlider" Panel.ZIndex="99"/>
<Label Grid.Column="1" Content="[Typing Accuracy][100%±5]" HorizontalAlignment="Left" Margin="10,110,0,0" VerticalAlignment="Top"
Height="34" Width="300" FontSize="15" Name="CT_Acc"/>


<CheckBox Grid.Column="1" Content="Auto Start" HorizontalAlignment="Left" Margin="10,180,0,0" VerticalAlignment="Top"
Height="40" Width="200" FontSize="16" Checked="CheckBox_Checked_1" Unchecked="CheckBox_Unchecked_1" IsChecked="True"/>
<CheckBox Grid.Column="1" Content="God Mode" HorizontalAlignment="Left" Margin="10,215,0,0" VerticalAlignment="Top"
Height="40" Width="200" FontSize="16" Checked="CheckBox_Checked" Unchecked="CheckBox_Unchecked"/>
<CheckBox Grid.Column="1" Content="God Mode (?)" HorizontalAlignment="Left" Margin="10,215,0,0" VerticalAlignment="Top"
Height="40" Width="200" FontSize="16" Checked="CheckBox_Checked" Unchecked="CheckBox_Unchecked" ToolTip="Breaks your game, will get you banned."/>
<CheckBox Grid.Column="1" Content="Random Variations" HorizontalAlignment="Left" Margin="10,250,0,0" VerticalAlignment="Top"
Height="40" Width="200" FontSize="16" Checked="CheckBox_Checked_2" Unchecked="CheckBox_Unchecked_2"/>
<CheckBox Grid.Column="1" Content="Auto Game" HorizontalAlignment="Left" Margin="10,285,0,0" VerticalAlignment="Top"
Height="40" Width="200" FontSize="16" Checked="CheckBox_Checked_3" Unchecked="CheckBox_Unchecked_3"/>
<CheckBox Grid.Column="1" Content="Use Nitros" HorizontalAlignment="Left" Margin="10,320,0,0" VerticalAlignment="Top"
Height="40" Width="200" FontSize="16" Checked="CheckBox_Checked_4" Unchecked="CheckBox_Unchecked_4"/>
<CheckBox Grid.Column="1" Content="Use Nitros (?)" HorizontalAlignment="Left" Margin="10,320,0,0" VerticalAlignment="Top"
Height="40" Width="200" FontSize="16" Checked="CheckBox_Checked_4" Unchecked="CheckBox_Unchecked_4" ToolTip="Breaks on Guest Race"/>


<TextBlock Grid.Column="1" HorizontalAlignment="Left" Margin="10,450,0,0" TextWrapping="Wrap"
VerticalAlignment="Top" Height="125" Width="200" Name="informationalTextBlock" FontSize="13px">
Copyright © kgsensei 2023.
<LineBreak/><LineBreak/>
Want to help this project?
<LineBreak/><LineBreak/>
<Hyperlink NavigateUri="https://paypal.me/publickgsensei" RequestNavigate="Hyperlink_RequestNavigate">
Click Here
</Hyperlink>.
</TextBlock>
<Label Grid.Column="1" FontSize="11" Content="Ad:" HorizontalAlignment="Left" Margin="5,370,0,0" VerticalAlignment="Top"/>
<Image HorizontalAlignment="Left" Height="125" Margin="5,340,0,0" VerticalAlignment="Top" Width="227" Grid.Column="1" Source="Library_Logo_Transparent.png" MouseLeftButtonUp="Image_MouseLeftButtonUp"/>
<Label Grid.Column="1" FontSize="15" Content="Play PieClicker on Steam today!" HorizontalAlignment="Left" Margin="15,460,0,0" VerticalAlignment="Top" MouseLeftButtonUp="Image_MouseLeftButtonUp"/>
</Grid>
</Window>
20 changes: 20 additions & 0 deletions NTH2/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ public void AsyncInitialize()
RequestHandler requestHandler = new CustomRequestHandler();
CefEmbed.RequestHandler = requestHandler;

// Load auto captcha from extensions
RequestContext requestContext = new RequestContext();
ExtensionHandler extensionHandler = new ExtensionHandler();
requestContext.LoadExtensionFromDirectory("nitrotype-captcha-auto-clicker", extensionHandler);

// Set callback for JavaScript so letters can be extracted from NitroType
CefEmbed.JavascriptMessageReceived += CefEmbed_JavascriptMessageReceived;

Expand Down Expand Up @@ -158,6 +163,11 @@ private void Slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<d
int change = Convert.ToInt32(e.NewValue);
int total = Convert.ToInt32(cheatTypeSpeedSlider.Maximum + cheatTypeSpeedSlider.Minimum);
thingsorwhatever.typingSpeed = total - change;
if (CT_WPM != null)
{
float wpm = ((change / 5) * 60) / 19;
CT_WPM.Content = "[Typing Speed][" + wpm.ToString() + " WPM±20] (?)";
}
}
}

Expand Down Expand Up @@ -192,6 +202,11 @@ private void cheatTypeAccSlider_ValueChanged(object sender, RoutedPropertyChange
if (!App.isCheatRunning && !thingsorwhatever.godMode)
{
thingsorwhatever.accuracyLvl = Convert.ToInt32(e.NewValue);
if (CT_Acc != null)
{
float acc = (int)Math.Floor(100 * ((decimal)(thingsorwhatever.accuracyLvl) / 100));
CT_Acc.Content = "[Typing Accuracy][" + acc + "%±5]";
}
}
}

Expand Down Expand Up @@ -257,6 +272,11 @@ private void CheckBox_Checked_4(object sender, RoutedEventArgs e)
thingsorwhatever.useNitros = true;
}
}

private void Image_MouseLeftButtonUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
System.Diagnostics.Process.Start("https://pieclicker.com");
}
}

public class CustomRequestHandler : RequestHandler
Expand Down
55 changes: 55 additions & 0 deletions NTH2/NitroType2.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,15 @@
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<Resource Include="nitrotype-captcha-auto-clicker\LICENSE">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="nitrotype-captcha-auto-clicker\manifest.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="nitrotype-captcha-auto-clicker\README.md">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
Expand All @@ -172,6 +181,52 @@
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<Resource Include="nitrotype-captcha-auto-clicker\about.html">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="nitrotype-captcha-auto-clicker\clicker.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="nitrotype-captcha-auto-clicker\images\clicker128.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="nitrotype-captcha-auto-clicker\images\clicker16.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="nitrotype-captcha-auto-clicker\images\clicker32.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="nitrotype-captcha-auto-clicker\images\clicker48.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="nitrotype-captcha-auto-clicker\images\clicker64.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="nitrotype-captcha-auto-clicker\index.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="nitrotype-captcha-auto-clicker\jquery-3.6.0.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="nitrotype-captcha-auto-clicker\lib.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="nitrotype-captcha-auto-clicker\popup.html">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="nitrotype-captcha-auto-clicker\style.css">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
</ItemGroup>
<ItemGroup>
<Resource Include="Header_Capsule.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="Library_Logo_Transparent.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions NTH2/NitroType2.csproj.user
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
<ErrorReportUrlHistory />
<FallbackCulture>en-US</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles>
<ProjectView>ProjectFiles</ProjectView>
</PropertyGroup>
</Project>
21 changes: 21 additions & 0 deletions NTH2/nitrotype-captcha-auto-clicker/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Prabhakar Rai

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 2 additions & 0 deletions NTH2/nitrotype-captcha-auto-clicker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# nitrotype-captcha-auto-clicker
Chrome extension for automatically clicking (solving) the reCaptcha on nitrotype which appears on race page after every 50 session races.
16 changes: 16 additions & 0 deletions NTH2/nitrotype-captcha-auto-clicker/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>About - Nitrotype Captcha Auto Clicker</title>
</head>
<body>
<h1>About - Nitrotype Captcha Auto Clicker</h1>
<article>
<h2>What this clicker can do?</h2>
<p>
This clicker extension can click the 'I am not ROBOT' captcha button that appears after every 50 session races on
nitrotype.
</p>
</article>
</body>
</html>
36 changes: 36 additions & 0 deletions NTH2/nitrotype-captcha-auto-clicker/clicker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
"use strict"

let minInterval = 25;
chrome.storage.sync.get("sleepTime", ({ sleepTime }) => {
minInterval = sleepTime;
});

// This is for running in reCaptcha iframe
var sid = setInterval(async () => {
if (
window.location.href
.match(/https:\/\/www.google.com\/recaptcha\/api\d\/anchor/) &&
$("#recaptcha-anchor div.recaptcha-checkbox-checkmark")
.length &&
$("#recaptcha-anchor div.recaptcha-checkbox-checkmark")
.is(':visible') &&
isScrolledIntoView($("#recaptcha-anchor div.recaptcha-checkbox-checkmark")
.get(0))
) {
var execute = true;
if (localStorage.getItem('accesstime')) {
let timeNow = new Date().getTime();
let timeLastExecuted = localStorage.getItem('accesstime') | 0;
let minIntervalMs = minInterval * 60 * 1000;
if (timeNow - timeLastExecuted < minIntervalMs) {
execute = false;
}
}

if (execute) {
localStorage.setItem('accesstime', new Date().getTime());
$("#recaptcha-anchor div.recaptcha-checkbox-checkmark").click();
}
clearInterval(sid);
}
}, 8000);
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions NTH2/nitrotype-captcha-auto-clicker/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
let sleepTime = 25; // in Minutes

/*
01 race = 30s (approx minimum)
50 races = 1500s
50 races = 25m
*/

chrome.runtime.onInstalled.addListener(() => {
chrome.storage.sync.set({ sleepTime });
console.log('Default sleep time set to %cgreen', `sleepTime: ${sleepTime}`);
});
Loading

0 comments on commit 8a3c828

Please sign in to comment.