Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define Padding(x) struct { unsigned char __padding##x[(x)]; };
- struct CUserLocal
- {
- Padding(0x5E5C); //char vector/char pid
- void* lpvPID;
- };
- struct Location
- {
- Padding(0x98); //mouse x
- int x; //0x98
- int y; //0x9C
- };
- struct CWndMan
- {
- Padding(0x0978); //mouse location
- Location* pLocation;
- Padding(0x0104); //animation - location - 4
- DWORD dwDlag;
- };
- CUserLocal*(__cdecl* TSingleton_CUserLocal_GetInstance)() = NULL;
- CWndMan*(__cdecl* TSingleton_CWndMan_GetInstance)() = NULL;
- void(__fastcall* CUserLocal__IsTeleportSkillAvailable)(void* lpvEcx, void* lpvEdx, void* lpvPID, int x, int y) = NULL;
- namespace Function
- {
- void Teleport(int x, int y)
- {
- void* PID = TSingleton_CUserLocal_GetInstance()->lpvPID;
- return CUserLocal_IsTeleportSkillAvailable(0, 0, PID, x, y);
- }
- void MouseFly(bool dragCheck)
- {
- Location *location = reinterpret_cast<Location*>(reinterpret_cast<PBYTE*>(TSingleton_CWndMan_GetInstance()->pLocation));
- int x = location->x;
- int y = location->y;
- if (!dragCheck) //no drag
- return Teleport(x, y);
- else
- {
- DWORD drag = TSingleton_CWndMan_GetInstance()->dwDlag;
- if (drag == 0xC)
- return Teleport(x, y);
- }
- }
- }
- void GetData()
- {
- *(void**)&TSingleton_CUserLocal_GetInstance = reinterpret_cast<void*>(0x004AEDB0); //
- *(void**)&TSingleton_CWndMan_GetInstance = reinterpret_cast<void*>(0x004AF6D0); //
- *(void**)&CUserLocal_IsTeleportSkillAvailable = reinterpret_cast<void*>(0x01763BE0); //
- }
- //C++/CLI
- static int iMouseFly_delay = 100; //100ms
- //CheckBox
- System::Void GUIm::cbMouseFly_CheckedChanged(System::Object^ sender, System::EventArgs^ e)
- {
- if (cbMouseFly->Checked)
- {
- tmrMouseFly->Interval = iMouseFly_delay;
- tmrMouseFly->Start();
- }
- else tmrMouseFly->Stop();
- }
- //NumericUpDown
- System::Void GUIm::txtMouseFlyDelay_ValueChanged(System::Object^ sender, System::EventArgs^ e)
- {
- if (System::Convert::ToInt32(txtMouseFlyDelay->Value) < 1)
- txtMouseFlyDelay->Value = 1;
- iMouseFly_delay = System::Convert::ToInt32(txtMouseFlyDelay->Value);
- }
- //Timer
- System::Void GUIm::tmrMouseFly_Tick(System::Object^ sender, System::EventArgs^ e)
- {
- static bool dragcheck;
- if (cbMouseFlyDragCheck->CheckState == CheckState::Checked)
- dragcheck = true;
- else dragcheck = false;
- Function::MouseFly(dragcheck);
- }
- //Function::MouseFly(true) //teleport on click
- //Function::MouseFly(false) //teleport on mouse coords
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement