Client 1.03P ENG Source(CustomHP-CustomMonster-CustomItems and more)

Page 11 of 19 FirstFirst ... 345678910111213141516171819 LastLast
Results 151 to 165 of 279
  1. #151
    Member ATJIAHT is offline
    MemberRank
    Jul 2008 Join Date
    65Posts

    Re: Client 1.03P ENG Source(CustomHP-CustomMonster-CustomItems and more)

    Quote Originally Posted by afonsolage View Post
    By mob I mean players also :P. This fix is just to when you spread a area skill, like Evil Spirit, the HPBar dont show random mobs HP.
    thx, but how disable hp bar for Players?
    i try do this but can't checking who target mob or player....

  2. #152
    Lage Company™ afonsolage is offline
    MemberRank
    Mar 2012 Join Date
    Fortaleza, BRALocation
    244Posts

    Re: Client 1.03P ENG Source(CustomHP-CustomMonster-CustomItems and more)

    Quote Originally Posted by ATJIAHT View Post
    thx, but how disable hp bar for Players?
    i try do this but can't checking who target mob or player....
    You have to do it on server side. You need to add a if on GCDamageSend(), replace this:
    Code:
    pResult.Life = gTarg->Life;
    pResult.MaxLife = gTarg->MaxLife + gTarg->AddLife;
    to this:

    Code:
    if (gTarg->Type == OBJ_MONSTER)
    {
    pResult.Life = gTarg->Life;
    pResult.MaxLife = gTarg->MaxLife;
    }
    Last edited by afonsolage; 06-10-13 at 05:40 PM.

  3. #153
    Alpha Member ianvalls90 is offline
    MemberRank
    Apr 2007 Join Date
    ArgentinaLocation
    1,829Posts

    Re: Client 1.03P ENG Source(CustomHP-CustomMonster-CustomItems and more)

    edited, got it working =).
    thanks for the help guys.
    Last edited by ianvalls90; 05-10-13 at 11:27 PM.

  4. #154
    Member ATJIAHT is offline
    MemberRank
    Jul 2008 Join Date
    65Posts

    Re: Client 1.03P ENG Source(CustomHP-CustomMonster-CustomItems and more)


    thx but....
    any idea? :)

  5. #155
    Alpha Member ianvalls90 is offline
    MemberRank
    Apr 2007 Join Date
    ArgentinaLocation
    1,829Posts

    Re: Client 1.03P ENG Source(CustomHP-CustomMonster-CustomItems and more)

    Quote Originally Posted by ATJIAHT View Post

    thx but....
    any idea? :)
    Whoa, that's a nice bug with life display XD. What are you trying to kill ? so I try it myself and let you know if same error happens here, on same mob.

  6. #156
    Member ATJIAHT is offline
    MemberRank
    Jul 2008 Join Date
    65Posts

    Re: Client 1.03P ENG Source(CustomHP-CustomMonster-CustomItems and more)

    i trying kill Player :D
    but i need disable hp bar in PvP :)

    i solved this. Hp Bar only for Monsters.
    need replace

    if(gTarg->Type == OBJECT_USER)
    {
    DataSend(TargetIndex, (LPBYTE)&pResult, pResult.h.size);
    }
    for this
    if(gTarg->Type == OBJECT_USER)
    {
    lpGCDamageSend(aIndex, TargetIndex, AttackDamage, MSBFlag, MSBDamage, iShieldDamage);
    }
    and added in Prodef.h
    #define lpGCDamageSend ((void(*)(int aIndex, int TargetIndex, int AttackDamage, int MSBFlag, int MSBDamage, int iShieldDamage)) 0x00455CB0)
    perhaps this is a bad solution but it works
    Last edited by ATJIAHT; 06-10-13 at 05:04 PM.

  7. #157
    Account Upgraded | Title Enabled! Mila is offline
    MemberRank
    Jan 2013 Join Date
    325Posts

    Re: Client 1.03P ENG Source(CustomHP-CustomMonster-CustomItems and more)

    Quote Originally Posted by afonsolage View Post
    More updates on this awesome topic



    I'll try to add a Step-by-step of how to add this on HPBar. All those configurations relay on client side:

    1 - On Interface.h, add this right bellow "#define MU_CDC_SETTEXTCOLOR 0x00420178"
    Code:
    #define MU_CDC_SETBACKGROUNDCOLOR    0x004201DA "typedef DWORD(__thiscall *pCDCSetTextColor)"
    2 - Still on Interface.h, add this right bellow "typedef DWORD(__thiscall *pCDCSetTextColor)"
    Code:
    typedef DWORD(__thiscall *pCDCSetBackgroundColor)(LPVOID This, BYTE r, BYTE g, BYTE b, BYTE h);
    3 - The last change on Interface.h is to add this right bellow "void MU_SetColor(BYTE r, BYTE g, BYTE b, BYTE h);"
    Code:
    void MU_SetBGColor(BYTE r, BYTE g, BYTE b, BYTE h);
    4 - Now lets move to Interface.cpp and add this right bellow "pCDCSetTextColor MU_SetTextColor"
    Code:
    pCDCSetBackgroundColor MU_SetBackgroundColor = (pCDCSetBackgroundColor)MU_CDC_SETBACKGROUNDCOLOR;
    5 - On Interface.cpp, add this function right bellow the function "MU_SetColor"
    Code:
    void MU_SetBGColor(BYTE r, BYTE g, BYTE b, BYTE h)
    {
        MU_SetBackgroundColor(CDC_This(), r, g, b, h);
    }
    6 - Ok, so lets finally add the code which prints those values. On mob_hp_bar.cpp, change the CMob_HPBar::Draw() to this:
    Code:
    void CMob_HPBar::Draw()
    {
        if (this->MaxHP == 0) return;
        float pHP = (this->HP * 100) / this->MaxHP;
        if (pHP)
        {
            MU_DrawGUI(NEWUI_BAR_SWITCH01, (MAX_WIDTH / 2) - 80, 20, 160, 18);
            MU_DrawColorButton(NEWUI_BAR_SWITCH02, (MAX_WIDTH / 2) - 75, 25, (150 * pHP) / 100, 8, 0, 0, MU_CreateColor(255, 0, 0, 150));
    
            MU_SetColor(0xFF, 0xFF, 0xFF, 255);
            MU_SetBGColor(0, 0, 0, 0);
    
            char msg[100];
            sprintf(msg, "%d / %d", (int)this->HP, (int)this->MaxHP);
             
            MU_OutText(300, 24, msg);
        }
        else
        {
            this->isDraw = false;
        }
    }
    So, thats it. Maybe you need to play with X and Y coords on MU_OutText if you have changed your HPBar position.

    Lets keep this work guys!

    EDIT:

    Also if you want to HPBar to be shown only when there is a Mob selected (with mouse over it), then change the if on cDrawInterface() function at file interface.cpp to this:

    Code:
    if (Mob_HP_Bar.isDraw && (*(LPBYTE)0x8C8674) != 0xFF)
    Error "chain" in this part:
    pCDCSetBackgroundColor MU_SetBackgroundColor = (pCDCSetBackgroundColor)MU_CDC_SETBACKGROUNDCOLOR;
    How to fix it? I did everything

  8. #158
    Member ATJIAHT is offline
    MemberRank
    Jul 2008 Join Date
    65Posts

    Re: Client 1.03P ENG Source(CustomHP-CustomMonster-CustomItems and more)

    Quote Originally Posted by Mila View Post
    Error "chain" in this part:
    How to fix it? I did everything
    delete in Interface.h

    #define MU_CDC_SETBACKGROUNDCOLOR 0x004201DA "typedef DWORD(__thiscall *pCDCSetTextColor)"

  9. #159
    Alpha Member ianvalls90 is offline
    MemberRank
    Apr 2007 Join Date
    ArgentinaLocation
    1,829Posts

    Re: Client 1.03P ENG Source(CustomHP-CustomMonster-CustomItems and more)

    Quote Originally Posted by afonsolage View Post
    You have to do it on server side. You need to add a if on GCDamageSend(), replace this:
    Code:
    pResult.Life = gTarg->Life;
    pResult.MaxLife = gTarg->MaxLife;
    to this:

    Code:
    if (lpTarget->Type == OBJ_MONSTER)
    {
    pResult.Life = gTarg->Life;
    pResult.MaxLife = gTarg->MaxLife;
    }
    Trying to add this, got 3 errors, solved 1 by changing OBJ_MONSTER to OBJECT_MONSTER

    2 errors still there, first:
    Code:
    error C2065: 'lpTarget' : identificador no declarado	File: \User.cpp	Line:804	Column:1
    second:
    Code:
    error C2227: el operando izquierdo de '->Type' debe señalar al tipo class/struct/union/generic	File: \User.cpp	Line:804	Column:1
    Any clues? My guess, you missed to post the declaration of "lpTarget"...or maybe it's called something else :|
    The second error I don't see a cause for this :|. Maybe I skipped something xD.

    Quote Originally Posted by ATJIAHT View Post
    i trying kill Player :D
    but i need disable hp bar in PvP :)
    The fix we're talking about right above, is about this, did you try to make it work ??...

  10. #160
    Account Upgraded | Title Enabled! Mila is offline
    MemberRank
    Jan 2013 Join Date
    325Posts

    Re: Client 1.03P ENG Source(CustomHP-CustomMonster-CustomItems and more)

    Quote Originally Posted by ATJIAHT View Post
    delete in Interface.h
    I tried but now not show the HP bar...
    I use 1.03O Main, perhaps offsets errors...

  11. #161
    Member ATJIAHT is offline
    MemberRank
    Jul 2008 Join Date
    65Posts

    Re: Client 1.03P ENG Source(CustomHP-CustomMonster-CustomItems and more)

    Quote Originally Posted by ianvalls90 View Post
    Trying to add this, got 3 errors, solved 1 by changing OBJ_MONSTER to OBJECT_MONSTER

    2 errors still there, first:
    Code:
    error C2065: 'lpTarget' : identificador no declarado	File: \User.cpp	Line:804	Column:1
    second:
    Code:
    error C2227: el operando izquierdo de '->Type' debe señalar al tipo class/struct/union/generic	File: \User.cpp	Line:804	Column:1
    Any clues? My guess, you missed to post the declaration of "lpTarget"...or maybe it's called something else :|
    The second error I don't see a cause for this :|. Maybe I skipped something xD.



    The fix we're talking about right above, is about this, did you try to make it work ??...
    change lpTarget to gTarg.... but it don't work for me.
    my solution here

    Quote Originally Posted by Mila View Post
    I tried but now not show the HP bar...
    I use 1.03O Main, perhaps offsets errors...
    checking all step by step.
    offset
    #define MU_CDC_SETBACKGROUNDCOLOR 0x004201DA
    is fine i use 1.03O eng too.

  12. #162
    Alpha Member ianvalls90 is offline
    MemberRank
    Apr 2007 Join Date
    ArgentinaLocation
    1,829Posts

    Re: Client 1.03P ENG Source(CustomHP-CustomMonster-CustomItems and more)

    Quote Originally Posted by ATJIAHT View Post
    i trying kill Player :D
    but i need disable hp bar in PvP :)

    i solved this. Hp Bar only for Monsters.
    need replace



    for this


    and added in Prodef.h


    perhaps this is a bad solution but it works
    Gonna test this now, but the Prodef.h part I have it added already, exactly the same...o.O

  13. #163
    Account Upgraded | Title Enabled! walter29 is offline
    MemberRank
    Dec 2007 Join Date
    316Posts

    Re: Client 1.03P ENG Source(CustomHP-CustomMonster-CustomItems and more)

    guys, I'm trying to adapt that system in server AI julia however is giving an error when the dll copilar see log below:
    1>ClCompile:
    1> User.cpp
    1>User.cpp(541): warning C4244: '=' : conversion from 'DWORD' to 'unsigned short', possible loss of data
    1>User.cpp(801): warning C4244: '=' : conversion from 'float' to 'int', possible loss of data
    1>User.cpp(802): warning C4244: '=' : conversion from 'float' to 'int', possible loss of data
    1>User.cpp(804): error C2065: 'OBJ_USER' : undeclared identifier
    1>User.cpp(809): error C2065: 'OBJ_USER' : undeclared identifier
    I'm no expert on the subject, I'm just venturing to add that to the info and your help, if someone can guide me in this as adapitar soucer AI julia will be grateful because I really want to learn about these things mecher

  14. #164
    Lage Company™ afonsolage is offline
    MemberRank
    Mar 2012 Join Date
    Fortaleza, BRALocation
    244Posts

    Re: Client 1.03P ENG Source(CustomHP-CustomMonster-CustomItems and more)

    Lets go:

    @ianvalls90
    Sorry, I've renamed that variable and forgot about that. The correct would be:
    Code:
    if (gTarg->Type == OBJ_MONSTER)
    {
    pResult.Life = gTarg->Life;
    pResult.MaxLife = gTarg->MaxLife + gTarg->AddLife;
    }
    I've edited the post.

    @Mila,
    What you mean with "Chain" error? Can you post the full error description?

    @ATJIAHT
    This seems to be a conversion error, or a float overflow. You changed the client side Hp and MaxHp variables to float, like I posted here?


    Quote Originally Posted by walter29 View Post
    guys, I'm trying to adapt that system in server AI julia however is giving an error when the dll copilar see log below:


    I'm no expert on the subject, I'm just venturing to add that to the info and your help, if someone can guide me in this as adapitar soucer AI julia will be grateful because I really want to learn about these things mecher
    Change OBJ_USER to OBJECT_USER
    Last edited by afonsolage; 06-10-13 at 05:40 PM.

  15. #165
    Account Upgraded | Title Enabled! Mila is offline
    MemberRank
    Jan 2013 Join Date
    325Posts

    Re: Client 1.03P ENG Source(CustomHP-CustomMonster-CustomItems and more)

    Quote Originally Posted by ATJIAHT View Post

    thx but....
    any idea? :)
    Check my post for fix this...

    http://forum.ragezone.com/f508/clien...ml#post7814898

    Quote Originally Posted by afonsolage View Post
    Lets go:
    @Mila,
    What you mean with "Chain" error? Can you post the full error description?
    I solver delete this line:
    #define MU_CDC_SETBACKGROUNDCOLOR 0x004201DA "typedef DWORD(__thiscall *pCDCSetTextColor)"
    But this line not work (fails to show hp bar)
    if (Mob_HP_Bar.isDraw && (*(LPBYTE)0x8C8674) != 0xFF)



Advertisement