C 1
chengdu
xranzei 1
xranzei
zendor2 1
zendor2
Bvural41 1
Bvural41
noisiv 1
noisiv
Manwe Work 1
Manwe Work
Almira2 1
Almira2
romegames 1
romegames
D 1
delimuratt
melankolıa18 1
melankolıa18
shrpnl 1
shrpnl
Hikaye Ekle
Reklam vermek için turkmmo@gmail.com
Kaynak ikonu

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

indirmek için izniniz yok
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.

[CODE lang="cpp" title="Client Source\source\UserInterface\Locale_inc.h"]//müsait bir yere ekle;

#define ENABLE_REFINE_RENEWAL[/CODE]
[CODE lang="cpp" title="Client Source\source\UserInterface\PythonApplicationModule.cpp"]//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[/CODE]
[CODE lang="python" title="root\constinfo.py"]#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]
}[/CODE]
[CODE lang="python" title="root\game.py"]#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[/CODE]
[CODE lang="python" title="root\interfacemodule.py"]#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)[/CODE]
[CODE lang="python" title="root\ui.py"]#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"])[/CODE]
[CODE lang="python" title="root\uirefine.py"]#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]
}[/CODE]
[CODE lang="python" title="root\uiinventory.py"]#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[/CODE]

Ekteki dosyayı pack'e atıp Index'e ekleyin.
Kanıt;
Ekli dosyayı görüntüle 3554
Hayırlı kullanımlar.​
  • Adsız.png
    Adsız.png
    95 KB · Görüntüleme: 0
Yazar
Ectoor
Kaynak İndirilme
43
Görüntüleme
522
İlk yayınlama
Son Güncelleme

Ratings

0.00 yıldız(lar) 0 rating

Ectoor - Kaynakları

Geri
Üst