Source UGradeID's 2008

Results 1 to 15 of 15
  1. #1
    My Religion: Love ♥ diosz is offline
    MemberRank
    Feb 2008 Join Date
    IDK~Location
    314Posts

    Source UGradeID's 2008

    well this is only the easy way to put color in Gunz

    UGradeID.h
    Code:
    #define Gunz08
    typedef struct MCOLOR
    {
        char r;
        char g;
        char b;
        char a;
    }MCOLOR;
    
    
    CDetour GetUserGradeIDColorDet;
    bool __cdecl GetUserGradeIDColor(int UGradeID, struct MCOLOR &Color,char *szName)
    {
    	//printf("%d\n",UGradeID);
    	switch(UGradeID)
    	{
    	case 255:
    	case 254:
    	case 7:
    	case 8:
    		break;
    		
    	default:
    		return true;
    	}
    	GetUserGradeIDColorDet.Ret(false);
    	
    	if(UGradeID == 7)
    	{
    		Color.a = 255;
    		Color.r = 255;
    		Color.g = 128;
    		Color.b = 64;
    	}else if(UGradeID == 255 || UGradeID == 254 || UGradeID == 8){
    		Color.a = 255;
    		Color.r = 9;
    		Color.g = 177;
    		Color.b = 163;
    	}
    	
    
    	//GetUserGradeIDColorDet.Org(UGradeID, Color, szName);
        return true;
    }
    
    
    __declspec(naked) void Scoreboard()	{
    #ifdef Gunz08
    	__asm
    	{
    		MOV EAX,[EBX+0x4EA] 
    	}
    #else
    	__asm
    	{
    		MOV EAX,[EBP+0x45A] 
    	}
    #endif
    	__asm
      {	
    	CMP EAX,0xFF //UGradeID 255
    	jne GradoM
    	MOV [EBP-0x17C],0x00 //The R
    	MOV [EBP-0x17B],0xB7 //The G
    	MOV [EBP-0x17A],0xFF //The B
    	MOV [EBP-0x179],0xFF //The A
    	MOV ECX,[EBP-0x17C]
    	JMP UgradeIDRegreso
    GradoM:
    	CMP EAX,0xFE //UGradeID 254
    	jne Grado1
    	MOV [EBP-0x17C],0xFF //The R
    	MOV [EBP-0x17B],0x80 //The G
    	MOV [EBP-0x17A],0x40 //The B
    	MOV [EBP-0x179],0xFF //The A
    	MOV ECX,[EBP-0x17C]
    	JMP UgradeIDRegreso
    Grado1:
    	CMP EAX,0x1 //UGradeID 1
    	jne Grado2
    	MOV [EBP-0x17C],0xFF //The R
    	MOV [EBP-0x17B],0x80 //The G
    	MOV [EBP-0x17A],0x40 //The B
    	MOV [EBP-0x179],0xFF //The A
    	MOV ECX,[EBP-0x17C]
    	JMP UgradeIDRegreso
    Grado2:
    	CMP EAX,0x7 //UGradeID 1
    	jne Final
    	MOV [EBP-0x17C],0xFF //The R
    	MOV [EBP-0x17B],0x80 //The G
    	MOV [EBP-0x17A],0x40 //The B
    	MOV [EBP-0x179],0xFF //The A
    	MOV ECX,[EBP-0x17C]
    	JMP UgradeIDRegreso
    Final:
    	JMP UgradeIDRegreso
    	}
    
    }
    
    __declspec(naked) void UGradeID()
    {
    	#ifdef Gunz08
    	__asm
    	{
    		MOV EAX,[ECX+0x4EA] 
    	}
    #else
    	__asm
    	{
    		MOV EAX,[ECX+0x45A] 
    	}
    #endif
    	__asm
    	{
    		CMP EAX,0xFF
    		JNE Final
    		CMP EAX,0xFE
    		JNE Final
    		CMP EAX,0x1
    		JNE Final
    		CMP EAX,0x7
    		JNE Final
    		XOR AL,AL
    		RETN
    	Final:
    		MOV AL,1
    		RETN
    	}
    }
    main.cpp
    Code:
    void CopyBuffer(BYTE *Buffer, int Size, DWORD *Address)	{
    		DWORD pPrevious = 0;
    		VirtualProtect(Address, Size, PAGE_EXECUTE_READWRITE, &pPrevious);
    		memcpy(Address, Buffer, Size);
    		VirtualProtect(Address, Size, pPrevious, &pPrevious);
    		}
    
    void SetupHook(DWORD Function, DWORD Hook, int Size)	{
    			Hook = Hook - Function - 5;
    			BYTE bHook[4];
    			memcpy(bHook,(void*)&Hook,4);
    			BYTE Buffer[10];
    			memset(Buffer,0x90,10);
    				Buffer[0] = 0xE9;
    				Buffer[1] = bHook[0];
    				Buffer[2] = bHook[1];
    				Buffer[3] = bHook[2];
    				Buffer[4] = bHook[3];
    			CopyBuffer(Buffer, Size, (DWORD*)Function);
    	}
    
    void LMAO()
    {
    /*	AllocConsole();
    	freopen("CONOUT$", "wb", stdout);
    	freopen("CONIN$", "rb", stdin);
    */
    
    	GetUserGradeIDColorDet.Detour((PBYTE)GetUserGradeIDColorAddress,(PBYTE)GetUserGradeIDColor,true);
    	GetUserGradeIDColorDet.Apply();
    	SetupHook((DWORD)UGradeIDAddress,(DWORD)UGradeID,5);
    	SetupHook((DWORD)ScoreboardAddress,(DWORD)Scoreboard,5);
    	CreateThread(NULL,NULL,InfoPC, NULL,NULL,NULL);
    }
    
    BOOL WINAPI DllMain (HMODULE hModule, DWORD dwReason, LPVOID)
    {
    	if (dwReason == DLL_PROCESS_ATTACH)
    	{
    		DisableThreadLibraryCalls (hModule);
    		LMAO();
    	}
    
    	return true;
    }
    Address
    Code:
    // 2008
    DWORD GetUserGradeIDColorAddress = 0x4A17A0;
    unsigned long UGradeIDAddress = 0x477000;
    unsigned long UgradeIDRegreso = 0x40784E;
    unsigned long ScoreboardAddress = 0x407832;
    
    /* 2007 No tested
    DWORD GetUserGradeIDColorAddress = 0x0049EF00;
    unsigned long UGradeIDAddress = 0x473920;
    unsigned long UgradeIDRegreso = 0x407909;
    unsigned long ScoreboardAddress = 0x4078F5;
    */
    well that all n_n

    Credits:
    - Lambda (http://forum.ragezone.com/f311/put-n...ml#post4434314)
    - Kyoshike (http://forum.ragezone.com/f245/july-...tomize-688781/)
    - Me(diosz)

    P.D. Sorry for my english D:
    Last edited by diosz; 13-08-11 at 03:57 AM.


  2. #2
    Ecchi addicted adz28 is offline
    MemberRank
    Nov 2008 Join Date
    IkebukuroLocation
    524Posts

    Re: Source UGradeID's 2008

    As I told you, I really guess you method is much easy, and your source pretty understandable.
    Thanks again ^^.

  3. #3
    Member Miguelbkn is offline
    MemberRank
    Feb 2010 Join Date
    Santiago, ChileLocation
    95Posts

    Re: Source UGradeID's 2008

    Hu Victor, can you spend it to .exe? It is what in these moments I do not have vs:)
    Last edited by Phoenix; 13-08-11 at 08:09 PM. Reason: English only.

  4. #4
    My Religion: Love ♥ diosz is offline
    MemberRank
    Feb 2008 Join Date
    IDK~Location
    314Posts

    Re: Source UGradeID's 2008

    Quote Originally Posted by Miguelbkn View Post
    Hu Victor, can you spend it to .exe? It is what in these moments I do not have vs:)
    yes i could only need the colors ... but only for this time

  5. #5
    Wait wut PenguinGuy is offline
    MemberRank
    Apr 2010 Join Date
    United StatesLocation
    765Posts

    Re: Source UGradeID's 2008

    Same idea and implementation I did, but doesn't seem like mine. The spacing and naming is too God awful. And yes, I am Travis rofl.
    Posted via Mobile Device
    Last edited by PenguinGuy; 14-08-11 at 03:14 AM.

  6. #6
    Account Upgraded | Title Enabled! jewness12 is offline
    MemberRank
    Aug 2009 Join Date
    213Posts

    Re: Source UGradeID's 2008

    I was amazed to see this looks exactly like my gradeid hooks, I did not detour getusergradeidcolor but rebuild the function, same for scoreboard and the other thing I don't remember its name.
    I dont hook functions, if I want something, I rebuild it.

  7. #7
    Member Miguelbkn is offline
    MemberRank
    Feb 2010 Join Date
    Santiago, ChileLocation
    95Posts

    Re: Source UGradeID's 2008

    Quote Originally Posted by diosz View Post
    yes i could only need the colors ... but only for this time
    Ok, i need 5 colours:

    *Gold : #FFCC00
    *Purple : #6633FF
    *Red : #990000
    *Pink : #FF33FF
    *Green : #00CC00
    Admin and Mod:
    ADM : #0066FF
    MOD : #996633

    This is the TheDuel.exe :
    TheDuel.exe
    The TheDuel is made by Phoenix.

    Ty Victor

    when u finish u can send me a pm whit the link of TheDuel? :)
    Last edited by Miguelbkn; 14-08-11 at 04:10 AM.

  8. #8
    GunZ Developer dacharles is offline
    MemberRank
    Oct 2006 Join Date
    476Posts

    Re: Source UGradeID's 2008

    Quote Originally Posted by jewness12 View Post
    I was amazed to see this looks exactly like my gradeid hooks, I did not detour getusergradeidcolor but rebuild the function, same for scoreboard and the other thing I don't remember its name.
    I dont hook functions, if I want something, I rebuild it.
    rebuild main()

  9. #9
    Proficient Member steven1234 is offline
    MemberRank
    Jan 2010 Join Date
    186Posts

    Re: Source UGradeID's 2008

    2007 it messes up names

    heres a pic

  10. #10
    Balance Elian is offline
    MemberRank
    Sep 2009 Join Date
    StarLocation
    1,768Posts

    Re: Source UGradeID's 2008

    Quote Originally Posted by steven1234 View Post
    2007 it messes up names

    heres a pic
    Lold at that.

  11. #11
    GunZ Developer dacharles is offline
    MemberRank
    Oct 2006 Join Date
    476Posts

    Re: Source UGradeID's 2008

    Quote Originally Posted by steven1234 View Post
    2007 it messes up names

    heres a pic
    Comment this line:
    Code:
    #define Gunz08

  12. #12
    Proficient Member steven1234 is offline
    MemberRank
    Jan 2010 Join Date
    186Posts

    Re: Source UGradeID's 2008

    Quote Originally Posted by dacharles View Post
    Comment this line:
    Code:
    #define Gunz08
    its not even that i removed the ifs and kept the else part


    __declspec(naked) void UGradeID()
    {
    __asm
    {
    MOV EAX,[ECX+0x45A]
    }
    __asm
    {
    CMP EAX,0xFF
    JNE Final
    CMP EAX,0xFE
    JNE Final
    CMP EAX,0x0
    JNE Final
    XOR AL,AL
    RETN
    Final:
    MOV AL,1
    RETN
    }
    }

    could be im calling 2 asms sec

    edit
    fixed that still does the same thing lol
    Last edited by steven1234; 16-08-11 at 08:37 PM.

  13. #13
    Enthusiast eduardo03 is offline
    MemberRank
    Feb 2011 Join Date
    36Posts

    Re: Source UGradeID's 2008

    This work, but...
    The name in tab is invisible and score and level etc...
    What can be?

    Spoiler:

    Lobby:


    In game(TAB):



  14. #14
    Just Me iceman4154 is offline
    MemberRank
    Oct 2007 Join Date
    Columbus, OhioLocation
    217Posts

    Re: Source UGradeID's 2008

    More than likely, wrong address.

  15. #15
    Enthusiast eduardo03 is offline
    MemberRank
    Feb 2011 Join Date
    36Posts

    Re: Source UGradeID's 2008

    I fix the error.
    Thanks. =]



Advertisement