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:
sau Download:
Tutorial adaugare taste noi:
Update, suport pentru Tab Target:
Prima data faceti acest tutorial daca nu il aveti facut: imbunatatiri/selecteaza-target-tab-tab- ... t1663.html
Dupa care:
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.
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.
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
// Add above
/// 2. @ Source/Client/UserInterface/PythonPlayerModule.cpp
// Search
// Add above
/// 3. @ Source/Client/UserInterface/PythonPlayerInputKeyboard.cpp
// Search
// Add below
2. Root
''' 1. @ Client/root/game.py
NOTE: This is the function that the key will call.
'''
# Add to the bottom of the document
''' 2. @ Client/root/uiKeyChange.py
NOTE: Always increase this value when adding new keys.
'''
# Search @ def __init__
# Add below
''' 3. @ Client/root/uiKeyChange.py
NOTE: This is the default key for calling the function.
'''
# Search @ def __BuildKeyInfo
# Add below
''' 4. @ Client/root/uiKeyChange.py
NOTE: This is the default function of the key.
'''
# Search @ def __BuildKeyFunction
# Add below
3. UIScript
''' 1. @ Client/UIScript/KeyChange_Window.py '''
# Add to the bottom of the document
/// 1. @ Source/Client/UserInterface/GameType.h
// Search @ EKeyboardSetting
Cod: Selectaţi tot
KEY_ADDKEYBUFFERCONTROL = 100,Cod: Selectaţi tot
KEY_CUSTOM_SYSTEM,// Search
Cod: Selectaţi tot
PyModule_AddIntConstant(poModule, "KEY_ADDKEYBUFFERCONTROL", KEY_ADDKEYBUFFERCONTROL);Cod: Selectaţi tot
PyModule_AddIntConstant(poModule, "KEY_CUSTOM_SYSTEM", KEY_CUSTOM_SYSTEM);// Search
Cod: Selectaţi tot
case KEY_SHOW_NAME: PyCallClassMemberFunc(m_ppyGameWindow, "ShowName", Py_BuildValue("()")); break;Cod: Selectaţi tot
case KEY_CUSTOM_SYSTEM: PyCallClassMemberFunc(m_ppyGameWindow, "CustomSystem", Py_BuildValue("()")); break;''' 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")NOTE: Always increase this value when adding new keys.
'''
# Search @ def __init__
Cod: Selectaţi tot
self.KeySlotMax = 66Cod: Selectaţi tot
self.KeySlotMax = self.KeySlotMax + 1NOTE: This is the default key for calling the function.
'''
# Search @ def __BuildKeyInfo
Cod: Selectaţi tot
KeyUiInfoDick[65] = app.DIK_XCod: Selectaţi tot
KeyUiInfoDick[66] = app.DIK_F10NOTE: This is the default function of the key.
'''
# Search @ def __BuildKeyFunction
Cod: Selectaţi tot
KeyFunctionInfo[65] = player.KEY_SHOW_NAMECod: Selectaţi tot
KeyFunctionInfo[66] = player.KEY_CUSTOM_SYSTEM''' 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
// Add above
/// 2. @ Source/Client/UserInterface/PythonPlayer.h
// Search
// Add below
/// 3. @ Source/Client/UserInterface/PythonApplicationEvent.cpp
// Search @ void CPythonApplication::OnKeyDown
// Replace with
// Search
Cod: Selectaţi tot
CInstanceBase* CPythonPlayer::__GetTargetActorPtr()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// Search
Cod: Selectaţi tot
DWORD GetTargetVID();Cod: Selectaţi tot
#if defined(ENABLE_TAB_NEXT_TARGET)
void SelectNearTarget();
#endif// 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);
}
}
#endifCod: Selectaţi tot
#if !defined(ENABLE_KEYCHANGE_SYSTEM)
if (DIK_TAB == iIndex)
CPythonPlayer::instance().SelectNearTarget();
#endif



