Administrator
Administrator
  • Mesaje: 4988
    Membru din: 07 Aug 2024, 18:53
  • Reacții: 126047
  • Mesaje utile: 47
  • Status: Pe aici.. 🤠
    Server: Saga2 - Soon
  • Regat: Jinno
  • [ID Discord]
  • Salut M2Forum,

    Las si eu aici sistemul asta cu care poti modifica tastele default de la joc cu altele.

    De exemplu:

    Poti schimba sa se deschida inventarul de pe tasta P sau sa deschizi Harta Mare de pe tasta I, etc.

    Pe langa asta, poti adauga functii noi la system..eu am pus Daily System si fereastra de la Pet sa poata fi modificate.


    Este un System de Key Binding ca pe alte mmo-uri :)




    Link aici:
    Conținut: Ascuns
    Reacționează ❤️ la acest mesaj și conținutul se va afișa automat.


    sau Download:
    Conținut: Ascuns
    Reacționează ❤️ la acest mesaj și conținutul se va afișa automat.


    Tutorial adaugare taste noi:
    1. Client Source

    /// 1. @ Source/Client/UserInterface/GameType.h
    // Search @ EKeyboardSetting

    Cod: Selectaţi tot

    	KEY_ADDKEYBUFFERCONTROL = 100,
    // Add above

    Cod: Selectaţi tot

    	KEY_CUSTOM_SYSTEM,
    /// 2. @ Source/Client/UserInterface/PythonPlayerModule.cpp
    // Search

    Cod: Selectaţi tot

    	PyModule_AddIntConstant(poModule, "KEY_ADDKEYBUFFERCONTROL", KEY_ADDKEYBUFFERCONTROL);
    // Add above

    Cod: Selectaţi tot

    	PyModule_AddIntConstant(poModule, "KEY_CUSTOM_SYSTEM", KEY_CUSTOM_SYSTEM);
    /// 3. @ Source/Client/UserInterface/PythonPlayerInputKeyboard.cpp
    // Search

    Cod: Selectaţi tot

    		case KEY_SHOW_NAME: PyCallClassMemberFunc(m_ppyGameWindow, "ShowName", Py_BuildValue("()")); break;
    // Add below

    Cod: Selectaţi tot

    		case KEY_CUSTOM_SYSTEM: PyCallClassMemberFunc(m_ppyGameWindow, "CustomSystem", Py_BuildValue("()")); break;
    2. Root

    ''' 1. @ Client/root/game.py
    NOTE: This is the function that the key will call.
    '''
    # Add to the bottom of the document

    Cod: Selectaţi tot

    	def CustomSystem(self):
    		chat.AppendChat(chat.CHAT_TYPE_INFO, "My Custom System")
    ''' 2. @ Client/root/uiKeyChange.py
    NOTE: Always increase this value when adding new keys.
    '''
    # Search @ def __init__

    Cod: Selectaţi tot

    		self.KeySlotMax = 66
    # Add below

    Cod: Selectaţi tot

    		self.KeySlotMax = self.KeySlotMax + 1
    ''' 3. @ Client/root/uiKeyChange.py
    NOTE: This is the default key for calling the function.
    '''
    # Search @ def __BuildKeyInfo

    Cod: Selectaţi tot

    		KeyUiInfoDick[65] = app.DIK_X
    # Add below

    Cod: Selectaţi tot

    		KeyUiInfoDick[66] = app.DIK_F10
    ''' 4. @ Client/root/uiKeyChange.py
    NOTE: This is the default function of the key.
    '''
    # Search @ def __BuildKeyFunction

    Cod: Selectaţi tot

    		KeyFunctionInfo[65] = player.KEY_SHOW_NAME
    # Add below

    Cod: Selectaţi tot

    		KeyFunctionInfo[66] = player.KEY_CUSTOM_SYSTEM
    3. UIScript

    ''' 1. @ Client/UIScript/KeyChange_Window.py '''
    # Add to the bottom of the document

    Cod: Selectaţi tot

    window["height"] = window["height"]
    window["children"][0]["height"] = window["children"][0]["height"]
    window["children"][0]["children"] = window["children"][0]["children"] + [
    	{ "name" : "Main", "type" : "text", "text" : "Custom System", "text_horizontal_align" : "left", "x" : 28 + 540 + 35, "y" : 75 + 320, },
    ]



    Update, suport pentru Tab Target:


    Prima data faceti acest tutorial daca nu il aveti facut: imbunatatiri/selecteaza-target-tab-tab- ... t1663.html

    Dupa care:
    /// 1. @ Source/Client/UserInterface/PythonPlayerInput.cpp
    // Search

    Cod: Selectaţi tot

    CInstanceBase* CPythonPlayer::__GetTargetActorPtr()
    // Add above

    Cod: Selectaţi tot

    #if defined(ENABLE_TAB_NEXT_TARGET)
    void CPythonPlayer::SelectNearTarget()
    {
    	const auto rkPlayer = CPythonPlayer::InstancePtr();
    	if (rkPlayer)
    	{
    		const auto pkInstTarget = CPythonCharacterManager::Instance().GetTabNextTargetPointer(rkPlayer->NEW_GetMainActorPtr());
    		if (pkInstTarget)
    			rkPlayer->SetTarget(pkInstTarget->GetVirtualID(), true);
    	}
    }
    #endif
    /// 2. @ Source/Client/UserInterface/PythonPlayer.h
    // Search

    Cod: Selectaţi tot

    	DWORD GetTargetVID();
    // Add below

    Cod: Selectaţi tot

    #if defined(ENABLE_TAB_NEXT_TARGET)
    	void SelectNearTarget();
    #endif
    /// 3. @ Source/Client/UserInterface/PythonApplicationEvent.cpp
    // Search @ void CPythonApplication::OnKeyDown

    Cod: Selectaţi tot

    #if defined(ENABLE_TAB_NEXT_TARGET)
    	if (DIK_TAB == iIndex)
    	{
    		const auto rkPlayer = CPythonPlayer::InstancePtr();
    		if (rkPlayer)
    		{
    			const auto pkInstTarget = CPythonCharacterManager::Instance().GetTabNextTargetPointer(rkPlayer->NEW_GetMainActorPtr());
    			if (pkInstTarget)
    				rkPlayer->SetTarget(pkInstTarget->GetVirtualID(), true);
    		}
    	}
    #endif
    // Replace with

    Cod: Selectaţi tot

    #if !defined(ENABLE_KEYCHANGE_SYSTEM)
    	if (DIK_TAB == iIndex)
    		CPythonPlayer::instance().SelectNearTarget();
    #endif
    Fii primul care reacționează

    Nou Cum descarc de pe TeraBox?

    Afișează detalii Ascunde detalii
    • Este asemănător cu Mega.nz
    • Instalați-vă clientul lor de Download de aici
    • Faceți-vă un cont (vă puteți loga cu Facebook / Google / etc)
    • Nou Dacă nu vreți să descărcați clientul de Download, folosiți acest site
    • Gata! Acum puteți descărca resursele rapid & simplu.

    De ce folosim TeraBox?

    • Este gratuit
    • Primești 1TB de spațiu gratuit la orice cont creat!
    • Este ușor de folosit și varianta premium este foarte ieftină
    • Fișierele nu sunt șterse niciodată
    TeraBox logo
    See full signature
    Administrator
    Administrator
  • Mesaje: 4988
    Membru din: 07 Aug 2024, 18:53
  • Reacții: 126047
  • Mesaje utile: 47
  • Status: Pe aici.. 🤠
    Server: Saga2 - Soon
  • Regat: Jinno
  • [ID Discord]
  • Avatar utilizator - SCOOB
    Administrator
    Administrator

    Mesaj

    Subiect actualizat!
    Fii primul care reacționează
    See full signature

    Înapoi la “Sisteme Metin2”

    Informații

    Utilizatori ce navighează pe acest forum: kevii_xd, osuas, sherlokx, umut și 15 vizitatori

    Discord ID copiat: