Diferite probleme/întrebări legate de sisteme.

Totalitatea subiectelor care nu respectă regulamentul impus in sectiunea "Probleme şi Întrebări" vor fi stocate aici.
Închis
Avatar utilizator
[#Chriss]
Utilizator interzis !

Utilizator interzis !
Mesaje: 621
Membru din: 09 Aug 2015, 15:46
Server: Metin2TheHurtLocker
Regat: Jinno
Aprecieri: 5  
Mulţumiri: 25  
 Contact:
Medalii

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 ?:)) .
Ai nevoie de suport gratuit metin2?
Skype: monster_cristi
Proiecte Realizate:
AgeOfKhaos, Cardinali, Expansive, Funny, DevDas, Tutankamon
Afișează semnătura
Avatar utilizator
[#Chriss]
Utilizator interzis !

Utilizator interzis !
Mesaje: 621
Membru din: 09 Aug 2015, 15:46
Server: Metin2TheHurtLocker
Regat: Jinno
Aprecieri: 5  
Mulţumiri: 25  
 Contact:
Medalii

up. (curele rezolvat )
Ai nevoie de suport gratuit metin2?
Skype: monster_cristi
Proiecte Realizate:
AgeOfKhaos, Cardinali, Expansive, Funny, DevDas, Tutankamon
Afișează semnătura
Avatar utilizator
Pietonu'
Nivel 7

Nivel 7
Mesaje: 1351
Membru din: 18 Mar 2015, 13:47
Regat: Chunjo
Aprecieri: 3  
Mulţumiri: 52  
Medalii

1.Game.py mergi in linia asta

Cod: Selectaţi tot

def __BuildKeyDict(self):
onPressKeyDict = {}
si schimbi cu asta:

Cod: Selectaţi tot

            onPressKeyDict[app.DIK_F6]    = lambda : self.VegaS()
Dupa jos de tot

Cod: Selectaţi tot

    def VegaS(self):
        import vegas
        self.system_vegas = vegas.dinasty()
        self.system_vegas.Show()
intri in root si creezi un fisier cu numele system_vegas.py

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",
                },
            ),
        },
    ),
}
Apoi tot in root creezi un fisier vegas.py

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




       
Imagine
Afișează semnătura
Avatar utilizator
[#Chriss]
Utilizator interzis !

Utilizator interzis !
Mesaje: 621
Membru din: 09 Aug 2015, 15:46
Server: Metin2TheHurtLocker
Regat: Jinno
Aprecieri: 5  
Mulţumiri: 25  
 Contact:
Medalii

Pietonu' scrie:1.Game.py mergi in linia asta

Cod: Selectaţi tot

def __BuildKeyDict(self):
onPressKeyDict = {}
si schimbi cu asta:

Cod: Selectaţi tot

            onPressKeyDict[app.DIK_F6]    = lambda : self.VegaS()
Dupa jos de tot

Cod: Selectaţi tot

    def VegaS(self):
        import vegas
        self.system_vegas = vegas.dinasty()
        self.system_vegas.Show()
intri in root si creezi un fisier cu numele system_vegas.py

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",
                },
            ),
        },
    ),
}
Apoi tot in root creezi un fisier vegas.py

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ă ?:). :-q
Ai nevoie de suport gratuit metin2?
Skype: monster_cristi
Proiecte Realizate:
AgeOfKhaos, Cardinali, Expansive, Funny, DevDas, Tutankamon
Afișează semnătura
Avatar utilizator
[#Chriss]
Utilizator interzis !

Utilizator interzis !
Mesaje: 621
Membru din: 09 Aug 2015, 15:46
Server: Metin2TheHurtLocker
Regat: Jinno
Aprecieri: 5  
Mulţumiri: 25  
 Contact:
Medalii

up .
Ai nevoie de suport gratuit metin2?
Skype: monster_cristi
Proiecte Realizate:
AgeOfKhaos, Cardinali, Expansive, Funny, DevDas, Tutankamon
Afișează semnătura
Avatar utilizator
[#Chriss]
Utilizator interzis !

Utilizator interzis !
Mesaje: 621
Membru din: 09 Aug 2015, 15:46
Server: Metin2TheHurtLocker
Regat: Jinno
Aprecieri: 5  
Mulţumiri: 25  
 Contact:
Medalii

up
Ai nevoie de suport gratuit metin2?
Skype: monster_cristi
Proiecte Realizate:
AgeOfKhaos, Cardinali, Expansive, Funny, DevDas, Tutankamon
Afișează semnătura
Avatar utilizator
C.Mihai
Nivel 9

Nivel 9
Mesaje: 1875
Membru din: 26 Mai 2014, 13:57
Server: xGamer
Regat: Chunjo
Aprecieri: 24  
Mulţumiri: 7  
 Contact:
Medalii

Subiect INACTIV !
Arhivat :-h !
Nu iti poti trai viata pentru altii. Trebuie sa faci ceea ce e bine pentru tine, chiar daca astfel ii ranesti pe cei pe care ii iubesti. – Nicholas Sparks
Imagine
Cea mai bună firmă de HOSTING !
Afișează semnătura
Închis
Răspunsuri
4
Vizualizări
601
Răspunsuri
2
Vizualizări
157
Răspunsuri
4
Vizualizări
209

Înapoi la “Arhivă Probleme şi Întrebări”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Google [Bot] și 90 vizitatori