-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathHotkeys.cs
39 lines (37 loc) · 1.18 KB
/
Hotkeys.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using AutoIt;
using System;
using System.Windows.Forms;
namespace PxgBot.Classes
{
public static class Hotkeys
{
public static bool Enabled = false;
public static string ReviveHotkey = "";
public static string PauseCavebotHotkey = "";
public static string PauseAttackerHotkey = "";
public static void KeyPress(object sender, KeyEventArgs e)
{
string key = e.KeyData.ToString();
//Console.WriteLine("Key press: " + key);
if (key == ReviveHotkey)
{
if (Pokemon.isOutside() == true) Pokemon.PutInOrOut();
Pokemon.Revive(true);
AutoItX.Sleep(100);
if (Pokemon.isOutside() == false) Pokemon.PutInOrOut();
}
else if (key == PauseCavebotHotkey)
{
if (Cavebot.Script.Count == 0 && Cavebot.Enabled == false)
{
return;
}
Cavebot.Enabled = !Cavebot.Enabled;
}
else if (key == PauseAttackerHotkey)
{
CavebotAttack.Enabled = !CavebotAttack.Enabled;
}
}
}
}