WarRock EU - Code Snippets

10/30/2011 18:24 _TradEmArk_ ™#5671
Quote:
Originally Posted by KingClem™ View Post
Ma wieder gelangweilt:
New ShowMenu function.

Code:
void D3DMenu::Show(CD3DFont *pFont,IDirect3DDevice9* pDevice)
 {
   int	i,val,cy;
   DWORD color;
   if (!visible) return;
 
   cy=y;
   if (title) {
	   pFont->DrawText((float)(x+totwidth/2), (float)cy+1,  col_title,title,D3DFONT_SHADOW|D3DFONT_CENTERED); //Drawing Title...You  can modify it too
	   cy+=titleheight;  }
   for (i=0; i<noitems; i++) {
	   if (MENU[i]->typ==MENUTEXT) {
		   pFont->DrawText((float)x, (float)cy, col_text,MENU[i]->txt,D3DFONT_SHADOW); //If Text draw without Box
		   if (MENU[i]->opt) {
			   pFont->DrawText((float)(x+ofs), (float)cy,  col_text,(char *)MENU[i]->opt, D3DFONT_RIGHT|D3DFONT_SHADOW);  //Drawing Text
		   }
	   } else  {//desc = MENU[cur]->description;
		   val=(MENU[i]->var)?(*MENU[i]->var):0;
		   // determine color
		   if (i==cur)
			  color=col_current; //Color = Current
		   else if (MENU[i]->typ==MENUGROUP)
			  color=col_group; //Color = Group Color
		   else if (MENU[i]->typ==MENUGROUP1)
			  color=(val)?col_on:col_off; //Color = col_on:col_off (Green:Red as Example)
		   else
			  color=(val)?col_on:col_off; //Color = col_on:col_off (Green:Red as Example)
		   
		   DrawBorderedBox(x,cy,10,10,D3DCOLOR_ARGB(255, 000, 000,  000),color,pDevice); //Drawing our Box before Menu Items (In Black and  in your choosen color)
		   pFont->DrawText((float)x+15, (float)cy,  col_item,MENU[i]->txt,D3DFONT_SHADOW); //New Calculation,Drawing Menu  Items
		   if (MENU[i]->opt) {
			   pFont->DrawText((float)(x+ofs), (float)cy, color,(char  *)MENU[i]->opt[val],D3DFONT_RIGHT|D3DFONT_SHADOW);  //Drawing on/off
		   }
	  }/*Original is made by Hans211,Modified by KingClem™*/
	  cy+=height;
   }
 }

New Drawbordered Function modified by KingClem™,Original from idk...


Code:
 HRESULT D3DMenu::DrawBorderedBox(int x, int y, int h, int w,DWORD color1, DWORD color2, LPDIRECT3DDEVICE9 pDevice)
 {
	 struct croner { D3DXVECTOR4 p; DWORD c; } cr[5];
 
	 // coord -0.5f prevents point filtering distorsions at the edges (smudging)
	 cr[0].p = D3DXVECTOR4(x+0-0.5f,y+h-0.5f,0.0f,1.0f); cr[0].c = color1;
	 cr[1].p = D3DXVECTOR4(x+0-0.5f,y+0-0.5f,0.0f,1.0f); cr[1].c = color1;
	 cr[2].p = D3DXVECTOR4(x+w-0.5f,y+h-0.5f,0.0f,1.0f); cr[2].c = color1;
	 cr[3].p = D3DXVECTOR4(x+w-0.5f,y+0-0.5f,0.0f,1.0f); cr[3].c = color1;
 
	 pDevice->SetTexture(0, NULL);
	 pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE);
	 pDevice->SetFVF(D3DFVF_XYZRHW | D3DFVF_DIFFUSE);
	 pDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP, 2, cr, sizeof(croner));
	 
	 // coord -0.5f prevents point filtering distorsions at the edges (smudging)
	 cr[0].p = D3DXVECTOR4(x+0-0.5f,y+h-0.5f,0.0f,3.0f); cr[0].c = color2;
 
	 cr[1].p = D3DXVECTOR4(x+0-0.5f,y+0-0.5f,0.0f,3.0f); cr[1].c = color2;
	 cr[2].p = D3DXVECTOR4(x+w-0.5f,y+0-0.5f,0.0f,3.0f); cr[2].c = color2;
	 cr[3].p = D3DXVECTOR4(x+w-0.5f,y+h-0.5f,0.0f,3.0f); cr[3].c = color2;
	 cr[4].p = D3DXVECTOR4(x+0-0.5f,y+h-0.5f,0.0f,3.0f); cr[4].c = color2;
 
	 pDevice->SetTexture(0, NULL);
	 pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
	 pDevice->SetFVF(D3DFVF_XYZRHW | D3DFVF_DIFFUSE);
	 pDevice->DrawPrimitiveUP(D3DPT_TRIANGLELIST, 3, cr, sizeof(croner));
 
	 return S_OK;
 }
It can look like this:

