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 


DLL Laggin Game

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
kitterz
Grandmaster Cheater Supreme
Reputation: 0

Joined: 24 Dec 2007
Posts: 1268

PostPosted: Thu Aug 14, 2008 1:51 pm    Post subject: DLL Laggin Game Reply with quote

I am working on a DLL Trainer for MapleStory...LoL.

So far, I have 4 Threads with delays from 100-500 ms each, as well as 12 registered hotkeys and 7 timers.

However, this lags maple shit, I think.

Will this lag maple? Or is it something else?
Back to top
View user's profile Send private message Send e-mail
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Thu Aug 14, 2008 1:54 pm    Post subject: Reply with quote

Use threads instead of timers.
_________________
Back to top
View user's profile Send private message
kitterz
Grandmaster Cheater Supreme
Reputation: 0

Joined: 24 Dec 2007
Posts: 1268

PostPosted: Thu Aug 14, 2008 2:06 pm    Post subject: Reply with quote

lurc wrote:
Use threads instead of timers.


How will I make that work?
Back to top
View user's profile Send private message Send e-mail
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Thu Aug 14, 2008 2:09 pm    Post subject: Reply with quote

Im using 4 timers on 1 thread and my trainer works fine on maple.
Back to top
View user's profile Send private message
GMZorita
Grandmaster Cheater Supreme
Reputation: 0

Joined: 21 Mar 2007
Posts: 1361

PostPosted: Thu Aug 14, 2008 2:09 pm    Post subject: Reply with quote

Instead of a time you just use a thread
for the infinite loop use
Code:

HANDLE MYTHREAD;
void ihazaThread
{
for(;;)
{
//Timer code here
Sleep(TimerSleepTimehere);
}
}

To start / stop just use
Code:

Start:
MYTHREAD = CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)ihazaThread,NULL,NULL,NULL);

Stop:
TerminateThread(MYTHREAD,0);


dnsi0 wrote:
Im using 4 timers on 1 thread and my trainer works fine on maple.

Timers are a waste...
Don't use it, its lame.
Learn 2 use Threads and will be be a lot better for ya.

_________________
Gone


Last edited by GMZorita on Thu Aug 14, 2008 2:11 pm; edited 1 time in total
Back to top
View user's profile Send private message
kitterz
Grandmaster Cheater Supreme
Reputation: 0

Joined: 24 Dec 2007
Posts: 1268

PostPosted: Thu Aug 14, 2008 2:11 pm    Post subject: Reply with quote

GMZorita wrote:
Instead of a time you just use a thread
for the infinite loop use
Code:

HANDLE MYTHREAD;
void ihazaThread
{
for(;;)
{
//Timer code here
Sleep(TimerSleepTimehere);
}
}

To start / stop just use
Code:

Start:
MYTHREAD = CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)ihazaThread,NULL,NULL,NULL);

Stop:
TerminateThread(MYTHREAD,0);


O wait...I was just confused for a sec.

Thanks...but I know this already Very Happy
Back to top
View user's profile Send private message Send e-mail
GMZorita
Grandmaster Cheater Supreme
Reputation: 0

Joined: 21 Mar 2007
Posts: 1361

PostPosted: Thu Aug 14, 2008 2:13 pm    Post subject: Reply with quote

kitterz wrote:
GMZorita wrote:
Instead of a time you just use a thread
for the infinite loop use
Code:

HANDLE MYTHREAD;
void ihazaThread
{
for(;;)
{
//Timer code here
Sleep(TimerSleepTimehere);
}
}

To start / stop just use
Code:

Start:
MYTHREAD = CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)ihazaThread,NULL,NULL,NULL);

Stop:
TerminateThread(MYTHREAD,0);


O wait...I was just confused for a sec.

Thanks...but I know this already :D

Wait... you just sayd you didn't...
kitterz wrote:
lurc wrote:
Use threads instead of timers.


How will I make that work?

_________________
Gone
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Thu Aug 14, 2008 2:14 pm    Post subject: Reply with quote

GMZorita wrote:
Instead of a time you just use a thread
for the infinite loop use
Code:

HANDLE MYTHREAD;
void ihazaThread
{
for(;;)
{
//Timer code here
Sleep(TimerSleepTimehere);
}
}

To start / stop just use
Code:

Start:
MYTHREAD = CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)ihazaThread,NULL,NULL,NULL);

Stop:
TerminateThread(MYTHREAD,0);


dnsi0 wrote:
Im using 4 timers on 1 thread and my trainer works fine on maple.

Timers are a waste...
Don't use it, its lame.
Learn 2 use Threads and will be be a lot better for ya.


I know how to use threads >.>
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Thu Aug 14, 2008 9:49 pm    Post subject: Reply with quote

Use conditional checks inside a single thread for your options. You do not need 7 different timers / threads to handle options. You can use a single one to handle all of them.

You should only create a new thread for something that is absolutely needed to be by itself.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
pkedpker
Master Cheater
Reputation: 1

Joined: 11 Oct 2006
Posts: 412

PostPosted: Thu Aug 14, 2008 10:39 pm    Post subject: Reply with quote

simpliest way to make threads lol

Code:


  _beginthread(mapleBotThread,0,NULL);

void mapleBotThread(void* start_args)
{
    unsigned long myTimer = 0;
    while(1) {
         ...
        if(myTimer % ((1000/10)*5) == 0) {
           //5 seconds has passed.
         //okay lol i dont know math of 10th millisecond of a second but w\e just figure out what number works best for ya.
        }
        myTimer++;
        Sleep(10);
    }
}





yes 500 MS will make it lag lOL.. thats too much you know what sleep does? it stops the whole Theard.. if you wanted to use timers.. sleep it by 10 and make a counter that goes up to (10/1000)xVAR= to get second related timers.


opps forgot to say you need

Code:


#include <process.h>



for it to work

thread would close on its own when while loop is finished by break; or whatever means you got but it wouldn't hurt to add

Code:


    _endthread();



to kill it how its suppose to be killed
Back to top
View user's profile Send private message
Cx
Master Cheater
Reputation: 0

Joined: 27 Jul 2007
Posts: 367

PostPosted: Thu Aug 14, 2008 11:14 pm    Post subject: Reply with quote

Uh did someone seriously make CreateThread wrapper to fill a few parameters AND an ExitThread wrapper that does NOTHING ELSE?
_________________

armed with this small butterfly net
i will face the world alone
& never be lonely.
Back to top
View user's profile Send private message
Zand
Master Cheater
Reputation: 0

Joined: 21 Jul 2006
Posts: 424

PostPosted: Fri Aug 15, 2008 12:01 am    Post subject: Reply with quote

_beginthread is a valid function.
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Fri Aug 15, 2008 12:09 am    Post subject: Reply with quote

Cx wrote:
Uh did someone seriously make CreateThread wrapper to fill a few parameters AND an ExitThread wrapper that does NOTHING ELSE?


Its basically the CRT version that handles threads.
Although I still recommend using CreateThread/ExitThread

_________________
Back to top
View user's profile Send private message
rapion124
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Mar 2007
Posts: 1095

PostPosted: Fri Aug 15, 2008 7:34 pm    Post subject: Reply with quote

Cx wrote:
Uh did someone seriously make CreateThread wrapper to fill a few parameters AND an ExitThread wrapper that does NOTHING ELSE?


Blame it on M$ with their own C++ standards Rolling Eyes
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
Page 1 of 1

 
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