WarRock EU - Code Snippets

09/11/2011 10:48 Raz9r#5161
Quote:
Originally Posted by SK1LL0R.. View Post
nicht das ich wüsste xD

€: Laggfreies Plantany Thread :>)

Code:
void Thread()
{
for(;
{
DWORD Playerx = *(DWORD*)ADR_PLAYERPOINTER;
if(Playerx== 0) Sleep(20); 

if(Plantanywhere==0)Sleep(20);
if (Playerx != 0)
{

if(Plantanywhere == 1)
{
*(BYTE*) PLANTANYWHERE_MEM = 0x1;
}
}
}
}
bullshit ;>

Code:
//global
#define ADR_PLAYERPOINTER 0x00  /*address here*/
#define ADR_PLANTANYWHERE 0x00 /*address here*/
DWORD *g_pPlayer = (DWORD *)ADR_PLAYERPOINTER;
BYTE *g_pPlantAnywhere = (BYTE *)ADR_PLANTANYWHERE;

//thread
LPTHREAD_START_ROUTINE lptsrThread(__in void *lpvThreadHandle)
{
while(1)
{
*g_pPlayer ? *g_pPlantAnywhere = 1 : Sleep(100);
Sleep(20);
}
}

//creating the thread in dllmain
HANDLE hThread = CreateThread(0, 0, lptsrThread, 0, 0, 0);
09/11/2011 10:58 SK1LL0R..#5162
Quote:
Originally Posted by __underScore View Post
bullshit ;>

Code:
//global
#define ADR_PLAYERPOINTER 0x00  /*address here*/
#define ADR_PLANTANYWHERE 0x00 /*address here*/
DWORD *g_pPlayer = (DWORD *)ADR_PLAYERPOINTER;
BYTE *g_pPlantAnywhere = (BYTE *)ADR_PLANTANYWHERE;

//thread
LPTHREAD_START_ROUTINE lptsrThread(__in void *lpvThreadHandle)
{
while(1)
{
*g_pPlayer ? *g_pPlantAnywhere = 1 : Sleep(100);
Sleep(20);
}
}

//creating the thread in dllmain
HANDLE hThread = CreateThread(0, 0, lptsrThread, 0, 0, 0);
Geht auch ;)

if(WTH==0)
{
*(float*)0x817A3C = 0.1;
}
if(WTH==1)
{
*(float*)0x817A3C = 10;
}
WelcomeToHell
09/11/2011 11:56 Raz9r#5163
Quote:
Originally Posted by SK1LL0R.. View Post
Geht auch ;)
mein "bullshit ;>" hat sich eher darauf bezogen, dass der von dir "lag-frei" genannte thread absolut unoptimiert war. es ist immerhin unnötig, register zu verwenden, die nicht verwendet werden müssten - gerade, wenn man auf ressourcen achten will.

Code:
loc_start:
	mov eax, dword ptr ds:[ADR_PLAYERPOINTER]
	test eax, eax
	jz loc_notingame
	mov byte ptr ds:[ADR_PLANTANYWHERE], 1
	push 20
	call Sleep
	jmp loc_start
loc_notingame:
	push 100
	call Sleep
	jmp loc_start
09/12/2011 18:13 R3d~F!st#5164
Ich hab mich ein wenig an __underScore orientiert
und etwas ausprobiert hoffe es ist richtig
ich lerne gerade ASM

Code:
void ASMThread( void )
{
__asm
{
loc_playerthread:
mov eax, dword ptr ds:[ADR_PLAYERPOINTER]
test eax, eax
jz loc_callsleep
mov float ptr ds:[ADR_FASTAMMO],99
mov float ptr ds:[ADR_FASTHEALTH],99
mov float ptr ds:[ADR_FASTREPAIR],99
mov float ptr ds:[ADR_FASTFLAG],99
jz loc_callsleep2

loc_serverthread:
mov esi, dword ptr ds:[ADR_SERVERPOINTER]
test esi,esi
jz loc_callsleep2
mov int ptr ds:[esi + OFS_SLOT5], 1
push 10
call 10
jz loc_jumptoprone

loc_prone:
test dword ptr ds:[OFS_GAMEMODE], 1



push 30
call 30
mov int ptr ds:[ADR_MEMCQCPRONE], 1; not sure which operand CQCPRONE is 
jz loc_callsleep



loc_callsleep:
push 30
call 30
jmp loc_playerthread

loc_callsleep2:
push 50
call 50
jmp loc_serverthread

loc_jumptoprone:
push 25
call 25
jmp loc_prone
}
}
09/12/2011 18:30 Raz9r#5165
Ich kommentier mal einiges unlogisches in rot.

Quote:
Originally Posted by R3d~F!st View Post
Code:
void ASMThread( void )
{
__asm
{
loc_playerthread:
mov eax, dword ptr ds:[ADR_PLAYERPOINTER]
test eax, eax
jz loc_callsleep 
mov float ptr ds:[ADR_FASTAMMO],99
mov float ptr ds:[ADR_FASTHEALTH],99
mov float ptr ds:[ADR_FASTREPAIR],99
mov float ptr ds:[ADR_FASTFLAG],99
jz loc_callsleep2 [color=red]JUMP ZERO ohne bedingung?[/color]

loc_serverthread:
mov esi, dword ptr ds:[ADR_SERVERPOINTER][color=red]eher ecx / edx nutzen.[/color]
test esi,esi
jz loc_callsleep2
mov int ptr ds:[esi + OFS_SLOT5], 1[color=red]int ptr? byte = align 1, word = align 2, dword align 4...[/color]
push 10
call 10[color=red]du legst den wert 10 auf den stack, callst dann etwas fehlerhaftes an [0Ah] (error) und weil das kein stdcall ist, da fehlerhaft, fehlt pop um es vom stack runterzunehmen[/color]

[color=red]... usw... kein bock mehr alles zu kommentieren, 95% bullshit.[/color]

jz loc_jumptoprone

loc_prone:
test dword ptr ds:[OFS_GAMEMODE], 1



push 30
call 30
mov int ptr ds:[ADR_MEMCQCPRONE], 1; not sure which operand CQCPRONE is 
jz loc_callsleep



loc_callsleep:
push 30
call 30
jmp loc_playerthread

loc_callsleep2:
push 50
call 50
jmp loc_serverthread

loc_jumptoprone:
push 25
call 25
jmp loc_prone
}
}
vielleicht solltest du erstmal lernen, was die einzelnen befehle bewirken. asm ist keine sprache, die man spielend erlernen kann, wie etwa c oder c++.
int zum beispiel steht nicht für integer, sondern für interrupt. statt "int ptr" solltest du eher "dword ptr" verwenden. ein fehler, den du immer wieder machst. auch versuchst du, funktionen via adressen zu callen, die kleiner sind als möglich für funktionen. dementsprechend kannst du dir auch nicht sicher sein, dass diese funktionen die standard calling convention haben, bei der die funktion selbst den stack aufräumt.
du solltest dir auch überlegen, welche register schon verwendet werden, immerhin castest du den thread zu DWORD __stdcall (__in LPVOID). einhergehend mit der standard calling convention sind einige register benutzt.
09/12/2011 19:26 kerimo#5166
Suche nach Fast Ammo fast repair fast health source code aber bitte einen richtigen funzenden ;) Chams A chams B source.
09/13/2011 09:07 .Crasy#5167
Quote:
Originally Posted by __underScore View Post
bullshit ;>

Code:
//global
#define ADR_PLAYERPOINTER 0x00  /*address here*/
#define ADR_PLANTANYWHERE 0x00 /*address here*/
DWORD *g_pPlayer = (DWORD *)ADR_PLAYERPOINTER;
BYTE *g_pPlantAnywhere = (BYTE *)ADR_PLANTANYWHERE;

//thread
LPTHREAD_START_ROUTINE lptsrThread(__in void *lpvThreadHandle)
{
while(1)
{
*g_pPlayer ? *g_pPlantAnywhere = 1 : Sleep(100);
Sleep(20);
}
}

//creating the thread in dllmain
HANDLE hThread = CreateThread(0, 0, lptsrThread, 0, 0, 0);
Was denn das für ein Dreck?..

Eine eine geöffnete While die immer und immer wieder läuft sprich eine nicht endende schleife, die jedes mal dirn Sleep von 100 Ms oder 20 Ms gibt beides Crap.

Und das soll Lagg frei sein? rofl wenn du praktisch 1000000x 100 MS Sleep hast, da net alle die Crap Funktion nutzen.

Wenn ich das so mach, wird das dadurch ausgelöst:

Sobald man Player ist sprich InGame wird Plantany = 1 wenn nicht bekom ich x mal 100 MS Sleep sprich wenn ich ein Game suche, dazu kommt, das immer 20 MS Sleep bekome, n1 code muss ich dir sagen ..
09/13/2011 14:41 .Karakan™#5168
Code:
switch (MC_QuickPlant){
case 0: MemEditing((void*)(ASM_QUICKPLANT),(PBYTE)"\x7D\x16",2); break;
case 1: MemEditing((void*)(ASM_QUICKPLANT),(PBYTE)"\xEB\x34",2); break;}
// Off/On Bytes Searched by Me (Source by me)
Code:
#define ASM_QUICKPLANT	 0x004D30A7

// ADDY by Alexkyse
Ich weiß nicht ob die Addy funktioniert, ist nicht von mir.
09/13/2011 18:06 Raz9r#5169
Quote:
Originally Posted by .Crasy View Post
Was denn das für ein Dreck?..

Eine eine geöffnete While die immer und immer wieder läuft sprich eine nicht endende schleife, die jedes mal dirn Sleep von 100 Ms oder 20 Ms gibt beides Crap.

Und das soll Lagg frei sein? rofl wenn du praktisch 1000000x 100 MS Sleep hast, da net alle die Crap Funktion nutzen.

Wenn ich das so mach, wird das dadurch ausgelöst:

Sobald man Player ist sprich InGame wird Plantany = 1 wenn nicht bekom ich x mal 100 MS Sleep sprich wenn ich ein Game suche, dazu kommt, das immer 20 MS Sleep bekome, n1 code muss ich dir sagen ..
es macht im asm code zeilentechnisch keinen unterschied, ob du

*g_pPlayer ? /* do something */ : Sleep(20);
Sleep(100);

oder

if(*g_pPlayer)
/* do something */
Sleep(*g_pPlayer ? 20 : 120);

verwendest.
auch die else abfrage würde nur einen weiteres label verwenden und ist damit also noch aufwendiger.
09/13/2011 19:11 arbarwings#5170
Do an need a bypass for chams ?
I have add chams in my menu, and it isn't working :(
09/13/2011 19:14 Dogukan47#5171
lol ein bypass is wieder public mal gucken wann er gepostet wird :P
09/14/2011 06:51 arbarwings#5172
Is that a yes or no one?
Can anyone help me?
09/14/2011 07:12 Dogukan47#5173
^no u dont need a bypass for chams
09/14/2011 07:21 _TradEmArk_:)#5174
^doch, sonst crasht es
09/14/2011 07:39 arbarwings#5175
Can you share a chams tut ? or help my with teamviewer ?
I understand German, but speaking is difficult.
Ich komme aus die Niederlanden