Otomatik Dönüşüm (Refine) Eklentisi

  • Konbuyu başlatan Konbuyu başlatan Admin
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 0
  • Görüntüleme Görüntüleme 90

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
Merhaba arkadaşlar.
Diğer konuların güncelleme linki veya anlatım linkleri kırıldığı için bu konuyu açma gereği duydum.

Kod:
//müsait bir yere ekle; #define ENABLE_REFINE_RENEWAL
Kod:
//arat; #ifdef ENABLE_COSTUME_SYSTEM     PyModule_AddIntConstant(poModule, "ENABLE_COSTUME_SYSTEM",    1); #else     PyModule_AddIntConstant(poModule, "ENABLE_COSTUME_SYSTEM",    0); #endif //altına ekle; #ifdef ENABLE_REFINE_RENEWAL     PyModule_AddIntConstant(poModule, "ENABLE_REFINE_RENEWAL",    1); #else     PyModule_AddIntConstant(poModule, "ENABLE_REFINE_RENEWAL",    0); #endif
Kod:
#müsait bir yere ekle; import app if app.ENABLE_REFINE_RENEWAL:     IS_AUTO_REFINE = False     AUTO_REFINE_TYPE = 0     AUTO_REFINE_DATA = {         "ITEM" : [-1, -1],         "NPC" : [0, -1, -1, 0]     }
Kod:
#arat;     def RefineSuceededMessage(self): #fonksiyonu değiştir;     def RefineSuceededMessage(self):         self.PopupMessage(localeInfo.REFINE_SUCCESS)         if app.ENABLE_REFINE_RENEWAL:             self.interface.CheckRefineDialog(False) #tekrar arat;     def RefineFailedMessage(self): #fonksiyonu değiştir;     def RefineFailedMessage(self):         self.PopupMessage(localeInfo.REFINE_FAILURE)         if app.ENABLE_REFINE_RENEWAL:             self.interface.CheckRefineDialog(True) #tekrar arat;     def __PutItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, dstChrID): #fonksiyon içinde bul;                     if chr.IsNPC(dstChrID): #altına ekle;                         if app.ENABLE_REFINE_RENEWAL:                             constInfo.AUTO_REFINE_TYPE = 2                             constInfo.AUTO_REFINE_DATA["NPC"][0] = dstChrID                             constInfo.AUTO_REFINE_DATA["NPC"][1] = attachedInvenType                             constInfo.AUTO_REFINE_DATA["NPC"][2] = attachedItemSlotPos                             constInfo.AUTO_REFINE_DATA["NPC"][3] = attachedItemCount
Kod:
#arat;     def AppendMaterialToRefineDialog(self, vnum, count):         self.dlgRefineNew.AppendMaterial(vnum, count) #altına ekle;     if app.ENABLE_REFINE_RENEWAL:         def CheckRefineDialog(self, isFail):             self.dlgRefineNew.CheckRefine(isFail)
Kod:
#arat; class AniImageBox(Window): #fonksiyon bitimine ekle; class CheckBox(Window):     def __init__(self):         Window.__init__(self)         self.backgroundImage = None         self.checkImage = None         self.eventFunc = { "ON_CHECK" : None, "ON_UNCKECK" : None, }         self.eventArgs = { "ON_CHECK" : None, "ON_UNCKECK" : None, }         self.CreateElements()     def __del__(self):         Window.__del__(self)         self.backgroundImage = None         self.checkImage = None         self.eventFunc = { "ON_CHECK" : None, "ON_UNCKECK" : None, }         self.eventArgs = { "ON_CHECK" : None, "ON_UNCKECK" : None, }     def CreateElements(self):         self.backgroundImage = ImageBox()         self.backgroundImage.SetParent(self)         self.backgroundImage.AddFlag("not_pick")         self.backgroundImage.LoadImage("d:/ymir work/ui/game/refine/checkbox.tga")         self.backgroundImage.Show()         self.checkImage = ImageBox()         self.checkImage.SetParent(self)         self.checkImage.AddFlag("not_pick")         self.checkImage.SetPosition(0, -4)         self.checkImage.LoadImage("d:/ymir work/ui/game/refine/checked.tga")         self.checkImage.Hide()         self.textInfo = TextLine()         self.textInfo.SetParent(self)         self.textInfo.SetPosition(20, -2)         self.textInfo.Show()         self.SetSize(self.backgroundImage.GetWidth() + self.textInfo.GetTextSize()[0], self.backgroundImage.GetHeight() + self.textInfo.GetTextSize()[1])     def SetTextInfo(self, info):         if self.textInfo:             self.textInfo.SetText(info)         self.SetSize(self.backgroundImage.GetWidth() + self.textInfo.GetTextSize()[0], self.backgroundImage.GetHeight() + self.textInfo.GetTextSize()[1])     def SetCheckStatus(self, flag):         if flag:             self.checkImage.Show()         else:             self.checkImage.Hide()     def GetCheckStatus(self):         if self.checkImage:             return self.checkImage.IsShow()         return False     def SetEvent(self, func, *args) :         result = self.eventFunc.has_key(args[0])         if result :             self.eventFunc[args[0]] = func             self.eventArgs[args[0]] = args         else :             print "[ERROR] ui.py SetEvent, Can`t Find has_key : %s" % args[0]     def OnMouseLeftButtonUp(self):         if self.checkImage:             if self.checkImage.IsShow():                 self.checkImage.Hide()                 if self.eventFunc["ON_UNCKECK"]:                     apply(self.eventFunc["ON_UNCKECK"], self.eventArgs["ON_UNCKECK"])             else:                 self.checkImage.Show()                 if self.eventFunc["ON_CHECK"]:                     apply(self.eventFunc["ON_CHECK"], self.eventArgs["ON_CHECK"])
Kod:
#arat;         self.titleBar.SetCloseEvent(ui.__mem_func__(self.CancelRefine)) #altına ekle;         if app.ENABLE_REFINE_RENEWAL:             self.checkBox = ui.CheckBox()             self.checkBox.SetParent(self)             self.checkBox.SetPosition(0, 70)             self.checkBox.SetWindowHorizontalAlignCenter()             self.checkBox.SetWindowVerticalAlignBottom()             self.checkBox.SetEvent(ui.__mem_func__(self.AutoRefine), "ON_CHECK", True)             self.checkBox.SetEvent(ui.__mem_func__(self.AutoRefine), "ON_UNCKECK", False)             self.checkBox.SetCheckStatus(constInfo.IS_AUTO_REFINE)             self.checkBox.SetTextInfo("Otomatik Dönüştürme")             self.checkBox.Show() #tekrar arat; class RefineDialogNew(ui.ScriptWindow): #fonksiyon içinde bul;     def Destroy(self): #def fonksiyonunun bitimine ekle;     if app.ENABLE_REFINE_RENEWAL:         def __InitializeOpen(self):             self.children = []             self.vnum = 0             self.targetItemPos = 0             self.dialogHeight = 0             self.cost = 0             self.percentage = 0             self.type = 0             self.xRefineStart = 0             self.yRefineStart = 0 #tekrar arat;     def Open(self, targetItemPos, nextGradeItemVnum, cost, prob, type): #fonksiyon içinde bul;         self.__Initialize() #değiştir;         if app.ENABLE_REFINE_RENEWAL:             self.__InitializeOpen()         else:             self.__Initialize() #tekrar arat;     def UpdateDialog(self): #fonksiyon içinde bul ve rakamı 10 sayı yükselt;         newHeight = self.dialogHeight + 69 #Buradaki rakam değişkenlik gösterebilir. #tekrar arat; class RefineDialogNew(ui.ScriptWindow): #fonksiyon içinde bul;     def Accept(self): #def fonksiyonunu değiştir;     def Accept(self):         if app.ENABLE_REFINE_RENEWAL:             net.SendRefinePacket(self.targetItemPos, self.type)         else:             net.SendRefinePacket(self.targetItemPos, self.type)             self.Close()     if app.ENABLE_REFINE_RENEWAL:         def AutoRefine(self, checkType, autoFlag):             constInfo.IS_AUTO_REFINE = autoFlag         def CheckRefine(self, isFail):             if constInfo.IS_AUTO_REFINE == True:                 if constInfo.AUTO_REFINE_TYPE == 1:                     if constInfo.AUTO_REFINE_DATA["ITEM"][0] != -1 and constInfo.AUTO_REFINE_DATA["ITEM"][1] != -1:                         scrollIndex = player.GetItemIndex(constInfo.AUTO_REFINE_DATA["ITEM"][0])                         itemIndex = player.GetItemIndex(constInfo.AUTO_REFINE_DATA["ITEM"][1])                                                chat.AppendChat(chat.CHAT_TYPE_INFO, "%d %d" % (itemIndex, int(itemIndex %10)))                         if scrollIndex == 0 or (itemIndex % 10 == 8 and not isFail):                             self.Close()                         else:                             net.SendItemUseToItemPacket(constInfo.AUTO_REFINE_DATA["ITEM"][0], constInfo.AUTO_REFINE_DATA["ITEM"][1])                 elif constInfo.AUTO_REFINE_TYPE == 2:                     npcData = constInfo.AUTO_REFINE_DATA["NPC"]                     if npcData[0] != 0 and npcData[1] != -1 and npcData[2] != -1 and npcData[3] != 0:                         itemIndex = player.GetItemIndex(npcData[1], npcData[2])                         if (itemIndex % 10 == 8 and not isFail) or isFail:                             self.Close()                         else:                             net.SendGiveItemPacket(npcData[0], npcData[1], npcData[2], npcData[3])                 else:                     self.Close()             else:                 self.Close() #tekrar arat;     def CancelRefine(self): #fonksiyonu değiştir;     def CancelRefine(self):         net.SendRefinePacket(255, 255)         self.Close()         if app.ENABLE_REFINE_RENEWAL:             constInfo.AUTO_REFINE_TYPE = 0             constInfo.AUTO_REFINE_DATA = {                 "ITEM" : [-1, -1],                 "NPC" : [0, -1, -1, 0]             }
Kod:
#arat;         if player.REFINE_OK != player.CanRefine(scrollIndex, targetSlotPos):             return #altına ekle;         if app.ENABLE_REFINE_RENEWAL:             constInfo.AUTO_REFINE_TYPE = 1             constInfo.AUTO_REFINE_DATA["ITEM"][0] = scrollSlotPos             constInfo.AUTO_REFINE_DATA["ITEM"][1] = targetSlotPos

Ekteki dosyayı pack'e atıp Index'e ekleyin.
Kanıt;
3879_Adsiz-png.

Hayırlı kullanımlar.
Otomatik Dönüşüm (Refine) Eklentisi Nedir?
Metin2 özel sunucularında oyun deneyimini artırmak için geliştirilen eklentilerden biri olan Otomatik Dönüşüm (Refine) Eklentisi, oyuncuların eşyalarını daha kolay ve hızlı bir şekilde yükseltmelerine olanak tanır. Bu sistem özellikle Metin2 PvP sunucularında popülerdir çünkü oyuncuların güçlenmesi ve rekabet ortamında avantaj elde etmesi için eşya yükseltme süreci büyük önem taşır.

Refine Sistemi Nasıl Çalışır?
Otomatik Refine eklentisi, oyuncunun belirli bir eşyayı seçip otomatik olarak dönüşüm (refine) işlemini başlatmasını sağlar. Geleneksel sistemde oyuncu her seferinde dönüşüm yapmak için tekrar tekrar menüye gitmek zorundadır. Ancak bu eklenti sayesinde işlem tek bir komutla veya butonla yapılır. Eklentinin arka planında çalışan C++ veya Python tabanlı sistem, istemci ile sunucu arasında veri alışverişini sağlayarak bu süreci otomatikleştirir.

Eklenti Özellikleri
Otomatik Jeton Kullanımı: Oyuncu, belirli miktarda refine jetonuna sahipse, sistem otomatik olarak jetonları kullanarak dönüşümü yapar.
Hata Kontrolü: Refine başarısız olursa, sistem bunu anlayarak işlemi durdurabilir veya yeniden deneme şansı verebilir.
Ayarlanabilir Oranlar: Sunucu yöneticileri, refine oranlarını sistem üzerinden ayarlayabilir ve bu sayede sunucuya özgü bir ekonomi oluşturabilirler.

Python GUI ve Py Root ile Entegrasyon
Bu tür sistemler genellikle Python GUI arayüzleri ile entegre edilerek daha kullanıcı dostu hale getirilir. Py Root klasörlerinde bulunan UIscript dosyaları ile istemci tarafında butonlar ve menüler oluşturulur. Böylece oyuncular, grafiksel arayüz üzerinden kolayca Otomatik Refine özelliğini kullanabilir. Bu yapı aynı zamanda server-side (sunucu tarafı) ile uyumlu çalışacak şekilde C++ kodları ile geliştirilir.

C++ Kaynak Kod ve DB Entegrasyonu
Otomatik Refine eklentisi, genellikle auth ve game sunucusu üzerinde çalışan C++ tabanlı bir sistemle entegre edilir. Bu sistem, refine işlemi sırasında DB (veritabanı) üzerinde gerekli kontrolleri yapar. Örneğin, oyuncunun yeterli jetona sahip olup olmadığını, eşyanın refine edilebilir olup olmadığını kontrol eder. Bu sayede hem hile engellenmiş olur hem de sistem daha stabil çalışır.

