Skip to content
This repository has been archived by the owner on Apr 27, 2023. It is now read-only.

Commit

Permalink
Fixes to redeem method, no longer uses sendkeys (too unreliable), not…
Browse files Browse the repository at this point in the history
… CTRL+Vs codes into box instead of typing. Notifications fixes. User guide added to help menu. AFK Killswitch fixed.
  • Loading branch information
Lumbridge committed Mar 29, 2018
1 parent 3b2e6b0 commit cf2f8f2
Show file tree
Hide file tree
Showing 69 changed files with 72 additions and 21 deletions.
Binary file modified .vs/MixerSmiteCodeRedeemer/v14/.suo
Binary file not shown.
39 changes: 39 additions & 0 deletions Dolphin Script/Classes/ScriptEventClasses/PasteClipboard.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
using DolphinScript.Lib.ScriptEventClasses;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using static DolphinScript.Lib.Backend.WinAPI;

namespace DolphinScript.Classes.ScriptEventClasses
{
[Serializable]
public class PasteClipboard : ScriptEvent
{
public override void DoEvent()
{
// placeholder for CTRL+V //
// down CTRL
keybd_event((byte)VirtualKeyStates.VK_LCONTROL, 0, 0, 0);
// down V key
keybd_event(0x56, 0, 0, 0);
Thread.Sleep(100);
keybd_event((byte)VirtualKeyStates.VK_LCONTROL, 0, KEYEVENTF_KEYUP, 0);
keybd_event(0x56, 0, KEYEVENTF_KEYUP, 0);
}

public override string GetEventListBoxString()
{
throw new NotImplementedException();
}

[DllImport("user32.dll")]
static extern void keybd_event(byte bVk, byte bScan, uint dwFlags,
int dwExtraInfo);

const uint KEYEVENTF_KEYUP = 0x0002;
}
}
1 change: 1 addition & 0 deletions Dolphin Script/Dolphin Script.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
<Compile Include="Classes\ScriptEventClasses\MouseMoveToAreaOnWindow.cs" />
<Compile Include="Classes\ScriptEventClasses\MouseMoveToColourOnWindow.cs" />
<Compile Include="Classes\ScriptEventClasses\MouseMoveToPointOnWindow.cs" />
<Compile Include="Classes\ScriptEventClasses\PasteClipboard.cs" />
<Compile Include="Classes\ScriptEventClasses\PauseWhileColourDoesntExistInAreaOnWindow.cs" />
<Compile Include="Classes\ScriptEventClasses\PauseWhileColourExistsInAreaOnWindow.cs" />
<Compile Include="Classes\ScriptEventClasses\ScriptEvent.cs" />
Expand Down
Binary file modified Dolphin Script/bin/Debug/DolphinScript.dll
Binary file not shown.
Binary file modified Dolphin Script/bin/Debug/DolphinScript.pdb
Binary file not shown.
Binary file modified Dolphin Script/bin/Release/DolphinScript.dll
Binary file not shown.
Binary file modified Dolphin Script/bin/Release/DolphinScript.pdb
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ C:\Users\ryans\Source\Repos\SmiteMixerCodeRedeemer\Dolphin Script\obj\Debug\Dolp
C:\Users\ryans\Source\Repos\SmiteMixerCodeRedeemer\Dolphin Script\obj\Debug\DolphinScript.pdb
C:\Users\ryans\Source\Repos\SmiteMixerCodeRedeemer\Dolphin Script\bin\Debug\DolphinScript.dll.config
C:\Users\ryans\Source\Repos\SmiteMixerCodeRedeemer\Dolphin Script\bin\Debug\DolphinScript.dll
C:\Users\ryans\Source\Repos\SmiteMixerCodeRedeemer\Dolphin Script\obj\Debug\Dolphin Script.csprojResolveAssemblyReference.cache
C:\Users\ryans\Source\Repos\SmiteMixerCodeRedeemer\Dolphin Script\obj\Debug\DolphinScript.dll
C:\Users\Ry208444\Source\Repos\SmiteMixerCodeRedeemer\Dolphin Script\bin\Debug\DolphinScript.dll.config
C:\Users\Ry208444\Source\Repos\SmiteMixerCodeRedeemer\Dolphin Script\bin\Debug\DolphinScript.dll
Expand Down
Binary file not shown.
Binary file not shown.
Binary file modified Dolphin Script/obj/Debug/DolphinScript.dll
Binary file not shown.
Binary file modified Dolphin Script/obj/Debug/DolphinScript.pdb
Binary file not shown.
Binary file modified Dolphin Script/obj/Release/DolphinScript.dll
Binary file not shown.
Binary file modified Dolphin Script/obj/Release/DolphinScript.pdb
Binary file not shown.
Binary file modified MixerChatAPI/bin/Debug/MixerChat.dll
Binary file not shown.
Binary file modified MixerChatAPI/bin/Debug/MixerChat.pdb
Binary file not shown.
Binary file modified MixerChatAPI/bin/Release/MixerChat.dll
Binary file not shown.
Binary file modified MixerChatAPI/bin/Release/MixerChat.pdb
Binary file not shown.
Binary file modified MixerChatAPI/obj/Debug/MixerChat.dll
Binary file not shown.
Binary file modified MixerChatAPI/obj/Debug/MixerChat.pdb
Binary file not shown.
Binary file not shown.
Binary file modified MixerChatAPI/obj/Release/MixerChat.dll
Binary file not shown.
Binary file modified MixerChatAPI/obj/Release/MixerChat.pdb
Binary file not shown.
Binary file modified SmiteMixerCodeGrabberCLI/bin/Debug/DolphinScript.dll
Binary file not shown.
Binary file modified SmiteMixerCodeGrabberCLI/bin/Debug/DolphinScript.pdb
Binary file not shown.
Binary file modified SmiteMixerCodeGrabberCLI/bin/Debug/MixerChat.dll
Binary file not shown.
Binary file modified SmiteMixerCodeGrabberCLI/bin/Debug/MixerChat.pdb
Binary file not shown.
Binary file modified SmiteMixerCodeGrabberCLI/bin/Debug/SmiteMixerListener.dll
Binary file not shown.
Binary file modified SmiteMixerCodeGrabberCLI/bin/Debug/SmiteMixerListener.pdb
Binary file not shown.
Binary file modified SmiteMixerCodeGrabberCLI/bin/Release/DolphinScript.dll
Binary file not shown.
Binary file modified SmiteMixerCodeGrabberCLI/bin/Release/DolphinScript.pdb
Binary file not shown.
Binary file modified SmiteMixerCodeGrabberCLI/bin/Release/MixerChat.dll
Binary file not shown.
Binary file modified SmiteMixerCodeGrabberCLI/bin/Release/MixerChat.pdb
Binary file not shown.
Binary file modified SmiteMixerCodeGrabberCLI/bin/Release/SmiteMixerListener.dll
Binary file not shown.
Binary file modified SmiteMixerCodeGrabberCLI/bin/Release/SmiteMixerListener.pdb
Binary file not shown.
Binary file not shown.
Binary file modified SmiteMixerCodeGrabberCLI/obj/Debug/SmiteMixerListener.dll
Binary file not shown.
Binary file modified SmiteMixerCodeGrabberCLI/obj/Debug/SmiteMixerListener.pdb
Binary file not shown.
Binary file not shown.
Binary file modified SmiteMixerCodeGrabberCLI/obj/Release/SmiteMixerListener.dll
Binary file not shown.
Binary file modified SmiteMixerCodeGrabberCLI/obj/Release/SmiteMixerListener.pdb
Binary file not shown.
23 changes: 12 additions & 11 deletions SmiteMixerCodeGrabberGUI/Classes/DynamicResolution.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,20 @@ static class DynamicResolution
{
public static List<ScriptEvent> GetRedeemLoop(string code)
{
System.Windows.Forms.Clipboard.SetText("/claimpromotion " + code);
List<ScriptEvent> SlowTypingScript = new List<ScriptEvent>()
{
new MouseMoveToAreaOnWindow() { ClickArea = new RECT(), WindowToClickTitle = Properties.Settings.Default.smiteWindowTitle },
GetPause(1.0, 1.5),
GetEnterKeyClick(),
GetPause(1.0, 1.5),
GetForwardSlashOEM(),
GetPaste(),
GetPause(1.0, 1.5),
GetEnterKeyClick(),
GetPause(1.0, 1.5),
GetESCKeyClick(),
GetPause(1.0, 1.5)
};
var fullcode = "claimpromotion " + code;
foreach (var letter in fullcode)
{
SlowTypingScript.Add(new KeyboardKeyPress() { KeyboardKeys = letter.ToString() });
SlowTypingScript.Add(GetPause(0.1, 0.3));
}
SlowTypingScript.Add(GetPause(0.3, 0.5));
SlowTypingScript.Add(GetEnterKeyClick());
SlowTypingScript.Add(GetPause(0.8, 1.0));
SlowTypingScript.Add(GetESCKeyClick());
return SlowTypingScript;
}

Expand All @@ -57,6 +53,11 @@ static MouseClick GetLeftMouseClick()
return new MouseClick() { MouseButton = VirtualMouseStates.Left_Click };
}

