1. Client / UserInterface / Locale_inc.h dosyasını açın ve ekleyin:
Kod:
#define ENABLE_CUBE_RENEWAL
2. Client / Kullanıcı Arayüzü / packet.h'yi açın ve içinde bulun:
Kod:
HEADER_CG_KEY_AGREEMENT = 0xfb, // _IMPROVED_PACKET_ENCRYPTION_ HEADER_CG_TIME_SYNC = 0xfc, HEADER_CG_CLIENT_VERSION = 0xfd, HEADER_CG_CLIENT_VERSION2 = 0xf1, HEADER_CG_PONG = 0xfe, HEADER_CG_HANDSHAKE = 0xff,
Üzerine ekle:
Kod:
#ifdef ENABLE_CUBE_RENEWAL HEADER_CG_CUBE_RENEWAL = 215, #endif
Bul:
Kod:
HEADER_GC_KEY_AGREEMENT_COMPLETED = 0xfa, // _IMPROVED_PACKET_ENCRYPTION_ HEADER_GC_KEY_AGREEMENT = 0xfb, // _IMPROVED_PACKET_ENCRYPTION_ HEADER_GC_HANDSHAKE_OK = 0xfc, // 252 HEADER_GC_PHASE = 0xfd, // 253 HEADER_GC_BINDUDP = 0xfe, // 254 HEADER_GC_HANDSHAKE = 0xff, // 255
Üzerine ekle:
Kod:
#ifdef ENABLE_CUBE_RENEWAL HEADER_GC_CUBE_RENEWAL = 217, #endif
Bul:
Kod:
#pragma pack(pop)
Altına ekle:
Kod:
#ifdef ENABLE_CUBE_RENEWAL enum { CUBE_RENEWAL_SUB_HEADER_OPEN_RECEIVE, CUBE_RENEWAL_SUB_HEADER_CLEAR_DATES_RECEIVE, CUBE_RENEWAL_SUB_HEADER_DATES_RECEIVE, CUBE_RENEWAL_SUB_HEADER_DATES_LOADING, CUBE_RENEWAL_SUB_HEADER_MAKE_ITEM, CUBE_RENEWAL_SUB_HEADER_CLOSE, }; typedef struct packet_send_cube_renewal { BYTE header; BYTE subheader; DWORD index_item; DWORD count_item; DWORD index_item_improve; } TPacketCGCubeRenewalSend; typedef struct dates_cube_renewal { DWORD npc_vnum; DWORD index; DWORD vnum_reward; int count_reward; bool item_reward_stackable; DWORD vnum_material_1; int count_material_1; DWORD vnum_material_2; int count_material_2; DWORD vnum_material_3; int count_material_3; DWORD vnum_material_4; int count_material_4; DWORD vnum_material_5; int count_material_5; int gold; int percent; char category[100]; } TInfoDateCubeRenewal; typedef struct packet_receive_cube_renewal { packet_receive_cube_renewal(): header(HEADER_GC_CUBE_RENEWAL) {} BYTE header; BYTE subheader; TInfoDateCubeRenewal date_cube_renewal; } TPacketGCCubeRenewalReceive; #endif
3. Client / UserInterface / PythonApplication.h dosyasını açın ve içinde bulun:
Kod:
#include "PythonExchange.h" #include "PythonChat.h"
Üzerine ekle:
Kod:
#ifdef ENABLE_CUBE_RENEWAL #include "PythonCubeRenewal.h" #endif
Bul:
Kod:
CGraphicDevice m_grpDevice; CNetworkDevice m_netDevice; CPythonSystem m_pySystem;
Altına ekle:
Kod:
#ifdef ENABLE_CUBE_RENEWAL CPythonCubeRenewal m_pyCubeRenewal; #endif
4. client / UserInterface / PythonApplicationModule.cpp açın ve içinde bulun:
Kod:
#ifdef ENABLE_COSTUME_SYSTEM PyModule_AddIntConstant(poModule, "ENABLE_COSTUME_SYSTEM", 1); #else PyModule_AddIntConstant(poModule, "ENABLE_COSTUME_SYSTEM", 0); #endif
Üzerine ekle:
Kod:
#ifdef ENABLE_CUBE_RENEWAL PyModule_AddIntConstant(poModule, "ENABLE_CUBE_RENEWAL", 1); #else PyModule_AddIntConstant(poModule, "ENABLE_CUBE_RENEWAL", 0); #endif
5. Client / UserInterface / PythonNetworkStream.cpp dosyasını açın ve içinde bulun:
Kod:
Set(HEADER_GC_DRAGON_SOUL_REFINE, CNetworkPacketHeaderMap::TPacketType(sizeof(TPacketGCDragonSoulRefine), STATIC_SIZE_PACKET));
Altına ekle:
Kod:
#ifdef ENABLE_CUBE_RENEWAL Set(HEADER_GC_CUBE_RENEWAL, CNetworkPacketHeaderMap::TPacketType(sizeof(TPacketGCCubeRenewalReceive), STATIC_SIZE_PACKET)); #endif
6. client / UserInterface / PythonNetworkStream.h dosyasını açın ve içinde bulun:
Kod:
// ETC DWORD GetMainActorVID(); DWORD GetMainActorRace(); DWORD GetMainActorEmpire(); DWORD GetMainActorSkillGroup(); void SetEmpireID(DWORD dwEmpireID); DWORD GetEmpireID(); void __TEST_SetSkillGroupFake(int iIndex);
Üzerine ekle:
Kod:
#ifdef ENABLE_CUBE_RENEWAL bool CubeRenewalMakeItem(int index_item, int count_item, int index_item_improve); bool CubeRenewalClose(); bool RecvCubeRenewalPacket(); #endif
7. Client / UserInterface / PythonNetworkStreamPhaseGame.cpp açın ve içinde bulun:
Kod:
#include "PythonTextTail.h" #include "PythonItem.h" #include "PythonChat.h"
Altına ekle:
Kod:
#ifdef ENABLE_CUBE_RENEWAL #include "PythonCubeRenewal.h" #endif
Bul:
Kod:
case HEADER_GC_DRAGON_SOUL_REFINE: ret = RecvDragonSoulRefine(); break;
Altına ekle:
Kod:
#ifdef ENABLE_CUBE_RENEWAL case HEADER_GC_CUBE_RENEWAL: ret = RecvCubeRenewalPacket(); break; #endif
Bul:
Kod:
bool CPythonNetworkStream::SendDragonSoulRefinePacket(BYTE bRefineType, TItemPos* pos) { TPacketCGDragonSoulRefine pk; pk.header = HEADER_CG_DRAGON_SOUL_REFINE; pk.bSubType = bRefineType; memcpy (pk.ItemGrid, pos, sizeof (TItemPos) * DS_REFINE_WINDOW_MAX_NUM); if (!Send(sizeof (pk), &pk)) { return false; } return true; }
Altına ekle:
Kod:
#ifdef ENABLE_CUBE_RENEWAL bool CPythonNetworkStream::CubeRenewalMakeItem(int index_item, int count_item, int index_item_improve) { if (!__CanActMainInstance()) return true; TPacketCGCubeRenewalSend packet; packet.header = HEADER_CG_CUBE_RENEWAL; packet.subheader = CUBE_RENEWAL_SUB_HEADER_MAKE_ITEM; packet.index_item = index_item; packet.count_item = count_item; packet.index_item_improve = index_item_improve; if (!Send(sizeof(TPacketCGCubeRenewalSend), &packet)) { Tracef("CPythonNetworkStream::CubeRenewalMakeItem Error\n"); return false; } return SendSequence(); } bool CPythonNetworkStream::CubeRenewalClose() { if (!__CanActMainInstance()) return true; TPacketCGCubeRenewalSend packet; packet.header = HEADER_CG_CUBE_RENEWAL; packet.subheader = CUBE_RENEWAL_SUB_HEADER_CLOSE; if (!Send(sizeof(TPacketCGCubeRenewalSend), &packet)) { Tracef("CPythonNetworkStream::CubeRenewalClose Error\n"); return false; } return SendSequence(); } bool CPythonNetworkStream::RecvCubeRenewalPacket() { TPacketGCCubeRenewalReceive CubeRenewalPacket; if (!Recv(sizeof(CubeRenewalPacket), &CubeRenewalPacket)) return false; switch (CubeRenewalPacket.subheader) { case CUBE_RENEWAL_SUB_HEADER_OPEN_RECEIVE: { PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "BINARY_CUBE_RENEWAL_OPEN", Py_BuildValue("()")); } break; case CUBE_RENEWAL_SUB_HEADER_DATES_RECEIVE: { CPythonCubeRenewal::Instance().ReceiveList(CubeRenewalPacket.date_cube_renewal); } break; case CUBE_RENEWAL_SUB_HEADER_DATES_LOADING: { CPythonCubeRenewal::Instance().LoadingList(); } break; case CUBE_RENEWAL_SUB_HEADER_CLEAR_DATES_RECEIVE: { CPythonCubeRenewal::Instance().ClearList(); } break; } return true; } #endif
8. Client / UserInterface / StdAfx.h dosyasını açın ve içinde bulun:
Kod:
void initsafebox(); void initguild(); void initMessenger();
Altına ekle:
Kod:
#ifdef ENABLE_CUBE_RENEWAL void intcuberenewal(); #endif
9. Client / UserInterface / UserInterface.cpp dosyasını açın ve içinde bulun:
Kod:
initsafebox(); initguild(); initServerStateChecker();
Altına ekle:
Kod:
#ifdef ENABLE_CUBE_RENEWAL intcuberenewal(); #endif
10. Kullanıcı Arayüzüne ekleyin ve projelendirin:
Kod:
#define ENABLE_CUBE_RENEWAL
12. game / char.h dosyasını açın ve bulun:
Kod:
#include "cube.h"
Altına ekle:
Kod:
#include "cube_renewal.h"
13. game / cmd_general.cpp dosyasını açın ve içinde bulun:
Kod:
ACMD(do_cube)
Her şeyi şununla değiştir:
Kod:
ACMD(do_cube) { const char *line; char arg1[256], arg2[256], arg3[256]; line = two_arguments(argument, arg1, sizeof(arg1), arg2, sizeof(arg2)); one_argument(line, arg3, sizeof(arg3)); if (0 == arg1[0]) { return; } switch (LOWER(arg1[0])) { case 'o': // open Cube_open(ch); break; default: return; } }
14. game / input.h dosyasını açın ve içinde bulun:
Kod:
void Refine(LPCHARACTER ch, const char* c_pData);
Üzerine ekle:
Kod:
#ifdef ENABLE_CUBE_RENEWAL void CubeRenewalSend(LPCHARACTER ch, const char* data); #endif
15. game / input_main.cpp dosyasını açın ve içinde bulun:
Kod:
case HEADER_CG_DRAGON_SOUL_REFINE: { TPacketCGDragonSoulRefine* p = reinterpret_cast <TPacketCGDragonSoulRefine*>((void*)c_pData); switch(p->bSubType) { case DS_SUB_HEADER_CLOSE: ch->DragonSoul_RefineWindow_Close(); break; case DS_SUB_HEADER_DO_REFINE_GRADE: { DSManager::instance().DoRefineGrade(ch, p->ItemGrid); } break; case DS_SUB_HEADER_DO_REFINE_STEP: { DSManager::instance().DoRefineStep(ch, p->ItemGrid); } break; case DS_SUB_HEADER_DO_REFINE_STRENGTH: { DSManager::instance().DoRefineStrength(ch, p->ItemGrid); } break; } } break;
Altına ekle:
Kod:
#ifdef ENABLE_CUBE_RENEWAL case HEADER_CG_CUBE_RENEWAL: CubeRenewalSend(ch, c_pData); break; #endif
Dosyanın sonuna şunu ekleyin:
Kod:
#ifdef ENABLE_CUBE_RENEWAL void CInputMain::CubeRenewalSend(LPCHARACTER ch, const char* data) { struct packet_send_cube_renewal * pinfo = (struct packet_send_cube_renewal *) data; switch (pinfo->subheader) { case CUBE_RENEWAL_SUB_HEADER_MAKE_ITEM: { int index_item = pinfo->index_item; int count_item = pinfo->count_item; int index_item_improve = pinfo->index_item_improve; Cube_Make(ch,index_item,count_item,index_item_improve); } break; case CUBE_RENEWAL_SUB_HEADER_CLOSE: { Cube_close(ch); } break; } } #endif
16. game / item_manager.cpp dosyasını açın ve içinde bulun:
Kod:
#include "cube.h"
Altına ekle:
Kod:
#include "cube_renewal.h"
17. game / packet.h dosyasını açın ve bulun:
Kod:
HEADER_CG_CLIENT_VERSION = 0xfd, HEADER_CG_CLIENT_VERSION2 = 0xf1, /********************************************************/ HEADER_GC_KEY_AGREEMENT_COMPLETED = 0xfa, // _IMPROVED_PACKET_ENCRYPTION_ HEADER_GC_KEY_AGREEMENT = 0xfb, // _IMPROVED_PACKET_ENCRYPTION_ HEADER_GC_TIME_SYNC = 0xfc, HEADER_GC_PHASE = 0xfd, HEADER_GC_BINDUDP = 0xfe, HEADER_GC_HANDSHAKE = 0xff,
Üzerine ekle:
Kod:
#ifdef ENABLE_CUBE_RENEWAL HEADER_CG_CUBE_RENEWAL = 215, #endif
Bul:
Kod:
HEADER_GC_DRAGON_SOUL_REFINE = 209, HEADER_GC_RESPOND_CHANNELSTATUS = 210,
Altıne ekle:
Kod:
#ifdef ENABLE_CUBE_RENEWAL HEADER_GC_CUBE_RENEWAL = 217, #endif
Bul:
Kod:
#pragma pack() #endif
Üzerine ekle:
Kod:
#ifdef ENABLE_CUBE_RENEWAL enum { CUBE_RENEWAL_SUB_HEADER_OPEN_RECEIVE, CUBE_RENEWAL_SUB_HEADER_CLEAR_DATES_RECEIVE, CUBE_RENEWAL_SUB_HEADER_DATES_RECEIVE, CUBE_RENEWAL_SUB_HEADER_DATES_LOADING, CUBE_RENEWAL_SUB_HEADER_MAKE_ITEM, CUBE_RENEWAL_SUB_HEADER_CLOSE, }; typedef struct packet_send_cube_renewal { BYTE header; BYTE subheader; DWORD index_item; DWORD count_item; DWORD index_item_improve; } TPacketCGCubeRenewalSend; typedef struct dates_cube_renewal { DWORD npc_vnum; DWORD index; DWORD vnum_reward; int count_reward; bool item_reward_stackable; DWORD vnum_material_1; int count_material_1; DWORD vnum_material_2; int count_material_2; DWORD vnum_material_3; int count_material_3; DWORD vnum_material_4; int count_material_4; DWORD vnum_material_5; int count_material_5; int gold; int percent; char category[100]; } TInfoDateCubeRenewal; typedef struct packet_receive_cube_renewal { packet_receive_cube_renewal(): header(HEADER_GC_CUBE_RENEWAL) {} BYTE header; BYTE subheader; TInfoDateCubeRenewal date_cube_renewal; } TPacketGCCubeRenewalReceive; #endif
18. game / packet_info.cpp dosyasını açın ve içinde bulun:
Kod:
Set(HEADER_CG_STATE_CHECKER, sizeof(BYTE), "ServerStateCheck", false);
Altına ekle:
Kod:
#ifdef ENABLE_CUBE_RENEWAL Set(HEADER_CG_CUBE_RENEWAL, sizeof(TPacketCGCubeRenewalSend), "CubeRenewalSend", true); #endif
19. Game / Makefile'a ekle:
Kod:
cube_renewal.cpp
20. #ifndef ENABLE_CUBE_RENEWAL'i başlangıçta cube.cpp / cube.h dosyanıza ve sonunda #endif'e ekleyin.
21. game'e ekle:
Kod:
def BINARY_DragonSoulGiveQuilification(self): self.interface.DragonSoulGiveQuilification()
Üzerine ekle:
Kod:
if app.ENABLE_CUBE_RENEWAL: def BINARY_CUBE_RENEWAL_OPEN(self): if self.interface: self.interface.BINARY_CUBE_RENEWAL_OPEN()
23. root / interfaceModule.py dosyasını açın ve içinde bulun:
Kod:
self.wndDragonSoulRefine = None self.wndChat = None
Altına ekle:
Kod:
if app.ENABLE_CUBE_RENEWAL: self.wndCubeRenewal = None
Bul:
Kod:
def __MakeCubeResultWindow(self): self.wndCubeResult = uiCube.CubeResultWindow() self.wndCubeResult.LoadWindow() self.wndCubeResult.Hide()
Altına ekle:
Kod:
if app.ENABLE_CUBE_RENEWAL: def __MakeCubeRenewal(self): import uicuberenewal self.wndCubeRenewal = uicuberenewal.CubeRenewalWindows() self.wndCubeRenewal.Hide()
Bul:
Kod:
self.__MakeCubeWindow() self.__MakeCubeResultWindow()
Altına ekle:
Kod:
if app.ENABLE_CUBE_RENEWAL: self.__MakeCubeRenewal()
Bul:
Kod:
# ACCESSORY_REFINE_ADD_METIN_STONE if self.wndItemSelect: self.wndItemSelect.Destroy() # END_OF_ACCESSORY_REFINE_ADD_METIN_STONE
Altına ekle:
Kod:
if app.ENABLE_CUBE_RENEWAL: if self.wndCubeRenewal: self.wndCubeRenewal.Destroy() self.wndCubeRenewal.Close()
Bul:
Kod:
del self.wndUICurtain del self.wndChat
Altına ekle:
Kod:
if app.ENABLE_CUBE_RENEWAL: del self.wndCubeRenewal
Bul:
Kod:
def SucceedCubeWork(self, itemVnum, count): self.wndCube.Clear() print "큐브 제작 성공! [%d:%d]" % (itemVnum, count) if 0: # 결과 메시지 출력은 생략 한다 self.wndCubeResult.SetPosition(*self.wndCube.GetGlobalPosition()) self.wndCubeResult.SetCubeResultItem(itemVnum, count) self.wndCubeResult.Open() self.wndCubeResult.SetTop()
Altına ekle:
Kod:
if app.ENABLE_CUBE_RENEWAL: def BINARY_CUBE_RENEWAL_OPEN(self): self.wndCubeRenewal.Show()
24. Köke ekle:
Kod:
CUBE_RENEWAL_TITLE Okienko uszlachetniania CUBE_RENEWAL_BELT_IMPROVE Podwyższ Szansę
Yeni Yenileme Resmi Cube Sistemi
Metin2 özel sunucularında oyun deneyimini zenginleştirmek ve oyuncuların karakterlerini daha güçlü hale getirmek amacıyla geliştirilen sistemlerden biri de Cube Sistemi'dir. Bu sistem, oyuncuların eşyalarını yükseltmeyi, güçlendirmeyi ve özelleştirmeyi sağlar. Ancak bu sistemlerin çoğu zaman statik ve sınırlı kalması, oyuncuların tekrarlayan işlemlerden sıkılmasına neden olabilir. Bu bağlamda, Yeni Yenileme Resmi Cube Sistemi devreye giriyor. Bu sistem, hem oyuncu deneyimini artırmayı hem de sunucu tarafında daha fazla esneklik sunmayı hedefler.
Cube Sistemi Nedir?
Cube sistemi, Metin2 oyununda oyuncuların belirli eşyaları kullanarak karakterlerinin güçlerini artırmalarını sağlayan bir özelliktir. Geleneksel Cube sistemleri genellikle sabit kurallara sahiptir ve oyuncuların sadece belirli kombinasyonları kullanarak yükseltme yapabilmesine izin verir. Ancak Yeni Yenileme Resmi Cube Sistemi, bu klasik yapıyı aşan yeniliklerle birlikte gelir. Bu sistem, geliştiricilere ve sunucu sahiplerine daha fazla kontrol imkanı sunarken, aynı zamanda oyunculara da daha fazla özelleştirme seçeneği sunar.
Yenilikler Neler?
Yeni sistemde, Cube işlemi sırasında özel şans değerleri, özel kombinasyonlar ve özel efektler tanımlanabilmektedir. Bu sayede oyuncular artık sadece belirli eşyaları birleştirerek değil, aynı zamanda belirli zamanlarda veya belirli görevleri tamamlayarak özel Cube kombinasyonlarına erişebilirler. Ayrıca, sistem C++ tabanlı olarak geliştirildiği için sunucu performansını etkilemeden daha hızlı ve verimli çalışmaktadır. Bu, özellikle büyük sunucularda yüksek sayıda oyuncunun Cube işlemleri yapabilmesini mümkün kılmaktadır.
Sistem Nasıl Çalışır?
Yeni Cube sistemi, oyuncuların belirli eşyaları Cube paneline yerleştirip bir işlem başlatmalarını sağlar. Bu işlem sonucunda, sunucuda tanımlı olan Python GUI arayüzü üzerinden kullanıcı dostu bir şekilde sonuç gösterilir. Cube işlemi sırasında başarı oranı, kullanılan malzemeler ve alınacak bonuslar gibi bilgiler kullanıcıya anlık olarak aktarılır. Bu sayede oyuncular, Cube yaparken ne yaptıklarının farkındadırlar ve stratejilerini buna göre planlayabilirler.
Sistem Geliştiricilere Ne Sağlıyor?
Sunucu geliştiricileri için bu sistem, C++ kaynak kodlar üzerinde kolayca özelleştirme yapabilme imkanı sunar. Cube kombinasyonları, DB üzerinden dinamik olarak yönetilebilir. Bu sayede sunucu sahibi, oyun içi dengeleri bozmadan Cube sistemini zamanla güncelleyebilir. Aynı zamanda, martysama tarafından geliştirilen bazı modüller sayesinde, Cube sistemine özel görsel efektler, sesler ve animasyonlar eklenebilir. Bu da oyuncuların daha immersif bir deneyim yaşamasını sağlar.
Sonuç
Yeni Yenileme Resmi Cube Sistemi, Metin2 özel sunucularında PvP ve game core deneyimini ciddi anlamda geliştiriyor. Oyunculara sunduğu esneklik, geliştiricilere sunduğu kolaylıklar ile bu sistem, Metin2 geliştirme dünyasında önemli bir yere sahip._cube_sistemi, server src, auth ve py root gibi birçok alanda entegre bir yapıyla çalışarak, Metin2'nin gelişimine katkı sunuyor.
New Official Cube System Update
The Cube System is one of the features developed to enrich the gaming experience on Metin2 private servers and make players' characters stronger. It allows players to upgrade, strengthen, and customize their items. However, many of these systems tend to become static and limited over time, leading players to feel bored from repetitive actions. In this context, the New Official Cube System comes into play. This system aims to enhance the player experience while offering more flexibility on the server side.
What is the Cube System?
The Cube system in Metin2 allows players to increase their character's power by using certain items. Traditional Cube systems usually have fixed rules and only allow players to upgrade through specific combinations. However, the New Official Cube System introduces innovations that go beyond classic structures. It offers more control options to developers and server owners, while also providing more customization options to players.
What Are the Innovations?
In the new system, special chance values, unique combinations, and custom effects can be defined during the Cube process. As a result, players are no longer limited to combining specific items; they can access special Cube combinations by completing certain tasks or at specific times. Additionally, since the system is developed based on C++, it operates efficiently without affecting server performance. This allows a large number of players on big servers to perform Cube operations simultaneously.
How Does the System Work?
The new Cube system enables players to place certain items into the Cube panel and start a process. The outcome is displayed to the user through a user-friendly Python GUI interface defined on the server. During the Cube process, information such as success rate, materials used, and bonuses gained is relayed to the player in real-time. This way, players remain aware of what they're doing during the Cube process and can plan their strategies accordingly.
What Does This System Offer to Developers?
For server developers, this system provides the ability to easily customize C++ source codes. Cube combinations can be dynamically managed via DB, allowing server owners to update the Cube system over time without disrupting in-game balance. Moreover, thanks to modules developed by martysama, special visual effects, sounds, and animations can be added to the Cube system, enhancing the immersive experience for players.
Conclusion
The New Official Cube System significantly enhances the PvP and game core experience in Metin2 private servers. With its flexibility for players and ease of use for developers, this system holds an important place in the world of Metin2 development. The _cube_system works seamlessly with areas like server src, auth, and py root, contributing to the growth of Metin2.
