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

Page 8 of 19 FirstFirst 1234567891011121314151618 ... LastLast
Results 106 to 120 of 279
  1. #106
    Lage Company™ afonsolage is offline
    MemberRank
    Mar 2012 Join Date
    Fortaleza, BRALocation
    244Posts

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

    I was able to fix the HPBar problem by chaging Life and MaxLife from int to float, since GS uses it as float:


    GS - User.CPP
    Code:
    //Custom HPBar mod:
    struct PMSG_ATTACKRESULT
    {
    	PBMSG_HEAD	h; // C1:DC
    	BYTE		NumberH; // 3
    	BYTE		NumberL; // 4
    	BYTE		DamageH; // 5
    	BYTE		DamageL; // 6
    	BYTE		DamageType; // 7
    	BYTE		btShieldDamageH; // 8
    	BYTE		btShieldDamageL; // 9
    	float		Life; //A
    	float		MaxLife; //E
    };
    Main.dll - mob_hp_bar.cpp
    Code:
    void CMob_HPBar::Draw()
    {
    	if (this->MaxHP == 0) return;
    	int pHP = (int)((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, 130));
    	}
    	else
    	{
    		this->isDraw = false;
    	}
    }
    
    void CMob_HPBar::SetupMob(float Life, float MaxLife, WORD index)
    {
    	if (Life > MaxLife)
    	{
    		this->isDraw = false; //something is wrong ^.^
    	}
    	this->HP = Life;
    	this->MaxHP = MaxLife;
    	this->aIndex = index;
    	this->isDraw = TRUE;
    }
    Main.dll - mob_hp_bar.h
    Code:
    class CMob_HPBar
    {
    	private:
    		float HP;
    		float MaxHP;
    	
    	public:
    		BOOL isDraw;
    		WORD aIndex;
    
    		CMob_HPBar();
    		virtual ~CMob_HPBar();
    		
    		void SetupMob(float Life, float MaxLife, WORD index);
    		void Draw();
    };
    I've added the PMSG_ATTACKRESULT on Protocol.cpp, to a better reading:

    Code:
    #include "StdAfx.h"
    #include "Protocol.h"
    #include "game_char.h"
    #include "mob_hp_bar.h"
    #include "mu_utils.h"
    
    pMU_ProtocolCoreEx MU_ProtocolCoreEx;
    BYTE PROTOCOLCORE_COPY_LEN = 7;
    
    struct PBMSG_HEAD	// Packet - Byte Type
    {
    public:
    	void set ( LPBYTE lpBuf, BYTE head, BYTE size)	// line : 18
    	{
    		lpBuf[0] = 0xC1;
    		lpBuf[1] = size;
    		lpBuf[2] = head;
    	};	// line : 22
    
    	void setE ( LPBYTE lpBuf, BYTE head, BYTE size)	// line : 25
    	{
    		lpBuf[0] = 0xC3;
    		lpBuf[1] = size;
    		lpBuf[2] = head;
    	};	// line : 29
    
    	BYTE c;
    	BYTE size;
    	BYTE headcode;
    }; 
    
    struct PMSG_ATTACKRESULT
    {
    	PBMSG_HEAD	h; // C1:DC
    	BYTE		NumberH; // 3
    	BYTE		NumberL; // 4
    	BYTE		DamageH; // 5
    	BYTE		DamageL; // 6
    	BYTE		DamageType; // 7
    	BYTE		btShieldDamageH; // 8
    	BYTE		btShieldDamageL; // 9
    	float		Life; //A
    	float		MaxLife; //E
    };
    
    int __cdecl cMU_ProtocolCore(int index, PBYTE lpMsg, int len, int flags)
    {
    	switch (index)
    	{
    		case MU_DAMAGE: //Damage
    			{
    				PMSG_ATTACKRESULT * lpAttack = (PMSG_ATTACKRESULT *) lpMsg;
    				WORD tIndex = ((lpAttack->NumberH << 8) + lpAttack->NumberL) & 0x7FFF;
    				if (tIndex == *GameIndex) {break;}
    				if (lpMsg[1] > 10)
    				{
    					float Life, MaxLife;
    					memcpy(&Life, &lpAttack->Life, sizeof(float));
    					memcpy(&MaxLife, &lpAttack->MaxLife, sizeof(float));
    					Mob_HP_Bar.SetupMob(Life, MaxLife, tIndex);
    					break;
    				}
    				break;
    			}
    
    		case 0x14: //Destroy viewport chars
    			{
    				for (unsigned int i=0; i<lpMsg[3]; ++i)
    				{
    					WORD tIndex = (lpMsg[4 + (i*2)] << 8) + lpMsg[5 + (i*2)];
    					if (tIndex == Mob_HP_Bar.aIndex)
    					{
    						Mob_HP_Bar.isDraw = false;
    						break;
    					}
    				}
    				break;
    			}
    
    		case 0x17: //Killed object
    			{
    				WORD tIndex = (lpMsg[3] << 8) + lpMsg[4];
    				if ((tIndex == Mob_HP_Bar.aIndex) || (tIndex == *GameIndex))
    				{
    					Mob_HP_Bar.isDraw = false;
    				}
    				break;
    			}
    
    		case 0x1C: //Teleport
    			{
    				if (lpMsg[5] == 1)
    				{
    					Mob_HP_Bar.isDraw = false;
    				}
    				break;
    			}
    
    		case 0xF3:
    			{
    				switch(lpMsg[3])
    				{
    					case 0x03: //Character selected (join map)
    						{
    							Mob_HP_Bar.isDraw = false;
    							break;
    						}
    					case 0x04: //Respawn
    						{
    							Mob_HP_Bar.isDraw = false;
    							break;
    						}
    				}
    				break;
    			}
    
    	}
    	return MU_ProtocolCoreEx(index, lpMsg, len, flags);
    }
    
    void InitProtocol()
    {
    	MU_ProtocolCoreEx = (pMU_ProtocolCoreEx)HookFunction((LPVOID)MU_PROTOCOL_CORE, cMU_ProtocolCore, PROTOCOLCORE_COPY_LEN);
    }
    muonline_hpbar.jpg

    EDIT:

    I've noticed also there is no Damage Info on client side, this is because the hooked GCDamageSend function uses JNP protocol for attack (0xDC) but our client is ENG (0x11), so we need to change it:

    Just change this on user.cpp (Server side)
    Code:
    PHeadSetB((LPBYTE)&pResult, 0x11, sizeof(pResult));
    And just change it on Protocol.h (Client side)
    Code:
    #define MU_DAMAGE			0x11


    Now my request:

    1 - Some one knows the offsets for current selected monsters? Then we can improve the HPMobar to show only selected mobs.

    2 - How to get rid of this fog on Cash Shop?

    Last edited by afonsolage; 30-09-13 at 08:10 AM.

  2. #107
    C/C++,PHP,HTML,Java,ASM zasmqniq is offline
    MemberRank
    Jan 2009 Join Date
    BulgariaLocation
    435Posts

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

    First Post Updated! :)!

  3. #108
    Proficient Member VeltonD is offline
    MemberRank
    Feb 2013 Join Date
    193Posts

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

    Quote Originally Posted by afonsolage View Post
    I was able to fix the HPBar problem by chaging Life and MaxLife from int to float, since GS uses it as float:


    GS - User.CPP
    Code:
    //Custom HPBar mod:
    struct PMSG_ATTACKRESULT
    {
        PBMSG_HEAD    h; // C1:DC
        BYTE        NumberH; // 3
        BYTE        NumberL; // 4
        BYTE        DamageH; // 5
        BYTE        DamageL; // 6
        BYTE        DamageType; // 7
        BYTE        btShieldDamageH; // 8
        BYTE        btShieldDamageL; // 9
        float        Life; //A
        float        MaxLife; //E
    };
    Main.dll - mob_hp_bar.cpp
    Code:
    void CMob_HPBar::Draw()
    {
        if (this->MaxHP == 0) return;
        int pHP = (int)((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, 130));
        }
        else
        {
            this->isDraw = false;
        }
    }
    
    void CMob_HPBar::SetupMob(float Life, float MaxLife, WORD index)
    {
        if (Life > MaxLife)
        {
            this->isDraw = false; //something is wrong ^.^
        }
        this->HP = Life;
        this->MaxHP = MaxLife;
        this->aIndex = index;
        this->isDraw = TRUE;
    }
    Main.dll - mob_hp_bar.h
    Code:
    class CMob_HPBar
    {
        private:
            float HP;
            float MaxHP;
        
        public:
            BOOL isDraw;
            WORD aIndex;
    
            CMob_HPBar();
            virtual ~CMob_HPBar();
            
            void SetupMob(float Life, float MaxLife, WORD index);
            void Draw();
    };
    I've added the PMSG_ATTACKRESULT on Protocol.cpp, to a better reading:

    Code:
    #include "StdAfx.h"
    #include "Protocol.h"
    #include "game_char.h"
    #include "mob_hp_bar.h"
    #include "mu_utils.h"
    
    pMU_ProtocolCoreEx MU_ProtocolCoreEx;
    BYTE PROTOCOLCORE_COPY_LEN = 7;
    
    struct PBMSG_HEAD    // Packet - Byte Type
    {
    public:
        void set ( LPBYTE lpBuf, BYTE head, BYTE size)    // line : 18
        {
            lpBuf[0] = 0xC1;
            lpBuf[1] = size;
            lpBuf[2] = head;
        };    // line : 22
    
        void setE ( LPBYTE lpBuf, BYTE head, BYTE size)    // line : 25
        {
            lpBuf[0] = 0xC3;
            lpBuf[1] = size;
            lpBuf[2] = head;
        };    // line : 29
    
        BYTE c;
        BYTE size;
        BYTE headcode;
    }; 
    
    struct PMSG_ATTACKRESULT
    {
        PBMSG_HEAD    h; // C1:DC
        BYTE        NumberH; // 3
        BYTE        NumberL; // 4
        BYTE        DamageH; // 5
        BYTE        DamageL; // 6
        BYTE        DamageType; // 7
        BYTE        btShieldDamageH; // 8
        BYTE        btShieldDamageL; // 9
        float        Life; //A
        float        MaxLife; //E
    };
    
    int __cdecl cMU_ProtocolCore(int index, PBYTE lpMsg, int len, int flags)
    {
        switch (index)
        {
            case MU_DAMAGE: //Damage
                {
                    PMSG_ATTACKRESULT * lpAttack = (PMSG_ATTACKRESULT *) lpMsg;
                    WORD tIndex = ((lpAttack->NumberH << 8) + lpAttack->NumberL) & 0x7FFF;
                    if (tIndex == *GameIndex) {break;}
                    if (lpMsg[1] > 10)
                    {
                        float Life, MaxLife;
                        memcpy(&Life, &lpAttack->Life, sizeof(float));
                        memcpy(&MaxLife, &lpAttack->MaxLife, sizeof(float));
                        Mob_HP_Bar.SetupMob(Life, MaxLife, tIndex);
                        break;
                    }
                    break;
                }
    
            case 0x14: //Destroy viewport chars
                {
                    for (unsigned int i=0; i<lpMsg[3]; ++i)
                    {
                        WORD tIndex = (lpMsg[4 + (i*2)] << 8) + lpMsg[5 + (i*2)];
                        if (tIndex == Mob_HP_Bar.aIndex)
                        {
                            Mob_HP_Bar.isDraw = false;
                            break;
                        }
                    }
                    break;
                }
    
            case 0x17: //Killed object
                {
                    WORD tIndex = (lpMsg[3] << 8) + lpMsg[4];
                    if ((tIndex == Mob_HP_Bar.aIndex) || (tIndex == *GameIndex))
                    {
                        Mob_HP_Bar.isDraw = false;
                    }
                    break;
                }
    
            case 0x1C: //Teleport
                {
                    if (lpMsg[5] == 1)
                    {
                        Mob_HP_Bar.isDraw = false;
                    }
                    break;
                }
    
            case 0xF3:
                {
                    switch(lpMsg[3])
                    {
                        case 0x03: //Character selected (join map)
                            {
                                Mob_HP_Bar.isDraw = false;
                                break;
                            }
                        case 0x04: //Respawn
                            {
                                Mob_HP_Bar.isDraw = false;
                                break;
                            }
                    }
                    break;
                }
    
        }
        return MU_ProtocolCoreEx(index, lpMsg, len, flags);
    }
    
    void InitProtocol()
    {
        MU_ProtocolCoreEx = (pMU_ProtocolCoreEx)HookFunction((LPVOID)MU_PROTOCOL_CORE, cMU_ProtocolCore, PROTOCOLCORE_COPY_LEN);
    }
    muonline_hpbar.jpg

    EDIT:

    I've noticed also there is no Damage Info on client side, this is because the GCDamageSend function was hooked and after it, it just finish, didnt continue what GCDamageSend should do.

    Dont know if there is a solution for this, but i've done as follows:

    Declare the original GCDamageSend function on Prodef.h:
    Code:
    #define lpGCDamageSend ((void(*)(int aIndex, int TargetIndex, int AttackDamage, int MSBFlag, int MSBDamage, int iShieldDamage)) 0x00455CB0)
    And just call this function at the end of our new function - User.cpp
    Code:
    lpGCDamageSend(aIndex, TargetIndex, AttackDamage, MSBFlag, MSBDamage, iShieldDamage);



    Now my request:

    1 - Some one knows the offsets for current selected monsters? Then we can improve the HPMobar to show only selected mobs.

    2 - How to get rid of this fog on Cash Shop?

    WOOOOW, Work 10000% Very Thanks :D

    It has a Changing the place where the bar is?
    Last edited by VeltonD; 27-09-13 at 02:15 PM.

  4. #109
    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 VeltonD View Post
    WOOOOW, Work 10000% Very Thanks :D

    It has a Changing the place where the bar is?
    I was making some tests but I tough it was back on right place . Isn't?

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

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

    Alfonso, could you share a full way to add this to julia's source? Added as in first post, and modded like you said, but still getting lots of errors when compiling :|.

    Maybe, just maybe, you can enlighten me and help me add this mod ^^; driving me nuts :|

  6. #111
    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
    I was able to fix the HPBar problem by chaging Life and MaxLife from int to float, since GS uses it as float:


    GS - User.CPP
    Code:
    //Custom HPBar mod:
    struct PMSG_ATTACKRESULT
    {
        PBMSG_HEAD    h; // C1:DC
        BYTE        NumberH; // 3
        BYTE        NumberL; // 4
        BYTE        DamageH; // 5
        BYTE        DamageL; // 6
        BYTE        DamageType; // 7
        BYTE        btShieldDamageH; // 8
        BYTE        btShieldDamageL; // 9
        float        Life; //A
        float        MaxLife; //E
    };
    Main.dll - mob_hp_bar.cpp
    Code:
    void CMob_HPBar::Draw()
    {
        if (this->MaxHP == 0) return;
        int pHP = (int)((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, 130));
        }
        else
        {
            this->isDraw = false;
        }
    }
    
    void CMob_HPBar::SetupMob(float Life, float MaxLife, WORD index)
    {
        if (Life > MaxLife)
        {
            this->isDraw = false; //something is wrong ^.^
        }
        this->HP = Life;
        this->MaxHP = MaxLife;
        this->aIndex = index;
        this->isDraw = TRUE;
    }
    Main.dll - mob_hp_bar.h
    Code:
    class CMob_HPBar
    {
        private:
            float HP;
            float MaxHP;
        
        public:
            BOOL isDraw;
            WORD aIndex;
    
            CMob_HPBar();
            virtual ~CMob_HPBar();
            
            void SetupMob(float Life, float MaxLife, WORD index);
            void Draw();
    };
    I've added the PMSG_ATTACKRESULT on Protocol.cpp, to a better reading:

    Code:
    #include "StdAfx.h"
    #include "Protocol.h"
    #include "game_char.h"
    #include "mob_hp_bar.h"
    #include "mu_utils.h"
    
    pMU_ProtocolCoreEx MU_ProtocolCoreEx;
    BYTE PROTOCOLCORE_COPY_LEN = 7;
    
    struct PBMSG_HEAD    // Packet - Byte Type
    {
    public:
        void set ( LPBYTE lpBuf, BYTE head, BYTE size)    // line : 18
        {
            lpBuf[0] = 0xC1;
            lpBuf[1] = size;
            lpBuf[2] = head;
        };    // line : 22
    
        void setE ( LPBYTE lpBuf, BYTE head, BYTE size)    // line : 25
        {
            lpBuf[0] = 0xC3;
            lpBuf[1] = size;
            lpBuf[2] = head;
        };    // line : 29
    
        BYTE c;
        BYTE size;
        BYTE headcode;
    }; 
    
    struct PMSG_ATTACKRESULT
    {
        PBMSG_HEAD    h; // C1:DC
        BYTE        NumberH; // 3
        BYTE        NumberL; // 4
        BYTE        DamageH; // 5
        BYTE        DamageL; // 6
        BYTE        DamageType; // 7
        BYTE        btShieldDamageH; // 8
        BYTE        btShieldDamageL; // 9
        float        Life; //A
        float        MaxLife; //E
    };
    
    int __cdecl cMU_ProtocolCore(int index, PBYTE lpMsg, int len, int flags)
    {
        switch (index)
        {
            case MU_DAMAGE: //Damage
                {
                    PMSG_ATTACKRESULT * lpAttack = (PMSG_ATTACKRESULT *) lpMsg;
                    WORD tIndex = ((lpAttack->NumberH << 8) + lpAttack->NumberL) & 0x7FFF;
                    if (tIndex == *GameIndex) {break;}
                    if (lpMsg[1] > 10)
                    {
                        float Life, MaxLife;
                        memcpy(&Life, &lpAttack->Life, sizeof(float));
                        memcpy(&MaxLife, &lpAttack->MaxLife, sizeof(float));
                        Mob_HP_Bar.SetupMob(Life, MaxLife, tIndex);
                        break;
                    }
                    break;
                }
    
            case 0x14: //Destroy viewport chars
                {
                    for (unsigned int i=0; i<lpMsg[3]; ++i)
                    {
                        WORD tIndex = (lpMsg[4 + (i*2)] << 8) + lpMsg[5 + (i*2)];
                        if (tIndex == Mob_HP_Bar.aIndex)
                        {
                            Mob_HP_Bar.isDraw = false;
                            break;
                        }
                    }
                    break;
                }
    
            case 0x17: //Killed object
                {
                    WORD tIndex = (lpMsg[3] << 8) + lpMsg[4];
                    if ((tIndex == Mob_HP_Bar.aIndex) || (tIndex == *GameIndex))
                    {
                        Mob_HP_Bar.isDraw = false;
                    }
                    break;
                }
    
            case 0x1C: //Teleport
                {
                    if (lpMsg[5] == 1)
                    {
                        Mob_HP_Bar.isDraw = false;
                    }
                    break;
                }
    
            case 0xF3:
                {
                    switch(lpMsg[3])
                    {
                        case 0x03: //Character selected (join map)
                            {
                                Mob_HP_Bar.isDraw = false;
                                break;
                            }
                        case 0x04: //Respawn
                            {
                                Mob_HP_Bar.isDraw = false;
                                break;
                            }
                    }
                    break;
                }
    
        }
        return MU_ProtocolCoreEx(index, lpMsg, len, flags);
    }
    
    void InitProtocol()
    {
        MU_ProtocolCoreEx = (pMU_ProtocolCoreEx)HookFunction((LPVOID)MU_PROTOCOL_CORE, cMU_ProtocolCore, PROTOCOLCORE_COPY_LEN);
    }
    muonline_hpbar.jpg

    EDIT:

    I've noticed also there is no Damage Info on client side, this is because the GCDamageSend function was hooked and after it, it just finish, didnt continue what GCDamageSend should do.

    Dont know if there is a solution for this, but i've done as follows:

    Declare the original GCDamageSend function on Prodef.h:
    Code:
    #define lpGCDamageSend ((void(*)(int aIndex, int TargetIndex, int AttackDamage, int MSBFlag, int MSBDamage, int iShieldDamage)) 0x00455CB0)
    And just call this function at the end of our new function - User.cpp
    Code:
    lpGCDamageSend(aIndex, TargetIndex, AttackDamage, MSBFlag, MSBDamage, iShieldDamage);



    Now my request:

    1 - Some one knows the offsets for current selected monsters? Then we can improve the HPMobar to show only selected mobs.

    2 - How to get rid of this fog on Cash Shop?

    Great, shows the damage, but the hp bar is still seen bad ..

  7. #112
    ImperiaMuCMS CEO jacubb is offline
    MemberRank
    Jul 2011 Join Date
    SlovakiaLocation
    1,507Posts

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

    For me now works everything great, but it will be nice to recode hp bar as it is in ex702, that over each monster will show hp bar. But I have no idea how to do it cause I dont have enough knowledge for client-side coding.

  8. #113
    Account Upgraded | Title Enabled! Offspring is offline
    MemberRank
    Oct 2011 Join Date
    203Posts

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

    Quote Originally Posted by jacubb View Post
    For me now works everything great, but it will be nice to recode hp bar as it is in ex702, that over each monster will show hp bar. But I have no idea how to do it cause I dont have enough knowledge for client-side coding.
    I second this + Is it possible for someone, to ADD or create something similar like the Autoclicker(AutoHelper) from season 6 episode 3 client, to Julia Files, season 4 files main 1.3.11 ??? Is this possible?

  9. #114
    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 Offspring View Post
    I second this + Is it possible for someone, to ADD or create something similar like the Autoclicker(AutoHelper) from season 6 episode 3 client, to Julia Files, season 4 files main 1.3.11 ??? Is this possible?
    Yes, its possible, but I think no one here is trying to do it, because this needs a lot of work. And the new MuHelper make the servers even more Easy, so a server hard with MuHelper isnt very hard, because you can hunt anything AFK, which makes players stop hunting and itens prices get low.

    I have a Ex702 server from IGCN and it's very nice, but I cant make a very hard server, because this i'll open another S4.6.

    Of course, this is MY OPINION and how I see MuHelper.

    Quote Originally Posted by ianvalls90 View Post
    Alfonso, could you share a full way to add this to julia's source? Added as in first post, and modded like you said, but still getting lots of errors when compiling :|.

    Maybe, just maybe, you can enlighten me and help me add this mod ^^; driving me nuts :|
    What erros do you got? On Main.dll or on WzAg.dll?
    Last edited by afonsolage; 28-09-13 at 06:40 PM.

  10. #115
    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
    Yes, its possible, but I think no one here is trying to do it, because this needs a lot of work. And the new MuHelper make the servers even more Easy, so a server hard with MuHelper isnt very hard, because you can hunt anything AFK, which makes players stop hunting and itens prices get low.

    I have a Ex702 server from IGCN and it's very nice, but I cant make a very hard server, because this i'll open another S4.6.

    Of course, this is MY OPINION and how I see MuHelper.



    What erros do you got? On Main.dll or on WzAg.dll?
    not 100% sure now, im not at home...but got a few errors on user.cpp while compiling WzAg.dll :/

  11. #116
    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 ianvalls90 View Post
    not 100% sure now, im not at home...but got a few errors on user.cpp while compiling WzAg.dll :/
    Add all them here: Pastebin.com - #1 paste tool since 2002!. Then I may check for you.

  12. #117
    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
    Add all them here: Pastebin.com - #1 paste tool since 2002!. Then I may check for you.
    Im not at home untill tuesday afternoon (gmt-3).....as soon as Im there, I'll check the errors and paste there.

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

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

    Another lilitle change:

    Instead of do it like I refer here:
    Declare the original GCDamageSend function on Prodef.h:
    Code:
    #define lpGCDamageSend ((void(*)(int aIndex, int TargetIndex, int AttackDamage, int MSBFlag, int MSBDamage, int iShieldDamage)) 0x00455CB0)
    And just call this function at the end of our new function - User.cpp
    Code:
    lpGCDamageSend(aIndex, TargetIndex, AttackDamage, MSBFlag, MSBDamage, iShieldDamage);

    Just change this on user.cpp (Server side)
    Code:
    PHeadSetB((LPBYTE)&pResult, 0x11, sizeof(pResult));
    And just change it on Protocol.h (Client side)
    Code:
    #define MU_DAMAGE			0x11
    This change is because i've notice the client is ENG but this solution (0xDC) is the JNP protocol for Attack, since we use ENG protocol we need to change it to 0x11...

    And there is no need to call GCDamageSend again at the end of user.cpp hook because the hooked function do every thing that original GCDamageSend does.

    Well, I'll update my frist post with those infos

    EDIT:


    Also I let for guys who are developing on this version a tip that may help a lot (for those who dont know ofc). It's a Console to have a better output and debugging more easy:



    To use it, just add those two files in your project:
    Console.h:
    Code:
    #ifndef CONSOLE_H
    #define CONSOLE_H
    
    #pragma once
    
    class Console
    {
    public:
    	void Init();
    	void Log(char* format, ...);
    
    };
    
    extern Console console;
    
    #endif
    Console.cpp
    Code:
    #include "stdafx.h"
    #include "Console.h"
    
    Console console;
    
    void Console::Init()
    {
    	AllocConsole();
    	SetConsoleTitle("Main - Debug Console");
    	console.Log("Debug Console started.");
    }
    
    void Console::Log(char* format, ...)
    {
    	char message[1024];
    	SYSTEMTIME t;
    	GetLocalTime(&t);
    	DWORD dwBytesWritten;
    	HANDLE Handle = GetStdHandle(STD_OUTPUT_HANDLE);
    	va_list pArguments;
    	va_start(pArguments, format);
    	vsprintf_s(message, format, pArguments);
    	//CheckProcent(Message); // "%" Bug Fix 
    	va_end(pArguments);
    
    	char currdate[11] = {0};
    	char outputmsg[2048];
    
    	sprintf_s(currdate, "(%02d:%02d:%02d)", t.wHour, t.wMinute, t.wSecond);
    	sprintf_s(outputmsg,"%s %s\n", currdate,message);
    
    	WriteFile(Handle, outputmsg, strlen(outputmsg), &dwBytesWritten, NULL);
    	SetConsoleTextAttribute(Handle, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
    }
    Now lets init the console on Main.cpp, add the following include:
    Code:
    #ifdef NDEBUG
    #include "Console.h"
    #endif
    And call the init function on Main.cpp init():
    Code:
    #ifdef NDEBUG
    		console.Init();
    #endif
    So, if you need to add something on console, just call the Log function, like this example which prints the frist three bytes from received packets on Protocol.cpp (cMu_ProtocolCore):
    Code:
    #ifdef NDEBUG
    	console.Log("Received protocol: %02X %02X %02X", lpMsg[0], lpMsg[1], lpMsg[2]);
    #endif
    Also note i'm using compiler directives ifdef to check if we are on debug mode, so when I need to ship this DLL, just set DEBUG off and the console will not be compiled and not shown.

    I got the IA Julia console code and made it fit on this DLL, so give the credits to IA Julia's Console developer
    Last edited by afonsolage; 30-09-13 at 11:08 AM.

  14. #119
    ^_^ ashlay is offline
    MemberRank
    Jun 2010 Join Date
    BrazilLocation
    874Posts

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

    also in PROTOCOLCORE_COPY_LEN we are using 7 but it is the same at JPN and in ENG should be 10 (i think) im workin in gs .90 source i added hp bar and works 100% in JPN main 1.03k but not work in ENG.


    Code:
    #ifdef __1_03_11JPN
    BYTE PROTOCOLCORE_COPY_LEN = 7;
    #endif
    #ifdef __1_03_28ENG
    BYTE PROTOCOLCORE_COPY_LEN = 10;
    #endif
    Last edited by ashlay; 30-09-13 at 04:29 PM.

  15. #120
    Darkness Member Kiosani is offline
    MemberRank
    Oct 2007 Join Date
    ArgentinaLocation
    1,276Posts

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

    Quote Originally Posted by ashlay View Post
    also in PROTOCOLCORE_COPY_LEN we are using 7 but it is the same at JPN and in ENG should be 10 (i think) im workin in gs .90 source i added hp bar and works 100% in JPN main 1.03k but not work in ENG.


    Code:
    #ifdef __1_03_11JPN
    BYTE PROTOCOLCORE_COPY_LEN = 7;
    #endif
    #ifdef __1_03_28ENG
    BYTE PROTOCOLCORE_COPY_LEN = 10;
    #endif
    the main.exe version: 1.03.28 ENG is more advanced that: 1.03.11 JPN, both are: Season 4.6, but.. this ENG Protocol main is more new that: 1.03.11, is different in some parts of code too. maybe: PROTOCOLCORE_COPY_LEN for the case of a: main.exe 1.03P isn't: 10, maybe is other number. I think
    Last edited by Kiosani; 30-09-13 at 07:17 PM.



Advertisement