mavzermete 1
mavzermete
Fethi Polat 1
Fethi Polat
noisiv 1
noisiv
Manwe Work 1
Manwe Work
Scarlet 1
Scarlet
xranzei 1
xranzei
Hikaye Ekle

[Py] Cube GM İtem Yaratma

  • Konuyu başlatan Konuyu başlatan -Blaster-
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 8
  • Görüntüleme Görüntüleme 665
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

HERAKLES Otomatik Avlı kalıcı sunucu. 19 Haziran'da açılıyor. Atius & Wizard güvencesiyle hemen kayıt ol, ön kayıt ödülleri aktif. HEMEN TIKLA!

Oyun yöneticileri için çok, çok kullanışlı bir özellik
Bir yükseltme penceresi açtığınızda, gerekli öğelere sağ tıklayarak doğrudan envanterinizde gelmerini sağlayabilirsiniz.
Bu sayede, bunları /item komutuyla kendiniz oluşturmanıza gerek kalmaz

sistem Alıntıdır...






[CODE lang="python" title="uirefine.py" highlight="Yoksa ekle"]import chr[/CODE]

[CODE lang="python" title="Ara"]__InitializeOpen:[/CODE]
[CODE lang="python" title="Ekle"]if constInfo.ENABLE_REFINE_ITEM_DESCRIPTION:
self.materialTextLines = []
self.lastRefreshTime = 0
self.refreshCount = 0[/CODE]

[CODE lang="python" title="ara"]__MakeItemSlot:[/CODE]

[CODE lang="python" title="SetOverOutItemEvent'ten sonra şunları ekliyoruz'ten sonra şunları ekliyoruz"]slot.SetSelectItemSlotEvent(ui.__mem_func__(self.OnGMItemClick))[/CODE]


[CODE lang="python" title="__MakeItemSlot'tan sonra ve OverInItem'dan önce şunları ekliyoruz'tan sonra ve OverInItem'dan önce şunları ekliyoruz"]def OnGMItemClick(self, slotIndex):
if not chr.IsGameMaster(player.GetMainCharacterIndex()):
return

if slotIndex >= len(TOOLTIP_DATA['materials']):
return

itemVnum = TOOLTIP_DATA['materials'][slotIndex]
if itemVnum == 0:
return

net.SendChatPacket("/item %d 1" % itemVnum)

if hasattr(self, 'materialTextLines'):
self.lastRefreshTime = app.GetTime() + 0.3
self.refreshCount = 5[/CODE]


[CODE lang="python" title="Ara"]def OverOutItem[/CODE]


[CODE lang="python" title="Ekle"]def RefreshMaterialTexts(self):
if not hasattr(self, 'materialTextLines'):
return

for material in self.materialTextLines:
vnum = material['vnum']
count = material['count']
textLine = material['textLine']

currentCount = player.GetItemCountByVnum(vnum)

if currentCount < count:
textLine.SetPackedFontColor(0xffFF0033)
else:
textLine.SetPackedFontColor(0xff40EF37)

item.SelectItem(vnum)
textLine.SetText("|cFFdddddd|H|h%s x%d|h|r (%d)" % (item.GetItemName(), count, currentCount))[/CODE]

[CODE lang="python" title="Ara"]def RefreshMaterialTexts[/CODE]


[CODE lang="python" title="Ekle"]def OnUpdate(self):
if constInfo.ENABLE_REFINE_ITEM_DESCRIPTION:
if hasattr(self, 'lastRefreshTime') and self.lastRefreshTime > 0:
currentTime = app.GetTime()
if currentTime >= self.lastRefreshTime:
self.RefreshMaterialTexts()
if hasattr(self, 'refreshCount'):
self.refreshCount -= 1
if self.refreshCount > 0:
self.lastRefreshTime = app.GetTime() + 0.2
else:
self.lastRefreshTime = 0
self.refreshCount = 0
else:
self.lastRefreshTime = 0[/CODE]

[CODE lang="python" title="Ara"]AppendMaterial[/CODE]


[CODE lang="python" title="Fonksiyonun sonunda, self.children.append(textLine) satırından sonra şunu ekliyoruz"]if constInfo.ENABLE_REFINE_ITEM_DESCRIPTION:
if not hasattr(self, 'materialTextLines'):
self.materialTextLines = []
self.materialTextLines.append({'vnum': vnum, 'count': count, 'textLine': textLine})[/CODE]

[CODE lang="python" title="Şimdi interfacemodule.py dosyasını açın ve şu fonksiyonu bulun"]RefreshInventory[/CODE]


[CODE lang="python" title="UpdateBonusChanger() fonksiyonundan sonra şunları ekliyoruz"]if constInfo.ENABLE_REFINE_ITEM_DESCRIPTION:
if self.dlgRefineNew and self.dlgRefineNew.IsShow():
if hasattr(self.dlgRefineNew, 'RefreshMaterialTexts'):
self.dlgRefineNew.RefreshMaterialTexts()[/CODE]
Yapıp paylaştıgım sistemi bari alıntılasaydın.
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst