- Katılım
- 22 Ocak 2014
- Konular
- 160
- Mesajlar
- 869
- Çözüm
- 2
- Online süresi
- 1mo 2d
- Reaksiyon Skoru
- 26
- Altın Konu
- 0
- TM Yaşı
- 12 Yıl 4 Ay 19 Gün
- Başarım Puanı
- 151
- MmoLira
- 3,479
- DevLira
- 0
ROHAN2 WORLD 1-120 TR TİPİ OFFICIAL YOHARA, BALATHOR VE AMON! 80. GÜNÜNDE! +10.000 ONLİNE! HİLE VE BOT %100 ENGELLİ HEMEN TIKLA!
Depo açıkken sağ tık ile envanterde ki itemlerinizi depoya, depodaki itemleri sağ tık ile envanterinize alabilirsiniz.
Kodların paste hali:Linkleri görebilmek için Turkmmo Forumuna ÜYE olmanız gerekmektedir.
interfacemodule.py Aç
[CODE lang="python" title="Arat"]def GetInventoryPageIndex(self):[/CODE]
[CODE lang="python" title="üstüne ekle"] def AttachItemFromSafebox(self, slotIndex, itemIndex):
if self.wndInventory and self.wndInventory.IsShow():
self.wndInventory.AttachItemFromSafebox(slotIndex, itemIndex)
return True
def AttachInvenItemToOtherWindowSlot(self, slotWindow, slotIndex):
if self.wndSafebox and self.wndSafebox.IsShow():
return self.wndSafebox.AttachItemFromInventory(slotWindow, slotIndex)
return False[/CODE]
uiinventory.py Aç
[CODE lang="python" title="Arat"]def __UseItem(self, slotIndex):[/CODE]
[CODE lang="python" title="üstüne ekle"] def __GetCurrentItemGrid(self):
itemGrid = [[False for slot in xrange(player.INVENTORY_PAGE_SIZE)] for page in xrange(player.INVENTORY_PAGE_COUNT)]
for page in xrange(player.INVENTORY_PAGE_COUNT):
for slot in xrange(player.INVENTORY_PAGE_SIZE):
itemVnum = player.GetItemIndex(slot + page * player.INVENTORY_PAGE_SIZE)
if itemVnum <> 0:
(w, h) = item.GetItemSize(item.SelectItem(itemVnum))
for i in xrange(h):
itemGrid[page][slot + i * 5] = True
return itemGrid
def __FindEmptyCellForSize(self, itemGrid, size):
for page in xrange(player.INVENTORY_PAGE_COUNT):
for slot in xrange(player.INVENTORY_PAGE_SIZE):
if itemGrid[page][slot] == False:
possible = True
for i in xrange(size):
p = slot + (i * 5)
try:
if itemGrid[page][p] == True:
possible = False
break
except IndexError:
possible = False
break
if possible:
return slot + page * player.INVENTORY_PAGE_SIZE
return -1
def AttachItemFromSafebox(self, slotIndex, itemIndex):
itemGrid = self.__GetCurrentItemGrid()
if item.GetItemType(item.SelectItem(itemIndex)) == item.ITEM_TYPE_DS:
return
emptySlotIndex = self.__FindEmptyCellForSize(itemGrid, item.GetItemSize()[1])
if emptySlotIndex <> -1:
net.SendSafeboxCheckoutPacket(slotIndex, player.INVENTORY, emptySlotIndex)
return True[/CODE]
[CODE lang="python" title="Arat"] def __UseItem(self, slotIndex):
ItemVNum = player.GetItemIndex(slotIndex)
item.SelectItem(ItemVNum)[/CODE]
[CODE lang="python" title="Değiş"] def __UseItem(self, slotIndex):
if self.interface and self.interface.AttachInvenItemToOtherWindowSlot(player.INVENTORY, slotIndex):
return
ItemVNum = player.GetItemIndex(slotIndex)
item.SelectItem(ItemVNum)[/CODE]
uisafebox.py Aç
İmportlarda item yoksa ekle
[CODE lang="python" title="Arat"]class SafeboxWindow(ui.ScriptWindow):[/CODE]
[CODE lang="python" title="tekrar arat"]def UseItemSlot(self, slotIndex):[/CODE]
[CODE lang="python" title="Değiş"] def __GetCurrentItemGrid(self):
itemGrid = [[False for cell in xrange(safebox.SAFEBOX_PAGE_SIZE)] for page in xrange(self.pagecount)]
for page in xrange(self.pagecount):
for slot in xrange(safebox.SAFEBOX_PAGE_SIZE):
itemVnum = safebox.GetItemID(slot + page * safebox.SAFEBOX_PAGE_SIZE)
if itemVnum <> 0:
item.SelectItem(itemVnum)
(w, h) = item.GetItemSize()
for i in xrange(h):
itemGrid[page][slot + i * safebox.SAFEBOX_SLOT_X_COUNT] = True
return itemGrid
def __FindEmptyCellForSize(self, itemGrid, size):
for page in xrange(self.pagecount):
for slot in xrange(safebox.SAFEBOX_PAGE_SIZE):
if itemGrid[page][slot] == False:
possible = True
for i in xrange(size):
p = slot + safebox.SAFEBOX_SLOT_X_COUNT * i
try:
if itemGrid[page][p] == True:
possible = False
break
except IndexError:
possible = False
break
if possible:
return slot + page * safebox.SAFEBOX_PAGE_SIZE
return -1
def AttachItemFromInventory(self, slotWindow, slotIndex):
attachedItemID = player.GetItemIndex(slotWindow, slotIndex)
item.SelectItem(attachedItemID)
if item.IsAntiFlag(item.ITEM_ANTIFLAG_SAFEBOX):
return False
itemGrid = self.__GetCurrentItemGrid()
item.SelectItem(attachedItemID)
emptySafeboxSlot = self.__FindEmptyCellForSize(itemGrid, item.GetItemSize()[1])
if emptySafeboxSlot == -1 or item.GetItemType() == item.ITEM_TYPE_ELK:
return False
net.SendSafeboxCheckinPacket(slotWindow, slotIndex, emptySafeboxSlot)
return True
def UseItemSlot(self, slotIndex):
if mouseModule.mouseController.isAttached():
mouseModule.mouseController.DeattachObject()
if self.interface:
globalSlotIndex = self.__LocalPosToGlobalPos(slotIndex)
self.interface.AttachItemFromSafebox(globalSlotIndex, safebox.GetItemID(globalSlotIndex))[/CODE]
İyi kullanımlar iyi forumlar..
not: eğer pagecount ile ilgili sysser alıyorsanız verdiğim kodlarda ki self.pagecount kısmını self.pageCount olarak değiştirin.
ustadım depodan envantere geliyor lakin envanterden depoya gitmiyor ne yapmam lazım self.pagecount ile pageCount değiştim olmadı
1230 18:00:31555 :: Traceback (most recent call last):
1230 18:00:31555 :: File "ui.py", line 2307, in OnUnselectItemSlot
1230 18:00:31555 :: File "ui.py", line 103, in __call__
1230 18:00:31555 :: File "ui.py", line 94, in __call__
1230 18:00:31556 :: File "uiInventory.py", line 3188, in UseItemSlot
1230 18:00:31556 :: File "uiInventory.py", line 3242, in __UseItem
1230 18:00:31556 :: File "interfaceModule.py", line 2439, in AttachInvenItemToOtherWindowSlot
1230 18:00:31556 :: File "uiSafebox.py", line 796, in AttachItemFromInventory
1230 18:00:31557 :: File "uiSafebox.py", line 757, in __GetCurrentItemGrid
1230 18:00:31557 :: AttributeError
1230 18:00:31567 :: :
1230 18:00:31567 :: 'SafeboxWindow' object has no attribute 'pageCount'
1230 18:00:31567 ::
- Katılım
- 5 Eki 2018
- Konular
- 0
- Mesajlar
- 112
- Online süresi
- 6h 58m
- Reaksiyon Skoru
- 20
- Altın Konu
- 0
- TM Yaşı
- 7 Yıl 8 Ay 7 Gün
- Başarım Puanı
- 46
- MmoLira
- 76
- DevLira
- 0
paylaşım için teşekkürler
- Katılım
- 22 Mar 2015
- Konular
- 5
- Mesajlar
- 107
- Çözüm
- 1
- Online süresi
- 15d 22h
- Reaksiyon Skoru
- 25
- Altın Konu
- 0
- TM Yaşı
- 11 Yıl 2 Ay 20 Gün
- Başarım Puanı
- 102
- MmoLira
- 3,532
- DevLira
- 0
you solved?Viniendo del inventario del almacén y, sin embargo, no iba a dominar el inventario del almacén ¿Qué debo hacer con self.pagecount no ha cambiado PageCounter
1230 18: 00: 31555 :: Traceback (última llamada más reciente):
1230 18: 00: 31555 :: Archivo "ui.py", línea 2307, en OnUnselectItemSlot
1230 18: 00: 31555 :: Archivo "ui.py", línea 103, en __call__
1230 18: 00: 31555 :: Archivo "ui.py", línea 94, en __call__
1230 18: 00: 31556 :: Archivo "uiInventory.py", línea 3188, en UseItemSlot
1230 18: 00: 31556 :: Archivo "uiInventory.py", línea 3242, en __UseItem
1230 18: 00: 31556 :: Archivo "interfaceModule.py", línea 2439, en AttachInvenItemToOtherWindowSlot
1230 18: 00: 31556 :: Archivo "uiSafebox.py", línea 796, en AttachItemFromInventory
1230 18: 00: 31557 :: Archivo "uiSafebox.py", línea 757, en __GetCurrentItemGrid
1230 18: 00: 31557 :: AttributeError
1230 18: 00: 31567 :::
1230 18: 00: 31567 :: El objeto 'SafeboxWindow' no tiene atributo 'pageCount'
1230 18: 00: 31567 ::
Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)
Benzer konular
- Cevaplar
- 16
- Görüntüleme
- 844
- Cevaplar
- 14
- Görüntüleme
- 662
- Cevaplar
- 16
- Görüntüleme
- 2K




