Results 1 to 6 of 6
  1. #1
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    4,922
    My Mood
    Cool

    Post "Complex" and "Simple"

    When I make a base, change some, update something, people say it is "Complex" but is it really? Most of your bases are filled with "Messy" code. These bases come can barely understand, any when I come make "improvements" or recommend something the first thing most people say is "complex". I am here to show you why you people just lazy. There is nothing complex about it, I mean most of you already look at me and say you "know C++", and i believe most of you understand the syntax of c++. So tell me this, my bases, menus or improved function, are those not made in C++? Cant you simply read them and understand them? Yes i can say that I may be more experience at somethings, and program these algorithm with more in mind, but that shouldn't stop you from understanding what the algorithm is doing. I mean if you do not understand the meaning behind something but not if you do not understand it in general.

    Lets do with examples, This is ghost mode someone sent to me something last year.
    Code:
    void GhostMode() {    
        if(gmode) {
        cPlayerMgr*  pPlayerManager;
        pPlayerManager= *(cPlayerMgr**)ADDR_PLAYERMGR;
        float PlayerPitch = pPlayerManager->Pitch;
        float PlayerYaw = pPlayerManager->Yaw;
    
    
          if (clock() < ghostwait)
            {
              //Do Nothing
            } else {
            ghostwait = clock () + 0.02 * CLOCKS_PER_SEC;
    
    
        bool Forward = (GetAsyncKeyState('W') & 0x8000) != 0;
        bool Backward = (GetAsyncKeyState('S') & 0x8000) != 0;
        bool Left = (GetAsyncKeyState('A') & 0x8000) != 0;
        bool Right = (GetAsyncKeyState('D') & 0x8000) != 0;
    
    
        if (Forward || Backward || Left || Right)
        {
          if (Forward || Backward)
          {
            float Sign = (Forward ? 1.0f : -1.0f);
            Posx += Sign * 20.0f * sinf(PlayerYaw);
            Posy += Sign * 20.0f * sinf(-PlayerPitch);
            Posz += Sign * 20.0f * cosf(PlayerYaw);
          }
          if (Left)
          {
            Posx += 20.0f * sinf(PlayerYaw - (MATH_PI / 2.0f));
            Posy += 0;
            Posz += 20.0f * cosf(PlayerYaw - (MATH_PI / 2.0f));
          }
          if (Right)
          {
            Posx += 20.0f * sinf(PlayerYaw + (MATH_PI / 2.0f));
            Posy += 0;
            Posz += 20.0f * cosf(PlayerYaw + (MATH_PI / 2.0f));
          }
        }
          }
    
    
        DWORD dwClientFxEntry    = (DWORD)GetModuleHandleA("Clientfx.fxd");
        DWORD dwClass = *(DWORD*)( dwClientFxEntry + ADDR_CLIENTFX );
            if(dwClass)
            {
                *(float*)( dwClass + 0xC8 ) = Posx;
                *(float*)( dwClass + 0xCC ) = Posy;
                *(float*)( dwClass + 0xD0 ) = Posz;
            }
        }
    }
    What I want you to do, is look at this carefully, and tell me why would this be less complex than the ghost mode I have below. Is it not the same code, but more organized? I do not understand your terms for simple and complex code.

    Code:
    void GhostMode(bool val){
    
    
        if (!val)
            return;
    
    
        static D3DXVECTOR3 pos = GetLocalPlayerPosition();
    
    
        auto pManager = GetPlayerManager();
        
        if (!pManager)
            goto SettingPosition;
    
    
        bool Forward = (GetAsyncKeyState('I') & 0x8000) != 0;
        bool Backward = (GetAsyncKeyState('K') & 0x8000) != 0;
    
    
        if (Forward || Backward)
        {
            float Sign = (Forward ? 1.0f : -1.0f);
            pos.x += Sign * 10.0f * std::sinf(pManager->Yaw);
            pos.y += Sign * 10.0f * std::sinf(-pManager->Pitch);
            pos.z += Sign * 10.0f * std::cosf(pManager->Yaw);
        }
        if (GetAsyncKeyState('J') & 0x8000)
        {    
            
            pos.x += 10.0f * std::sinf(pManager->Yaw - (M_PI_2));
            pos.z += 10.0f * std::cosf(pManager->Yaw - (M_PI_2));
        }
        else if (GetAsyncKeyState('L') & 0x8000)
        {
            pos.x += 10.0f * std::sinf(pManager->Yaw + (M_PI_2));
            pos.z += 10.0f * std::cosf(pManager->Yaw + (M_PI_2));
        }
    SettingPosition:
        SetLocalPlayerPosition(pos);
    
    
    }
    Lets go with ESP, I know that most of you have esp, and seem to understand it a little. So this is your everyday esp.
    Code:
    void ESP(){
        INT CenterX = GetSystemMetrics(0) / 2-1;
        INT CenterY = GetSystemMetrics(1) / 2-1;
        CHAR CName[50], CDistance[50];
        
        if((*(BYTE *)ADDR_GAMESTATUS == 1) && (espNames || espLines || espDistances || espBoxes) || espWarning))
        {
            GetPlayerByIndex3 = (lpGetPlayerByIndex3)ADDR_PLAYERBYINDEX;
            unsigned long ulThis = *(unsigned long *)ADDR_CLIENTINFOMGR;
            GetLocalPlayer3 = (lpGetLocalPlayer3)ADDR_LOCALPLAYER;
    
    
            for(int i = 0; i < 24; i++)
            {
                pPlayerInfo *pLocal  = GetLocalPlayer3(ulThis);
                pPlayerInfo *pPlayer = GetPlayerByIndex3(ulThis, i, 0);
                if(pPlayer != 0 && pPlayer->Object != 0 && pPlayer->IsDead == 0)
                {
                    D3DXVECTOR3 vPos, vFootScreen, vScreen;
                    vPos.x = pPlayer->Object->Pos.x;
                    vPos.y = pPlayer->Object->yBound2;
                    vPos.z = pPlayer->Object->Pos.z;
                    if(WorldToScreen(vPos, &vScreen))
                    {
                        if(pPlayer->Team != pLocal->Team) {
    
    
                            if(getESPTextIndex(Menu->espNames->GetText()) == 1 || getESPTextIndex(Menu->espNames->GetText()) == 3)
                            {
                                //sprintf(CName, "%s", pPlayer->Name);
                                Main->D3D->DrawTextA(vScreen.x, vScreen.y, Red, TCenter, pPlayer->Name);// TCenter, pFont, pPlayer->Name);
                            }
                            if(getESPTextIndex(Menu->espLines->GetText()) == 1 || getESPTextIndex(Menu->espLines->GetText()) == 3) 
                            {
                                Main->D3D->DrawLine(CenterX, CenterY, vScreen.x, vScreen.y, 1, Red);
                            }
                            
                            if(getESPTextIndex(Menu->espBoxes->GetText()) == 1 || getESPTextIndex(Menu->espBoxes->GetText()) == 3)
                            {
                                vPos.x = pPlayer->Object->Pos.x;
                                vPos.y = pPlayer->Object->yBound1;
                                vPos.z = pPlayer->Object->Pos.z;
                                if(WorldToScreen(vPos, &vFootScreen))
                                {
                                    INT BoxDist = INT(0.2f * (vFootScreen.y - vScreen.y));
                                    
                                    Main->D3D->DrawBox(vScreen.x - BoxDist, vScreen.y    , 1, vFootScreen.y-vScreen.y , Red);
                                    Main->D3D->DrawBox(vScreen.x - BoxDist, vFootScreen.y, BoxDist*2,  1, Red);
                                    Main->D3D->DrawBox(vScreen.x + BoxDist, vScreen.y    , 1, vFootScreen.y-vScreen.y, Red);
                                    Main->D3D->DrawBox(vScreen.x - BoxDist, vScreen.y    , BoxDist*2, 1, Red);
                                }
                            }
                            if(Menu->espWarning->Checkbox()->IsChecked())
                            {
                                if(GetDistance(pLocal->Object->Pos, pPlayer->Object->Pos) < 10.0f)
                                    Main->D3D->DrawTextA(CenterX, 100, Red, TCenter, "Enemy under 10m");
                            }
                        }
    
    
                        if(pPlayer->Team == pLocal->Team) {
    
    
                            if(getESPTextIndex(Menu->espNames->GetText()) == 2 || getESPTextIndex(Menu->espNames->GetText()) == 3)
                            {
                                sprintf(CName, "%s", pPlayer->Name);
                                Main->D3D->DrawTextA(vScreen.x, vScreen.y, Blue, TCenter, CName);
                            }
                            
                            if(getESPTextIndex(Menu->espLines->GetText()) == 2 || getESPTextIndex(Menu->espLines->GetText()) == 3) 
                            {
                                Main->D3D->DrawLine(CenterX, CenterY, vScreen.x, vScreen.y, 1, Blue);
                            }
                            if(getESPTextIndex(Menu->espBoxes->GetText()) == 2 || getESPTextIndex(Menu->espBoxes->GetText()) == 3)
                            {
                                vPos.x = pPlayer->Object->Pos.x;
                                vPos.y = pPlayer->Object->yBound1;
                                vPos.z = pPlayer->Object->Pos.z;
                                if(WorldToScreen(vPos, &vFootScreen))
                                {
                                    INT BoxDist = INT(0.2f * (vFootScreen.y - vScreen.y));
                                    Main->D3D->DrawBox(vScreen.x - BoxDist, vScreen.y    , 1, vFootScreen.y-vScreen.y , Blue);
                                    Main->D3D->DrawBox(vScreen.x - BoxDist, vFootScreen.y, BoxDist*2,  1, Blue);
                                    Main->D3D->DrawBox(vScreen.x + BoxDist, vScreen.y    , 1, vFootScreen.y-vScreen.y, Blue);
                                    Main->D3D->DrawBox(vScreen.x - BoxDist, vScreen.y    , BoxDist*2, 1, Blue);
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    Now what I want you to tell me is, How my esp is more complex.
    Code:
    void esp_player_event_call(PlayerInfo_t* player, CharacterFX_t* fx, PlayerInfo_t* lplayer){
        auto color = (player->iTeam == lplayer->iTeam) ? 0xFF00FF00 : 0xFFFF0000;
    
        D3DXVECTOR3 vScreen, vFootScreen;
    
    
        auto vPos = player->Object->RootPosition;
        vPos.y = player->Object->MinRootPosition.y;                
    
    
        if (!WorldToScreen(vPos, &vScreen, pDevice))
            return;
    
        if (box)
        {
            vPos.y = player->Object->MaxRootPosition.y;
    
            if (WorldToScreen(vPos, &vFootScreen, pDevice))
            {
                auto BoxDist = 0.2f * (vFootScreen.y - vScreen.y);
                Graphics::DrawBorder(vScreen.x - BoxDist, vScreen.y, BoxDist * 2, vFootScreen.y - vScreen.y, 1, color);
            }
        }
    
        if (name)
        {
            Graphics::DrawFont(vScreen.x, vScreen.y - 5, color, player->sName, D3DFONT_CENTERED);
        }
        
        if (healthbar)
        {
            if (fx)
            {
                DrawHealthBars(vScreen.x - 13, vScreen.y - 7, (int)fx->wHealth, fx->bSpawnSheild);
            }
        }
    }
    
    
    void HackManager::ESP(bool val){
        if (!val)
            return;
    
    
        auto lPlayer = GetLocalPlayer();
    
    
        if (!lPlayer)
            return;
        
        auto gcs = GetGameClientShell();
        
        auto count = (gcs) ? gcs->GetSFXMgr()->SFXList[SFX_CHARACTER].Num : 24;
    
    
        CharacterFX_t* fx = nullptr;
        for (int i = 0; i < count; i++)
        {
            fx = nullptr;
    
    
            if (gcs)
            {
                fx = (CharacterFX_t*)gcs->GetSFXMgr()->SFXList[SFX_CHARACTER].List[i];
            }
            auto player = GetPlayerByIndex(i);
    
    
            if (!player || player->bIsDead != 0 || !player->Object || player->iIndex == lPlayer->iIndex)
                continue;
    
    
            esp_player_event_call(player, fx, lPlayer);
        }
    }
    You say these things are complex... I call bullshit. You are just saying this hide your laziness and your ignorance. You live in this world where all of you pretend to be something you are not. You want to be respected by all and lie to our faces. You want something from someone and you play games with this person. What is wrong with you? Why must everything be a lie. Why cant you just ask me for what you want? Are you scared for how i might class you as a person? Why? Most of you don't even live in the same countries.

    This is my conclusion.
    If you do not understand something, say you do not understand and what you do not understand. I am preparing you'll for something, Normally I just drop things in randomly. I believe it is time you try. You cannot learn more by saying with the simple, you already got the "almost" simple, it is time you step into deeper waters otherwise, you'll never learn how to swim.


    I know most of you know of Hyperion, the base but Hyperion was just one of the Titans and he had 3 children. Helios was one of them, which is gathering of everything into the hack. Helios means Sun, the center of everything.
    The next is Selene this is the hack manager for Helios, kinda how Sisters keep their brothers all balanced out. You do not want the waters to be all one sided. Selene means moon.

    (If you have any idea on the tidal forces, you will get where I am going with this and what is to come)
    Last edited by topblast; 01-13-2014 at 05:07 AM.
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  2. The Following 3 Users Say Thank You to topblast For This Useful Post:

    [MPGH]Flengo (01-14-2014),Kamcorder (01-13-2014),OpKilts (01-13-2014)

  3. #2
    OpKilts's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    The Interwebs
    Posts
    94
    Reputation
    57
    Thanks
    380
    My Mood
    Aggressive
    I really like your attention to detail and your attitude towards coding & development
    ULTIMATE GAY'S LIST
    • Matypatty
    • DisOwned


    Error: Max Thanks Reached


    TASK'S
    1. (Complete)Make Simple Menu For Combat Arms NA
    2. (Complete) Reach 50 Post's
    3. (In Progress)Troll Nerdy Kids
    4. (Complete)Get a job at KFC

  4. #3
    Shadow`'s Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    MN
    Posts
    643
    Reputation
    74
    Thanks
    2,999
    My Mood
    Relaxed
    You're making me break my exeedingly long no-login streak to ask this; why do you continually use C style casts? I seem to remember you saying that you would accept advice on your code, so start using C++ casts.

    On a side note, I've been seeing you use the type "auto" when it isn't needed. It's used when the type isn't necessary or cared about, along with occasions when the output type isn't known. When a function returns an integer, and you use do
    Code:
    auto i = myFunct();
    it just confuses the reader. Maybe you have a valid reason for using it from the code I'm not seeing, but this is how I've been seeing your code.

    Now that that's over, I better go crawl back into the depths of the *********.
    Currently coding applications in Java and C++.

    "It is change, continuing change, inevitable change, that is the dominant factor in society today. No sensible decision can be made any longer without taking into account not only the world as it is, but the world as it will be." -Isaac Asimov

  5. The Following 3 Users Say Thank You to Shadow` For This Useful Post:

    arun823 (01-13-2014),Saltine (01-13-2014),topblast (01-14-2014)

  6. #4
    arun823's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Los Angeles, California
    Posts
    524
    Reputation
    151
    Thanks
    1,887
    My Mood
    Amused
    Agreeing with Shadow on that one.

    However, if you wish for simplicity, you can do Ghost Mode in only a couple of lines with this method:

    Code:
    class cClientPlayer
    {
    public:
    	__int32 iPlayerState; //0x0000		1 = Alive, 2 = Dead, 4 = Roam Map (Unable to shoot), -5 = Ghost Mode
    	char _0x0004[36];
    	bool bIsShooting; //0x0028 
    	char _0x002C[144];
    };//Size=0x00BC
    
    cClientPlayer *pClientPlayer = reinterpret_cast<cClientPlayer*>(this->Addresses->dwPlayerState); //Player Status (Beast Mode) Address
    
    if(Main->Tools->IsValidPointer(pClientPlayer))
    {				
    	if(iGhostMode && pClientPlayer->iPlayerState == 1) pClientPlayer->iPlayerState = -5;
    	else if(iGhostMode == 0 && pClientPlayer->iPlayerState == -5) pClientPlayer->iPlayerState = 1;
    }
    Or you could just directly change the value of the address if you don't wish to use the class.
    Last edited by arun823; 01-13-2014 at 11:07 PM.
    Reversing is the only way to move forward.

  7. The Following User Says Thank You to arun823 For This Useful Post:

    topblast (01-14-2014)

  8. #5
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    4,922
    My Mood
    Cool
    Quote Originally Posted by Shadow` View Post
    You're making me break my exeedingly long no-login streak to ask this; why do you continually use C style casts? I seem to remember you saying that you would accept advice on your code, so start using C++ casts.

    On a side note, I've been seeing you use the type "auto" when it isn't needed. It's used when the type isn't necessary or cared about, along with occasions when the output type isn't known. When a function returns an integer, and you use do
    Code:
    auto i = myFunct();
    it just confuses the reader. Maybe you have a valid reason for using it from the code I'm not seeing, but this is how I've been seeing your code.

    Now that that's over, I better go crawl back into the depths of the *********.
    I only have one answer for both of them, and i do believe it is a very powerful answer : Laziness, idk why but my fingers find auto pretty fast and i never really like typing static case and stuff like that.

    We all have our downsides

    Quote Originally Posted by arun823 View Post
    Agreeing with Shadow on that one.

    However, if you wish for simplicity, you can do Ghost Mode in only a couple of lines with this method:

    Code:
    class cClientPlayer
    {
    public:
        __int32 iPlayerState; //0x0000        1 = Alive, 2 = Dead, 4 = Roam Map (Unable to shoot), -5 = Ghost Mode
        char _0x0004[36];
        bool bIsShooting; //0x0028 
        char _0x002C[144];
    };//Size=0x00BC
    
    cClientPlayer *pClientPlayer = reinterpret_cast<cClientPlayer*>(this->Addresses->dwPlayerState); //Player Status (Beast Mode) Address
    
    if(Main->Tools->IsValidPointer(pClientPlayer))
    {                
        if(iGhostMode && pClientPlayer->iPlayerState == 1) pClientPlayer->iPlayerState = -5;
        else if(iGhostMode == 0 && pClientPlayer->iPlayerState == -5) pClientPlayer->iPlayerState = 1;
    }
    Or you could just directly change the value of the address if you don't wish to use the class.
    I will have to try this, thanks
    Last edited by topblast; 01-14-2014 at 04:57 AM.
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  9. #6
    Sixx93's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    673
    Reputation
    21
    Thanks
    250
    My Mood
    Cool
    Quote Originally Posted by topblast View Post
    Why must everything be a lie.
    Holy words...

    As always, good job topblast!

  10. The Following User Says Thank You to Sixx93 For This Useful Post:

    topblast (01-16-2014)

Similar Threads

  1. Xbox and PS3. simple.
    By Empire in forum General
    Replies: 10
    Last Post: 02-23-2011, 06:45 AM
  2. [Release] InjectPlz Refresh - Back and so simple a peanut could use it
    By Samueldo in forum Combat Arms Spammers, Injectors and Multi Tools
    Replies: 16
    Last Post: 02-03-2011, 11:06 AM
  3. HLSS and wmv quotes with MW2 MP?
    By Gt3x24x7v2 in forum Call of Duty Modern Warfare 2 Help
    Replies: 5
    Last Post: 02-28-2010, 05:56 PM
  4. Just A Few Observations And A Simple Request
    By Bobby123456 in forum Combat Arms Hacks & Cheats
    Replies: 13
    Last Post: 04-24-2009, 08:12 PM
  5. Got banned today with zeas modul, and a simple code
    By mojo007 in forum Visual Basic Programming
    Replies: 10
    Last Post: 04-12-2008, 06:50 AM