📄 func.cs
字号:
public static object percentdecimal(object min, object max)
{
if (Operators.ConditionalCompareObjectGreater(min, 1, false))
{
return Conversions.ToString(Operators.MultiplyObject(Operators.DivideObject(min, max), 100));
}
return Conversions.ToString(0);
}
public static object percentrogue(object min, object max)
{
if (BitConverter.ToInt32((byte[]) min, 0) > 1)
{
return Conversions.ToString(Operators.MultiplyObject(Operators.DivideObject(BitConverter.ToInt32((byte[]) min, 0), max), 100));
}
return Conversions.ToString(0);
}
[DllImport("winmm.dll", CharSet=CharSet.Ansi, SetLastError=true, ExactSpelling=true)]
public static extern int PlaySound([MarshalAs(UnmanagedType.VBByRefStr)] ref string lpszSoundName, int hModule, int dwFlags);
public static bool PlayWav(string fileFullPath)
{
int num = 0;
try
{
num = PlaySound(ref fileFullPath, 0, 0x20000);
}
catch (Exception exception1)
{
ProjectData.SetProjectError(exception1);
ProjectData.ClearProjectError();
}
return (num > 0);
}
public static string Post_request(string url, string data)
{
string str;
try
{
HttpWebRequest request = (HttpWebRequest) WebRequest.Create(url);
request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = data.Length;
StreamWriter writer = new StreamWriter(request.GetRequestStream());
writer.Write(data);
writer.Close();
str = new StreamReader(request.GetResponse().GetResponseStream()).ReadToEnd();
}
catch (Exception exception1)
{
ProjectData.SetProjectError(exception1);
Exception exception = exception1;
str = exception.Message.ToString();
ProjectData.ClearProjectError();
}
return str;
}
[DllImport("user32", EntryPoint="PostMessageA", CharSet=CharSet.Ansi, SetLastError=true, ExactSpelling=true)]
public static extern bool PostMessage(IntPtr hwnd, int wMsg, int wParam, int lParam);
public static object pressechap()
{
PostMessage(Main.wow.WindowHandle, 0x100, 0x1b, (int) IntPtr.Zero);
PostMessage(Main.wow.WindowHandle, 0x101, 0x1b, (int) IntPtr.Zero);
return 0;
}
public static object presskey(object touche)
{
if (Operators.ConditionalCompareObjectEqual(touche, 1, false))
{
PostMessage(Main.wow.WindowHandle, 0x100, 0x31, (int) IntPtr.Zero);
PostMessage(Main.wow.WindowHandle, 0x101, 0x31, (int) IntPtr.Zero);
}
else if (Operators.ConditionalCompareObjectEqual(touche, 2, false))
{
PostMessage(Main.wow.WindowHandle, 0x100, 50, (int) IntPtr.Zero);
PostMessage(Main.wow.WindowHandle, 0x101, 50, (int) IntPtr.Zero);
}
else if (Operators.ConditionalCompareObjectEqual(touche, 3, false))
{
PostMessage(Main.wow.WindowHandle, 0x100, 0x33, (int) IntPtr.Zero);
PostMessage(Main.wow.WindowHandle, 0x101, 0x33, (int) IntPtr.Zero);
}
else if (Operators.ConditionalCompareObjectEqual(touche, 4, false))
{
PostMessage(Main.wow.WindowHandle, 0x100, 0x34, (int) IntPtr.Zero);
PostMessage(Main.wow.WindowHandle, 0x101, 0x34, (int) IntPtr.Zero);
}
else if (Operators.ConditionalCompareObjectEqual(touche, 5, false))
{
PostMessage(Main.wow.WindowHandle, 0x100, 0x35, (int) IntPtr.Zero);
PostMessage(Main.wow.WindowHandle, 0x101, 0x35, (int) IntPtr.Zero);
}
else if (Operators.ConditionalCompareObjectEqual(touche, 6, false))
{
PostMessage(Main.wow.WindowHandle, 0x100, 0x36, (int) IntPtr.Zero);
PostMessage(Main.wow.WindowHandle, 0x101, 0x36, (int) IntPtr.Zero);
}
else if (Operators.ConditionalCompareObjectEqual(touche, 7, false))
{
PostMessage(Main.wow.WindowHandle, 0x100, 0x37, (int) IntPtr.Zero);
PostMessage(Main.wow.WindowHandle, 0x101, 0x37, (int) IntPtr.Zero);
}
else if (Operators.ConditionalCompareObjectEqual(touche, 8, false))
{
PostMessage(Main.wow.WindowHandle, 0x100, 0x38, (int) IntPtr.Zero);
PostMessage(Main.wow.WindowHandle, 0x101, 0x38, (int) IntPtr.Zero);
}
else if (Operators.ConditionalCompareObjectEqual(touche, 9, false))
{
PostMessage(Main.wow.WindowHandle, 0x100, 0x39, (int) IntPtr.Zero);
PostMessage(Main.wow.WindowHandle, 0x101, 0x39, (int) IntPtr.Zero);
}
else if (Operators.ConditionalCompareObjectEqual(touche, 0, false))
{
PostMessage(Main.wow.WindowHandle, 0x100, 0x30, (int) IntPtr.Zero);
PostMessage(Main.wow.WindowHandle, 0x101, 0x30, (int) IntPtr.Zero);
}
else
{
SendKeys.Send(Conversions.ToString(touche));
}
return 0;
}
public static object ReadASCIIString(int DecimalAdresse)
{
byte[] data = new byte[0x100];
mem.Peek((int) Main.wow.ProcessHandle, DecimalAdresse, data);
return Encoding.Default.GetString(data);
}
public static object ReadInt32(int DecimalAdresse)
{
byte[] data = new byte[0x100];
mem.Peek((int) Main.wow.ProcessHandle, DecimalAdresse, data);
return BitConverter.ToInt32(data, 0);
}
public static object ReadLong(int DecimalAdresse)
{
byte[] data = new byte[0x100];
mem.Peek((int) Main.wow.ProcessHandle, DecimalAdresse, data);
return BitConverter.ToInt64(data, 0);
}
public static object ReadSingle(int DecimalAdresse, int start)
{
byte[] data = new byte[0x100];
mem.Peek((int) Main.wow.ProcessHandle, DecimalAdresse, data);
return BitConverter.ToSingle(data, start);
}
public static object resetkey()
{
Bot.keybd_event(40, 0, 2L, 0L);
Bot.keybd_event(0x27, 0, 2L, 0L);
Bot.keybd_event(0x26, 0, 2L, 0L);
Bot.keybd_event(0x25, 0, 2L, 0L);
return 0;
}
public static object rien()
{
int num = 0;
Clavier.ReculerUp();
Clavier.AvancerUp();
while (num == 0)
{
oldWait(0xea60);
}
return 0;
}
public static void rot(object process, object address, object data)
{
object[] arguments = new object[] { RuntimeHelpers.GetObjectValue(data) };
bool[] copyBack = new bool[] { true };
if (copyBack[0])
{
data = RuntimeHelpers.GetObjectValue(arguments[0]);
}
data = RuntimeHelpers.GetObjectValue(NewLateBinding.LateGet(null, typeof(BitConverter), "GetBytes", arguments, null, null, copyBack));
mem.Poke((Process) process, Conversions.ToInteger(address), (byte[]) data);
}
public static object secName()
{
string str2 = "";
Random random = new Random();
str2 = Conversions.ToString(random.Next(100, 0x3e6));
string str = Conversions.ToString(random.Next(0, 0xff));
return Conversions.ToString((double) (Conversions.ToDouble(str2) + Convert.ToInt32(str, 0x10)));
}
[DllImport("user32")]
public static extern int SetCursorPos(int x, int y);
[DllImport("user32", CharSet=CharSet.Ansi, SetLastError=true, ExactSpelling=true)]
public static extern long SetForegroundWindow(long hwnd);
[DllImport("user32", CharSet=CharSet.Ansi, SetLastError=true, ExactSpelling=true)]
public static extern int SetWindowPos(int hwnd, int hWndInsertAfter, int x, int y, int cx, int cy, int wFlags);
[DllImport("user32", CharSet=CharSet.Ansi, SetLastError=true, ExactSpelling=true)]
public static extern int ShowWindow(int hWnd, int nCmdShow);
[DllImport("Kernel32.dll", CharSet=CharSet.Ansi, SetLastError=true, ExactSpelling=true)]
public static extern void Sleep(int dwMillisenconds);
public static object UpdateNotifyIcon()
{
MyProject.Forms.Main.NotifyIcon1.Text = "Kill(s) : " + MyProject.Forms.Main.mobskilled.Text + " Loot(s) : " + MyProject.Forms.Main.mobslooted.Text + " Death(s) : " + MyProject.Forms.Main.died.Text;
return 0;
}
[StructLayout(LayoutKind.Sequential)]
public struct POINTAPI
{
public long X;
public long Y;
}
[StructLayout(LayoutKind.Sequential)]
public struct RECT
{
public int Left;
public int Top;
public int Right;
public int Bottom;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -