- Katılım
- 24 Nis 2016
- Konular
- 15
- Mesajlar
- 262
- Çözüm
- 3
- Online süresi
- 1d 2h
- Reaksiyon Skoru
- 84
- Altın Konu
- 0
- TM Yaşı
- 10 Yıl 1 Ay 15 Gün
- Başarım Puanı
- 107
- MmoLira
- 868
- 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.
Moderatör tarafında düzenlendi:
En Çok Reaksiyon Alan Mesajlar
Teşekkürler
- Katılım
- 27 Ara 2018
- Konular
- 17
- Mesajlar
- 616
- Çözüm
- 5
- Online süresi
- 1mo 21d
- Reaksiyon Skoru
- 219
- Altın Konu
- 0
- TM Yaşı
- 7 Yıl 5 Ay 12 Gün
- Başarım Puanı
- 136
- Yaş
- 28
- MmoLira
- 6,218
- DevLira
- 3
Depo açıkken sağ tık ile envanterde ki itemlerinizi depoya, depodaki itemleri sağ tık ile envanterinize alabilirsiniz.
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..
Teşekkürler
- Katılım
- 12 Tem 2017
- Konular
- 3,675
- Mesajlar
- 14,203
- Çözüm
- 157
- Online süresi
- 1mo 19d
- Reaksiyon Skoru
- 6,341
- Altın Konu
- 1
- Başarım Puanı
- 462
- MmoLira
- 2,563
- DevLira
- 166
Teşekkürler.
- Katılım
- 15 May 2018
- Konular
- 96
- Mesajlar
- 950
- Çözüm
- 18
- Online süresi
- 3mo 25d
- Reaksiyon Skoru
- 285
- Altın Konu
- 0
- TM Yaşı
- 8 Yıl 23 Gün
- Başarım Puanı
- 186
- Yaş
- 28
- MmoLira
- 11,583
- DevLira
- 30
item envanterde depoya sağ tıkla alınca böyle sysrr yardımcı olurmusunuz
0416 08:01:36348 :: Traceback (most recent call last):
0416 08:01:36348 :: File "ui.py", line 2030, in OnUnselectItemSlot
0416 08:01:36348 :: File "ui.py", line 90, in __call__
0416 08:01:36348 :: File "ui.py", line 81, in __call__
0416 08:01:36348 :: File "uiInventory.py", line 2402, in UseItemSlot
0416 08:01:36348 :: File "uiInventory.py", line 2453, in __UseItem
0416 08:01:36348 :: File "interfaceModule.py", line 2557, in AttachInvenItemToOtherWindowSlot
0416 08:01:36348 :: File "uiSafebox.py", line 751, in AttachItemFromInventory
0416 08:01:36348 :: File "uiSafebox.py", line 712, in __GetCurrentItemGrid
0416 08:01:36348 :: AttributeError
0416 08:01:36348 :: :
0416 08:01:36348 :: 'SafeboxWindow' object has no attribute 'pagecount'
0416 08:01:36349 ::
0416 08:01:36794 :: Traceback (most recent call last):
0416 08:01:36794 :: File "ui.py", line 2030, in OnUnselectItemSlot
0416 08:01:36794 :: File "ui.py", line 90, in __call__
0416 08:01:36794 :: File "ui.py", line 81, in __call__
0416 08:01:36794 :: File "uiInventory.py", line 2402, in UseItemSlot
0416 08:01:36794 :: File "uiInventory.py", line 2453, in __UseItem
0416 08:01:36795 :: File "interfaceModule.py", line 2557, in AttachInvenItemToOtherWindowSlot
0416 08:01:36795 :: File "uiSafebox.py", line 751, in AttachItemFromInventory
0416 08:01:36795 :: File "uiSafebox.py", line 712, in __GetCurrentItemGrid
0416 08:01:36795 :: AttributeError
0416 08:01:36795 :: :
0416 08:01:36795 :: 'SafeboxWindow' object has no attribute 'pagecount'
0416 08:01:36795 ::
0416 08:01:36348 :: Traceback (most recent call last):
0416 08:01:36348 :: File "ui.py", line 2030, in OnUnselectItemSlot
0416 08:01:36348 :: File "ui.py", line 90, in __call__
0416 08:01:36348 :: File "ui.py", line 81, in __call__
0416 08:01:36348 :: File "uiInventory.py", line 2402, in UseItemSlot
0416 08:01:36348 :: File "uiInventory.py", line 2453, in __UseItem
0416 08:01:36348 :: File "interfaceModule.py", line 2557, in AttachInvenItemToOtherWindowSlot
0416 08:01:36348 :: File "uiSafebox.py", line 751, in AttachItemFromInventory
0416 08:01:36348 :: File "uiSafebox.py", line 712, in __GetCurrentItemGrid
0416 08:01:36348 :: AttributeError
0416 08:01:36348 :: :
0416 08:01:36348 :: 'SafeboxWindow' object has no attribute 'pagecount'
0416 08:01:36349 ::
0416 08:01:36794 :: Traceback (most recent call last):
0416 08:01:36794 :: File "ui.py", line 2030, in OnUnselectItemSlot
0416 08:01:36794 :: File "ui.py", line 90, in __call__
0416 08:01:36794 :: File "ui.py", line 81, in __call__
0416 08:01:36794 :: File "uiInventory.py", line 2402, in UseItemSlot
0416 08:01:36794 :: File "uiInventory.py", line 2453, in __UseItem
0416 08:01:36795 :: File "interfaceModule.py", line 2557, in AttachInvenItemToOtherWindowSlot
0416 08:01:36795 :: File "uiSafebox.py", line 751, in AttachItemFromInventory
0416 08:01:36795 :: File "uiSafebox.py", line 712, in __GetCurrentItemGrid
0416 08:01:36795 :: AttributeError
0416 08:01:36795 :: :
0416 08:01:36795 :: 'SafeboxWindow' object has no attribute 'pagecount'
0416 08:01:36795 ::
Ş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





