Jump to content

Doose

Active+ Member
  • Posts

    113
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Doose

  1. Hello Metin2 Dev Community.

    I'm here to present a function to check and return the monster rank.

    Spoiler
    //File: questlua_npc.cpp
    
    //Search for:
    	int npc_get_level(lua_State * L)
    	{
    		LPCHARACTER npc = CQuestManager::instance().GetCurrentNPCCharacterPtr();
    		lua_pushnumber(L, npc ? npc->GetLevel() : 0);
    		return 1;
    	}
    
    //Add after:
    	int npc_get_rank(lua_State * L)
    	{
    		LPCHARACTER npc = CQuestManager::instance().GetCurrentNPCCharacterPtr();
    		lua_pushnumber(L, npc ? npc->GetMobRank() : 0);
    		return 1;
    	}
    
    //Search for:
    	{ "get_level",			npc_get_level			},
    
    //Add after:
    	{ "get_rank",			npc_get_rank			},
    
    //Now in quest_functions add:
    	npc.get_rank
          
    
    //Here is a simple quest on how it works.
    quest test begin
        state start begin
            when kill with npc.get_race() == 101 begin
                if npc.get_rank() == 4 then
                    game.drop_item_with_ownership(19, 1)
                end
            end
        end
    end

     


    I'm creating my biolog that's why i had to create this function, i know there are other ways to do this but i decided to do it this way.
    I'm sharing in case someone needs.

     

    With best regards, Doose.

    • Metin2 Dev 1
  2. Spoiler
    //File: PythonNonPlayerModule.cpp (userinterface)
    
    Search for this function to see if it exists:
    PyObject* nonplayerGetMonsterLevel(PyObject* poSelf, PyObject* poArgs)
      
    //If it doesn't exist, add this:
    
    PyObject* nonplayerGetMonsterLevel(PyObject* poSelf, PyObject* poArgs)
    {
    	int race;
    	if (!PyTuple_GetInteger(poArgs, 0, &race))
    		return Py_BuildException();
    
    	CPythonNonPlayer& rkNonPlayer = CPythonNonPlayer::Instance();
    
    	return Py_BuildValue("i", rkNonPlayer.GetMonsterLevel(race));
    }
    
    { "GetMonsterLevel",			nonplayerGetMonsterLevel,			METH_VARARGS },
    
    
    

     

    To help you more i would need your anydesk or discord.

    WIth best regards,

    Doose.

  3. Hello metin2 Dev.

    I'm here to present a method on how to create a new passive skill.

    the design of my own passive won't be shared so i recommend you to create a new one.

    Here is a gif.

    So, let's go to the tutorial.

    Spoiler

    SVN Game

    Spoiler
    //File: char.cpp
    
    //Search for:
    	Int iMaxStamina;
    
    //Add after:
        CSkillProto* pkSk;
        int value_skill = 0;
    
    //Search for:
    	iMaxHP += static_cast<int>(pkSk->kPointPoly.Eval());
    
    //Add after:
            {
                pkSk = CSkillManager::instance().Get(SKILL_REALM_UNITY);
    
                if (NULL != pkSk)
                {
                    pkSk->SetPointVar("k", 1.0f * GetSkillPower(SKILL_REALM_UNITY) / 100.0f);      //SKILL_REALM_UNITY -> Variable name for skill.
                    value_skill = static_cast<int>(pkSk->kPointPoly.Eval());
                    PointChange(POINT_MAX_HP_PCT,value_skill );
                    value_skill = static_cast<int>(pkSk->kPointPoly2.Eval());
                    PointChange(POINT_HP_REGEN,value_skill );
                    value_skill = static_cast<int>(pkSk->kPointPoly3.Eval());
                    PointChange(POINT_MALL_DEFBONUS,value_skill );
                }
            }
    
    //Search for:
    
    	int CHARACTER::GetLeadershipSkillLevel() const
    	{ 
    	    return GetSkillLevel(SKILL_LEADERSHIP);
    	}
    
    //Add after:
    	int CHARACTER::GetRealmSkillLevel() const
    	{
          	return GetSkillLevel(SKILL_REALM_UNITY);
    	}
    
    //File: char.h
    
    //Search for:
    	int                GetLeadershipSkillLevel() const;
    
    //Add after:
    	int                GetRealmSkillLevel() const;
    
    //File: char_skill.cpp
    
    //Search for:
    
    	SKILL_RESIST_PENETRATE
    
    //Add after:
          , SKILL_REALM_UNITY
          
          
    //File: skill.h
    
    //Search for:
    
    	SKILL_HORSE_SUMMON        = 131,
    
    //Add after:
    
    	SKILL_REALM_UNITY        = 132,

     

     

    Spoiler

    SVN Client

    Spoiler
    //File: PythonPlayerModule.cpp
    
    //Search for:
    
    	extern const DWORD c_iSkillIndex_Summon        = 131;
    
    //Add after:
    
    	extern const DWORD c_iSkillIndex_Realm        = 132;
    
    //Search for:
    
    	PyModule_AddIntConstant(poModule, "SKILL_INDEX_SUMMON",            c_iSkillIndex_Summon);
    
    //Add after:
    	PyModule_AddIntConstant(poModule, "SKILL_INDEX_REALM",            c_iSkillIndex_Realm);
    
    //File: PythonPlayerSkill.cpp
    
    //Search for:
    
    
    	bool CPythonPlayer::__CheckShortMana(TSkillInstance& rkSkillInst, CPythonSkill::TSkillData& rkSkillData)
    	{
    	    extern const DWORD c_iSkillIndex_Summon;
    	    if (c_iSkillIndex_Summon == rkSkillInst.dwIndex)
     	       return false;
    
    
    //Add after:
    
        extern const DWORD c_iSkillIndex_Realm;
        if (c_iSkillIndex_Realm == rkSkillInst.dwIndex)
            return false;

     

     

    Spoiler

    CLIENT ROOT

    Spoiler
    //File: playersettingmodule.py
    
    //Search for:
    
    	SKILL_INDEX_DICT = {
    
    //Do:    Extend your "SUPPORT" for all jobs with: 132
    
    
    //File: uicharacter.py
    
    //Search for:
    
    	SHOW_LIMIT_SUPPORT_SKILL_LIST
    
    //Do: 	Extend with: 132
      
    //Search for:
    
    	skillType = skill.GetSkillType(skillIndex)
    
    
    //Add after:
    
            if skillIndex == 132:
                if skillGrade == 1:
                    skillLevel += 19
                elif skillGrade == 2:
                    skillLevel += 29
                elif skillGrade == 3:
                    skillLevel += 39
                self.toolTipSkill.SetSkillNew(srcSlotIndex, skillIndex, skillGrade, skillLevel)
                return

     

     

    Spoiler

    CLIENT LOCALE

    Spoiler

    Edit your skilldesc.txt, skilltable.txt and add the image on ETC.

     

    Spoiler

    SERVER

    Spoiler

    Edit your skill_proto.sql on navicat with your new skill.

     

     

    And this is how you create a new support skill.

    Anything you need help with, don't hesitate to write here or to contact.

    With best regards,
    Doose.

    • Metin2 Dev 3
    • Good 1
    • muscle 1
    • Love 1
    • Love 3
  4. 14 minutes ago, Filachilla said:

    Yes, thats my idea.. 😄 I think it would be better when its not just totally free like press button.. 😄

    I see, here is a simple and fast way to do it (With the system installed).

    Spoiler

    ROOT:

    Spoiler

    Inside Game.py search for:

    def __ServerCommand_Build(self):

    After:

    "MyShopPriceList"        : self.__PrivateShop_PriceList,

    Add:

    "portable_shop"        : self.portable_shop,

     

    Add at EOF:

        def portable_shop(self):
            self.interface.PortableShop()

     

    Spoiler

    Quest:

    Spoiler

    quest random begin

    state start begin

    when itemvum.use with pc.get_level() < 20 begin --This pc.get_level() < 20 is a simple conditionm, you can remove if you want.

    cmdchat("portable_shop")

    end

    end

    end

     

     

    With best regards, Doose.

    • Metin2 Dev 2
    • Love 1
  5. This is the hidden content, please

    Alternative download links → 

    This is the hidden content, please

     

     

    Hello Metin2 Dev.
    I'm here to present a Portable Shop System.

    How does it work?

    • Players get a panel when click F7 with several options.
    • This system exists to make players able to buy items while farming.

    In case of any problem, contact me or write here.

    With best regards, Doose.

    Spoiler

    spacer.png

     

    • Metin2 Dev 27
    • Lmao 1
    • Good 2
    • Love 11
  6. This is the hidden content, please

    This is the hidden content, please

    Hello Metin2 Dev.

    I'm here to share 2 of my hunting missions.

    How do they work?

    • The player receive a scroll with the mission details.
    • It will give the player 2 options.
    • After complete the mission, the player receives his reward.
    • The second mission only appears after concluding the first one.
    • It will show on mission panel how many left is there to kill.

     

    As always is a pleasure to work with this community.

    Any error or problem, text here or contact me in private.

    With best Regards, Doose.

    • Metin2 Dev 94
    • Eyes 4
    • Facepalm 1
    • Think 2
    • Good 22
    • Love 9
    • Love 42
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.