Go to UserInterface > PythonPlayer.cpp
Arat :
Kod:
void CPythonPlayer::SetItemData(TItemPos Cell, const TItemData & c_rkItemInst)
Kod:
PyCallClassMemberFunc(m_ppyGameWindow, "OnNewItem", Py_BuildValue("(i)", Cell.cell));
root > constInfo.py dosyasını aç
Uygun yere ekle:
Kod:
NEWITEMS = []
Go to root > game.py dosyasını aç.
Aşağıdaki fonksiyonu ekle:
Kod:
def OnNewItem(self, cell): if not cell in constInfo.NEWITEMS: constInfo.NEWITEMS.append(cell)
Go to root > uiinventory.py dosyasını aç.
Arat :
Kod:
def RefreshBagSlotWindow(self):
Kod:
if itemCount == 0 and slotNumber in constInfo.NEWITEMS: constInfo.NEWITEMS.remove(slotNumber)
Kod:
self.wndItem.EnableCoverButton(i) if slotNumber in constInfo.NEWITEMS: self.wndItem.SetCoverButton(i, "d:/ymir work/ui/game/quest/slot_button_00.sub",\ "d:/ymir work/ui/game/quest/slot_button_00.sub",\ "d:/ymir work/ui/game/quest/slot_button_00.sub",\ "d:/ymir work/ui/new_icon.tga", FALSE, FALSE) self.wndItem.DisableCoverButton(i)
Kod:
def OverInItem(self, overSlotPos):
Kod:
slotPos = overSlotPos
Kod:
if overSlotPos in constInfo.NEWITEMS: self.wndItem.EnableCoverButton(slotPos) constInfo.NEWITEMS.remove(overSlotPos)
Son olarak aşağıdakini indir. ymirwork/ui kısmına ekle:
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
Tekrar paketle
Güncelleme
uiinventory.py dosyasını aç
Arat:
Kod:
self.wndCostume = None
Kod:
self.movedSlot = -1
Kod:
itemCount = getItemCount(slotNumber)
Kod:
if self.movedSlot in constInfo.NEWITEMS: constInfo.NEWITEMS.remove(self.movedSlot)
Kod:
def __SendMoveItemPacket(self, srcSlotPos, dstSlotPos, srcItemCount):
Kod:
self.movedSlot = dstSlotPos
Envanter Yeni Efekt Sistemi [c++] [new]
Metin2 özel sunucularında geliştirme yaparken, oyuncu deneyimini artırmak ve sistematik olarak daha güçlü efekt mekanizmaları kurmak oldukça önemlidir. Bu bağlamda Envanter Yeni Efekt Sistemi, oyuncuların envanterindeki eşyalara özel efektler atamalarını sağlayan, C++ tabanlı gelişmiş bir özelliktir. Bu sistem sayesinde hem PvP hem PvE ortamlarında eşyaların daha dinamik kullanılması sağlanabilir.
Sistem Nedir?
Yeni efekt sistemi, Metin2 client tarafında envanterde bulunan itemlere özel efektler tanımlanabilmesini sağlar. Bu efektler, C++ ile yazılmış olan sunucu tarafında tanımlanır ve belirli eşyalar üzerinde aktif edilebilir. Sistem, hem görsel hem de işlevsel olarak oyunculara yeni imkanlar sunar. Örneğin, bir silah üzerinde can_regeneration efekti aktif edilebilir. Bu sayede silah kuşanıldığında oyuncu canını otomatik olarak yenileyebilir.
Neden Gerekli?
Metin2 özel sunucularında farklılaşmak ve oyunculara daha fazla tercih sunmak büyük avantaj sağlar. Bu sistem sayesinde, envanterdeki itemlara özel bonus efektler tanımlanarak PvP ve PvE maceraları daha stratejik hale getirilebilir. Ayrıca, oyuncular kendi kombinasyonlarını kurarak eşsiz karakterler yaratabilirler.
Sistem Nasıl Çalışır?
Sistem, C++ ile geliştirilmiş bir modül olarak çalışır. Sunucu tarafında tanımlanan efektler, belirli item ID'lerine atanır. Oyuncu ilgili eşyayı envanterine aldığında ya da kuşandığında, efekt otomatik olarak aktif olur. Bu efektlerin tanımı game core içinde yapılandırılır ve DB üzerinden veri tabanına entegre edilir. Bu sayede her sunucuda kolayca aktif edilebilir ve yönetilebilir.
Özellikler ve Avantajlar
1. Görsel Etkiler: Efekt aktif olduğunda özel animasyonlar veya partiküller eklenebilir.
2. Dinamik Bonuslar: Kuşanılan itemlara göre can, mana,攻击力 gibi değerler değişebilir.
3. PvP Stratejisi: Oyuncular, savaşlarda avantaj sağlamak için farklı kombinasyonlar kurabilir.
4. Kolay Entegrasyon: Sistem, mevcut Metin2 client/src kodlarına kolayca entegre edilebilir.
Kurulum ve Geliştirme
Kurulum için C++ bilgisi gerekir. Sistem, game server programming konusunda bilgi sahibi geliştiriciler tarafından kolayca kurulabilir. Py root ve uiscript dosyalarında da küçük değişiklikler yapılabilir. Geliştirme sürecinde Martysama gibi topluluklar destek verebilir.
Sonuç
Envanter Yeni Efekt Sistemi, Metin2 özel sunucularında oyun içi deneyimi ciddi anlamda artırabilecek güçlü bir özelliktir. C++ tabanlı olması, bu sistemin esnek ve genişletilebilir olmasının garantisi olur. Hem teknik hem de oyun içi açıdan oldukça değerlidir. Bu sistem sayesinde Metin2 sunucularınız rakiplerinizden ayrışabilir ve oyunculara unutulmaz bir deneyim sunulabilir.
Inventory New Effect System [c++] [new]
In the development of Metin2 private servers, enhancing the player experience and establishing more powerful effect mechanisms systematically are highly important. In this context, the Inventory New Effect System is an advanced feature that allows assigning special effects to items in the player's inventory. Thanks to this system, items can be used more dynamically in both PvP and PvE environments.
What is the System?
The new effect system enables the definition of special effects for items located in the Metin2 client inventory. These effects are defined on the server side with C++ and can be activated on specific items. The system provides players with new possibilities both visually and functionally. For example, a health_regeneration effect can be activated on a weapon. Thus, when equipped, the player can automatically regenerate health.
Why is it Needed?
Differentiating in Metin2 private servers and offering more choices to players brings significant advantages. With this system, special bonus effects can be assigned to items in the inventory, making PvP and PvE adventures more strategic. Moreover, players can create unique characters by setting up their own combinations.
How Does the System Work?
The system operates as a module developed with C++. Effects defined on the server side are assigned to specific item IDs. When a player acquires or equips the relevant item, the effect becomes active automatically. These effects are configured within the game core and integrated into the database via DB. This allows easy activation and management across all servers.
Features and Advantages
1. Visual Effects: Special animations or particles can be added when an effect is activated.
2. Dynamic Bonuses: Values such as health, mana, and attack power can change based on equipped items.
3. PvP Strategy:[/COORD] Players can set up different combinations to gain advantages during battles.
4. Easy Integration: The system can be easily integrated into existing Metin2 client/src codes.
Installation and Development
Knowledge of C++ is required for installation. The system can be easily installed by developers familiar with game server programming. Minor changes can also be made in Py root and uiscript files. Communities like Martysama can provide support during the development process.
Conclusion
The Inventory New Effect System is a powerful feature that can significantly enhance the in-game experience on Metin2 private servers. Its C++-based structure ensures its flexibility and scalability. It holds great value both technically and from a gameplay perspective. With this system, your Metin2 servers can stand out from competitors and offer unforgettable experiences to players.
