'서든어택dll'에 해당되는 글 2건
- 2020.04.11 :: [서든어택] 오토핫키 소스 1
- 2020.04.10 :: [서든어택] 월H 소스 (C++)
SetKeyDelay,-1, 8
SetControlDelay, -1
SetMouseDelay, -1
SetWinDelay,-1
SendMode, InputThenPlay
SetBatchLines,-1
ListLines, Off
CoordMode, Pixel, Screen, RGB
CoordMode, Mouse, Screen
PID := DllCall("GetCurrentProcessId")
Process, Priority, %PID%, NormalGui ,Color, A4A4A4
Gui, Font, Bold cBlack, Arial
Gui, Font, Bold cBlack, Arial
Gui, Add, GroupBox, x12 y129 w240 h120 , 인식범위 조절
Gui, Font, Bold cBlack, Arial
Gui, Add, GroupBox, x12 y259 w240 h70 , 떨림보정
Gui, Add, GroupBox, x12 y9 w240 h120 , 해상도
Gui, Font, Bold, Arial
Gui, Font, s10 Bold cBlack, Arial
Gui, Font, s8 Bold cBlack, Arial
Gui, Add, Slider, x22 y279 w170 h40 center altsubmit range1-20 gloop vlpcou, %lpcou%
Gui, Font, s15 Bold c0x000000, Arial
Gui, Add, Text, x202 y289 w40 h20 vloopcou +0x200, %lpcou%
Gui, Font, s8 Bold cBlack, Arial
Gui, Font, Bold Underline cRed, Arial
Gui, Add, CheckBox, x272 y189 w70 h20 vta1, 팀구분
Gui, Add, CheckBox, x342 y189 w70 h20 vta2, 일반
Gui, Font, Bold Underline cblue, Arial
Gui, Add, CheckBox, x412 y189 w70 h20 vta3, A T
Gui, Font, Bold, Arial
Gui, Add, GroupBox, x262 y9 w230 h70 ,67
Gui, Add, Slider, x272 y29 w160 h40 center altsubmit range0-120 g슬라이더 v오차범위, %오차범위%
Gui, Font, s15 Bold c0x000000, Arial
Gui, Add, Text, x442 y29 w40 h40 v오차범위숫자 +0x200, %오차범위%
Gui, Font, Bold혻c0x000000, Arial
Gui, Add, GroupBox, x262 y79 w230 h80 , 배속
Gui, Add, Text, x642 y149 w190 h30 , Recommend value 15~20
Gui, Add, Slider, x272 y109 w160 h40 center altsubmit range1-30 gAMS vAimcount, %aimcount%
Gui, Font, s15 Bold c0x000000, Arial
Gui, Add, Text, x442 y109 w40 h40 vAimsc +0x200, %aimcount%
Gui, Font, s8 Bold, Tahoma
Gui, Add, Button, x262 y289 w50 h40 gSave1, Save1
Gui, Add, Button, x322 y289 w50 h40 gLoad1, Load1
Gui, Font, s10 Bold cblack, Arial
Gui, Add, Text, x22 y159 w40 h20 , 좌 우
Gui, Add, Text, x22 y209 w40 h20 , 상 하
Gui, Add, Text, x22 y39 w10 h20 , X
Gui, Add, Text, x22 y89 w10 h20 , Y
Gui, Add, Slider, x72 y149 w120 h40 center altsubmit range1-200 gscanX vFoX, %fox%
Gui, Add, Slider, x72 y199 w120 h40 center altsubmit range1-200 gscanY vFoY, %foy%
Gui, Add, Slider, x42 y29 w150 h40 center altsubmit range394-510 gaxisXX vaxisX, %axisX%
Gui, Add, Slider, x42 y79 w150 h40 center altsubmit range296-395 gaxisYY vaxisY, %axisY%
Gui, Font, s15 Bold c0x000000, Arial
Gui, Add, Text, x202 y39 w30 h20 vaxisXcou +0x200, %axisX%
Gui, Add, Text, x202 y89 w30 h20 vaxisYcou +0x200, %axisY%
Gui, Add, Text, x202 y159 w30 h20 vScanXcou +0x200, %FoX%
Gui, Add, Text, x202 y209 w30 h20 vScanYcou +0x200, %FoY%
Gui, Font, S8 CDefault, Verdana
Gui, Add, CheckBox, x272 y219 w80 h20 vLc gMouseMoves, LeftClick
Gui, Add, CheckBox, x362 y219 w90 h20 VRc gMouseMoves, RightClick
Gui, Font, S8 CRed Bold, Verdana
Gui, Add, Button, x382 y289 w50 h40 , Save2
Gui, Add, Button, x442 y289 w50 h40 , Load2
Gui, Font, S8 CGreen, Verdana
Gui, Add, Text, x282 y249 w190 h20 , 엘자와 쀼까
Gui, Font, S9 CGreen, Verdana
Gui, Font, S10 CGreen, Verdana
Gui, Font, S12 CGreen, Verdana
Gui, Font, S12 CGreen, Arial
Gui, Font, S12 CGreen Bold, Arial
Gui, Font, S12 CGreen Bold, Arial
Gui, Add, GroupBox, x262 y159 w230 h120 , 모 드
Gui, Show, x259 y242 h343 w508, YouTube
Gui, color, A4A4A4
gui,3:color, A4A4A4
suspend,off
ON = 0
ON2 = 0
Loop
{
ZeroX :=axisX
ZeroY :=axisY
ZeroX2 :=axisX
ZeroY2 :=axisY
XFoV := FoX
Yfov := FoY
ScanL := ZeroX-XFoV
ScanR :=ZeroX+Xfov
ScanT := ZeroY-Yfov
ScanB := ZeroY+Yfov
ScanL2 := ZeroX2-15
ScanR2 := ZeroX2+15
ScanT2 := ZeroY2-15
ScanB2 := ZeroY2+15
guicontrolget,foy
guicontrolget,fox
guicontrolget,axisX
guicontrolget,axisY
GetKeyState, Operate,%op%
GuiControlGet, Lc,,Lc
if Lc = 1
{
GetKeyState, Mouse_1, Lbutton, P
GuiControlGet, ta2,,ta2
if ta2 = 1
{
if Mouse_1 = D
{
PixelSearch, AimPixelX, AimPixelY, ScanL, ScanT, ScanR, ScanB, 0xFF00DD, %오차범위%, Fast RGB
if errorlevel = 0
{
GoSub GetAimOffset
GoSub GetAimMoves
GoSub MouseMoves
GoSub SleepF
loop
{
PixelSearch, AimPixelX, AimPixelY, ScanL2, ScanT2, ScanR2, ScanB2, 0x720072, %오차범위%, Fast RGB
if errorlevel = 0
{
GoSub GetAimOffset
GoSub GetAimMoves
GoSub MouseMoves
GoSub SleepF
}
else
{
break
}
}
}
}
}
}
GuiControlGet, Rc,,Rc
if Rc = 1
{
GetKeyState, Mouse_1, Rbutton, P
GuiControlGet, ta2,,ta2
if ta2 = 1
{
if Mouse_1 = D
{
PixelSearch, AimPixelX, AimPixelY, ScanL, ScanT, ScanR, ScanB, 0xFF00DD, %오차범위%, Fast RGB
if errorlevel = 0
{
GoSub GetAimOffset
GoSub GetAimMoves
GoSub MouseMoves
GoSub SleepF
loop
{
PixelSearch, AimPixelX, AimPixelY, ScanL2, ScanT2, ScanR2, ScanB2, 0x720072, %오차범위%, Fast RGB
if errorlevel = 0
{
GoSub GetAimOffset
GoSub GetAimMoves
GoSub MouseMoves
GoSub SleepF
}
else
{
break
}
}
}
}
}
}
GuiControlGet, ta3,,ta3
if ta3 = 1
{
if Mouse_1 = D
{
PixelSearch, AimPixelX, AimPixelY, ScanL, ScanT, ScanR, ScanB, 0x720072, %오차범위%, Fast RGB
if errorlevel = 0
{
GoSub GetAimOffset
GoSub GetAimMoves
GoSub MouseMoves
MouseClick, left
GoSub SleepF
}
}
}
GuiControlGet, ta1,,ta1
if ta1 = 1
{
if Mouse_1 = D
{
PixelSearch, AimPixelX, AimPixelY, ScanL, ScanT, ScanR, ScanB, 0xFF0000, 10, Fast RGB
if errorlevel = 0
{
PixelSearch, AimPixelX, AimPixelY, ScanL, ScanT, ScanR, ScanB, 0xFF00DD, %오차범위%, Fast RGB
if errorlevel = 0
{
GoSub GetAimOffset2
GoSub GetAimMoves
GoSub MouseMoves
loop
{
PixelSearch, AimPixelX, AimPixelY, ScanL2, ScanT2, ScanR2, ScanB2, 0x720072, %오차범위%, Fast RGB
if errorlevel = 0
{
GoSub GetAimOffset2
GoSub GetAimMoves
GoSub MouseMoves
GoSub SleepF
}
else
{
break
}
}
}
else errorlevel = 1
{
GoSub sleepF
}
}
}
}
}
Search:
{
PixelSearch, AimPixelX, AimPixelY, ScanL, ScanT, ScanR, ScanB, 0x720072, %오차범위%, Fast RGB
if errorlevel = 0
{
GoSub GetAimOffset
GoSub GetAimMoves
GoSub MouseMoves
GoSub SleepF
}
}
GetAimOffset:
AimX := AimPixelX - ZeroX
AimY := AimPixelY - ZeroY
If ( AimX > 1 ) {
DirX := 0.8
}
If ( AimX < 1 ) {
DirX := -0.8
}
If ( AimY > 1 ) {
DirY := 0.8
}
If ( AimY < 1 ) {
DirY := -0.8
}
AimOffsetX := AimX * DirX
AimOffsetY := AimY * DirY
Return
GetAimOffset2:
AimX := AimPixelX - ZeroX
AimY := AimPixelY - ZeroY
If ( AimX > 1 ) {
DirX := 0.98
}
If ( AimX < 1 ) {
DirX := -0.98
}
If ( AimY > 1 ) {
DirY := 0.98
}
If ( AimY < 1 ) {
DirY := -0.98
}
AimOffsetX := AimX * DirX
AimOffsetY := AimY * DirY
Return
GetAimMoves:
Fx =7
Zx=%Aimcount%
AimA:=Fx/Zx
RootX := Ceil(( AimOffsetX ** (AimA)))
RootY := Ceil(( AimOffsetY ** (AimA)))
MoveX := RootX * DirX
MoveY := RootY * DirY
return
MouseMoves:
If (Mouse_1 == "D" ){
DllCall("mouse_event", uint, 1, int, MoveX, int, MoveY, uint, 0, int, 0)
}
Return
SleepF:
SleepDuration = 6
TimePeriod = 1
DllCall("Winmm\timeBeginPeriod", uint, TimePeriod)
Iterations =%lpcou%
StartTime := A_TickCount
Loop, %Iterations% {
DllCall("Sleep", UInt, TimePeriod)
}
DllCall("Winmm\timeEndPeriod", UInt, TimePeriod)
Return
DebugTool:
ToolTip, %MoveX% | %MoveY% || %MX% %MY%
Return
f1::
ON = 1
splashimage 1:,B c1 X1 Y1 W240 H45 CW000000 CTFF5A5A Fs25 ws800, ON
sleep,1000
splashimage, 1: off
return
f2::
ON = 0
splashimage 1:,B c1 X1 Y1 W240 H45 CW000000 CTA748FF Fs25 ws1000, OFF
sleep,1000
splashimage, 1: off
return
3guiclose:
gui,3: Destroy
suspend,off
return
save1:
Gui,submit,nohide
IniWrite,%오차범위%,setting1.ini,Error range,Error range
IniWrite,%Aimcount%,setting1.ini,AimMoveSpeed,AimMoveSpeed
IniWrite,%FoX%,setting1.ini,ScanX,ScanX
IniWrite,%FoY%,setting1.ini,ScanY,ScanY
IniWrite,%Lpcou%,setting1.ini,Lpcount,Lpcount
IniWrite,%axisX%,setting1.ini,axisX,axisX
IniWrite,%axisY%,setting1.ini,axisY,axisY
Msgbox, 64 , 알림,Error Range"%오차범위%" , AMS"%Aimcount%" Scan Range XY"%FoX%,%FoY%", Iteration"%Lpcou%"
return
save2:
Gui,submit,nohide
IniWrite,%오차범위%, setting2.ini,Error range,Error range
IniWrite,%Aimcount%, setting2.ini,AimMoveSpeed,AimMoveSpeed
IniWrite,%FoX%, setting2.ini,ScanX,ScanX
IniWrite,%FoY%, setting2.ini,ScanY,ScanY
IniWrite,%Lpcou%, setting2.ini,Lpcount,Lpcount
IniWrite,%axisX%, setting2.ini,axisX,axisX
IniWrite,%axisY%, setting2.ini,axisY,axisY
Msgbox, 64 , 알림,Error Range"%오차범위%" , AMS"%Aimcount%" Scan Range XY"%FoX%,%FoY%", Iteration"%Lpcou%"
return
load1:
{
ifexist, %A_scriptDir%\setting1.ini
{
Gui,submit,nohide
IniRead,오차범위,setting1.ini,Error range,Error range
IniRead,Aimcount,setting1.ini,AimMoveSpeed,AimMoveSpeed
IniRead,FoX,setting1.ini,ScanX,ScanX
IniRead,foY,setting1.ini,FOVX,FOVX
IniRead,foy,setting1.ini,ScanY,ScanY
IniRead,Lpcou,setting1.ini,Lpcount,Lpcount
IniRead,axisX,setting1.ini,axisX,axisX
IniRead,axisY,setting1.ini,axisY,axisY
Guicontrol,,오차범위,%오차범위%
Guicontrol,,오차범위숫자,%오차범위%
Guicontrol,,Aimcount,%Aimcount%
guicontrol,,Aimsc,%Aimcount%
Guicontrol,,FoX,%FoX%
guicontrol,,ScanXcou,%FoX%
Guicontrol,,FoY,%FoY%
guicontrol,,ScanYcou,%FoY%
Guicontrol,,Lpcou,%Lpcou%
guicontrol,,LoopCou,%Lpcou%
Guicontrol,,axisX,%axisX%
Guicontrol,,axisY,%axisY%
Guicontrol,,axisXcou,%axisX%
Guicontrol,,axisYcou,%axisY%
msgbox, 64,알림,Open Setting1.ini
return
}
else
{
MsgBox, 16,Caution ini read fail,설정 값을 새로 저장해 주시기 바랍니다.
}
}
return
load2:
{
ifexist, %A_scriptDir%\setting2.ini
{
Gui,submit,nohide
IniRead,오차범위,setting2.ini,Error range,Error range
IniRead,Aimcount,setting2.ini,AimMoveSpeed,AimMoveSpeed
IniRead,FoX,setting2.ini,ScanX,ScanX
IniRead,foY,setting2.ini,FOVX,FOVX
IniRead,foy,setting2.ini,ScanY,ScanY
IniRead,Lpcou,setting2.ini,Lpcount,Lpcount
IniRead,axisX,setting2.ini,axisX,axisX
IniRead,axisY,setting2.ini,axisY,axisY
Guicontrol,,오차범위,%오차범위%
Guicontrol,,오차범위숫자,%오차범위%
Guicontrol,,Aimcount,%Aimcount%
guicontrol,,Aimsc,%Aimcount%
Guicontrol,,FoX,%FoX%
guicontrol,,ScanXcou,%FoX%
Guicontrol,,FoY,%FoY%
guicontrol,,ScanYcou,%FoY%
Guicontrol,,Lpcou,%Lpcou%
guicontrol,,LoopCou,%Lpcou%
Guicontrol,,axisX,%axisX%
Guicontrol,,axisY,%axisY%
Guicontrol,,axisXcou,%axisX%
Guicontrol,,axisYcou,%axisY%
msgbox, 64,알림,Open Setting2.ini
return
}
else
{
MsgBox, 16,Caution ini read fail,설정 값을 새로 저장해 주시기 바랍니다.
}
}
return
return
슬라이더:
gui, submit,nohide
guicontrol,,오차범위숫자,%오차범위%
return
AMS:
gui, submit,nohide
guicontrol,,Aimsc,%Aimcount%
return
ScanX:
gui, submit,nohide
guicontrol,,ScanXcou,%FoX%
return
ScanY:
gui, submit,nohide
guicontrol,,ScanYcou,%FoY%
return
Loop:
gui, submit,nohide
guicontrol,,LoopCou,%Lpcou%
return
axisXX:
gui, submit,nohide
guicontrol,,axisXcou,%axisX%
return
axisYY:
gui, submit,nohide
guicontrol,,axisYcou,%axisY%
return
return
GetOut:
GuiClose:
Gui, Hide
ExitApp
exitapp
'게임 코드 자료실' 카테고리의 다른 글
[서든어택] 오토샷 소스 (2) | 2020.04.11 |
---|---|
[오버워치] 매크로 소스 (2019Ver) (0) | 2020.04.11 |
[서든어택] 쉘값&H코드값 (자료코드) (2) | 2020.04.11 |
[서든어택] 월H 소스 (C++) (0) | 2020.04.10 |
#include <windows.h>
#include <detours.h>
#include <d3d8.h>
#include <d3dx8.h>
#include "log.h"
#include <fstream>
#include <iostream>
#pragma comment(lib, "d3dx8.lib")
#pragma comment(lib, "d3d8.lib")
using namespace std;
static DWORD dwBeginScene = 0x6D9D9250;
static DWORD dwEndScene = 0x6d9d93a0;
static DWORD dwDrawIndexedPrimitive = 0x6d9d73a0;
static DWORD dwSetStreamSource = 0x6d9d6760;
static DWORD dwSetViewport = 0x6d9d5b90 ;
int m_Stride;
int texnum;
int nNumVertices;
int nPrimitiveCount;
LPDIRECT3DTEXTURE8 Red,Yellow,Green,Blue,Purple,Pink,Orange;
bool Color = true;
bool Logger = false;
ofstream ofile;
char dlldir[320];
float ScreenCenterX = 0.0f;
float ScreenCenterY = 0.0f;
bool xhair = false;
bool WallHack = false;
bool WallHack2 = false;
HANDLE hand1 =NULL;
HANDLE hand2 =NULL;
DWORD bytes;
//Logger
int texarray[1000];
int arraycounter;
int delarray[500];
int dcount;
unsigned int arrc;
int i=0;
D3DCOLOR redt = D3DCOLOR_XRGB( 255, 0, 0 );
char *GetDirectoryFile(char *filename)
{
static char path[320];
strcpy(path, dlldir);
strcat(path, filename);
return path;
}
void __cdecl add_log (const char *fmt, ...)
{
if(ofile != NULL)
{
if(!fmt) { return; }
va_list va_alist;
char logbuf[256] = {0};
va_start (va_alist, fmt);
_vsnprintf (logbuf+strlen(logbuf), sizeof(logbuf) - strlen(logbuf), fmt, va_alist);
va_end (va_alist);
ofile << logbuf << endl;
}
}
HRESULT GenerateTexture(IDirect3DDevice8 *pD3Ddev, IDirect3DTexture8 **ppD3Dtex, DWORD colour32)
{
if( FAILED(pD3Ddev->CreateTexture(8, 8, 1, 0, D3DFMT_A4R4G4B4, D3DPOOL_MANAGED, ppD3Dtex)) )
return E_FAIL;
WORD colour16 = ((WORD)((colour32>>28)&0xF)<<12)
|(WORD)(((colour32>>20)&0xF)<<8)
|(WORD)(((colour32>>12)&0xF)<<4)
|(WORD)(((colour32>>4)&0xF)<<0);
D3DLOCKED_RECT d3dlr;
(*ppD3Dtex)->LockRect(0, &d3dlr, 0, 0);
WORD *pDst16 = (WORD*)d3dlr.pBits;
for(int xy=0; xy < 8*8; xy++)
*pDst16++ = colour16;
(*ppD3Dtex)->UnlockRect(0);
return S_OK;
}
//=================================EndScene_Start=================================================================================//
typedef HRESULT ( WINAPI* oEndScene ) ( LPDIRECT3DDEVICE8 pDevice );
oEndScene pEndScene;
HRESULT WINAPI myEndScene(LPDIRECT3DDEVICE8 pDevice)
{
if(Color)
{
GenerateTexture(pDevice, &Red, D3DCOLOR_ARGB (255 , 255 , 0 , 0 ));
GenerateTexture(pDevice, &Yellow, D3DCOLOR_ARGB (255 , 255 , 255 , 0 ));
GenerateTexture(pDevice, &Green, D3DCOLOR_ARGB (255 , 0 , 255 , 0 ));
GenerateTexture(pDevice, &Blue, D3DCOLOR_ARGB (255 , 0 , 0 , 255 ));
GenerateTexture(pDevice, &Purple, D3DCOLOR_ARGB (255 , 102 , 0 , 153 ));
GenerateTexture(pDevice, &Pink, D3DCOLOR_ARGB (255 , 255 , 20 , 147 ));
GenerateTexture(pDevice, &Orange, D3DCOLOR_ARGB (255 , 255 , 165 , 0 ));
Color=false;
}
if(xhair)
{
D3DRECT rec2 = {ScreenCenterX-20, ScreenCenterY, ScreenCenterX+ 20, ScreenCenterY+2};
D3DRECT rec3 = {ScreenCenterX, ScreenCenterY-20, ScreenCenterX+ 2,ScreenCenterY+20};
pDevice->Clear(1, &rec2, D3DCLEAR_TARGET,redt, 0, 0);
pDevice->Clear(1, &rec3, D3DCLEAR_TARGET,redt, 0, 0);
}
//=============================================UnHooK_Start===================================================//
if((GetAsyncKeyState(VK_F5)&1))
{
int end =NULL;
int dip =NULL;
int svp =NULL;
int sss =NULL;
BYTE Unhook[5] = {0x8B,0xFF,0x55,0x8B,0xEC};//Original Function Bytes.
hand1 = GetCurrentProcess();
DWORD dwmodualBase=(DWORD)GetModuleHandle("d3d8.dll");
end = 0x6d9d93a0;
dip = 0x6d9d73a0;
svp = 0x6d9d5b90;
sss = 0x6d9d6760;
WriteProcessMemory(hand1, (void*) end, Unhook, 5, &bytes);
WriteProcessMemory(hand1, (void*) dip, Unhook, 5, &bytes);
WriteProcessMemory(hand1, (void*) svp ,Unhook, 5, &bytes);
WriteProcessMemory(hand1, (void*) sss,Unhook, 5, &bytes);
}
//=========================================UnHook_End=========================================================//
if((GetAsyncKeyState(VK_F1)&1)){xhair=!xhair;}
if((GetAsyncKeyState(VK_F2)&1)){WallHack=!WallHack;}
return pEndScene(pDevice);
}
//====================================EndScene_End============================================================================//
//=================================Dip_Start============================================================================================//
typedef HRESULT ( WINAPI* oDrawIndexedPrimitive ) ( LPDIRECT3DDEVICE8 pDevice, D3DPRIMITIVETYPE pType, UINT nMinIndex, UINT nNumVertices, UINT nStartIndex, UINT nPrimitiveCount );
oDrawIndexedPrimitive pDrawIndexedPrimitive;
HRESULT WINAPI myDrawIndexedPrimitive(LPDIRECT3DDEVICE8 pDevice, D3DPRIMITIVETYPE pType, UINT nMinIndex, UINT nNumVertices, UINT nStartIndex, UINT nPrimitiveCount)
{
if(WallHack)
{
texnum = (nNumVertices*100000)+nPrimitiveCount;
if(m_Stride==40 &&
(texnum==7500121 )||(texnum==8500105 )||(texnum==12400168)||(texnum==37000650)||
(texnum==18000274)||(texnum==8800105 )||(texnum==36900650)||(texnum==19600314)||
(texnum==21800306)||(texnum==7500121 )||(texnum==8500105 )||(texnum==12400168)||
(texnum==21800306)||(texnum==36900650)||(texnum==7500121 )||(texnum==37000650)||
(texnum==18000274)||(texnum==7500121 )||(texnum==8500105 )||(texnum==38000658)||
(texnum==22100268)||(texnum==62400752)||(texnum==27900456)||(texnum==45700654)||
(texnum==4800040 )||(texnum==83600752)||(texnum==33400477)||(texnum==38100666)||
(texnum==2800036 )||(texnum==62400752)||(texnum==29700492)||(texnum==84900778)||
(texnum==27500442)||(texnum==52100658)||(texnum==62400752)||(texnum==33600552)||
(texnum==44100646)||(texnum==18000274)||(texnum==37200508)||(texnum==45700654)||
(texnum==37200508)||(texnum==52100658)||(texnum==52100658) &&
(nNumVertices == 100 && nPrimitiveCount == 121) || //Foot
(nNumVertices == 105 && nPrimitiveCount == 168) || //Right Arm
(nNumVertices == 132 && nPrimitiveCount == 180) || //Hand
(nNumVertices == 159 && nPrimitiveCount == 200) || //Left Arm
(nNumVertices == 338 && nPrimitiveCount == 534) || //Underbody thanks japennese guy =)
//(nNumVertices == 448 && nPrimitiveCount == 776) || //Head
(nNumVertices == 804 && nPrimitiveCount == 1016) || //Body //SRG Option item
(nNumVertices == 109 && nPrimitiveCount == 110) || //Bulletproof Vest
(nNumVertices == 336 && nPrimitiveCount == 532)) //Battle Pants
{
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
pDevice->SetTexture(0,Orange);
//pDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME );
pDrawIndexedPrimitive(pDevice, pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);
//pDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_SOLID );
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
pDevice->SetTexture(0,Pink);
}
if(m_Stride==40 && texnum== 21300174)
{
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
pDevice->SetTexture(0,Green);//GreenNade
pDrawIndexedPrimitive(pDevice, pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
pDevice->SetTexture(0,Purple);
}
if(nNumVertices == 158 && nPrimitiveCount == 131)
{
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
pDevice->SetTexture(0,Red);//GreenNade
pDrawIndexedPrimitive(pDevice, pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
pDevice->SetTexture(0,Yellow);
}
if (nNumVertices == 171 && nPrimitiveCount == 143)
{
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
pDevice->SetTexture(0,Red);//GreenNade
pDrawIndexedPrimitive(pDevice, pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
pDevice->SetTexture(0,Yellow);
}
if(m_Stride==40 &&//face,mask etc...
(texnum==36700612) ||
(texnum==9600172 ) ||
(texnum==14200236) ||
(texnum==37800552) ||
(texnum==28100486) ||
(texnum==35500568) ||
(texnum==2200024 ) ||
(texnum==16200243) ||
(texnum==31900466) ||
(texnum==19300342) ||
(texnum==36200604) ||
(texnum==21300290) ||
(texnum==35700558) ||
(texnum==22100396) ||
(texnum==36100604) ||
(texnum==27100464) ||
(texnum==11400180) ||
(texnum==34900580) ||
(texnum==13200212) ||
(texnum==34700538) ||
(texnum==19500352)&&
(nNumVertices == 448 && nPrimitiveCount == 776))
{
pDevice->SetTexture(0,Blue);
}
{
pDevice->SetRenderState(D3DRS_FOGENABLE,false);
}
/*Logger
if(m_Stride==40){
while(GetAsyncKeyState(VK_NUMPAD1)&1) arrc--; //Used as manual index for adding textures to delarray
while(GetAsyncKeyState(VK_NUMPAD3)&1) arrc++;
bool alrdy=false;
bool inarr=false;
if(texarray[arrc]==texnum)
if(delarray[i]==texarray[arrc])
alrdy=true;
for(int i=0;i<dcount;i++) //sees if said texture is in delarray
if(delarray[i]==texnum)
inarr=true;
if(texarray[arrc]==texnum || inarr){ //If true, color model differently
LPDIRECT3DTEXTURE8 texCol;
DWORD dwOldZEnable = D3DZB_TRUE;
pDevice->SetTexture(0, NULL);
pDevice->GetRenderState(D3DRS_ZENABLE, &dwOldZEnable);
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
if(alrdy) //Different colors for selected models that are already being logged (For removal from array)
texCol=Blue;
else
texCol=Red;
pDevice->SetTexture(0, texCol);
pDrawIndexedPrimitive(pDevice, pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);
pDevice->SetRenderState(D3DRS_ZENABLE, dwOldZEnable);
}
}
if(GetAsyncKeyState(VK_F5)&1) add_log("Logged tesx: %i", texarray[arrc]); //F5 will print currently selected texnum to logfile
if(GetAsyncKeyState(VK_F6)&1) { //For adding/removing textures to array
bool inarr=true;
for(int k=0;k<dcount;k++){
if(delarray[k]==texarray[arrc])
{
inarr=false;//Found selected texture to already exist
delarray[k]=0;//Delete texture
break;//Cancel loop
}
}
if(inarr==true)
{
delarray[dcount]=texarray[arrc];//Add texture
dcount++;
}
}
if(GetAsyncKeyState(VK_F7)&1){
int total=1;
add_log("omfg values?!? {");
for(int x=0;x<dcount;x++)//Loops through all recorded variables and prints them in a nice array based format
if(delarray[x]){
add_log("%i,",delarray[x]); //add_log2==add_log but without endl
total++;
}
add_log("}; %i variables in array",total);
}
bool found = false; //THIS PART CREDITS TO KRYPTEC
for(int y=0; y<arraycounter; y++) //THIS IS HIS LOGGING FUNCTION
{
if(texnum==texarray[y])found=true; //I JUST CREATED AN INTERFACE FOR IT
}
if(!found && arraycounter < 1000)
{
texarray[arraycounter]=texnum;
arraycounter++;
}*/
}
return pDrawIndexedPrimitive(pDevice, pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);
}
//=====================================Dip_End===========================================================================//
//=====================================Sss_Start==========================================================================//
typedef HRESULT ( WINAPI* oSetStreamSource ) ( LPDIRECT3DDEVICE8 pDevice, UINT nStreamNumber, LPDIRECT3DVERTEXBUFFER8 pStreamData, UINT nStride );
oSetStreamSource pSetStreamSource;
HRESULT WINAPI mySetStreamSource(LPDIRECT3DDEVICE8 pDevice, UINT nStreamNumber, LPDIRECT3DVERTEXBUFFER8 pStreamData, UINT nStride)
{
if(nStreamNumber==0)
m_Stride = nStride;
return pSetStreamSource(pDevice, nStreamNumber, pStreamData, nStride);
}
//====================================Sss_End============================================================================//
//====================================Svp_Start==========================================================================//
typedef HRESULT (WINAPI* oSetViewport)(LPDIRECT3DDEVICE8 pDevice,CONST D3DVIEWPORT8* pViewport);
oSetViewport pSetViewport;
HRESULT WINAPI mySetViewport(LPDIRECT3DDEVICE8 pDevice,CONST D3DVIEWPORT8* pViewport)
{
ScreenCenterX = ( float )pViewport->Width / 2;
ScreenCenterY = ( float )pViewport->Height / 2;
return pSetViewport(pDevice,pViewport);
}
//===================================Svp_End=============================================================================//
typedef HRESULT ( WINAPI* oBeginScene ) ( LPDIRECT3DDEVICE8 pDevice );
oBeginScene pBeginScene;
HRESULT WINAPI myBeginScene(LPDIRECT3DDEVICE8 pDevice)
{
if((GetAsyncKeyState(VK_F6)&1))
{
pEndScene = (oEndScene)DetourFunction((PBYTE)dwEndScene, (PBYTE)myEndScene);
pDrawIndexedPrimitive = (oDrawIndexedPrimitive)DetourFunction((PBYTE)dwDrawIndexedPrimitive, (PBYTE)myDrawIndexedPrimitive);
pSetStreamSource = (oSetStreamSource)DetourFunction((PBYTE)dwSetStreamSource, (PBYTE)mySetStreamSource);
pSetViewport=(oSetViewport)DetourFunction((PBYTE)dwSetViewport,(PBYTE)mySetViewport);
}
return pBeginScene(pDevice);
}
BOOL WINAPI DllMain ( HMODULE hModule, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hModule);
if ( dwReason == DLL_PROCESS_ATTACH )
{
//=========Log==========================//
GetModuleFileName(hModule, dlldir, 512);
for(int i = strlen(dlldir); i > 0; i--) { if(dlldir[i] == '\\') { dlldir[i+1] = 0; break; } }
ofile.open(GetDirectoryFile("log.txt"), ios::app);
//=========Log=========================//
pBeginScene = (oBeginScene)DetourFunction((PBYTE)dwBeginScene, (PBYTE)myBeginScene);
pEndScene = (oEndScene)DetourFunction((PBYTE)dwEndScene, (PBYTE)myEndScene);
pDrawIndexedPrimitive = (oDrawIndexedPrimitive)DetourFunction((PBYTE)dwDrawIndexedPrimitive, (PBYTE)myDrawIndexedPrimitive);
pSetStreamSource = (oSetStreamSource)DetourFunction((PBYTE)dwSetStreamSource, (PBYTE)mySetStreamSource);
pSetViewport=(oSetViewport)DetourFunction((PBYTE)dwSetViewport,(PBYTE)mySetViewport);
}
return TRUE;
}
--------------------
[log.h]
#define WIN32_LEAN_AND_MEAN
#ifndef _MAIN_H
#define _MAIN_H
char *GetDirectoryFile(char *filename);
void __cdecl add_log (const char * fmt, ...);
--------------------
*기본소스 예제입니다
*C++ 기반
'게임 코드 자료실' 카테고리의 다른 글
[서든어택] 오토핫키 소스 (1) | 2020.04.11 |
---|---|
[서든어택] 오토샷 소스 (2) | 2020.04.11 |
[오버워치] 매크로 소스 (2019Ver) (0) | 2020.04.11 |
[서든어택] 쉘값&H코드값 (자료코드) (2) | 2020.04.11 |