static DolphinScript.Classes.ScriptEventClasses.PasteClipboard GetPaste()
{
return new DolphinScript.Classes.ScriptEventClasses.PasteClipboard();
}

static DolphinScript.Classes.ScriptEventClasses.KeybdEvent GetEnterKeyClick()
{
return new DolphinScript.Classes.ScriptEventClasses.KeybdEvent() { KeybdEventBtn = VirtualKeyStates.VK_RETURN };
Expand Down
2 changes: 1 addition & 1 deletion SmiteMixerCodeGrabberGUI/Classes/MetaInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace SmiteMixerCodeGrabberGUI.Classes
{
public static class MetaInfo
{
public static string Version = "v1.0.2";
public static string Version = "v1.0.4";

public static string GetMetaInfoConsole()
{
Expand Down
20 changes: 15 additions & 5 deletions SmiteMixerCodeGrabberGUI/MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions SmiteMixerCodeGrabberGUI/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ private void checkbox_AFKMode_CheckedChanged(object sender, EventArgs e)
{
if (checkbox_AFKMode.Checked)
{
Task.Run(() => CheckForTerminationKey());
Properties.Settings.Default.AFKMode = true;
Properties.Settings.Default.Save();
IsRunning = true;
Expand Down Expand Up @@ -331,6 +330,10 @@ private void reportBugToolStripMenuItem_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("https://github.com/Lumbridge/SmiteMixerCodeRedeemer/issues");
}
private void userGuideToolStripMenuItem_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("https://github.com/Lumbridge/SmiteMixerCodeRedeemer/blob/master/README.md");
}
#endregion

#region Helper Methods
Expand Down Expand Up @@ -424,8 +427,6 @@ public static void CheckForTerminationKey()
Properties.Settings.Default.Save();

DisplayNotification("F5 Key Detected: AFK Mode disabled.");

return;
}
Thread.Sleep(15);
}
Expand Down
Binary file modified SmiteMixerCodeGrabberGUI/bin/Debug/DolphinScript.dll
Binary file not shown.
Binary file modified SmiteMixerCodeGrabberGUI/bin/Debug/DolphinScript.pdb
Binary file not shown.
Binary file modified SmiteMixerCodeGrabberGUI/bin/Debug/MixerChat.dll
Binary file not shown.
Binary file modified SmiteMixerCodeGrabberGUI/bin/Debug/MixerChat.pdb
Binary file not shown.
Binary file modified SmiteMixerCodeGrabberGUI/bin/Debug/Smite Mixer Code Grabber.exe
Binary file not shown.
Binary file not shown.
Binary file modified SmiteMixerCodeGrabberGUI/bin/Debug/SmiteMixerListener.dll
Binary file not shown.
Binary file modified SmiteMixerCodeGrabberGUI/bin/Debug/SmiteMixerListener.pdb
Binary file not shown.
Binary file modified SmiteMixerCodeGrabberGUI/bin/Release/DolphinScript.dll
Binary file not shown.
Binary file modified SmiteMixerCodeGrabberGUI/bin/Release/DolphinScript.pdb
Binary file not shown.
Binary file modified SmiteMixerCodeGrabberGUI/bin/Release/MixerChat.dll
Binary file not shown.
Binary file modified SmiteMixerCodeGrabberGUI/bin/Release/MixerChat.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified SmiteMixerCodeGrabberGUI/bin/Release/SmiteMixerListener.dll
Binary file not shown.
Binary file modified SmiteMixerCodeGrabberGUI/bin/Release/SmiteMixerListener.pdb
Binary file not shown.
Binary file modified SmiteMixerCodeGrabberGUI/obj/Debug/Smite Mixer Code Grabber.exe
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit cf2f8f2

Please sign in to comment.