public void SetMouseCoordFlag() { //spour la mouse vite fais avec cheat engine fo enleve et le remettre Memory.WriteInt(TrucVert1, 64); Thread.Sleep(20); Memory.WriteInt(TrucVert2, 438906840); //spour le graph , retrouver avec ida grace a SetChatWindowName Thread.Sleep(20); Memory.WriteByte(0x049C8B3, 0); //Memory.WriteInt(0x0049c743, 0); MxBots.Hook.cliked += new MxBots.Hook.MouseTransfertEvent(getcoordmousse); }
public uint InjectAndExecute(string[] asm, bool allowOffline = false) { lock (Locker) { if (!allowOffline && (!Helpers.Usefuls.InGame || Helpers.Usefuls.IsLoading)) { return(0); } /*List<string> asmCode = new List<string>(); * foreach (string s in asm) * { * asmCode.Add(s); * if (Others.Random(0, 100) > 50) * { * int nR = Others.Random(1, 3); * for (int i = nR; i >= 1; i--) * { * asmCode.Add(ProtectHook()); * } * } * } * return (uint) Wow.Memory.WowProcess.Executor.Call(asmCode.ToArray());*/ if (!ThreadHooked) { return(0); } var fasm = new ManagedFasm(Memory.ProcessHandle); fasm.SetMemorySize(0x1000); fasm.SetPassLimit(100); foreach (string s in asm) { fasm.AddLine(s); } fasm.Inject(_mInjectionCode); Memory.WriteByte(_mExecuteRequested, 1); Timer injectTimer = new Timer(2000); injectTimer.Reset(); while (Memory.ReadByte(_mExecuteRequested) == 1 && !injectTimer.IsReady) { Thread.Sleep(1); } if (injectTimer.IsReady) { Logging.WriteError("Injection have been aborted, execution too long from " + CurrentCallStack); return(0); } Memory.WriteBytes(_mInjectionCode, _mZeroBytesInjectionCodes); uint returnValue = Memory.ReadUInt(_mResult); return(returnValue); } }