Results 1 to 4 of 4
  1. #1
    Dwar
    Dwar is offline
    Veteran Dwar's Avatar
    Join Date
    2010 Mar
    Posts
    2,222
    Thanks Thanks Given 
    211
    Thanks Thanks Received 
    2,230
    Thanked in
    292 Posts
    Rep Power
    10

    ColorBox Example for Map Color

    It's a WarRock ColorBox Example for Map Color.

    The DrawText Function. I think the DrawBox and the DrawRectangle do you have it.
    void DrawTexx(char *text,int x,int y,DWORD color,ID3DXFont*  pFont)
    {
    RECT rect;
    SetRect( &rect, x, y, x, y );
    pFont->DrawTextA(NULL, text, -1, &rect, DT_NOCLIP, color);
    }


    [b]Define]int WHC_MaPcoSel=1;
    int WHC_MapColor=0;

    int ExTra_VerschiebungX=0; //Move the ColorBox to a another Postion X Posstion when you need it.
    int ExTra_VerschiebungY=0;//Move the ColorBox to a another Postion Y Posstion when you need it.

    float WHC_mAFillRed;
    float WHC_mAFillBlue;
    float WHC_mAFillGreen;[/i]

    Color Box Code and the Color Box Function:
    if(WHC_MapColor==1)
    {
    DrawBox((int)x+ExTra_VerschiebungX+460,(int)y+ExTr a_VerschiebungY+180,(int)350,(int)150,BlackTrans,p Device);
    DrawRectangle((int)x+ExTra_VerschiebungX+460,(int) y+ExTra_VerschiebungY+180,(int)350,(int)150,1,Yell ow,pDevice);
    DrawTexx("--- ][ Color Box ][ ---",x+ExTra_VerschiebungX+570,y+ExTra_VerschiebungY+ 183,RED,pFont);
    DrawRectangle((int)x+ExTra_VerschiebungX+474,(int) y+ExTra_VerschiebungY+205,(int)311,(int)100,2,Whit e,pDevice);
    DrawTexx("Red:",x+ExTra_VerschiebungX+480,y+ExTra_ VerschiebungY+215,RED,pFont);
    DrawRectangle((int)x+ExTra_VerschiebungX+520,(int) y+ExTra_VerschiebungY+215,(int)256,(int)15,1,White ,pDevice);
    DrawBox((int)x+ExTra_VerschiebungX+521,(int)y+ExTr a_VerschiebungY+217,(int)WHC_mAFillRed,(int)12,Red ,pDevice);
    DrawTexx("Blue:",x+ExTra_VerschiebungX+480,y+ExTra _VerschiebungY+245,Blue,pFont);
    DrawRectangle((int)x+ExTra_VerschiebungX+520,(int) y+ExTra_VerschiebungY+245,(int)256,(int)15,1,White ,pDevice);
    DrawBox((int)x+ExTra_VerschiebungX+521,(int)y+ExTr a_VerschiebungY+247,(int)WHC_mAFillBlue,(int)12,Bl ue,pDevice);
    DrawTexx("Green:",x+ExTra_VerschiebungX+480,y+ExTr a_VerschiebungY+275,Green,pFont);
    DrawRectangle((int)x+ExTra_VerschiebungX+520,(int) y+ExTra_VerschiebungY+275,(int)256,(int)15,1,White ,pDevice);
    DrawBox((int)x+ExTra_VerschiebungX+521,(int)y+ExTr a_VerschiebungY+277,(int)WHC_mAFillGreen,(int)13,G reen,pDevice);
    DrawTexx("Selected Color:",x+ExTra_VerschiebungX+465,y+ExTra_Verschie bungY+311,White,pFont);

    if(GetAsyncKeyState(0x21) &1)
    {
    if(WHC_MaPcoSel > 1)
    {
    WHC_MaPcoSel--;
    }
    }

    if(GetAsyncKeyState(0x22) &1)
    {
    if(WHC_MaPcoSel < 3)
    {
    WHC_MaPcoSel++;
    }
    }

    if(WHC_MaPcoSel==1)
    {
    if(WHC_mAFillRed < 255)
    {
    if(GetAsyncKeyState(VK_ADD) &1)
    {
    WHC_mAFillRed++;
    }
    }

    if(WHC_mAFillRed > 0)
    {
    if(GetAsyncKeyState(0x6D) &1)
    {
    WHC_mAFillRed--;
    }
    }
    DrawTexx("Red",x+560,y+311,Red,pFont);
    }

    if(WHC_MaPcoSel==2)
    {
    if(WHC_mAFillBlue < 255)
    {
    if(GetAsyncKeyState(VK_ADD) &1)
    {
    WHC_mAFillBlue++;
    }
    }

    if(WHC_mAFillBlue > 0)
    {
    if(GetAsyncKeyState(0x6D) &1)
    {
    WHC_mAFillBlue--;
    }
    }
    DrawTexx("Blue",x+560,y+311,Blue,pFont);
    }

    if(WHC_MaPcoSel==3)
    {
    if(WHC_mAFillGreen < 255)
    {
    if(GetAsyncKeyState(VK_ADD) &1)
    {
    WHC_mAFillGreen++;
    }
    }

    if(WHC_mAFillGreen > 0)
    {
    if(GetAsyncKeyState(0x6D) &1)
    {
    WHC_mAFillGreen--;
    }
    }
    DrawTexx("Green",x+560,y+311,Green,pFont);
    }
    }

    Define:
    VOID wFloat(It adr,Ft Value)
    {
    *(Ft*)(adr) = Value;
    }


    #define WHA_MapColor1 0x00BB0BB4
    #define WHA_MapColor2 0x00BB0BB0
    #define WHA_MapColor3 0x00BB0BAC


    The Hook Fucntion in your Hack Thread.:
    [c]if(WHC_MapColor==1)
    {
    wFloat(WHA_MapColor3,WHC_mAFillRed);
    wFloat(WHA_MapColor2,WHC_mAFillBlue);
    wFloat(WHA_MapColor1,WHC_mAFillGreen);
    }
    Notes:

    The Color box appearance example:


    Credits: Willi27
    Please, post your questions on forum, not by PM or mail

    I spend my time, so please pay a little bit of your time to keep world in equilibrium

  2. #2
    Willi27
    Willi27 is offline
    Guest
    Join Date
    2010 Nov
    Posts
    1
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts
    Rep Power
    0

    Re: ColorBox Example for Map Color

    Omg leecher. Give Credits to me -.-. I share this on the other Forums Public ....

  3. #3
    Dwar
    Dwar is offline
    Veteran Dwar's Avatar
    Join Date
    2010 Mar
    Posts
    2,222
    Thanks Thanks Given 
    211
    Thanks Thanks Received 
    2,230
    Thanked in
    292 Posts
    Rep Power
    10

    Re: ColorBox Example for Map Color

    Willi27
    Open your eyes, the author has already noted
    Please, post your questions on forum, not by PM or mail

    I spend my time, so please pay a little bit of your time to keep world in equilibrium

  4. #4
    MrSmith
    MrSmith is offline
    Member-in-training
    Join Date
    2010 Aug
    Posts
    85
    Thanks Thanks Given 
    9
    Thanks Thanks Received 
    7
    Thanked in
    4 Posts
    Rep Power
    0

    Re: ColorBox Example for Map Color

    Many people miss the fineprint .
    Ever Danced With The Devil By The Pale Moonlight ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •