| View previous topic :: View next topic |
| Author |
Message |
kitterz Grandmaster Cheater Supreme
Reputation: 0
Joined: 24 Dec 2007 Posts: 1268
|
Posted: Thu Aug 14, 2008 1:51 pm Post subject: DLL Laggin Game |
|
|
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 |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Thu Aug 14, 2008 1:54 pm Post subject: |
|
|
Use threads instead of timers.
_________________
|
|
| Back to top |
|
 |
kitterz Grandmaster Cheater Supreme
Reputation: 0
Joined: 24 Dec 2007 Posts: 1268
|
Posted: Thu Aug 14, 2008 2:06 pm Post subject: |
|
|
| lurc wrote: | | Use threads instead of timers. |
How will I make that work?
|
|
| Back to top |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Thu Aug 14, 2008 2:09 pm Post subject: |
|
|
| Im using 4 timers on 1 thread and my trainer works fine on maple.
|
|
| Back to top |
|
 |
GMZorita Grandmaster Cheater Supreme
Reputation: 0
Joined: 21 Mar 2007 Posts: 1361
|
Posted: Thu Aug 14, 2008 2:09 pm Post subject: |
|
|
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 |
|
 |
kitterz Grandmaster Cheater Supreme
Reputation: 0
Joined: 24 Dec 2007 Posts: 1268
|
Posted: Thu Aug 14, 2008 2:11 pm Post subject: |
|
|
| 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
|
|
| Back to top |
|
 |
GMZorita Grandmaster Cheater Supreme
Reputation: 0
Joined: 21 Mar 2007 Posts: 1361
|
Posted: Thu Aug 14, 2008 2:13 pm Post subject: |
|
|
| 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 |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Thu Aug 14, 2008 2:14 pm Post subject: |
|
|
| 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 |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Thu Aug 14, 2008 9:49 pm Post subject: |
|
|
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 |
|
 |
pkedpker Master Cheater
Reputation: 1
Joined: 11 Oct 2006 Posts: 412
|
Posted: Thu Aug 14, 2008 10:39 pm Post subject: |
|
|
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
to kill it how its suppose to be killed
|
|
| Back to top |
|
 |
Cx Master Cheater
Reputation: 0
Joined: 27 Jul 2007 Posts: 367
|
Posted: Thu Aug 14, 2008 11:14 pm Post subject: |
|
|
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 |
|
 |
Zand Master Cheater
Reputation: 0
Joined: 21 Jul 2006 Posts: 424
|
Posted: Fri Aug 15, 2008 12:01 am Post subject: |
|
|
| _beginthread is a valid function.
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Fri Aug 15, 2008 12:09 am Post subject: |
|
|
| 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 |
|
 |
rapion124 Grandmaster Cheater Supreme
Reputation: 0
Joined: 25 Mar 2007 Posts: 1095
|
Posted: Fri Aug 15, 2008 7:34 pm Post subject: |
|
|
| 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
|
|
| Back to top |
|
 |
|