Exemple #1
0
        public bool Click()
        {
            int CtrlNamePtr = CN.Trim().Length > 0 ? CP : (name.Trim().Length > 0 ? name_ptr : -1);

            if (name_ptr == -1)
            {
                return(false);
            }
            byte[] WP =
            {
                0x60,                               // PUSHAH
                0x68, 0x00, 0x00, 0x00, 0x00,       // push NTL_CriticalSectionPtr
                0xFF, 0x15, 0x00, 0x00, 0x00, 0x00, // call [NTL_EnterCriticalSection]
                0xB9, 0x00, 0x00, 0x00, 0x00,       // mov ecx, WinPtr
                0x68, 0x00, 0x00, 0x00, 0x00,       // push ControlStringPtr
                0xBB, 0x00, 0x00, 0x00, 0x00,       // mov ebx, GuiPtr
                0xFF, 0xD3,                         // call ebx
                0x68, 0x00, 0x00, 0x00, 0x00,       // push NTL_CriticalSectionPtr
                0xFF, 0x15, 0x00, 0x00, 0x00, 0x00, // call [NTL_LeaveCriticalSection]
                0x61, 0xC3                          // POPAD, RET
            };
            Packet P = new Packet(WND.HNDL, WP);

            P.Copy(OFS.GetUInt("NTL_CriticalSectionPtr"), 2, 4);
            P.Copy(OFS.GetUInt("NTL_CriticalSectionPtr"), 30, 4);
            P.Copy(OFS.GetUInt("NTL_EnterCriticalSection"), 8, 4);
            P.Copy(OFS.GetUInt("NTL_LeaveCriticalSection"), 36, 4);
            P.Copy(OFS.GetUInt("GUI"), 23, 4);
            P.Copy(WND.ptr, 13, 4);
            P.Copy(CtrlNamePtr, 18, 4);
            return(P.Execute());
        }
Exemple #2
0
        public bool Click_Critical()
        {
            int CtrlNamePtr = CN.Trim().Length > 0 ? CP : (name.Trim().Length > 0 ? name_ptr : -1);

            if (CtrlNamePtr == -1)
            {
                return(false);
            }
            byte[] WP =
            {
                0x60,                               // PUSHAH
                0x68, 0x00, 0x00, 0x00, 0x00,       // push NTDLL_CriticalSectionPtr
                0xFF, 0x15, 0x00, 0x00, 0x00, 0x00, // call [NTDLL_EnterCriticalSection]
                0xBE, 0x00, 0x00, 0x00, 0x00,       // mov esi, WinPtr
                0x8B, 0x16,                         // mov edx,[esi]
                0x8B, 0x42, 0x30,                   // mov eax,[edx + 30]
                0x68, 0x00, 0x00, 0x00, 0x00,       // push ControlStringPtr
                0x8B, 0xCE,                         // mov ecx, esi
                0xFF, 0xD0,                         // call eax
                0x68, 0x00, 0x00, 0x00, 0x00,       // push NTDLL_CriticalSectionPtr
                0xFF, 0x15, 0x00, 0x00, 0x00, 0x00, // call [NTDLL_LeaveCriticalSection]
                0x61, 0xC3                          // POPAD, RET
            };
            Packet P = new Packet(WND.HNDL, WP);

            P.Copy(OFS.GetUInt("NTDLL_CriticalSectionPtr"), 2, 4);
            P.Copy(OFS.GetUInt("NTDLL_CriticalSectionPtr"), 32, 4);
            P.Copy(OFS.GetUInt("NTDLL_EnterCriticalSection"), 8, 4);
            P.Copy(OFS.GetUInt("NTDLL_LeaveCriticalSection"), 38, 4);
            P.Copy(WND.ptr, 13, 4);
            P.Copy(CtrlNamePtr, 23, 4);
            return(P.Execute());
        }
Exemple #3
0
        public void Move(Location loc, Boolean wait = false, double accuracy = 0.5)
        {
            byte[] WP =
            {
                0x60,                                            //pushad
                0xB8,              /*2*/ 0x00,0x00, 0x00, 0x00, //mov eax, BA
                0x8B,              0x00,                         //mox eax, dword ptr [eax]
                0x8B,              0x40, 0x1C,                   //mov eax, dword ptr[eax + 1C]
                0x8B,              0x78, 0x34,                   //mov edi, dword ptr[eax + 0x34]
                0x8B,              0x8F, 0xC4, 0x15, 0x00, 0x00, //mov ecx, dword ptr[edi + 0x154C]
                0x6A,              0x01,                         //push 1
                0xB8,              /*23*/ 0x00,0x00, 0x00, 0x00, //mov eax, action_1
                0xFF,              0xD0,                         //call eax
                0x8D,              0x54, 0x24, 0x1C,             //lea edx, dword ptr[esp + 0x1C]
                0x8B,              0xD8,                         //mov ebx, eax
                0x52,                                            //push edx
                0x68,              /*37*/ 0x00,0x00, 0x00, 0x00, //push walk_mode
                0x8B,              0xCB,                         //mov ecx, ebx
                0xB8,              /*44*/ 0x00,0x00, 0x00, 0x00, //mov eax, action_2
                0xFF,              0xD0,                         //call eax
                0x8B,              0x8F, 0xC4, 0x15, 0x00, 0x00, //mov ecx, dword ptr [edi + 0x154C]
                0xB8,              /*57*/ 0x00,0x00, 0x00, 0x00, //mov eax, x
                0x89,              0x43, 0x20,                   //mov dword ptr[ebx + 0x20], eax
                0xB8,              /*65*/ 0x00,0x00, 0x00, 0x00, //mov eax, z
                0x89,              0x43, 0x24,                   //mov dword ptr[ebx + 0x24], eax
                0xB8,              /*73*/ 0x00,0x00, 0x00, 0x00, //mov eax, y
                0x89,              0x43, 0x28,                   //mov dword ptr[ebx + 0x28], eax
                0x6A,              0x00,                         //push 0
                0x53,                                            //push ebx
                0x6A,              0x01,                         //push 1
                0xB8,              /*86*/ 0x00,0x00, 0x00, 0x00, //mov eax, action_3
                0xFF,              0xD0,                         //call eax
                0x61,                                            //popad
                0xC3                                             //ret
            };
            Packet P = new Packet(HNDL, WP);

            P.Copy(OFS.BA, 2, 4);
            P.Copy(OFS.GetUInt("Player_Action_Struct"), 16, 4);
            P.Copy(OFS.GetUInt("Player_Action_Struct"), 52, 4);
            P.Copy(OFS.GetUInt("action_1"), 23, 4);
            P.Copy(OFS.GetUInt("action_2"), 44, 4);
            P.Copy(OFS.GetUInt("action_3"), 86, 4);
            P.Copy(loc.x, 57, 4);
            P.Copy(loc.y, 73, 4);
            P.Copy(loc.z, 65, 4);
            int WalkMode = Memory.RD(HNDL, CSP + OFS.GetInt("Player_WalkMode"));

            P.Copy(WalkMode > 0 ? 1 : 0, 37, 4);
            P.Execute();
            if (wait)
            {
                while (LOC.GetDistance(loc) > accuracy)
                {
                    LoadLocation();
                    System.Threading.Thread.Sleep(200);
                }
            }
        }