Skip to content

Commit 3747628

Browse files
Merge pull request #21 from daniel-widrick/window-title-random
Window title random
2 parents ec66c07 + 9ac6b99 commit 3747628

File tree

11 files changed

+59
-18
lines changed

11 files changed

+59
-18
lines changed

UltimateFishBot.sln

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 14
4-
VisualStudioVersion = 14.0.23107.0
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.27428.2015
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UltimateFishBot", "UltimateFishBot\UltimateFishBot.csproj", "{E4705D9F-56CD-48CB-863B-4363D03C8424}"
77
EndProject
@@ -13,16 +13,25 @@ EndProject
1313
Global
1414
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1515
Debug|Any CPU = Debug|Any CPU
16+
Debug|x64 = Debug|x64
1617
Release|Any CPU = Release|Any CPU
18+
Release|x64 = Release|x64
1719
EndGlobalSection
1820
GlobalSection(ProjectConfigurationPlatforms) = postSolution
1921
{E4705D9F-56CD-48CB-863B-4363D03C8424}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2022
{E4705D9F-56CD-48CB-863B-4363D03C8424}.Debug|Any CPU.Build.0 = Debug|Any CPU
2123
{E4705D9F-56CD-48CB-863B-4363D03C8424}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
24+
{E4705D9F-56CD-48CB-863B-4363D03C8424}.Debug|x64.ActiveCfg = Debug|x64
25+
{E4705D9F-56CD-48CB-863B-4363D03C8424}.Debug|x64.Build.0 = Debug|x64
2226
{E4705D9F-56CD-48CB-863B-4363D03C8424}.Release|Any CPU.ActiveCfg = Release|Any CPU
2327
{E4705D9F-56CD-48CB-863B-4363D03C8424}.Release|Any CPU.Build.0 = Release|Any CPU
28+
{E4705D9F-56CD-48CB-863B-4363D03C8424}.Release|x64.ActiveCfg = Release|x64
29+
{E4705D9F-56CD-48CB-863B-4363D03C8424}.Release|x64.Build.0 = Release|x64
2430
EndGlobalSection
2531
GlobalSection(SolutionProperties) = preSolution
2632
HideSolutionNode = FALSE
2733
EndGlobalSection
34+
GlobalSection(ExtensibilityGlobals) = postSolution
35+
SolutionGuid = {9D9545D2-DE63-4ED7-AC09-41C3F8E7D147}
36+
EndGlobalSection
2837
EndGlobal

UltimateFishBot/App.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</sectionGroup>
77
</configSections>
88
<startup>
9-
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/>
9+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
1010
</startup>
1111
<userSettings>
1212
<UltimateFishBot.Properties.Settings>
@@ -83,7 +83,7 @@
8383
<value>22000</value>
8484
</setting>
8585
<setting name="AudioDevice" serializeAs="String">
86-
<value />
86+
<value/>
8787
</setting>
8888
<setting name="AutoBait" serializeAs="String">
8989
<value>False</value>

UltimateFishBot/Classes/BodyParts/Hands.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ class Hands
1313
private int m_baitIndex;
1414
private string[] m_baitKeys;
1515
private IntPtr Wow;
16+
private Random rand;
1617

1718
public Hands()
1819
{
1920
m_baitIndex = 0;
2021
m_cursor = new Cursor(Cursor.Current.Handle);
22+
rand = new Random();
2123
UpdateKeys();
2224
}
2325
public Hands(IntPtr wowWindow)
@@ -48,21 +50,20 @@ public void UpdateKeys()
4850

4951
public async Task Cast(CancellationToken token)
5052
{
51-
Win32.ActivateWow(this.Wow);
5253
if (Properties.Settings.Default.RightClickCast) {
5354
Win32.SendMouseDblRightClick(this.Wow);
5455
} else {
5556
Win32.SendKey(Properties.Settings.Default.FishKey);
5657
Log.Information("Sent key: " + Properties.Settings.Default.FishKey);
5758
}
58-
await Task.Delay(Properties.Settings.Default.CastingDelay, token);
59+
await Task.Delay(new Random().Next(0,Properties.Settings.Default.CastingDelay), token);
5960
}
6061

6162
public async Task Loot()
6263
{
6364
Win32.SendMouseClick(this.Wow);
6465
Log.Information("Send Loot.");
65-
await Task.Delay(Properties.Settings.Default.LootingDelay);
66+
await Task.Delay(new Random().Next(0,Properties.Settings.Default.LootingDelay));
6667
}
6768

6869
public void ResetBaitIndex()

UltimateFishBot/Classes/BodyParts/Legs.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Threading;
1+
using System;
2+
using System.Threading;
23
using System.Threading.Tasks;
34
using System.Windows.Forms;
45
using UltimateFishBot.Classes.Helpers;
@@ -41,14 +42,14 @@ private async Task MovePath(Keys[] moves, CancellationToken cancellationToken)
4142
foreach (Keys move in moves)
4243
{
4344
await SingleMove(move, cancellationToken);
44-
await Task.Delay(500, cancellationToken);
45+
await Task.Delay(new Random().Next(100,500), cancellationToken);
4546
}
4647
}
4748