[Only registered and activated users can see links. Click Here To Register...]
Man kann screen ned sehen
10/30/2011 18:31 SubZerom|_#5672
Quote:
Originally Posted by _TradEmArk_ ™ View Post
Man kann screen ned sehen
Screen wird von AntiVirus blockiert xDD
10/30/2011 18:36 Dogukan47#5673
îch kann screen sehen^^
10/30/2011 18:40 Raz9r#5674
Quote:
Originally Posted by KingClem™ View Post
Ma wieder gelangweilt:
New ShowMenu function.

Code:
(...)
New Drawbordered Function modified by KingClem™,Original from idk...

Code:
(...)
Also bitte, das erste ist nur so minimal modifiziert, da kann man nur lachen, dass du das deswegen postest. Dafür gehen allenfalls Credits an Hans211.

Das Gleiche mit der zweiten Funktion - Die ist von Croner... und was hast du modifiziert? So gut wie nichts.
Eine richtig gute DrawBorderedRectangle Function braucht den PrimitiveType D3DPT_TRIANGLESTRIP, D3DPT_TRIANGLELIST oder D3DPT_LINELIST sowie maximal 8 Vertices und einmaliges Rendern.
10/30/2011 20:58 Waller66#5675
ist hier immer noch keine d3d base oben ? ich finde auf jedenfall keine .

wenn jemand eine gute hat , dann please pn mit dl
10/31/2011 08:26 Neqqa™#5676
schau mal hier

[Only registered and activated users can see links. Click Here To Register...]
10/31/2011 12:43 alexkyse#5677
#Suche

-RapidFire Memory
-NoReload Memory

Ty :P
10/31/2011 17:49 Waller66#5678
suche die addy von gm warning
10/31/2011 19:15 Mircoyee111#5679
#request auto start / ready
11/01/2011 12:25 Neqqa™#5680
Quote:
suche die addy von gm warning
==>[Only registered and activated users can see links. Click Here To Register...]

Quote:
#request auto start / ready
mein Code:
Code:
if(AutoStart == 1)
{
	if(dwPlayerPtr == 0)
	{
		SetCursorPos(450,90);
		Sleep(20);
		mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
		Sleep(20);
		mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
		Sleep(20);	
	}
}
11/01/2011 13:13 Kalle22933#5681
Suche die Positionen für Zombie Opk
Ich möchte die so nähe ammos haben wie Siro seins :D

Meine sind in mom:

/*Blind Bullet*/
ZombieOPKPosX = 3805.408936;
ZombieOPKPosY = 104.5786362;
ZombieOPKPosZ = 3798.268799;

/*Broken Sunset*/
ZombieOPKPosX = 3249.44751;
ZombieOPKPosY = 485.1827393;
ZombieOPKPosZ = 3052.904541;

/*Light House*/
ZombieOPKPosX = 3064.141113;
ZombieOPKPosY = -25.95392418;
ZombieOPKPosZ = 3055.297852;
11/01/2011 13:17 Neqqa™#5682
Quote:
Suche die Positionen für Zombie Opk
Ich möchte die so nähe ammos haben wie Siro seins
benutz doch einfach einen Position Logger dann kannst du die Positionen frei wählen...
11/01/2011 13:17 Kalle22933#5683
Quote:
Originally Posted by Neqqa™ View Post
benutz doch einfach einen Position Logger dann kannst du die Positionen frei wählen...
:facepalm: stimmt sry :p
11/01/2011 13:35 head12344#5684
Hat sich die NFD source verändert? Oder stimmt meine addy nicht?
Meine NFD addy: #define OFS_NFD 0x00102C8
11/01/2011 14:07 Angel-Piece#5685
Quote:
Originally Posted by Neqqa™ View Post
==>[Only registered and activated users can see links. Click Here To Register...]



mein Code:
Code:
if(AutoStart == 1)
{
	if(dwPlayerPtr == 0)
	{
		SetCursorPos(450,90);
		Sleep(20);
		mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
		Sleep(20);
		mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
		Sleep(20);	
	}
}
benutzt das das hier geht auf allen os:



Code:
	DWORD PlayerPointer = *(DWORD*)ADR_PLAYERPOINTER;
		DWORD ServerPointer = *(DWORD*)ADR_SERVERPOINTER;

		DWORD StartPointer = *(DWORD*)(0x000000);
 		DWORD GameStart = 0x000000;

		if(ServerPointer != 0)
		{	 
			if(cvar.PowerLevelRoomStart)
			{
				if(*(int*)(ServerPointer+0x11B7F8) == *(int*)(ServerPointer+0xFD158) || *(int*)((Basepointer + 0x0001C30)+(0x1CF8*(*(int*)(ServerPointer+0x11B7F8))))!=1)
				{
					if(StartPointer )
					{
						StartPointer = *(DWORD*)(StartPointer + 0xA4);
						if(StartPointer)
						{
							StartPointer = *(DWORD*)(StartPointer + 0x8E0);
							if(StartPointer )
							{
								Sleep(700);
								{	
									__asm
									{
										push StartPointer;
										call [GameStart];
									}
								}
							}
						}
					}
				}
			}
		}
oder machts so wenn ihr einen keyboard hook habt den ich auch irgend wo hier geposted habe:

Code:
PostMessage	(0, WM_KEYDOWN, VK_F5, GetLParam(VK_F5));