Am luat sistemul fast equip 4sloturi+curea + costume şi nu ştiu să fac tabul..la el..unde să mi-l pun să fie..eu vreau să fie în loc de Depozit Item-Shop în inventar ştie cineva cum aş putea face asta?
Am sistem curele dar când vreau să pun cureaua în căsuţa ei nu se pune..apare că este căsuţă dar nu se pune nimic acolo..şi nici nu apare în chat că nu poţi + locurile pentru inele cum le pot face? să meargă? ele apar acolo doar în inventar..dar nu sunt sloturi ( dacă mă înţelegeţi ) .
Cum pot să fac să pot purta mai mult de 1 inel pe mine? mă refer la acadea/bucurie/semi-lună etc pot pune una pe mine..dar nu mai merge încă una zice că nu pot face aşa ceva cum aş putea să pot ?:)) .
Diferite probleme/întrebări legate de sisteme.
1.Game.py mergi in linia asta
si schimbi cu asta:
Dupa jos de tot
intri in root si creezi un fisier cu numele system_vegas.py
Apoi tot in root creezi un fisier vegas.py
Cod: Selectaţi tot
def __BuildKeyDict(self):
onPressKeyDict = {}Cod: Selectaţi tot
onPressKeyDict[app.DIK_F6] = lambda : self.VegaS()Cod: Selectaţi tot
def VegaS(self):
import vegas
self.system_vegas = vegas.dinasty()
self.system_vegas.Show()Cod: Selectaţi tot
#############################################################
#### Client by VegaS - Client DinastyWorld II - ####
#### Skype: sacadatt.amazon / Contact: 0748576910 ####
#### www.dinasty-world.ro ####
#############################################################
import uiScriptLocale
import item
window = {
"name" : "CostumeWindow",
"x" : SCREEN_WIDTH - 340,
"y" : 140,
"style" : ("movable", "float",),
"width" : 182,
"height" : 530,
"children" :
(
{
"name" : "board",
"type" : "board",
"style" : ("attach",),
"x" : 0,
"y" : 0,
"width" : 182,
"height" : 530,
"children" :
(
## Titlu barei
{
"name" : "TitleBar",
"type" : "titlebar",
"style" : ("attach",),
"x" : 6,
"y" : 6,
"width" : 170,
"color" : "yellow",
"children" :
(
{ "name":"TitleName", "type":"text", "x":80, "y":3, "text":"System Fast Equip", "text_horizontal_align":"center" },
),
},
## Slot-urile ## VegaS -
{
"name" : "equip_Base",
"type" : "image",
"x" : 13,
"y" : 38,
"image" : "d:/ymir work/ui/game/windows/equipment_base.sub",
},
{
"name" : "dinastyworld",
"type" : "slot",
"x" : 16,
"y" : 41,
"width" : 130,
"height" : 150,
"slot" : (
{"index":1, "x":39, "y":37, "width":32, "height":64},
{"index":2, "x":39, "y":2, "width":32, "height":32},
{"index":3, "x":39, "y":145, "width":32, "height":32},
{"index":4, "x":75, "y":67, "width":32, "height":32},
{"index":5, "x":3, "y":3, "width":32, "height":96},
{"index":6, "x":116, "y":84, "width":32, "height":32},
{"index":7, "x":116, "y":52, "width":32, "height":32},
{"index":8, "x":75, "y":35, "width":32, "height":32},
{"index":9, "x":114, "y":2, "width":32, "height":32},
{"index":10, "x":75, "y":35, "width":32, "height":32},
),
},
#button inlocuire
{
"name" : "button_dinasty",
"type" : "button",
"x" : 45,
"y" : 235,
"text" : "Inlocuieste",
"default_image" : "d:/ymir work/ui/public/Large_Button_01.sub",
"over_image" : "d:/ymir work/ui/public/Large_Button_02.sub",
"down_image" : "d:/ymir work/ui/public/Large_Button_03.sub",
},
#button resetare
{
"name" : "button_vegas",
"type" : "button",
"x" : 45,
"y" : 265,
"text" : "Reseteaza",
"default_image" : "d:/ymir work/ui/public/Large_Button_01.sub",
"over_image" : "d:/ymir work/ui/public/Large_Button_02.sub",
"down_image" : "d:/ymir work/ui/public/Large_Button_03.sub",
},
#incepere sloturi I-VIII
{
"name" : "vegas0",
"type" : "button",
"x" : 47,
"y" : 295,
"text" : "Echipament I",
"default_image" : "d:/ymir work/ui/game/windows/tab_button_large_01.sub",
"over_image" : "d:/ymir work/ui/game/windows/tab_button_large_02.sub",
"down_image" : "d:/ymir work/ui/game/windows/tab_button_large_03.sub",
}, {
"name" : "vegas1",
"type" : "button",
"x" : 47,
"y" : 325,
"all_align" : "center",
"text" : "Echipament II",
"default_image" : "d:/ymir work/ui/game/windows/tab_button_large_01.sub",
"over_image" : "d:/ymir work/ui/game/windows/tab_button_large_02.sub",
"down_image" : "d:/ymir work/ui/game/windows/tab_button_large_03.sub",
}, {
"name" : "vegas2",
"type" : "button",
"x" : 47,
"y" : 355,
"text" : "Echipament III",
"default_image" : "d:/ymir work/ui/game/windows/tab_button_large_01.sub",
"over_image" : "d:/ymir work/ui/game/windows/tab_button_large_02.sub",
"down_image" : "d:/ymir work/ui/game/windows/tab_button_large_03.sub",
}, {
"name" : "vegas3",
"type" : "button",
"x" : 47,
"y" : 385,
"text" : "Echipament IV",
"default_image" : "d:/ymir work/ui/game/windows/tab_button_large_01.sub",
"over_image" : "d:/ymir work/ui/game/windows/tab_button_large_02.sub",
"down_image" : "d:/ymir work/ui/game/windows/tab_button_large_03.sub",
}, {
"name" : "vegas4",
"type" : "button",
"x" : 47,
"y" : 415,
"text" : "Echipament V",
"default_image" : "d:/ymir work/ui/game/windows/tab_button_large_01.sub",
"over_image" : "d:/ymir work/ui/game/windows/tab_button_large_02.sub",
"down_image" : "d:/ymir work/ui/game/windows/tab_button_large_03.sub",
}, {
"name" : "vegas5",
"type" : "button",
"x" : 47,
"y" : 445,
"text" : "Echipament VI",
"default_image" : "d:/ymir work/ui/game/windows/tab_button_large_01.sub",
"over_image" : "d:/ymir work/ui/game/windows/tab_button_large_02.sub",
"down_image" : "d:/ymir work/ui/game/windows/tab_button_large_03.sub",
}, {
"name" : "vegas6",
"type" : "button",
"x" : 47,
"y" : 475,
"text" : "Echipament VII",
"default_image" : "d:/ymir work/ui/game/windows/tab_button_large_01.sub",
"over_image" : "d:/ymir work/ui/game/windows/tab_button_large_02.sub",
"down_image" : "d:/ymir work/ui/game/windows/tab_button_large_03.sub",
}, {
"name" : "vegas7",
"type" : "button",
"x" : 47,
"y" : 505,
"text" : "Echipament VIII",
"default_image" : "d:/ymir work/ui/game/windows/tab_button_large_01.sub",
"over_image" : "d:/ymir work/ui/game/windows/tab_button_large_02.sub",
"down_image" : "d:/ymir work/ui/game/windows/tab_button_large_03.sub",
},
),
},
),
}Cod: Selectaţi tot
#############################################################
#### Client by VegaS - Client DinastyWorld II - ####
#### Skype: sacadatt.amazon / Contact: 0748576910 ####
#### www.dinasty-world.ro ####
#############################################################
import ui
import player
import mouseModule
import net
import app
import chat
import snd
import item
import grp
import uiScriptLocale
import locale
import ime
import grpText
import uiToolTip
import os
class dinasty(ui.ScriptWindow):
def __init__(self):
import exception
ui.ScriptWindow.__init__(self)
self.wndEquip = None
self.tokens = None
self.activeslot = 1
self.tooltipItem = uiToolTip.ItemToolTip()
self.tooltipItem.Hide()
self.saveName = "lib/"+str(player.GetName())+"1.ddr"
def __del__(self):
ui.ScriptWindow.__del__(self)
def Show(self):
self.__LoadWindow()
ui.ScriptWindow.Show(self)
def Close(self):
self.Hide()
def __LoadWindow(self):
try:
pyScrLoader = ui.PythonScriptLoader()
pyScrLoader.LoadScriptFile(self, "system_vegas.py")
except:
import exception
exception.Abort("CostumeWindow.LoadWindow.LoadObject")
self.wndEquip = self.GetChild("dinastyworld")
self.bottone_change = self.GetChild("button_dinasty")
self.TitleBar = self.GetChild("TitleBar")
self.TitleBar.SetCloseEvent(ui.__mem_func__(self.Close))
self.wndEquip.SetSelectEmptySlotEvent(ui.__mem_func__(self.SelectItemSlot))
self.wndEquip.SetSelectItemSlotEvent(ui.__mem_func__(self.SelectItemSlot))
self.wndEquip.SetOverInItemEvent(ui.__mem_func__(self.OverInItem))
self.wndEquip.SetOverOutItemEvent(ui.__mem_func__(self.OnOverOutItem))
self.bottone_change.SetEvent(ui.__mem_func__(self.__button_dinasty))
self.button_vegas = self.GetChild("button_vegas")
self.button_vegas.SetEvent(ui.__mem_func__(self.__button_vegas))
self.vegas0 = self.GetChild("vegas0")
self.vegas1 = self.GetChild("vegas1")
self.vegas2 = self.GetChild("vegas2")
self.vegas3 = self.GetChild("vegas3")
self.vegas4 = self.GetChild("vegas4")
self.vegas5 = self.GetChild("vegas5")
self.vegas6 = self.GetChild("vegas6")
self.vegas7 = self.GetChild("vegas7")
self.vegas0.SetEvent(ui.__mem_func__(self.__SetSlot), 1)
self.vegas1.SetEvent(ui.__mem_func__(self.__SetSlot), 2)
self.vegas2.SetEvent(ui.__mem_func__(self.__SetSlot), 3)
self.vegas3.SetEvent(ui.__mem_func__(self.__SetSlot), 4)
self.vegas4.SetEvent(ui.__mem_func__(self.__SetSlot), 5)
self.vegas4.SetEvent(ui.__mem_func__(self.__SetSlot), 6)
self.vegas4.SetEvent(ui.__mem_func__(self.__SetSlot), 7)
self.vegas4.SetEvent(ui.__mem_func__(self.__SetSlot), 8)
self.LoadData()
def __button_dinasty(self):
for i in range(1,9):
if self.tokens[i-1] != "@":
net.SendItemUsePacket(int(self.tokens[i-1]))
def __button_vegas(self):
open(self.saveName, "w").write("@\t@\t@\t@\t@\t@\t@\t@")
def LoadData(self):
if os.path.exists(self.saveName):
self.tokens = open(self.saveName, "r").read().split()
else:
open(self.saveName, "w").write("@\t@\t@\t@\t@\t@\t@\t@")
def __SetSlot(self, arg):
self.saveName = "lib/"+str(player.GetName())+str(arg)+".ddr"
self.LoadData()
def OverInItem(self, slotNumber):
if self.tooltipItem:
self.tooltipItem.SetInventoryItem(int(self.tokens[slotNumber-1]))
def OnOverOutItem(self):
if self.tooltipItem:
self.tooltipItem.HideToolTip()
def SelectItemSlot(self, itemSlotIndex):
isAttached = mouseModule.mouseController.isAttached()
if isAttached:
attachedSlotType = mouseModule.mouseController.GetAttachedType()
attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
itemIndex = player.GetItemIndex(attachedSlotPos)
itemCount = player.GetItemCount(attachedSlotPos)
item.SelectItem(itemIndex)
itemType = item.GetItemType()
itemSubType = item.GetItemSubType()
if itemSlotIndex == 1 and item.IsWearableFlag(item.WEARABLE_BODY):
self.tokens[itemSlotIndex-1] = attachedSlotPos
elif itemSlotIndex == 2 and item.IsWearableFlag(item.WEARABLE_HEAD):
self.tokens[itemSlotIndex-1] = attachedSlotPos
elif itemSlotIndex == 3 and item.IsWearableFlag(item.WEARABLE_FOOTS):
self.tokens[itemSlotIndex-1] = attachedSlotPos
elif itemSlotIndex == 4 and item.IsWearableFlag(item.WEARABLE_WRIST):
self.tokens[itemSlotIndex-1] = attachedSlotPos
elif itemSlotIndex == 5 and item.IsWearableFlag(item.WEARABLE_WEAPON):
self.tokens[itemSlotIndex-1] = attachedSlotPos
elif itemSlotIndex == 6 and item.IsWearableFlag(item.WEARABLE_NECK):
self.tokens[itemSlotIndex-1] = attachedSlotPos
elif itemSlotIndex == 7 and item.IsWearableFlag(item.WEARABLE_EAR):
self.tokens[itemSlotIndex-1] = attachedSlotPos
elif itemSlotIndex == 8 and item.IsWearableFlag(item.WEARABLE_SHIELD):
self.tokens[itemSlotIndex-1] = attachedSlotPos
else:
return
open(self.saveName, "w").write("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % tuple(self.tokens))
mouseModule.mouseController.DeattachObject()
def OnUpdate(self):
tokens = open(self.saveName, "r").read().split()
self.tokens = tokens
for i in range(1,9):
if tokens[i-1] == "@":
self.wndEquip.SetItemSlot(i, 0, 0)
else:
itemIndex = player.GetItemIndex(int(tokens[i-1]))
if itemIndex != 0:
item.SelectItem(itemIndex)
if i == 1 and item.IsWearableFlag(item.WEARABLE_BODY):
self.wndEquip.SetItemSlot(i, itemIndex, 0)
elif i == 2 and item.IsWearableFlag(item.WEARABLE_HEAD):
self.wndEquip.SetItemSlot(i, itemIndex, 0)
elif i == 3 and item.IsWearableFlag(item.WEARABLE_FOOTS):
self.wndEquip.SetItemSlot(i, itemIndex, 0)
elif i == 4 and item.IsWearableFlag(item.WEARABLE_WRIST):
self.wndEquip.SetItemSlot(i, itemIndex, 0)
elif i == 5 and item.IsWearableFlag(item.WEARABLE_WEAPON):
self.wndEquip.SetItemSlot(i, itemIndex, 0)
elif i == 6 and item.IsWearableFlag(item.WEARABLE_NECK):
self.wndEquip.SetItemSlot(i, itemIndex, 0)
elif i == 7 and item.IsWearableFlag(item.WEARABLE_EAR):
self.wndEquip.SetItemSlot(i, itemIndex, 0)
elif i == 8 and item.IsWearableFlag(item.WEARABLE_SHIELD):
self.wndEquip.SetItemSlot(i, itemIndex, 0)
else:
self.wndEquip.SetItemSlot(i, 0, 0)
self.tokens[i-1] = "@"
open(self.saveName, "w").write("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % tuple(self.tokens))
continue
else:
self.wndEquip.SetItemSlot(i, 0, 0)
def OnPressEscapeKey(self):
self.Close()
return TRUE
Ai citit tot? înainte..să-mi arunci ceva în scârbă ?:).Pietonu' scrie:1.Game.py mergi in linia astasi schimbi cu asta:Cod: Selectaţi tot
def __BuildKeyDict(self): onPressKeyDict = {}Dupa jos de totCod: Selectaţi tot
onPressKeyDict[app.DIK_F6] = lambda : self.VegaS()intri in root si creezi un fisier cu numele system_vegas.pyCod: Selectaţi tot
def VegaS(self): import vegas self.system_vegas = vegas.dinasty() self.system_vegas.Show()Apoi tot in root creezi un fisier vegas.pyCod: Selectaţi tot
############################################################# #### Client by VegaS - Client DinastyWorld II - #### #### Skype: sacadatt.amazon / Contact: 0748576910 #### #### www.dinasty-world.ro #### ############################################################# import uiScriptLocale import item window = { "name" : "CostumeWindow", "x" : SCREEN_WIDTH - 340, "y" : 140, "style" : ("movable", "float",), "width" : 182, "height" : 530, "children" : ( { "name" : "board", "type" : "board", "style" : ("attach",), "x" : 0, "y" : 0, "width" : 182, "height" : 530, "children" : ( ## Titlu barei { "name" : "TitleBar", "type" : "titlebar", "style" : ("attach",), "x" : 6, "y" : 6, "width" : 170, "color" : "yellow", "children" : ( { "name":"TitleName", "type":"text", "x":80, "y":3, "text":"System Fast Equip", "text_horizontal_align":"center" }, ), }, ## Slot-urile ## VegaS - { "name" : "equip_Base", "type" : "image", "x" : 13, "y" : 38, "image" : "d:/ymir work/ui/game/windows/equipment_base.sub", }, { "name" : "dinastyworld", "type" : "slot", "x" : 16, "y" : 41, "width" : 130, "height" : 150, "slot" : ( {"index":1, "x":39, "y":37, "width":32, "height":64}, {"index":2, "x":39, "y":2, "width":32, "height":32}, {"index":3, "x":39, "y":145, "width":32, "height":32}, {"index":4, "x":75, "y":67, "width":32, "height":32}, {"index":5, "x":3, "y":3, "width":32, "height":96}, {"index":6, "x":116, "y":84, "width":32, "height":32}, {"index":7, "x":116, "y":52, "width":32, "height":32}, {"index":8, "x":75, "y":35, "width":32, "height":32}, {"index":9, "x":114, "y":2, "width":32, "height":32}, {"index":10, "x":75, "y":35, "width":32, "height":32}, ), }, #button inlocuire { "name" : "button_dinasty", "type" : "button", "x" : 45, "y" : 235, "text" : "Inlocuieste", "default_image" : "d:/ymir work/ui/public/Large_Button_01.sub", "over_image" : "d:/ymir work/ui/public/Large_Button_02.sub", "down_image" : "d:/ymir work/ui/public/Large_Button_03.sub", }, #button resetare { "name" : "button_vegas", "type" : "button", "x" : 45, "y" : 265, "text" : "Reseteaza", "default_image" : "d:/ymir work/ui/public/Large_Button_01.sub", "over_image" : "d:/ymir work/ui/public/Large_Button_02.sub", "down_image" : "d:/ymir work/ui/public/Large_Button_03.sub", }, #incepere sloturi I-VIII { "name" : "vegas0", "type" : "button", "x" : 47, "y" : 295, "text" : "Echipament I", "default_image" : "d:/ymir work/ui/game/windows/tab_button_large_01.sub", "over_image" : "d:/ymir work/ui/game/windows/tab_button_large_02.sub", "down_image" : "d:/ymir work/ui/game/windows/tab_button_large_03.sub", }, { "name" : "vegas1", "type" : "button", "x" : 47, "y" : 325, "all_align" : "center", "text" : "Echipament II", "default_image" : "d:/ymir work/ui/game/windows/tab_button_large_01.sub", "over_image" : "d:/ymir work/ui/game/windows/tab_button_large_02.sub", "down_image" : "d:/ymir work/ui/game/windows/tab_button_large_03.sub", }, { "name" : "vegas2", "type" : "button", "x" : 47, "y" : 355, "text" : "Echipament III", "default_image" : "d:/ymir work/ui/game/windows/tab_button_large_01.sub", "over_image" : "d:/ymir work/ui/game/windows/tab_button_large_02.sub", "down_image" : "d:/ymir work/ui/game/windows/tab_button_large_03.sub", }, { "name" : "vegas3", "type" : "button", "x" : 47, "y" : 385, "text" : "Echipament IV", "default_image" : "d:/ymir work/ui/game/windows/tab_button_large_01.sub", "over_image" : "d:/ymir work/ui/game/windows/tab_button_large_02.sub", "down_image" : "d:/ymir work/ui/game/windows/tab_button_large_03.sub", }, { "name" : "vegas4", "type" : "button", "x" : 47, "y" : 415, "text" : "Echipament V", "default_image" : "d:/ymir work/ui/game/windows/tab_button_large_01.sub", "over_image" : "d:/ymir work/ui/game/windows/tab_button_large_02.sub", "down_image" : "d:/ymir work/ui/game/windows/tab_button_large_03.sub", }, { "name" : "vegas5", "type" : "button", "x" : 47, "y" : 445, "text" : "Echipament VI", "default_image" : "d:/ymir work/ui/game/windows/tab_button_large_01.sub", "over_image" : "d:/ymir work/ui/game/windows/tab_button_large_02.sub", "down_image" : "d:/ymir work/ui/game/windows/tab_button_large_03.sub", }, { "name" : "vegas6", "type" : "button", "x" : 47, "y" : 475, "text" : "Echipament VII", "default_image" : "d:/ymir work/ui/game/windows/tab_button_large_01.sub", "over_image" : "d:/ymir work/ui/game/windows/tab_button_large_02.sub", "down_image" : "d:/ymir work/ui/game/windows/tab_button_large_03.sub", }, { "name" : "vegas7", "type" : "button", "x" : 47, "y" : 505, "text" : "Echipament VIII", "default_image" : "d:/ymir work/ui/game/windows/tab_button_large_01.sub", "over_image" : "d:/ymir work/ui/game/windows/tab_button_large_02.sub", "down_image" : "d:/ymir work/ui/game/windows/tab_button_large_03.sub", }, ), }, ), }Cod: Selectaţi tot
############################################################# #### Client by VegaS - Client DinastyWorld II - #### #### Skype: sacadatt.amazon / Contact: 0748576910 #### #### www.dinasty-world.ro #### ############################################################# import ui import player import mouseModule import net import app import chat import snd import item import grp import uiScriptLocale import locale import ime import grpText import uiToolTip import os class dinasty(ui.ScriptWindow): def __init__(self): import exception ui.ScriptWindow.__init__(self) self.wndEquip = None self.tokens = None self.activeslot = 1 self.tooltipItem = uiToolTip.ItemToolTip() self.tooltipItem.Hide() self.saveName = "lib/"+str(player.GetName())+"1.ddr" def __del__(self): ui.ScriptWindow.__del__(self) def Show(self): self.__LoadWindow() ui.ScriptWindow.Show(self) def Close(self): self.Hide() def __LoadWindow(self): try: pyScrLoader = ui.PythonScriptLoader() pyScrLoader.LoadScriptFile(self, "system_vegas.py") except: import exception exception.Abort("CostumeWindow.LoadWindow.LoadObject") self.wndEquip = self.GetChild("dinastyworld") self.bottone_change = self.GetChild("button_dinasty") self.TitleBar = self.GetChild("TitleBar") self.TitleBar.SetCloseEvent(ui.__mem_func__(self.Close)) self.wndEquip.SetSelectEmptySlotEvent(ui.__mem_func__(self.SelectItemSlot)) self.wndEquip.SetSelectItemSlotEvent(ui.__mem_func__(self.SelectItemSlot)) self.wndEquip.SetOverInItemEvent(ui.__mem_func__(self.OverInItem)) self.wndEquip.SetOverOutItemEvent(ui.__mem_func__(self.OnOverOutItem)) self.bottone_change.SetEvent(ui.__mem_func__(self.__button_dinasty)) self.button_vegas = self.GetChild("button_vegas") self.button_vegas.SetEvent(ui.__mem_func__(self.__button_vegas)) self.vegas0 = self.GetChild("vegas0") self.vegas1 = self.GetChild("vegas1") self.vegas2 = self.GetChild("vegas2") self.vegas3 = self.GetChild("vegas3") self.vegas4 = self.GetChild("vegas4") self.vegas5 = self.GetChild("vegas5") self.vegas6 = self.GetChild("vegas6") self.vegas7 = self.GetChild("vegas7") self.vegas0.SetEvent(ui.__mem_func__(self.__SetSlot), 1) self.vegas1.SetEvent(ui.__mem_func__(self.__SetSlot), 2) self.vegas2.SetEvent(ui.__mem_func__(self.__SetSlot), 3) self.vegas3.SetEvent(ui.__mem_func__(self.__SetSlot), 4) self.vegas4.SetEvent(ui.__mem_func__(self.__SetSlot), 5) self.vegas4.SetEvent(ui.__mem_func__(self.__SetSlot), 6) self.vegas4.SetEvent(ui.__mem_func__(self.__SetSlot), 7) self.vegas4.SetEvent(ui.__mem_func__(self.__SetSlot), 8) self.LoadData() def __button_dinasty(self): for i in range(1,9): if self.tokens[i-1] != "@": net.SendItemUsePacket(int(self.tokens[i-1])) def __button_vegas(self): open(self.saveName, "w").write("@\t@\t@\t@\t@\t@\t@\t@") def LoadData(self): if os.path.exists(self.saveName): self.tokens = open(self.saveName, "r").read().split() else: open(self.saveName, "w").write("@\t@\t@\t@\t@\t@\t@\t@") def __SetSlot(self, arg): self.saveName = "lib/"+str(player.GetName())+str(arg)+".ddr" self.LoadData() def OverInItem(self, slotNumber): if self.tooltipItem: self.tooltipItem.SetInventoryItem(int(self.tokens[slotNumber-1])) def OnOverOutItem(self): if self.tooltipItem: self.tooltipItem.HideToolTip() def SelectItemSlot(self, itemSlotIndex): isAttached = mouseModule.mouseController.isAttached() if isAttached: attachedSlotType = mouseModule.mouseController.GetAttachedType() attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber() itemIndex = player.GetItemIndex(attachedSlotPos) itemCount = player.GetItemCount(attachedSlotPos) item.SelectItem(itemIndex) itemType = item.GetItemType() itemSubType = item.GetItemSubType() if itemSlotIndex == 1 and item.IsWearableFlag(item.WEARABLE_BODY): self.tokens[itemSlotIndex-1] = attachedSlotPos elif itemSlotIndex == 2 and item.IsWearableFlag(item.WEARABLE_HEAD): self.tokens[itemSlotIndex-1] = attachedSlotPos elif itemSlotIndex == 3 and item.IsWearableFlag(item.WEARABLE_FOOTS): self.tokens[itemSlotIndex-1] = attachedSlotPos elif itemSlotIndex == 4 and item.IsWearableFlag(item.WEARABLE_WRIST): self.tokens[itemSlotIndex-1] = attachedSlotPos elif itemSlotIndex == 5 and item.IsWearableFlag(item.WEARABLE_WEAPON): self.tokens[itemSlotIndex-1] = attachedSlotPos elif itemSlotIndex == 6 and item.IsWearableFlag(item.WEARABLE_NECK): self.tokens[itemSlotIndex-1] = attachedSlotPos elif itemSlotIndex == 7 and item.IsWearableFlag(item.WEARABLE_EAR): self.tokens[itemSlotIndex-1] = attachedSlotPos elif itemSlotIndex == 8 and item.IsWearableFlag(item.WEARABLE_SHIELD): self.tokens[itemSlotIndex-1] = attachedSlotPos else: return open(self.saveName, "w").write("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % tuple(self.tokens)) mouseModule.mouseController.DeattachObject() def OnUpdate(self): tokens = open(self.saveName, "r").read().split() self.tokens = tokens for i in range(1,9): if tokens[i-1] == "@": self.wndEquip.SetItemSlot(i, 0, 0) else: itemIndex = player.GetItemIndex(int(tokens[i-1])) if itemIndex != 0: item.SelectItem(itemIndex) if i == 1 and item.IsWearableFlag(item.WEARABLE_BODY): self.wndEquip.SetItemSlot(i, itemIndex, 0) elif i == 2 and item.IsWearableFlag(item.WEARABLE_HEAD): self.wndEquip.SetItemSlot(i, itemIndex, 0) elif i == 3 and item.IsWearableFlag(item.WEARABLE_FOOTS): self.wndEquip.SetItemSlot(i, itemIndex, 0) elif i == 4 and item.IsWearableFlag(item.WEARABLE_WRIST): self.wndEquip.SetItemSlot(i, itemIndex, 0) elif i == 5 and item.IsWearableFlag(item.WEARABLE_WEAPON): self.wndEquip.SetItemSlot(i, itemIndex, 0) elif i == 6 and item.IsWearableFlag(item.WEARABLE_NECK): self.wndEquip.SetItemSlot(i, itemIndex, 0) elif i == 7 and item.IsWearableFlag(item.WEARABLE_EAR): self.wndEquip.SetItemSlot(i, itemIndex, 0) elif i == 8 and item.IsWearableFlag(item.WEARABLE_SHIELD): self.wndEquip.SetItemSlot(i, itemIndex, 0) else: self.wndEquip.SetItemSlot(i, 0, 0) self.tokens[i-1] = "@" open(self.saveName, "w").write("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % tuple(self.tokens)) continue else: self.wndEquip.SetItemSlot(i, 0, 0) def OnPressEscapeKey(self): self.Close() return TRUE
-
- Informaţie
-
Cine este conectat
Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 78 vizitatori