4849
private async Task SingleMove(Keys move, CancellationToken cancellationToken)
4950
{
5051
Win32.SendKeyboardAction(move, Win32.keyState.KEYDOWN);
51-
await Task.Delay(250, cancellationToken);
52+
await Task.Delay(new Random().Next(100, 250), cancellationToken);
5253
Win32.SendKeyboardAction(move, Win32.keyState.KEYUP);
5354
}
5455
}

UltimateFishBot/Forms/frmMain.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ private async void frmMain_Load(object sender, EventArgs e)
4848
btnAbout.Text = Translate.GetTranslate("frmMain", "BUTTON_ABOUT");
4949
lblStatus.Text = Translate.GetTranslate("frmMain", "LABEL_STOPPED");
5050
this.Text = "UltimateFishBot - v " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
51+
/* Hide ? */
52+
Random r = new Random();
53+
this.Text = this.Text + r.Next(1000, 1000000).ToString();
54+
this.Text = this.Text.GetHashCode().ToString();
55+
56+
5157
ReloadHotkeys();
5258
await CheckStatus();
5359
}

UltimateFishBot/Program.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
using System;
2+
using System.Diagnostics;
3+
using System.IO;
24
using System.Windows.Forms;
35
using Serilog;
46

@@ -12,6 +14,8 @@ static class Program
1214
[STAThread]
1315
static void Main()
1416
{
17+
Console.Out.WriteLine("Hash dodge");
18+
1519
Log.Logger = new LoggerConfiguration()
1620
.WriteTo.ColoredConsole()
1721
.WriteTo.File("ufb.log")
@@ -22,6 +26,7 @@ static void Main()
2226
Application.EnableVisualStyles();
2327
Application.SetCompatibleTextRenderingDefault(false);
2428
Application.Run(new frmMain());
29+
2530
}
2631
}
2732
}

UltimateFishBot/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
// Les informations générales relatives à un assembly dépendent de
77
// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
88
// associées à un assembly.
9-
[assembly: AssemblyTitle("UltimateFishBot")]
10-
[assembly: AssemblyDescription("UltimateFishBot")]
9+
[assembly: AssemblyTitle("MenShowHandles")]
10+
[assembly: AssemblyDescription("MenShowHandles")]
1111
[assembly: AssemblyConfiguration("")]
1212
[assembly: AssemblyCompany("Open Source")]
13-
[assembly: AssemblyProduct("UltimateFishBot")]
13+
[assembly: AssemblyProduct("MenShowHandles")]
1414
[assembly: AssemblyCopyright("Copyright © 2018")]
1515
[assembly: AssemblyTrademark("")]
1616
[assembly: AssemblyCulture("")]

UltimateFishBot/Properties/Resources.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UltimateFishBot/Properties/Settings.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UltimateFishBot/UltimateFishBot.csproj

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
<OutputType>WinExe</OutputType>
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>UltimateFishBot</RootNamespace>
11-
<AssemblyName>UltimateFishBot</AssemblyName>
12-
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
11+
<AssemblyName>AdviseSnowDireful</AssemblyName>
12+
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
<NuGetPackageImportStamp>
1515
</NuGetPackageImportStamp>
@@ -55,6 +55,25 @@
5555
<PropertyGroup>
5656
<ApplicationIcon>icon.ico</ApplicationIcon>
5757
</PropertyGroup>
58+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
59+
<DebugSymbols>true</DebugSymbols>
60+
<OutputPath>bin\x64\Debug\</OutputPath>
61+
<DefineConstants>DEBUG;TRACE</DefineConstants>
62+
<WarningLevel>3</WarningLevel>
63+
<DebugType>full</DebugType>
64+
<PlatformTarget>x64</PlatformTarget>
65+
<ErrorReport>prompt</ErrorReport>
66+
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
67+
</PropertyGroup>
68+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
69+
<OutputPath>bin\x64\Release\</OutputPath>
70+
<DefineConstants>TRACE</DefineConstants>
71+
<Optimize>true</Optimize>
72+
<DebugType>pdbonly</DebugType>
73+
<PlatformTarget>x64</PlatformTarget>
74+
<ErrorReport>prompt</ErrorReport>
75+
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
76+
</PropertyGroup>
5877
<ItemGroup>
5978
<Reference Include="AForge, Version=2.2.5.0, Culture=neutral, PublicKeyToken=c1db6ff4eaa06aeb, processorArchitecture=MSIL">
6079
<HintPath>..\packages\AForge.2.2.5\lib\AForge.dll</HintPath>

0 commit comments

Comments
 (0)