metin2united
.Elijah

c++ C++ | Metin2 | Mount System Renewal

28 posts in this topic

Description :

  • The mount will follow you.
  • The bonuses is set from item_proto.

https://i.gyazo.com/9dac9deaada344672a153f37575d0b13.mp4

https://i.gyazo.com/05713068360a55cbbe25db6761925030.mp4
https://i.gyazo.com/de7397f26a0b7aeeb66e1b4ce4af5b0d.mp4

 

Code is based on default pet code from Ymir, i don't offer support for extra features, details, anyway easy for use.
(Sorry for tutorial, not so perfect.)


Download:

https://mega.nz/#!eMIgVajA!uxIaISsLj3S5BipWsgEHIX4k84AcyGByIcF8DsTfv_E

 

  • Like 9
  • Thanks 3

Share this post


Link to post
Share on other sites
"

///add:
#ifdef ENABLE_MOUNT_COSTUME_SYSTEM
#include "MountSystem.h"
#endif

///search:
    if (g_noticeBattleZone)
    {
        if (FN_is_battle_zone(ch))
        {
            ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("? ??? ???? ??? ??? ? ????."));
            ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("? ??? ???? ???"));
            ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("??? ?? ? ???? ????? ????."));
        }
    }

///add:
#ifdef ENABLE_MOUNT_COSTUME_SYSTEM
    if (ch->GetMapIndex() != 113 && CArenaManager::instance().IsArenaMap(ch->GetMapIndex()) == false)
    {
        ch->CheckMount();
    }
#endif

///search:
    else if (ch->GetMapIndex() == 113)
    {
#ifdef ENABLE_MOUNT_COSTUME_SYSTEM
        if (ch->IsHorseRiding() == true)
        {
            ch->StopRiding();
            ch->HorseSummon(false);
        }

        ch->RemoveAffect(AFFECT_MOUNT);
        ch->RemoveAffect(AFFECT_MOUNT_BONUS);
        if (ch->IsRiding())
            ch->StopRiding();
#endif
///add:


///search:


///add:


///search:


///add:

"

 

why? :(

Share this post


Link to post
Share on other sites

https://pastebin.com/eHXxUSt

 

 

  1. 01. Search :
  2. #include "priv_manager.h"
  3.  
  4. 01. Add after :
  5.  
  6. #ifdef ENABLE_MOUNT_COSTUME_SYSTEM
  7. #include "MountSystem.h"
  8. #endif
  9.  
  10.  
  11. 02. Search :
  12.  
  13.     if (g_noticeBattleZone)
  14.     {
  15.                 ...
  16.     }
  17.    
  18. 02. Add after :
  19.  
  20. #ifdef ENABLE_MOUNT_COSTUME_SYSTEM
  21.     if (ch->GetMapIndex() != 113 && CArenaManager::instance().IsArenaMap(ch->GetMapIndex()) == false)
  22.     {
  23.         ch->CheckMount();
  24.     }
  25. #endif

c

  • Like 1

Share this post


Link to post
Share on other sites

Why you did not do this? Isn't it simplier this way ?

		m_stateIdle.Set(this, &CHARACTER::BeginStateEmpty, &CHARACTER::StateHorse, &CHARACTER::EndStateEmpty);
		m_stateMove.Set(this, &CHARACTER::BeginStateEmpty, &CHARACTER::StateMove, &CHARACTER::EndStateEmpty);
		m_stateBattle.Set(this, &CHARACTER::BeginStateEmpty, &CHARACTER::StateHorse, &CHARACTER::EndStateEmpty);
		//Instead of StateHorse create a new one inside char_state called StateMount or sth same for StateMove

 

Share this post


Link to post
Share on other sites

Any one can make this system like official ? I mean when use the seal the player directly ride the mount and when take off the seal the mount disappear 

 

I can pay for it 

Share this post


Link to post
Share on other sites

After porting ive got 2 mounts one im riding on and second on next to me.  

When ive got on the mount my bonuses are duplicated

Pay for fix

Share this post


Link to post
Share on other sites
On 1/2/2019 at 5:04 AM, Krusty said:

After porting ive got 2 mounts one im riding on and second on next to me.  

When ive got on the mount my bonuses are duplicated

Pay for fix

read the replies == 


just delete the mount quest

Share this post


Link to post
Share on other sites
vor 1 Stunde schrieb jeddawee:

read the replies == 


just delete the mount quest

Fixxed already. It was a big inside the source but thanks anyway

Share this post


Link to post
Share on other sites
1 hour ago, Krusty said:

Fixxed already. It was a big inside the source but thanks anyway

Would you mind showing us how can we fix this too?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.