Jump to content
metin2dev
Ekstasia2
Sign in to follow this  
.Elijah

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

Recommended Posts

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

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×