Sunucu Geliştirme ve Paketleme
Metin2 özel sunucularında otomatik refine sistemi, server src (kaynak kodu) düzenlemeleriyle birlikte paketlenerek sunucuya entegre edilir. Bu süreçte MARTYSAMA gibi geliştirici toplulukları tarafından sağlanan kaynaklar da kullanılabilir. Eklenti, game core ve db core üzerinde çalışarak sunucu performansını etkilemeden sorunsuz bir şekilde çalışır.

Sonuç
Otomatik Dönüşüm (Refine) Eklentisi, Metin2 özel sunucularında oyuncu memnuniyetini artırmak ve PvP sistemlerini desteklemek için önemli bir özelliktir. Hem kullanıcı dostu hem de sunucu tarafında güvenli çalışan bu sistem, C++, Python ve veritabanı teknolojileri ile birlikte geliştirildiğinde güçlü ve kararlı bir altyapı sunar.


What is the Auto Refine Plugin?
The Auto Refine plugin is one of the tools developed to enhance the gaming experience on Metin2 private servers. It allows players to upgrade their items more easily and quickly. This system is especially popular in Metin2 PvP servers since item upgrades are crucial for player progression and gaining competitive advantages.

How Does the Refine System Work?
The auto refine plugin enables players to select an item and start the refine process automatically with just one click or command. In traditional systems, players had to manually navigate through menus each time they wanted to refine. However, this plugin automates the process by exchanging data between the client and server using C++ or Python-based backend systems.

Features of the Plugin
Automatic Token Usage: If a player has enough refine tokens, the system automatically consumes them during the refine process.
Error Handling: If a refine attempt fails, the system detects it and may stop the process or allow retrying.
Adjustable Rates: Server administrators can configure refine success rates to create custom economic models within the game.

Integration with Python GUI and Py Root
Such systems are often integrated with user-friendly Python GUI interfaces. UIscript files located in Py Root folders allow the creation of buttons and menus on the client side. This way, players can easily access the auto-refine feature through graphical interfaces. These components are also designed to work seamlessly with server-side C++ codebases.

C++ Source Code and Database Integration
The auto refine plugin typically integrates with C++ based systems running on both auth and game servers. During refine operations, the system checks the database (DB) to verify if the player has sufficient tokens or if the item is eligible for refinement. This ensures anti-cheating measures while maintaining stability and reliability.

Server Development and Packaging
On Metin2 private servers, the auto refine system is implemented by modifying server source codes (src) and packaging them into the server. Resources provided by developer communities such as MARTYSAMA can be used during this process. The plugin works smoothly on game core and db core without affecting server performance.

Conclusion
The Auto Refine plugin is an essential feature for increasing player satisfaction and supporting PvP systems in Metin2 private servers. When developed using C++, Python, and database technologies, it provides a secure, stable, and user-friendly infrastructure.
 

Şuan Bu Konuyu Görüntüleyen Kullanıcılar (Toplam : 0, Üye : 0, Misafir : 0)

Benzer konular

Geri
Üst Alt