Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Auto Pot
- int UserSetHP;
- int UserSetMP;
- bool HPMPExit;
- void AutoPot()
- {
- HWND hwnd = FindWindow("MapleStoryClass", 0);
- LPARAM lParam = (MapVirtualKey(0x21, 0) << 16);
- LPARAM lParam2 = (MapVirtualKey(0x22, 0) << 16); // Test it now. okies
- while(!HPMPExit)
- {//This loop should stop if both HP & MP are higher then what you put in your checkboxes
- if(CurrentHp < UserSetHP)
- {
- PostMessage(hwnd, WM_KEYDOWN, 0x21, lParam); // Page Up
- }
- if(CurrentMP < UserSetMP)
- {
- PostMessage(hwnd, WM_KEYDOWN, 0x22, lParam2); // Page Down
- }
- Sleep(100);
- }
- }
- void Form1::textBox7_TextChanged(System::Object^ sender, System::EventArgs^ e)
- {
- UserSetHP = Convert::ToInt32(this->textBox7->Text);
- }
- void Form1::textBox8_TextChanged(System::Object^ sender, System::EventArgs^ e)
- {
- UserSetMP = Convert::ToInt32(this->textBox8->Text);
- }
- void Form1::checkBox31_CheckedChanged(System::Object^ sender, System::EventArgs^ e)
- {
- if(this->checkBox31->Checked)
- {
- HPMPExit = false;
- CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)&AutoPot, NULL, NULL, NULL);
- }
- else
- {
- HPMPExit = true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement