Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[C++] Auto Pot (MapleStory) [Solved]
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
TraxMate
Master Cheater
Reputation: 0

Joined: 01 Mar 2008
Posts: 363

PostPosted: Sun Oct 26, 2008 3:02 pm    Post subject: Reply with quote

1qaz wrote:
in your auto pots thread use this code
i guess it should do the job if the window moved (wrote it on quick reply)
so correct me if i'm wrong
Code:

HWND msWnd;
MSG msg;
msWnd = FindWindow(_T("MapleStoryClass"),_T("MapleStory"));
if (msWnd != 0){
   GetMessage(&msg,msWnd,0,0);
   if (msg.message == WM_MOVE){
      int newWndX, newWndY;
      newWndX = LOWORD(msg.lParam);
      newWndY = HIWORD(msg.lParam);
      int x = 0, y = 0;
      x = newWndX - oldWndX;
      y = newWndY - oldWndY;
      xPos += x;
      yPos += y;
   }
}

considering that xPos and yPos are the coords of hp/mp bar
I fixed it myself. But thx for trying to help all =). Snootae was right the colors was different in windowed mode. So all I did was a check to se if DXWnd was open and then use the new RGB values.
Back to top
View user's profile Send private message
tdenisenko
Grandmaster Cheater
Reputation: 0

Joined: 23 Oct 2007
Posts: 799
Location: Turkey

PostPosted: Sun Oct 26, 2008 3:02 pm    Post subject: Reply with quote

thanks for sharing traxmate

btw if you still play EMS i can send you auto meso-maker

_________________
I am learning C++ and ASM and making trainers!
My Last Chaos Trainer!
LC Trainer by tdenisenko
Back to top
View user's profile Send private message
TraxMate
Master Cheater
Reputation: 0

Joined: 01 Mar 2008
Posts: 363

PostPosted: Sun Oct 26, 2008 3:06 pm    Post subject: Reply with quote

tdenisenko wrote:
thanks for sharing traxmate

btw if you still play EMS i can send you auto meso-maker
NP ^^. I would like to have an auto meso-maker :O.
Back to top
View user's profile Send private message
tdenisenko
Grandmaster Cheater
Reputation: 0

Joined: 23 Oct 2007
Posts: 799
Location: Turkey

PostPosted: Sun Oct 26, 2008 3:14 pm    Post subject: Reply with quote

TraxMate wrote:
tdenisenko wrote:
thanks for sharing traxmate

btw if you still play EMS i can send you auto meso-maker
NP ^^. I would like to have an auto meso-maker :O.


only for EMS...
you play EMS?
if yes pm me msn or ign Very Happy

_________________
I am learning C++ and ASM and making trainers!
My Last Chaos Trainer!
LC Trainer by tdenisenko
Back to top
View user's profile Send private message
imeantobebad
Master Cheater
Reputation: 0

Joined: 11 Jan 2007
Posts: 469
Location: Moree

PostPosted: Mon Oct 27, 2008 3:05 am    Post subject: Reply with quote

TraxMate wrote:
Snootae wrote:
i doubt it, find out what the problem is, check if its the wrong spot, or the wrong colours
It is the wrong spot(atleast according to Pixels.), but how can it be the wrong spot when the pixels should be the same all the time? Even in windowed mode maple is only 800 x 600 pixels. I don't know about the color, will check it now.


Have it like a case loop( thats a loop isnt it) Like have 2 different cases. 1 for Windowed and one for full screen maybe check the pixels at the top of the screen? Is the like Strip at the top of windows counted as the MapleStoryClass window? Cause then you could check the pixels up there to see if they are black? u see what im saying or did u already think of this?
Back to top
View user's profile Send private message
TraxMate
Master Cheater
Reputation: 0

Joined: 01 Mar 2008
Posts: 363

PostPosted: Mon Oct 27, 2008 3:39 am    Post subject: Reply with quote

imeantobebad wrote:
TraxMate wrote:
Snootae wrote:
i doubt it, find out what the problem is, check if its the wrong spot, or the wrong colours
It is the wrong spot(atleast according to Pixels.), but how can it be the wrong spot when the pixels should be the same all the time? Even in windowed mode maple is only 800 x 600 pixels. I don't know about the color, will check it now.


Have it like a case loop( thats a loop isnt it) Like have 2 different cases. 1 for Windowed and one for full screen maybe check the pixels at the top of the screen? Is the like Strip at the top of windows counted as the MapleStoryClass window? Cause then you could check the pixels up there to see if they are black? u see what im saying or did u already think of this?
yah I understand what you mean and that's one way to do it. But I already solved it, Thx anyways : ).
Back to top
View user's profile Send private message
imeantobebad
Master Cheater
Reputation: 0

Joined: 11 Jan 2007
Posts: 469
Location: Moree

PostPosted: Mon Oct 27, 2008 4:22 am    Post subject: Reply with quote

K, im glad u did it
Back to top
View user's profile Send private message
Heartless
I post too much
Reputation: 0

Joined: 03 Dec 2006
Posts: 2436

PostPosted: Mon Oct 27, 2008 4:32 am    Post subject: Re: [C++] Auto Pot (MapleStory) [Solved] Reply with quote

TraxMate wrote:
I'm making an auto pot for my bot. It works perfectly in fullscreen maple but not in windowed.
Code:
void AutoPot()
{
   while(true)
   {
      HWND hWnd = FindWindow(_T("MapleStoryClass"), _T("MapleStory"));
      HDC hdc = GetDC(hWnd);
      COLORREF hpPot = GetPxl(hdc, 252, 588);
      COLORREF mpPot = GetPxl(hdc, 350, 589);
      BYTE hpR, mpR, hpG, mpG, hpB, mpB;
      hpR = GetRValue(hpPot),   hpG = GetGValue(hpPot), hpB = GetBValue(hpPot);
      mpR = GetRValue(mpPot), mpG = GetGValue(mpPot), mpB = GetBValue(mpPot);
      if(hpR == 190, hpG == 188, hpB == 189)
         PostMsg(MapleWnd, WM_KEYDOWN, 0x23, (MapVirtualKey(0x23, 0) << 16));

not a fix to your problem, but it shortens your code.
      else if(mpR == 173, mpG == 178, mpB == 173)
         PostMsg(MapleWnd, WM_KEYDOWN, 0x41, (MapVirtualKey(0x41, 0) << 16));
      Sleep(100);
   }
}
I don't know why it's not working in windowed mode. In my eyes this should work in windowed mode withput preblems Shocked .


I haven't tried this out. Looks like it should work.

Code:
Dword HP = 0xBEBCBD;     //R190, G188, B189
if (hpPot == HP)
{
    //code
}


This dosen't sove your problem, but shortens your code.

_________________
What dosen't kill you, usually does the second time.
Back to top
View user's profile Send private message
TraxMate
Master Cheater
Reputation: 0

Joined: 01 Mar 2008
Posts: 363

PostPosted: Mon Oct 27, 2008 6:03 am    Post subject: Re: [C++] Auto Pot (MapleStory) [Solved] Reply with quote

HornyAZNBoy wrote:
TraxMate wrote:
I'm making an auto pot for my bot. It works perfectly in fullscreen maple but not in windowed.
Code:
void AutoPot()
{
   while(true)
   {
      HWND hWnd = FindWindow(_T("MapleStoryClass"), _T("MapleStory"));
      HDC hdc = GetDC(hWnd);
      COLORREF hpPot = GetPxl(hdc, 252, 588);
      COLORREF mpPot = GetPxl(hdc, 350, 589);
      BYTE hpR, mpR, hpG, mpG, hpB, mpB;
      hpR = GetRValue(hpPot),   hpG = GetGValue(hpPot), hpB = GetBValue(hpPot);
      mpR = GetRValue(mpPot), mpG = GetGValue(mpPot), mpB = GetBValue(mpPot);
      if(hpR == 190, hpG == 188, hpB == 189)
         PostMsg(MapleWnd, WM_KEYDOWN, 0x23, (MapVirtualKey(0x23, 0) << 16));

not a fix to your problem, but it shortens your code.
      else if(mpR == 173, mpG == 178, mpB == 173)
         PostMsg(MapleWnd, WM_KEYDOWN, 0x41, (MapVirtualKey(0x41, 0) << 16));
      Sleep(100);
   }
}
I don't know why it's not working in windowed mode. In my eyes this should work in windowed mode withput preblems Shocked .


I haven't tried this out. Looks like it should work.

Code:
Dword HP = 0xBEBCBD;     //R190, G188, B189
if (hpPot == HP)
{
    //code
}


This dosen't sove your problem, but shortens your code.
Thx for the tip. I will try that Smile.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites