2 mesaje
Administrator Administrator
  • Mesaje: 3450
  • Reacții: 48500
  • Mesaje utile: 29
  • Status: Pe aici.. 🤠
  • Server: Saga2 - Soon
  • Regat: Jinno
  • [ID Discord]
  • Contact:
    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
    Code:
    	KEY_ADDKEYBUFFERCONTROL = 100,
    // Add above
    Code:
    	KEY_CUSTOM_SYSTEM,
    /// 2. @ Source/Client/UserInterface/PythonPlayerModule.cpp
    // Search
    Code:
    	PyModule_AddIntConstant(poModule, "KEY_ADDKEYBUFFERCONTROL", KEY_ADDKEYBUFFERCONTROL);
    // Add above
    Code:
    	PyModule_AddIntConstant(poModule, "KEY_CUSTOM_SYSTEM", KEY_CUSTOM_SYSTEM);
    /// 3. @ Source/Client/UserInterface/PythonPlayerInputKeyboard.cpp
    // Search
    Code:
    		case KEY_SHOW_NAME: PyCallClassMemberFunc(m_ppyGameWindow, "ShowName", Py_BuildValue("()")); break;
    // Add below
    Code:
    		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
    Code:
    	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__
    Code:
    		self.KeySlotMax = 66
    # Add below
    Code:
    		self.KeySlotMax = self.KeySlotMax + 1
    ''' 3. @ Client/root/uiKeyChange.py
    NOTE: This is the default key for calling the function.
    '''
    # Search @ def __BuildKeyInfo
    Code:
    		KeyUiInfoDick[65] = app.DIK_X
    # Add below
    Code:
    		KeyUiInfoDick[66] = app.DIK_F10
    ''' 4. @ Client/root/uiKeyChange.py
    NOTE: This is the default function of the key.
    '''
    # Search @ def __BuildKeyFunction
    Code:
    		KeyFunctionInfo[65] = player.KEY_SHOW_NAME
    # Add below
    Code:
    		KeyFunctionInfo[66] = player.KEY_CUSTOM_SYSTEM
    3. UIScript

    ''' 1. @ Client/UIScript/KeyChange_Window.py '''
    # Add to the bottom of the document
    Code:
    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
    Code:
    CInstanceBase* CPythonPlayer::__GetTargetActorPtr()
    // Add above
    Code:
    #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
    Code:
    	DWORD GetTargetVID();
    // Add below
    Code:
    #if defined(ENABLE_TAB_NEXT_TARGET)
    	void SelectNearTarget();
    #endif
    /// 3. @ Source/Client/UserInterface/PythonApplicationEvent.cpp
    // Search @ void CPythonApplication::OnKeyDown
    Code:
    #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
    Code:
    #if !defined(ENABLE_KEYCHANGE_SYSTEM)
    	if (DIK_TAB == iIndex)
    		CPythonPlayer::instance().SelectNearTarget();
    #endif

    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)
    • Dacă nu vreți să descărcați clientul de Download, folosiți acest site
    • Gata! Acum puteți descărca resursele

    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
    Te asteptam si pe serverul de Discord :p - aici ne-am strans toata comunitatea de Metin2 din Romania.
    Link: https://discord.gg/jWxeDSf7HP

    Suntem peste 1700 membri! - Avem chat activ zilnic, support, cereri, resurse. :D :ymcowboy:




    See full signature

    🔥 Hai pe Discord! - Chat activ și support direct

    Te așteptăm și pe serverul de Discord - aici ne-am strâns toată comunitatea de Metin2 din România.

    Alătură-te acum!
    1300+ de membri activi!
    Robot Discord
    Roboțelu'
    Anunț
    Administrator Administrator
  • Mesaje: 3450
  • Reacții: 48500
  • Mesaje utile: 29
  • Status: Pe aici.. 🤠
  • Server: Saga2 - Soon
  • Regat: Jinno
  • [ID Discord]
  • Contact:
    Avatar utilizator
    Administrator
    Administrator

    Mesaj de [HF]White »

    Subiect actualizat!
    Te asteptam si pe serverul de Discord :p - aici ne-am strans toata comunitatea de Metin2 din Romania.
    Link: https://discord.gg/jWxeDSf7HP

    Suntem peste 1700 membri! - Avem chat activ zilnic, support, cereri, resurse. :D :ymcowboy:




    See full signature

    📢 Resurse Metin2 Premium!

    Zeci de resurse Metin2 Premium - exclusive și 100% funcționale începând cu 15.99€!.

    Vezi resursele Cumpără premium
    Premium
    Premium
    Anunț
    Scrie răspuns

    Creează-ți un cont sau autentifică-te pentru a participa la discuție

    Trebuie să fii membru pentru a răspunde

    Creează-ți un cont

    Membrii pot crea subiecte noi și pot descărca resurse Metin2 Gratuit!


    Te poți înregistra sau conecta rapid utilizând contul tău de Discord, Github sau Google.

    Înregistrare

    Autentifică-te

    Înapoi la “Sisteme Metin2”

    Informații

    Utilizatori ce navighează pe acest forum: Reakti0nZz și 10 vizitatori

    Discord ID copiat: