Register for your free account! | Forgot your password?

You last visited: Today at 01:28

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[RELEASE]Official Crafting System

Discussion on [RELEASE]Official Crafting System within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old 06/19/2013, 18:41   #16
 
elite*gold: 40
Join Date: Dec 2007
Posts: 651
Received Thanks: 1,737
Quote:
Originally Posted by s3da71v View Post
Eroor : )
0719 19:30:23329 :: File "
0719 19:30:23329 :: <string>
0719 19:30:23329 :: ", line
0719 19:30:23329 :: 1541
0719 19:30:23329 ::

0719 19:30:23329 ::
0719 19:30:23329 :: def BINARY_Cube_Open(self, npcVNUM):
Thats what we said.
The binary don't give the npcVNUM to the PythonScript, so it wont work.

It would be possible to give the npcVNUM to the script by using cmdchat in the cubeopen quests.. but even then, the server don't know the "/cube r_info" command.. so there would be still nothing to display..
Ap0kalyps3 is offline  
Thanks
1 User
Old 06/19/2013, 18:50   #17
 
s3da71v's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 92
Received Thanks: 58
True Ap0kalyps3 will never work like this from my opinion the only solution it's a library
s3da71v is offline  
Old 06/19/2013, 19:05   #18
 
georedzor's Avatar
 
elite*gold: 0
Join Date: Apr 2010
Posts: 78
Received Thanks: 10
this system dosen't need a quest or something?
georedzor is offline  
Old 06/19/2013, 19:21   #19
 
Fever.'s Avatar
 
elite*gold: 182
Join Date: May 2010
Posts: 1,367
Received Thanks: 244
Ich versteh das Ganze irgendwie nicht. Was bewirkt dieses System?
Fever. is offline  
Old 06/19/2013, 19:36   #20
 
teh_yoshi's Avatar
 
elite*gold: 0
Join Date: Jun 2013
Posts: 37
Received Thanks: 2
Quote:
Originally Posted by DerUnbekannte7 View Post
Ich versteh das Ganze irgendwie nicht. Was bewirkt dieses System?
blöde frage sieht man doch aufn Screenshot

Crafting System sagt doch schon alles

1 Waffe die man erstellen kann +6 - +9 oder jenahcdem .. und brauchst dem entsprechend die Uppitems dafür ^^
teh_yoshi is offline  
Old 06/19/2013, 21:28   #21
 
crusa2's Avatar
 
elite*gold: 0
Join Date: Dec 2011
Posts: 55
Received Thanks: 53
You have to load a new library, without it won't work.
crusa2 is offline  
Old 06/19/2013, 22:55   #22
 
elite*gold: 0
Join Date: Dec 2011
Posts: 24
Received Thanks: 1
It's not full system
Hardkorrek is offline  
Old 06/19/2013, 23:53   #23
 
elite*gold: 0
Join Date: Dec 2011
Posts: 14
Received Thanks: 5
could pass please uidragonsoul.py dragonsoulwindow.py dragonsoulrefinewindow.py dragon_soul_refine_settings.py plis tanks
sekirei666 is offline  
Old 06/20/2013, 12:20   #24
 
elite*gold: 309
Join Date: Dec 2010
Posts: 33
Received Thanks: 2
Has anyone tried them go?
AsAsYn07 is offline  
Old 06/20/2013, 13:14   #25
 
elite*gold: 0
Join Date: Oct 2009
Posts: 51
Received Thanks: 4
Quote:
Originally Posted by .Minton™ View Post
Hello Epvp

Official Crafting System to share today

Screen:



Add game.py

PHP Code:
# CUBE
    
def BINARY_Cube_Open(selfnpcVNUM):
        
self.currentCubeNPC npcVNUM
        
        self
.interface.OpenCubeWindow()

        
        if 
npcVNUM not in self.cubeInformation:
            
net.SendChatPacket("/cube r_info")
        else:
            
cubeInfoList self.cubeInformation[npcVNUM]
            
            
0
            
for cubeInfo in cubeInfoList:                                
                
self.interface.wndCube.AddCubeResultItem(cubeInfo["vnum"], cubeInfo["count"])
                
                
0                
                
for materialList in cubeInfo["materialList"]:
                    for 
materialInfo in materialList:
                        
itemVnumitemCount materialInfo
                        self
.interface.wndCube.AddMaterialInfo(ijitemVnumitemCount)
                    
1                        
                        
                i 
1
                
            self
.interface.wndCube.Refresh()

    
def BINARY_Cube_Close(self):
        
self.interface.CloseCubeWindow()

    
# Á¦ÀÛ¿¡ ÇÊ¿äÇÑ °ñµå, ¿¹»óµÇ´Â ¿Ï¼ºÇ°ÀÇ VNUM°ú °³¼ö Á¤º¸ update
    
def BINARY_Cube_UpdateInfo(selfgolditemVnumcount):
        
self.interface.UpdateCubeInfo(golditemVnumcount)
        
    
def BINARY_Cube_Succeed(selfitemVnumcount):
        print 
"Å¥ºê Á¦ÀÛ ¼º°ø"
        
self.interface.SucceedCubeWork(itemVnumcount)
        
pass

    def BINARY_Cube_Failed
(self):
        print 
"Å¥ºê Á¦ÀÛ ½ÇÆĞ"
        
self.interface.FailedCubeWork()
        
pass

    def BINARY_Cube_ResultList
(selfnpcVNUMlistText):
        
# ResultList Text Format : 72723,1/72725,1/72730.1/50001,5  ÀÌ·±½ÄÀ¸·Î "/" ¹®ÀڷΠ±¸ºĞµÈ ¸®½ºÆ®¸¦ ÁÜ
        #print listText
        
        
if npcVNUM == 0:
            
npcVNUM self.currentCubeNPC
        
        self
.cubeInformation[npcVNUM] = []
        
        try:
            for 
eachInfoText in listText.split("/"):
                
eachInfo eachInfoText.split(",")
                
itemVnum    int(eachInfo[0])
                
itemCount    int(eachInfo[1])

                
self.cubeInformation[npcVNUM].append({"vnum"itemVnum"count"itemCount})
                
self.interface.wndCube.AddCubeResultItem(itemVnumitemCount)
            
            
resultCount len(self.cubeInformation[npcVNUM])
            
requestCount 7
            modCount 
resultCount requestCount
            splitCount 
resultCount requestCount
            
for i in xrange(splitCount):
                
#print("/cube r_info %d %d" % (i * requestCount, requestCount))
                
net.SendChatPacket("/cube r_info %d %d" % (requestCountrequestCount))
                
            if 
modCount:
                
#print("/cube r_info %d %d" % (splitCount * requestCount, modCount))                
                
net.SendChatPacket("/cube r_info %d %d" % (splitCount requestCountmodCount))

        
except RuntimeErrormsg:
            
dbg.TraceError(msg)
            return 
0
            
        pass
        
    def BINARY_Cube_MaterialInfo
(selfstartIndexlistCountlistText):
        
# Material Text Format : 125,1|126,2|127,2|123,5&555,5&555,4/120000
        
try:
            
#print listText
            
            
if len(listText):
                
dbg.TraceError("Wrong Cube Material Infomation")
                return 
0

            
            
            eachResultList 
listText.split("@")

            
cubeInfo self.cubeInformation[self.currentCubeNPC]            
            
            
itemIndex 0
            
for eachResultText in eachResultList:
                
cubeInfo[startIndex itemIndex]["materialList"] = [[], [], [], [], []]
                
materialList cubeInfo[startIndex itemIndex]["materialList"]
                
                
gold 0
                splitResult 
eachResultText.split("/")
                if 
len(splitResult):
                    
gold int(splitResult[1])
                    
                
#print "splitResult : ", splitResult
                
eachMaterialList splitResult[0].split("&")
                
                
0
                
for eachMaterialText in eachMaterialList:
                    
complicatedList eachMaterialText.split("|")
                    
                    if 
len(complicatedList):
                        for 
complicatedText in complicatedList:
                            (
itemVnumitemCount) = complicatedText.split(",")
                            
itemVnum int(itemVnum)
                            
itemCount int(itemCount)
                            
self.interface.wndCube.AddMaterialInfo(itemIndex startIndexiitemVnumitemCount)
                            
                            
materialList[i].append((itemVnumitemCount))
                            
                    else:
                        
itemVnumitemCount eachMaterialText.split(",")
                        
itemVnum int(itemVnum)
                        
itemCount int(itemCount)
                        
self.interface.wndCube.AddMaterialInfo(itemIndex startIndexiitemVnumitemCount)
                        
                        
materialList[i].append((itemVnumitemCount))
                        
                    
1
                    
                    
                    
                itemIndex 
itemIndex 1
                
            self
.interface.wndCube.Refresh()
            
                
        
except RuntimeErrormsg:
            
dbg.TraceError(msg)
            return 
0
            
        pass
    
    
# END_OF_CUBE
    
    # ¿ëÈ¥¼®    
    
def BINARY_Highlight_Item(selfinven_typeinven_pos):
        
self.interface.Highligt_Item(inven_typeinven_pos)
    
    
def BINARY_DragonSoulGiveQuilification(self):
        
self.interface.DragonSoulGiveQuilification()
        
    
def BINARY_DragonSoulRefineWindow_Open(self):
        
self.interface.OpenDragonSoulRefineWindow()

    
def BINARY_DragonSoulRefineWindow_RefineFail(selfreasoninven_typeinven_pos):
        
self.interface.FailDragonSoulRefine(reasoninven_typeinven_pos)

    
def BINARY_DragonSoulRefineWindow_RefineSucceed(selfinven_typeinven_pos):
        
self.interface.SucceedDragonSoulRefine(inven_typeinven_pos)
    
    
# END of DRAGON SOUL REFINE WINDOW 
dragon_soul_refine_settings.py

PHP Code:
import item

default_grade_need_count 
= [151053]
default_grade_fee = [300005000070000100000]
default_step_need_count = [4321]
default_step_fee = [20000300004000050000]

strength_fee = {
    
item.MATERIAL_DS_REFINE_NORMAL 10000,
    
item.MATERIAL_DS_REFINE_BLESSED 20000,
    
item.MATERIAL_DS_REFINE_HOLLY 30000,
}

# °*È*°¡ ¾î´À ´Ü°è ±îÁö °¡´É ÇÑÁö
# table(GRADE, STEP) = max strength.
default_strength_max_table = [
    [
22334],
    [
33344],
    [
44444],
    [
44445],
    [
44456],
]

# ÀÏ´Ü ±âȹÀûÀ¸·Î´Â strength °*È*ÀÇ °æ¿ì, °*È*¼®¿¡ ÀÇÇØ fee°¡ ¼ÂÆÃµÇ±â ¶§¹®¿¡,
# dragon_soul_refine_info¿¡ ³ÖÁö ¾Ê¾Ò´Ù.
# (°*È*¼®¸¸ ³Ö¾îµµ ¾ó¸¶ ÇÊ¿äÇÑÁö º¸ÀÏ ¼ö ÀÖµµ·Ï Çϱâ À§ÇØ)
# ´Ù¸¸ ¼*¹ö¿¡¼*´Â ¿ëÈ¥¼® Å¸ÀÔ º°·Î °*È*¼® fee¸¦ ¼ÂÆÃÇÒ ¼ö ÀÖµµ·Ï Çسù±â ¶§¹®¿¡,
# ¸¸ÀÏ ¿ëÈ¥¼® º°·Î °*È*¼® fee¸¦ ´Ù¸£°Ô ÇÏ°í ½Í´Ù¸é,
# Å¬¶ó Äڵ带 ¼öÁ¤ÇؾßÇÒ °ÍÀÌ´Ù.
default_refine_info = {
    
"grade_need_count" default_grade_need_count,
    
"grade_fee" default_grade_fee,
    
"step_need_count" default_step_need_count,
    
"step_fee" default_step_fee,
    
"strength_max_table" default_strength_max_table,
}

dragon_soul_refine_info = {
    
11 default_refine_info,
    
12 default_refine_info,
    
13 default_refine_info,
    
14 default_refine_info,
    
15 default_refine_info,
    
16 default_refine_info,

locale/de/ui

dragonsoulrefinewindow.py

PHP Code:
import locale
import uiScriptLocale

window 
= {
    
"name" "DragonSoulRefineWindow",

    
## ¿ëÈ¥¼® Ã¢ ¹Ù·Î ¿ŞÂÊ
    
"x" SCREEN_WIDTH 176 287 10 287,
    
"y" SCREEN_HEIGHT 37 505,

    
"style" : ("movable""float",),

    
"width" 287,
    
"height" 232,

    
"children" :
    (
        {
            
"name" "board",
            
"type" "board",
            
"style" : ("attach",),

            
"x" 0,
            
"y" 0,

            
"width" 287,
            
"height" 232,

            
"children" :
            (
                
## Base BackGroud Image
                
{
                    
"name" "DragonSoulRefineWindowBaseImage",
                    
"type" "expanded_image",
                    
"x" 0,
                    
"y" 0,

                    
"image" "d:/ymir work/ui/dragonsoul/dragon_soul_refine_bg.tga",
                },

                
## Title
                
{
                    
"name" "TitleBar",
                    
"type" "titlebar",
                    
"style" : ("attach",),

                    
"x" 5,
                    
"y" 7,

                    
"width" 275,
                    
"color" "yellow",

                    
"children" :
                    (
                        { 
                            
"name":"TitleName"
                            
"type":"text"
                            
"x":140
                            
"y":5
                            
"text":uiScriptLocale.DRAGONSOUL_REFINE_WINDOW_TITLE
                            
"text_horizontal_align":"center" 
                        
},
                    ),
                },
                
                
## Refine Slot
                
{
                    
"name" "RefineSlot",
                    
"type" "grid_table",

                    
"image" "d:/ymir work/ui/dragonsoul/cap.tga"

                    
"x" 15,
                    
"y" 39,

                    
"start_index" 0,
                    
"x_count" 5,
                    
"y_count" 3,
                    
"x_step" 32,
                    
"y_step" 32,
                },

                
## Result Slot
                
{
                    
"name" "ResultSlot",
                    
"type" "grid_table",

                    
"x" 207,
                    
"y" 39,

                    
"start_index" 0,
                    
"x_count" 2,
                    
"y_count" 3,
                    
"x_step" 32,
                    
"y_step" 32,
                },
                
                
## Grade Button
                
{
                    
"name" "GradeButton",
                    
"type" "toggle_button",

                    
"x" 36,
                    
"y" 148,

                    
"default_image" "d:/ymir work/ui/dragonsoul/button_01.tga",
                    
"over_image" "d:/ymir work/ui/dragonsoul/button_02.tga",
                    
"down_image" "d:/ymir work/ui/dragonsoul/button_03.tga",

                    
"children" :
                    (
                        {
                            
"name" "GradeSlotTitle",
                            
"type" "text",
                            
"x" 0,
                            
"y" 0,
                            
"all_align" "center",
                            
"text" uiScriptLocale.GRADE_SELECT,
                            
"color" 0xFFF1E6C0,
                        },
                    ),
                },

                
## Step Button
                
{
                    
"name" "StepButton",
                    
"type" "toggle_button",

                    
"x" 118,
                    
"y" 148,

                    
"default_image" "d:/ymir work/ui/dragonsoul/button_01.tga",
                    
"over_image" "d:/ymir work/ui/dragonsoul/button_02.tga",
                    
"down_image" "d:/ymir work/ui/dragonsoul/button_03.tga",

                    
"children" :
                    (
                        {
                            
"name" "StepSlotTitle",
                            
"type" "text",
                            
"x" 0,
                            
"y" 0,
                            
"all_align" "center",
                            
"text" uiScriptLocale.STEP_SELECT,
                            
"color" 0xFFF1E6C0,
                        },
                    ),
                },

                
## Refine Button
                
{
                    
"name" "StrengthButton",
                    
"type" "toggle_button",

                    
"x" 198,
                    
"y" 148,

                    
"default_image" "d:/ymir work/ui/dragonsoul/button_01.tga",
                    
"over_image" "d:/ymir work/ui/dragonsoul/button_02.tga",
                    
"down_image" "d:/ymir work/ui/dragonsoul/button_03.tga",

                    
"children" :
                    (
                        {
                            
"name" "RefineSlotTitle",
                            
"type" "text",
                            
"x" 0,
                            
"y" 0,
                            
"all_align" "center",
                            
"text" uiScriptLocale.STRENGTH_SELECT,
                            
"color" 0xFFF1E6C0,
                        },
                    ),
                },

                
## Money Print
                
{
                    
"name":"Money_Slot",
                    
"type" "text",

                    
"x":35,
                    
"y":180,

                    
"horizontal_align" "right",
                    
"text_horizontal_align" "right",

                    
"text" "123456789",
                },

                
## Do Refine Button
                
{
                    
"name" "DoRefineButton",
                    
"type" "button",

                    
"x" 188,
                    
"y" 200,

                    
"default_image" "d:/ymir work/ui/dragonsoul/l_button01.tga",
                    
"over_image" "d:/ymir work/ui/dragonsoul/l_button02.tga",
                    
"down_image" "d:/ymir work/ui/dragonsoul/l_button03.tga",

                    
"children" :
                    (
                        { 
                            
"name" "DoRefineButtonTitle"
                            
"type" "text"
                            
"x" 0
                            
"y" 0
                            
"text" uiScriptLocale.DO_REFINE
                            
"all_align" "center",
                        },
                    ),
                },
            ),
        },
    ),

locale/de/ui

dragonsoulwindow.py

PHP Code:
import uiScriptLocale
import player

window 
= {
    
"name" "InventoryWindow",

    
## 600 - (width + ¿À¸¥ÂÊÀ¸·Î ºÎÅÍ ¶ç¿ì±â 24 px)
    
"x" SCREEN_WIDTH 176 287 10,
    
"y" SCREEN_HEIGHT 37 505,

    
"style" : ("movable""float",),

    
"width" 287,
    
"height" 505,

    
"children" :
    (
        {
            
"name" "board",
            
"type" "board",
            
"style" : ("attach",),

            
"x" 0,
            
"y" 0,

            
"width" 287,
            
"height" 505,

            
"children" :
            (
                
## Equipment Slot
                
{
                    
"name" "Equipment_Base",
                    
"type" "expanded_image",

                    
"x" 0,
                    
"y" 0,

                    
"image" "d:/ymir work/ui/dragonsoul/dragon_soul_bg.tga",

                },
                {
                    
"name" "Inventory_Tab_01",
                    
"type" "radio_button",

                    
"x" 16,
                    
"y" 332,

                    
"default_image" "d:/ymir work/ui/dragonsoul/s_button01.tga",
                    
"over_image" "d:/ymir work/ui/dragonsoul/s_button02.tga",
                    
"down_image" "d:/ymir work/ui/dragonsoul/s_button03.tga",

                    
"children" :
                    (
                        {
                            
"name" "Inventory_Tab_01_Print",
                            
"type" "text",

                            
"x" 0,
                            
"y" 0,

                            
"all_align" "center",

                            
"text" uiScriptLocale.DRAGONSOUL_PAGE_BUTTON_1,
                            
"color" 0xFFF1E6C0,
                        },
                    ),
                },
                {
                    
"name" "Inventory_Tab_02",
                    
"type" "radio_button",

                    
"x" 67,
                    
"y" 332,

                    
"default_image" "d:/ymir work/ui/dragonsoul/s_button01.tga",
                    
"over_image" "d:/ymir work/ui/dragonsoul/s_button02.tga",
                    
"down_image" "d:/ymir work/ui/dragonsoul/s_button03.tga",

                    
"children" :
                    (
                        {
                            
"name" "Inventory_Tab_02_Print",
                            
"type" "text",

                            
"x" 0,
                            
"y" 0,

                            
"all_align" "center",

                            
"text" uiScriptLocale.DRAGONSOUL_PAGE_BUTTON_2,
                            
"color" 0xFFF1E6C0,
                        },
                    ),
                },
                {
                    
"name" "Inventory_Tab_03",
                    
"type" "radio_button",

                    
"x" 118,
                    
"y" 332,

                    
"default_image" "d:/ymir work/ui/dragonsoul/s_button01.tga",
                    
"over_image" "d:/ymir work/ui/dragonsoul/s_button02.tga",
                    
"down_image" "d:/ymir work/ui/dragonsoul/s_button03.tga",

                    
"children" :
                    (
                        {
                            
"name" "Inventory_Tab_03_Print",
                            
"type" "text",

                            
"x" 0,
                            
"y" 0,

                            
"all_align" "center",

                            
"text" uiScriptLocale.DRAGONSOUL_PAGE_BUTTON_3,
                            
"color" 0xFFF1E6C0,
                        },
                    ),
                },
                {
                    
"name" "Inventory_Tab_04",
                    
"type" "radio_button",

                    
"x" 169,
                    
"y" 332,

                    
"default_image" "d:/ymir work/ui/dragonsoul/s_button01.tga",
                    
"over_image" "d:/ymir work/ui/dragonsoul/s_button02.tga",
                    
"down_image" "d:/ymir work/ui/dragonsoul/s_button03.tga",

                    
"children" :
                    (
                        {
                            
"name" "Inventory_Tab_04_Print",
                            
"type" "text",

                            
"x" 0,
                            
"y" 0,

                            
"all_align" "center",

                            
"text" uiScriptLocale.DRAGONSOUL_PAGE_BUTTON_4,
                            
"color" 0xFFF1E6C0,
                        },
                    ),
                },
                {
                    
"name" "Inventory_Tab_05",
                    
"type" "radio_button",

                    
"x" 220,
                    
"y" 332,

                    
"default_image" "d:/ymir work/ui/dragonsoul/s_button01.tga",
                    
"over_image" "d:/ymir work/ui/dragonsoul/s_button02.tga",
                    
"down_image" "d:/ymir work/ui/dragonsoul/s_button03.tga",

                    
"children" :
                    (
                        {
                            
"name" "Inventory_Tab_05_Print",
                            
"type" "text",

                            
"x" 0,
                            
"y" 0,

                            
"all_align" "center",

                            
"text" uiScriptLocale.DRAGONSOUL_PAGE_BUTTON_5,
                            
"color" 0xFFF1E6C0,
                        },
                    ),
                },
                
                
## Item Slot
                
{
                    
"name" "ItemSlot",
                    
"type" "grid_table",

                    
"x" 15,
                    
"y" 355,

                    
"start_index" 0,
                    
"x_count" 8,
                    
"y_count" 4,
                    
"x_step" 32,
                    
"y_step" 32,

                    
#"image" : "d:/ymir work/ui/public/Slot_Base.sub"
                
},
                {
                    
"name" "EquipmentSlot",
                    
"type" "slot",

                    
"x" 0,
                    
"y" 0,

                    
"width" 287,
                    
"height" 280,

                    
"slot" : (
                                {
"index":player.DRAGON_SOUL_EQUIPMENT_SLOT_START+0"x":128"y":53"width":32"height":32},
                                {
"index":player.DRAGON_SOUL_EQUIPMENT_SLOT_START+1"x":59"y":93"width":32"height":32},
                                {
"index":player.DRAGON_SOUL_EQUIPMENT_SLOT_START+2"x":59"y":179"width":32"height":32},
                                {
"index":player.DRAGON_SOUL_EQUIPMENT_SLOT_START+3"x":128"y":219"width":32"height":32},
                                {
"index":player.DRAGON_SOUL_EQUIPMENT_SLOT_START+4"x":194"y":179"width":32"height":32},
                                {
"index":player.DRAGON_SOUL_EQUIPMENT_SLOT_START+5"x":194"y":93"width":32"height":32},
                            ),
                },
                {
                    
"name" "deck1",
                    
"type" "toggle_button",

                    
"x" 21,
                    
"y" 230,

                    
"default_image" "d:/ymir work/ui/dragonsoul/deck1_1.tga",
                    
"over_image" "d:/ymir work/ui/dragonsoul/deck1_2.tga",
                    
"down_image" "d:/ymir work/ui/dragonsoul/deck1_3.tga",
                },
                {
                    
"name" "deck2",
                    
"type" "toggle_button",

                    
"x" 234,
                    
"y" 230,

                    
"default_image" "d:/ymir work/ui/dragonsoul/deck2_1.tga",
                    
"over_image" "d:/ymir work/ui/dragonsoul/deck2_2.tga",
                    
"down_image" "d:/ymir work/ui/dragonsoul/deck2_3.tga",
                },
                
## Title
                
{
                    
"name" "TitleBar",
                    
"type" "titlebar",
                    
"style" : ("attach",),

                    
"x" 8,
                    
"y" 7,

                    
"width" 271,
                    
"color" "yellow",

                    
"children" :
                    (
                        { 
"name":"TitleName""type":"text""x":130"y":3"text":uiScriptLocale.DRAGONSOUL_TITLE"text_horizontal_align":"center" },
                    ),
                },
                
## Tab Area
                
{
                    
"name" "TabControl",
                    
"type" "window",

                    
"x" 10,
                    
"y" 279,

                    
"width" 267,
                    
"height" 30,

                    
"children" :
                    (
                        
## Tab
                        
{
                            
"name" "Tab_01",
                            
"type" "expanded_image",

                            
"x" 0,
                            
"y" 0,

                            
"width" 267,
                            
"height" 30,

                            
"image" "d:/ymir work/ui/dragonsoul/tap01.tga",
                        },
                        {
                            
"name" "Tab_02",
                            
"type" "expanded_image",

                            
"x" 0,
                            
"y" 0,

                            
"width" 267,
                            
"height" 30,

                            
"image" "d:/ymir work/ui/dragonsoul/tap02.tga",
                        },
                        {
                            
"name" "Tab_03",
                            
"type" "expanded_image",

                            
"x" 0,
                            
"y" 0,

                            
"width" 267,
                            
"height" 30,

                            
"image" "d:/ymir work/ui/dragonsoul/tap03.tga",
                        },
                        {
                            
"name" "Tab_04",
                            
"type" "expanded_image",

                            
"x" 0,
                            
"y" 0,

                            
"width" 267,
                            
"height" 30,

                            
"image" "d:/ymir work/ui/dragonsoul/tap04.tga",
                        },
                        {
                            
"name" "Tab_05",
                            
"type" "expanded_image",

                            
"x" 0,
                            
"y" 0,

                            
"width" 267,
                            
"height" 30,

                            
"image" "d:/ymir work/ui/dragonsoul/tap05.tga",
                        },
                        {
                            
"name" "Tab_06",
                            
"type" "expanded_image",

                            
"x" 0,
                            
"y" 0,

                            
"width" 267,
                            
"height" 30,

                            
"image" "d:/ymir work/ui/dragonsoul/tap06.tga",
                        },
                        
## RadioButton
                        
{
                            
"name" "Tab_Button_01",
                            
"type" "radio_button",

                            
"x" 2,
                            
"y" 2,

                            
"width" 36,
                            
"height" 27,
                        },
                        {
                            
"name" "Tab_Button_02",
                            
"type" "radio_button",

                            
"x" 42,
                            
"y" 2,

                            
"width" 36,
                            
"height" 27,
                        },
                        {
                            
"name" "Tab_Button_03",
                            
"type" "radio_button",

                            
"x" 82,
                            
"y" 2,

                            
"width" 36,
                            
"height" 27,
                        },
                        {
                            
"name" "Tab_Button_04",
                            
"type" "radio_button",

                            
"x" 122,
                            
"y" 2,

                            
"width" 36,
                            
"height" 27,
                        },
                        {
                            
"name" "Tab_Button_05",
                            
"type" "radio_button",

                            
"x" 162,
                            
"y" 2,

                            
"width" 36,
                            
"height" 27,
                        },
                        {
                            
"name" "Tab_Button_06",
                            
"type" "radio_button",

                            
"x" 202,
                            
"y" 2,

                            
"width" 36,
                            
"height" 27,
                        },
                    ),
                },
                {
                    
"name" "tab_text_area",
                    
"type" "text",

                    
"x" 18,
                    
"y" 315,

                    
"text" uiScriptLocale.DRAGONSOUL_TAP_TITLE_1,
                    
"color" 0xFFC0C0C0,
                },
                {                    
                    
"name" "activate",
                    
"type" "toggle_button",

                    
"x" 217,
                    
"y" 492,

                    
"text" uiScriptLocale.DRAGONSOUL_ACTIVATE,

                    
"default_image" "d:/ymir work/ui/dragonsoul/m_button01.tga",
                    
"over_image" "d:/ymir work/ui/dragonsoul/m_button02.tga",
                    
"down_image" "d:/ymir work/ui/dragonsoul/m_button03.tga",
                },
            ),
        },
    ),

root

uidragonsoul.py

PHP Code:
import ui
import player
import mouseModule
import net
import app
import snd
import item
import chat
import grp
import uiScriptLocale
import uiRefine
import uiAttachMetin
import uiPickMoney
import uiCommon
import uiPrivateShopBuilder
import locale
import constInfo
import ime
import uiInventory
import sys
ITEM_FLAG_APPLICABLE 
<< 14

# ¿ëÈ¥¼® Vnum¿¡ ´ëÇÑ comment    
# ITEM VNUMÀ» 10¸¸ ÀÚ¸®ºÎÅÍ, FEDCBA¶ó°í ÇÑ´Ù¸é
# FE : ¿ëÈ¥¼® Á¾·ù.    D : µî±Ş
# C : ´Ü°è            B : °*È*        
# A : ¿©¹úÀÇ ¹øÈ£µé...     

class DragonSoulWindow(ui.ScriptWindow):
    
KIND_TAP_TITLES = [uiScriptLocale.DRAGONSOUL_TAP_TITLE_1uiScriptLocale.DRAGONSOUL_TAP_TITLE_2,
            
uiScriptLocale.DRAGONSOUL_TAP_TITLE_3uiScriptLocale.DRAGONSOUL_TAP_TITLE_4uiScriptLocale.DRAGONSOUL_TAP_TITLE_5uiScriptLocale.DRAGONSOUL_TAP_TITLE_6]
    
def __init__(self):
        
ui.ScriptWindow.__init__(self)
        
self.questionDialog None
        self
.tooltipItem None
        self
.sellingSlotNumber = -1
        self
.isLoaded 0
        self
.isActivated FALSE
        self
.DSKindIndex 0
        self
.tabDict None
        self
.tabButtonDict None
        self
.deckPageIndex 0
        self
.inventoryPageIndex 0
        self
.SetWindowName("DragonSoulWindow")
        
self.__LoadWindow()

    
def __del__(self):
        
ui.ScriptWindow.__del__(self)
        
    
def Show(self):
        
self.__LoadWindow()

        
ui.ScriptWindow.Show(self)
    
def __LoadWindow(self):
        if 
self.isLoaded == 1:
            return
        
self.isLoaded 1
        
try:
            
pyScrLoader ui.PythonScriptLoader()            
            
pyScrLoader.LoadScriptFile(selfuiScriptLocale.LOCALE_UISCRIPT_PATH "dragonsoulwindow.py")
        
        
except:
            
import exception
            exception
.Abort("dragonsoulwindow.LoadWindow.LoadObject")
        try:
            if 
locale.IsARABIC():
                
self.board self.GetChild("Equipment_Base")
                
self.board.SetScale(-1.01.0)
                
self.board.SetRenderingRect(-1.00.01.00.0)
                
self.board self.GetChild("Tab_01")
                
self.board.SetScale(-1.01.0)
                
self.board.SetRenderingRect(-1.00.01.00.0)
                
self.board self.GetChild("Tab_02")
                
self.board.SetScale(-1.01.0)
                
self.board.SetRenderingRect(-1.00.01.00.0)
                
self.board self.GetChild("Tab_03")
                
self.board.SetScale(-1.01.0)
                
self.board.SetRenderingRect(-1.00.01.00.0)
                
self.board self.GetChild("Tab_04")
                
self.board.SetScale(-1.01.0)
                
self.board.SetRenderingRect(-1.00.01.00.0)
                
self.board self.GetChild("Tab_05")
                
self.board.SetScale(-1.01.0)
                
self.board.SetRenderingRect(-1.00.01.00.0)
                
self.board self.GetChild("Tab_06")
                
self.board.SetScale(-1.01.0)
                
self.board.SetRenderingRect(-1.00.01.00.0)
                
            
wndItem self.GetChild("ItemSlot")
            
wndEquip self.GetChild("EquipmentSlot")
            
self.activateButton self.GetChild("activate")
            
self.deckTab = []
            
self.deckTab.append(self.GetChild("deck1"))
            
self.deckTab.append(self.GetChild("deck2"))
            
self.GetChild("TitleBar").SetCloseEvent(ui.__mem_func__(self.Close))            
            
self.inventoryTab = []
            
self.inventoryTab.append(self.GetChild("Inventory_Tab_01"))
            
self.inventoryTab.append(self.GetChild("Inventory_Tab_02"))
            
self.inventoryTab.append(self.GetChild("Inventory_Tab_03"))
            
self.inventoryTab.append(self.GetChild("Inventory_Tab_04"))
            
self.inventoryTab.append(self.GetChild("Inventory_Tab_05"))
            
self.tabDict = {
                
0    self.GetChild("Tab_01"),
                
1    self.GetChild("Tab_02"),
                
2    self.GetChild("Tab_03"),
                
3    self.GetChild("Tab_04"),
                
4    self.GetChild("Tab_05"),
                
5    self.GetChild("Tab_06"),
            }
            
self.tabButtonDict = {
                
0    self.GetChild("Tab_Button_01"),
                
1    self.GetChild("Tab_Button_02"),
                
2    self.GetChild("Tab_Button_03"),
                
3    self.GetChild("Tab_Button_04"),
                
4    self.GetChild("Tab_Button_05"),
                
5    self.GetChild("Tab_Button_06"),
            }
            
self.tabText self.GetChild("tab_text_area")
        
except:
            
import exception
            exception
.Abort("InventoryWindow.LoadWindow.BindObject")
        
## DragonSoul Kind Tap
        
for (tabKeytabButtonin self.tabButtonDict.items():
            
tabButton.SetEvent(ui.__mem_func__(self.SetDSKindIndex), tabKey)
        
## Item
        
wndItem.SetOverInItemEvent(ui.__mem_func__(self.OverInItem))
        
wndItem.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))
        
wndItem.SetSelectItemSlotEvent(ui.__mem_func__(self.SelectItemSlot))
        
wndItem.SetSelectEmptySlotEvent(ui.__mem_func__(self.SelectEmptySlot))
        
wndItem.SetUnselectItemSlotEvent(ui.__mem_func__(self.UseItemSlot))
        
wndItem.SetUseSlotEvent(ui.__mem_func__(self.UseItemSlot))
        
        
## Equipment
        
wndEquip.SetSelectEmptySlotEvent(ui.__mem_func__(self.SelectEmptyEquipSlot))
        
wndEquip.SetSelectItemSlotEvent(ui.__mem_func__(self.SelectEquipItemSlot))
        
wndEquip.SetUnselectItemSlotEvent(ui.__mem_func__(self.UseEquipItemSlot))
        
wndEquip.SetUseSlotEvent(ui.__mem_func__(self.UseEquipItemSlot))
        
wndEquip.SetOverInItemEvent(ui.__mem_func__(self.OverInEquipItem))
        
wndEquip.SetOverOutItemEvent(ui.__mem_func__(self.OverOutEquipItem))
        
        
## Deck
        
self.deckTab[0].SetToggleDownEvent(lambda arg=0self.SetDeckPage(arg))
        
self.deckTab[1].SetToggleDownEvent(lambda arg=1self.SetDeckPage(arg))
        
self.deckTab[0].SetToggleUpEvent(lambda arg=0self.__DeckButtonDown(arg))
        
self.deckTab[1].SetToggleUpEvent(lambda arg=1self.__DeckButtonDown(arg))
        
self.deckTab[0].Down()
        
## Grade button
        
self.inventoryTab[0].SetEvent(lambda arg=0self.SetInventoryPage(arg))
        
self.inventoryTab[1].SetEvent(lambda arg=1self.SetInventoryPage(arg))
        
self.inventoryTab[2].SetEvent(lambda arg=2self.SetInventoryPage(arg))
        
self.inventoryTab[3].SetEvent(lambda arg=3self.SetInventoryPage(arg))
        
self.inventoryTab[4].SetEvent(lambda arg=4self.SetInventoryPage(arg))
        
self.inventoryTab[0].Down()
        
## Etc
        
self.wndItem wndItem
        self
.wndEquip wndEquip
        
        self
.dlgQuestion uiCommon.QuestionDialog2()
        
self.dlgQuestion.Close()
        
        
self.activateButton.SetToggleDownEvent(ui.__mem_func__(self.ActivateButtonClick))
        
self.activateButton.SetToggleUpEvent(ui.__mem_func__(self.ActivateButtonClick))
        
self.wndPopupDialog uiCommon.PopupDialog()
        
        
## 
        
self.listHighlightedSlot = []
        
        
## Refresh
        
self.SetInventoryPage(0)
        
self.RefreshItemSlot()
        
self.RefreshEquipSlotWindow()
        
self.RefreshBagSlotWindow()
        
self.SetDSKindIndex(0)
        
self.activateButton.Enable()
        
self.deckTab[self.deckPageIndex].Down()
        
self.activateButton.SetUp()

    
def Destroy(self):
        
self.ClearDictionary()
        
self.tooltipItem None
        self
.wndItem 0
        self
.wndEquip 0
        self
.activateButton 0
        self
.questionDialog None
        self
.mallButton None
        self
.inventoryTab = []
        
self.deckTab = []
        
self.equipmentTab = []
        
self.tabDict None
        self
.tabButtonDict None
        
    def Close
(self):
        if 
None != self.tooltipItem:
            
self.tooltipItem.HideToolTip()
         
self.Hide()
     
     
def __DeckButtonDown(selfdeck):
         
self.deckTab[deck].Down()
     
    
def SetInventoryPage(selfpage):
        if 
self.inventoryPageIndex != page:
            
self.__HighlightSlot_ClearCurrentPage()
        
self.inventoryPageIndex page
        self
.inventoryTab[(page+1)%5].SetUp()
        
self.inventoryTab[(page+2)%5].SetUp()
        
self.inventoryTab[(page+3)%5].SetUp()
        
self.inventoryTab[(page+4)%5].SetUp()
        
self.RefreshBagSlotWindow()
        
    
def SetItemToolTip(selftooltipItem):
        
self.tooltipItem tooltipItem
        
    def RefreshItemSlot
(self):
        
self.RefreshBagSlotWindow()
        
self.RefreshEquipSlotWindow()
        
    
def RefreshEquipSlotWindow(self):
        for 
i in xrange(6):
            
slotNumber self.__InventoryLocalSlotPosToGlobalSlotPos(player.INVENTORYplayer.DRAGON_SOUL_EQUIPMENT_SLOT_START i)
            
itemVnum player.GetItemIndex(slotNumber)
            
self.wndEquip.SetItemSlot(player.DRAGON_SOUL_EQUIPMENT_SLOT_START iitemVnum0)
            
self.wndEquip.EnableSlot(player.DRAGON_SOUL_EQUIPMENT_SLOT_START i)
            
            if 
itemVnum != 0:
                
item.SelectItem(itemVnum)
                for 
j in xrange(item.LIMIT_MAX_NUM):
                    (
limitTypelimitValue) = item.GetLimit(j)
                    
                    
# ¹Ø¿¡¼* remain_timeÀÌ 0ÀÌÇÏÀÎÁö Ã¼Å© Çϱ⠶§¹®¿¡ ÀÓÀÇÀÇ ¾ç¼ö·Î ÃʱâÈ*
                    
remain_time 999
                    
# ÀÏ´Ü ÇöÀç Å¸À̸Ӵ ÀÌ ¼¼°³ »ÓÀÌ´Ù.
                    
if item.LIMIT_REAL_TIME == limitType:
                        
remain_time player.GetItemMetinSocket(player.INVENTORYslotNumber0) - app.GetGlobalTimeStamp()
                    
elif item.LIMIT_REAL_TIME_START_FIRST_USE == limitType:
                        
remain_time player.GetItemMetinSocket(player.INVENTORYslotNumber0) - app.GetGlobalTimeStamp()
                    
elif item.LIMIT_TIMER_BASED_ON_WEAR == limitType:
                        
remain_time player.GetItemMetinSocket(player.INVENTORYslotNumber0)
                        
                    if 
remain_time <= 0:
                        
self.wndEquip.DisableSlot(player.DRAGON_SOUL_EQUIPMENT_SLOT_START i)
                        break
                    
        
self.wndEquip.RefreshSlot()
        
    
def RefreshStatus(self):
        
self.RefreshItemSlot()
        
    
def __InventoryLocalSlotPosToGlobalSlotPos(selfwindow_typelocal_slot_pos):
        if 
player.INVENTORY == window_type:
            return 
self.deckPageIndex player.DRAGON_SOUL_EQUIPMENT_FIRST_SIZE local_slot_pos
            
        
return (self.DSKindIndex player.DRAGON_SOUL_PAGE_SIZE) + self.inventoryPageIndex player.DRAGON_SOUL_PAGE_SIZE local_slot_pos
        
    def RefreshBagSlotWindow
(self):
        
getItemVNum=player.GetItemIndex
        getItemCount
=player.GetItemCount
        setItemVnum
=self.wndItem.SetItemSlot
        
for i in xrange(player.DRAGON_SOUL_PAGE_SIZE):
            
self.wndItem.EnableSlot(i)
            
#<- dragon soul kind
            
slotNumber self.__InventoryLocalSlotPosToGlobalSlotPos(player.DRAGON_SOUL_INVENTORYi)

            
itemCount getItemCount(player.DRAGON_SOUL_INVENTORYslotNumber)
            if 
== itemCount:
                
self.wndItem.ClearSlot(i)
                continue
            
elif 1 == itemCount:
                
itemCount 0
            itemVnum 
getItemVNum(player.DRAGON_SOUL_INVENTORYslotNumber)

            
setItemVnum(iitemVnumitemCount)

            if 
itemVnum != 0:
                
item.SelectItem(itemVnum)
                for 
j in xrange(item.LIMIT_MAX_NUM):
                    (
limitTypelimitValue) = item.GetLimit(j)

                    
# ¹Ø¿¡¼* remain_timeÀÌ À½¼öÀÎÁö Ã¼Å© Çϱ⠶§¹®¿¡ ÀÓÀÇÀÇ ¾ç¼ö·Î ÃʱâÈ*
                    
remain_time 999
                    
if item.LIMIT_REAL_TIME == limitType:
                        
remain_time player.GetItemMetinSocket(player.DRAGON_SOUL_INVENTORYslotNumber0)
                    
elif item.LIMIT_REAL_TIME_START_FIRST_USE == limitType:
                        
remain_time player.GetItemMetinSocket(player.DRAGON_SOUL_INVENTORYslotNumber0)
                    
elif item.LIMIT_TIMER_BASED_ON_WEAR == limitType:
                        
remain_time player.GetItemMetinSocket(player.DRAGON_SOUL_INVENTORYslotNumber0)
                
                    if 
remain_time <= 0:
                        
self.wndItem.DisableSlot(i)
                        break

        
self.__HighlightSlot_RefreshCurrentPage()
        
self.wndItem.RefreshSlot()
        
    
def ShowToolTip(selfwindow_typeslotIndex):
        if 
None != self.tooltipItem:
            if 
player.INVENTORY == window_type:
                
self.tooltipItem.SetInventoryItem(slotIndex)
            else:
                
self.tooltipItem.SetInventoryItem(slotIndexplayer.DRAGON_SOUL_INVENTORY)

    
def OnPressEscapeKey(self):
        
self.Close()
        return 
TRUE
            
    def OnTop
(self):
        if 
None != self.tooltipItem:
            
self.tooltipItem.SetTop()
    
    
# item slot °ü·Ã ÇÔ¼ö                
    
def OverOutItem(self):
        
self.wndItem.SetUsableItem(FALSE)
        if 
None != self.tooltipItem:
            
self.tooltipItem.HideToolTip()
            
    
def OverInItem(selfoverSlotPos):
        
self.wndItem.DeactivateSlot(overSlotPos)
        
overSlotPos self.__InventoryLocalSlotPosToGlobalSlotPos(player.DRAGON_SOUL_INVENTORYoverSlotPos)
        try:
            
self.listHighlightedSlot.remove(overSlotPos)
        
except:
            
pass
        
        self
.wndItem.SetUsableItem(FALSE)
        
self.ShowToolTip(player.DRAGON_SOUL_INVENTORYoverSlotPos)
    
    
def __UseItem(selfslotIndex):
        
ItemVNum player.GetItemIndex(player.DRAGON_SOUL_INVENTORYslotIndex)
        if 
== player.GetItemMetinSocket(player.DRAGON_SOUL_INVENTORYslotIndex0):
            
self.wndPopupDialog.SetText(locale.DRAGON_SOUL_EXPIRED)
            
self.wndPopupDialog.Open()
            return
 
        
self.__EquipItem(slotIndex)

    
def __EquipItem(selfslotIndex):    
        
ItemVNum player.GetItemIndex(player.DRAGON_SOUL_INVENTORYslotIndex)
        
item.SelectItem(ItemVNum)
        
subType item.GetItemSubType()
        
equipSlotPos player.DRAGON_SOUL_EQUIPMENT_SLOT_START self.deckPageIndex player.DRAGON_SOUL_EQUIPMENT_FIRST_SIZE subType
        srcItemPos 
= (player.DRAGON_SOUL_INVENTORYslotIndex)
        
dstItemPos = (player.INVENTORYequipSlotPos)
        
self.__OpenQuestionDialog(TRUEsrcItemPosdstItemPos)
    
    
def SelectItemSlot(selfitemSlotIndex):
        if 
constInfo.GET_ITEM_DROP_QUESTION_DIALOG_STATUS() == 1:
            return

        
itemSlotIndex self.__InventoryLocalSlotPosToGlobalSlotPos(player.DRAGON_SOUL_INVENTORYitemSlotIndex)

        if 
mouseModule.mouseController.isAttached():
            
attachedSlotType mouseModule.mouseController.GetAttachedType()
            
attachedSlotPos mouseModule.mouseController.GetAttachedSlotNumber()
            
attachedItemVID mouseModule.mouseController.GetAttachedItemIndex()
                
            
attachedInvenType player.SlotTypeToInvenType(attachedSlotType)
            if 
player.RESERVED_WINDOW != attachedInvenType:
                
net.SendItemUseToItemPacket(attachedInvenTypeattachedSlotPosplayer.DRAGON_SOUL_INVENTORYitemSlotIndex)

            
mouseModule.mouseController.DeattachObject()

        else:
            
selectedItemVNum player.GetItemIndex(player.DRAGON_SOUL_INVENTORYitemSlotIndex)
            
itemCount player.GetItemCount(player.DRAGON_SOUL_INVENTORYitemSlotIndex)
            
mouseModule.mouseController.AttachObject(selfplayer.SLOT_TYPE_DRAGON_SOUL_INVENTORYitemSlotIndexselectedItemVNumitemCount)
            
self.wndItem.SetUseMode(FALSE)
            
snd.PlaySound("sound/ui/pick.wav")

    
def SelectEmptySlot(selfselectedSlotPos):
        if 
constInfo.GET_ITEM_DROP_QUESTION_DIALOG_STATUS() == 1:
            return

        
selectedSlotPos self.__InventoryLocalSlotPosToGlobalSlotPos(player.DRAGON_SOUL_INVENTORYselectedSlotPos)
        print 
"__debug"selectedSlotPos
        
if mouseModule.mouseController.isAttached():

            
attachedSlotType mouseModule.mouseController.GetAttachedType()
            
attachedSlotPos mouseModule.mouseController.GetAttachedSlotNumber()
            
attachedItemCount mouseModule.mouseController.GetAttachedItemCount()
            
attachedItemIndex mouseModule.mouseController.GetAttachedItemIndex()

            
attachedInvenType player.SlotTypeToInvenType(attachedSlotType)
            if 
player.SLOT_TYPE_PRIVATE_SHOP == attachedSlotType:
                
mouseModule.mouseController.RunCallBack("INVENTORY")

            
elif player.SLOT_TYPE_SHOP == attachedSlotType:
                
net.SendShopBuyPacket(attachedSlotPos)

            
elif player.SLOT_TYPE_SAFEBOX == attachedSlotType:
                if 
player.ITEM_MONEY == attachedItemIndex:
                    
net.SendSafeboxWithdrawMoneyPacket(mouseModule.mouseController.GetAttachedItemCount())
                    
snd.PlaySound("sound/ui/money.wav")

                else:
                    
net.SendSafeboxCheckoutPacket(attachedSlotPosplayer.DRAGON_SOUL_INVENTORYselectedSlotPos)

            
elif player.SLOT_TYPE_MALL == attachedSlotType:
                
net.SendMallCheckoutPacket(attachedSlotPosplayer.DRAGON_SOUL_INVENTORYselectedSlotPos)

            
elif player.RESERVED_WINDOW != attachedInvenType:
                if 
player.IsDSEquipmentSlot(attachedInvenTypeattachedSlotPos):
                    
srcItemPos = (attachedInvenTypeattachedSlotPos)
                    
dstItemPos = (player.DRAGON_SOUL_INVENTORYselectedSlotPos)
                    
self.__OpenQuestionDialog(FALSEsrcItemPosdstItemPos)
                else:
                    
itemCount player.GetItemCount(attachedInvenTypeattachedSlotPos)
                    
attachedCount mouseModule.mouseController.GetAttachedItemCount()
 
                    
self.__SendMoveItemPacket(attachedInvenTypeattachedSlotPosplayer.DRAGON_SOUL_INVENTORYselectedSlotPosattachedCount)

            
mouseModule.mouseController.DeattachObject()

    
def UseItemSlot(selfslotIndex):
        if 
constInfo.GET_ITEM_DROP_QUESTION_DIALOG_STATUS():
            return
        
slotIndex self.__InventoryLocalSlotPosToGlobalSlotPos(player.DRAGON_SOUL_INVENTORYslotIndex)
        try:
            
# ¿ëÈ¥¼® °*È*âÀÌ ¿*·ÁÀÖÀ¸¸é, ¾ÆÀÌÅÛ ¿ìŬ¸¯ ½Ã ÀÚµ¿À¸·Î °*È*âÀ¸·Î µé¾î°¨.
            
if self.wndDragonSoulRefine.IsShow():
                if 
uiPrivateShopBuilder.IsBuildingPrivateShop():
                    
chat.AppendChat(chat.CHAT_TYPE_INFOlocaleInfo.MOVE_ITEM_FAILURE_PRIVATE_SHOP)
                    return
                
self.wndDragonSoulRefine.AutoSetItem((player.DRAGON_SOUL_INVENTORYslotIndex), 1)
                return
        
except:
            
pass

        self
.__UseItem(slotIndex)
 
        
mouseModule.mouseController.DeattachObject()
        
self.OverOutItem()
        
    
def __SendMoveItemPacket(selfsrcSlotWindowsrcSlotPosdstSlotWindowdstSlotPossrcItemCount):
        if 
uiPrivateShopBuilder.IsBuildingPrivateShop():
            
chat.AppendChat(chat.CHAT_TYPE_INFOlocale.MOVE_ITEM_FAILURE_PRIVATE_SHOP)
            return
        
        
net.SendItemMovePacket(srcSlotWindow srcSlotPosdstSlotWindowdstSlotPossrcItemCount)
    
    
# equip ½½·Ô °ü·Ã ÇÔ¼öµé.
    
def OverOutEquipItem(self):
        
self.OverOutItem()
            
    
def OverInEquipItem(selfoverSlotPos):
        
overSlotPos self.__InventoryLocalSlotPosToGlobalSlotPos(player.INVENTORYoverSlotPos)
        
self.wndItem.SetUsableItem(FALSE)
        
self.ShowToolTip(player.INVENTORYoverSlotPos)
    
    
def UseEquipItemSlot(selfslotIndex):
        if 
constInfo.GET_ITEM_DROP_QUESTION_DIALOG_STATUS():
            return

        
slotIndex self.__InventoryLocalSlotPosToGlobalSlotPos(player.INVENTORYslotIndex)

        
self.__UseEquipItem(slotIndex)
        
mouseModule.mouseController.DeattachObject()
        
self.OverOutEquipItem()
    
    
def __UseEquipItem(selfslotIndex):
        if 
uiPrivateShopBuilder.IsBuildingPrivateShop():
            
chat.AppendChat(chat.CHAT_TYPE_INFOlocale.USE_ITEM_FAILURE_PRIVATE_SHOP)
            return

        
self.__OpenQuestionDialog(FALSE, (player.INVENTORYslotIndex), (11))
                    
    
    
def SelectEquipItemSlot(selfitemSlotIndex):
        if 
constInfo.GET_ITEM_DROP_QUESTION_DIALOG_STATUS() == 1:
            return

        
itemSlotIndex self.__InventoryLocalSlotPosToGlobalSlotPos(player.INVENTORYitemSlotIndex)

        if 
mouseModule.mouseController.isAttached():
            
attachedSlotType mouseModule.mouseController.GetAttachedType()
            
attachedSlotPos mouseModule.mouseController.GetAttachedSlotNumber()
            
# ÀÚ±â ÀÚ½ÅÀ» ÀÚ±â Àڽſ¡°Ô µå·¡±×Çϴ °æ¿ì
            
if player.SLOT_TYPE_INVENTORY == attachedSlotType and itemSlotIndex == attachedSlotPos:
                return
 
            
attachedItemVID mouseModule.mouseController.GetAttachedItemIndex()
                
            
attachedInvenType player.SlotTypeToInvenType(attachedSlotType)
            if 
player.RESERVED_WINDOW != attachedInvenType:
                
net.SendItemUseToItemPacket(attachedInvenTypeattachedSlotPosplayer.INVENTORYitemSlotIndex)

            
mouseModule.mouseController.DeattachObject()
        else:
            
selectedItemVNum player.GetItemIndex(player.INVENTORYitemSlotIndex)
            
itemCount player.GetItemCount(player.INVENTORYitemSlotIndex)
            
mouseModule.mouseController.AttachObject(selfplayer.SLOT_TYPE_INVENTORYitemSlotIndexselectedItemVNumitemCount)
            
self.wndItem.SetUseMode(FALSE)
            
snd.PlaySound("sound/ui/pick.wav")
            
    
def SelectEmptyEquipSlot(selfselectedSlot):
        if 
constInfo.GET_ITEM_DROP_QUESTION_DIALOG_STATUS() == 1:
            return

        
selectedSlotPos self.__InventoryLocalSlotPosToGlobalSlotPos(player.INVENTORYselectedSlot)

        if 
mouseModule.mouseController.isAttached():
            
attachedSlotType mouseModule.mouseController.GetAttachedType()
            
attachedSlotPos mouseModule.mouseController.GetAttachedSlotNumber()
            
attachedItemCount mouseModule.mouseController.GetAttachedItemCount()
            
attachedItemIndex mouseModule.mouseController.GetAttachedItemIndex()

            if 
player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedSlotType:
                if 
== player.GetItemMetinSocket(player.DRAGON_SOUL_INVENTORYattachedSlotPos0):
                    
self.wndPopupDialog.SetText(locale.DRAGON_SOUL_EXPIRED)
                    
self.wndPopupDialog.Open()
                    return
            
                
item.SelectItem(attachedItemIndex)
                
subType item.GetItemSubType()
                if 
subType != (selectedSlot player.DRAGON_SOUL_EQUIPMENT_SLOT_START):
                    
self.wndPopupDialog.SetText(locale.DRAGON_SOUL_UNMATCHED_SLOT)
                    
self.wndPopupDialog.Open()
                else:
                    
srcItemPos = (player.DRAGON_SOUL_INVENTORYattachedSlotPos)
                    
dstItemPos = (player.INVENTORYselectedSlotPos)
                    
self.__OpenQuestionDialog(TRUEsrcItemPosdstItemPos)

            
mouseModule.mouseController.DeattachObject()
    
# equip ½½·Ô °ü·Ã ÇÔ¼öµé ³¡.
    
    # °æ°íâ °ü·Ã
    
def __OpenQuestionDialog(selfEquipsrcItemPosdstItemPos):
        
self.srcItemPos srcItemPos
        self
.dstItemPos dstItemPos
        
        self
.dlgQuestion.SetAcceptEvent(ui.__mem_func__(self.__Accept))
        
self.dlgQuestion.SetCancelEvent(ui.__mem_func__(self.__Cancel))

        if 
Equip:
            
self.dlgQuestion.SetText1(locale.DRAGON_SOUL_EQUIP_WARNING1)
            
self.dlgQuestion.SetText2(locale.DRAGON_SOUL_EQUIP_WARNING2)
        else:
            
self.dlgQuestion.SetText1(locale.DRAGON_SOUL_UNEQUIP_WARNING1)
            
self.dlgQuestion.SetText2(locale.DRAGON_SOUL_UNEQUIP_WARNING2)
 
        
self.dlgQuestion.Open()
        
    
def __Accept(self):
        if (-
1, -1) == self.dstItemPos:
            
net.SendItemUsePacket(*srcItemPos)
        else:
            
self.__SendMoveItemPacket(*(self.srcItemPos self.dstItemPos + (0,)))
        
self.dlgQuestion.Close()

    
def __Cancel(self):
        
self.srcItemPos = (00)
        
self.dstItemPos = (00)
        
self.dlgQuestion.Close()

    
# °æ°íâ °ü·Ã ³¡
    
    
def SetDSKindIndex(selfkindIndex):
        if 
self.DSKindIndex != kindIndex:
            
self.__HighlightSlot_ClearCurrentPage()
        
        
self.DSKindIndex kindIndex

        
for (tabKeytabButtonin self.tabButtonDict.items():
            if 
kindIndex!=tabKey:
                
tabButton.SetUp()

        for 
tabValue in self.tabDict.itervalues():
            
tabValue.Hide()

        
self.tabDict[kindIndex].Show()
        
self.tabText.SetText(DragonSoulWindow.KIND_TAP_TITLES[kindIndex])
        
        
self.RefreshBagSlotWindow()
        
    
def SetDeckPage(selfpage):
        if 
page == self.deckPageIndex:
            return
    
        if 
self.isActivated:
            
self.DeactivateDragonSoul()
            
net.SendChatPacket("/dragon_soul deactivate")
        
self.deckPageIndex page
        self
.deckTab[page].Down()
        
self.deckTab[(page+1)%2].SetUp()
        
        
self.RefreshEquipSlotWindow()
    
    
# ¿ëÈ¥¼® È°¼ºÈ* °ü·Ã
    
def ActivateDragonSoulByExtern(selfdeck):
        
self.isActivated TRUE
        self
.activateButton.Down()
        
self.deckPageIndex deck
        self
.deckTab[deck].Down()
        
self.deckTab[(deck+1)%2].SetUp()
        
self.RefreshEquipSlotWindow()
        
    
def DeactivateDragonSoul(self):
        
self.isActivated FALSE
        self
.activateButton.SetUp()

    
def ActivateButtonClick(self):
        
self.isActivated self.isActivated TRUE
        
if self.isActivated:
            if 
self.__CanActivateDeck():
                
net.SendChatPacket("/dragon_soul activate " str(self.deckPageIndex))
            else:
                
self.isActivated FALSE
                self
.activateButton.SetUp()
        else:
            
net.SendChatPacket("/dragon_soul deactivate")

    
def __CanActivateDeck(self):
        
canActiveNum 0
        
for i in xrange(6):
            
slotNumber self.__InventoryLocalSlotPosToGlobalSlotPos(player.INVENTORYplayer.DRAGON_SOUL_EQUIPMENT_SLOT_START i)
            
itemVnum player.GetItemIndex(slotNumber)
            
            if 
itemVnum != 0:
                
item.SelectItem(itemVnum)
                
isNoLimit TRUE
                
for i in xrange(item.LIMIT_MAX_NUM):
                    (
limitTypelimitValue) = item.GetLimit(i)
                    
                    
# LIMIT_TIMER_BASED_ON_WEAR´Â ¼ÒÄÏ0¿¡ ³²Àº ½Ã°£À» ¹Ú´Â´Ù.
                    # LIMIT_REAL_TIMEÀº ½Ã°£ ´Ù µÇ¸é ¾ÆÀÌÅÛÀÌ »ç¶óÁö¹Ç·Î ÇÒ Çʿ䰡 ¾ø´Ù.
                    # LIMIT_REAL_TIME_START_FIRST_USE´Â ¼*¹ö¿¡ Á¦´ë·Î Á¤ÀǵÇÁö ¾Ê¾Æ ÀÏ´Ü ³ÀµĞ´Ù.
                    
if item.LIMIT_TIMER_BASED_ON_WEAR == limitType:
                        
isNoLimit FALSE
                        remain_time 
player.GetItemMetinSocket(player.INVENTORYslotNumber0)
                        if 
!= remain_time:
                            
canActiveNum += 1
                            
break
                
# Å¸À̸Ӱ¡ ¾ø´Ù¸é ActivateÇÒ ¼ö Àִ ¿ëÈ¥¼®.
                
if isNoLimit:
                    
canActiveNum += 1
        
        
return canActiveNum 0
    
    
# È°¼ºÈ* °ü·Ã ³¡
    
    # ½½·Ô highlight °ü·Ã
    
def __HighlightSlot_ClearCurrentPage(self):
        for 
i in xrange(self.wndItem.GetSlotCount()):
            
slotNumber self.__InventoryLocalSlotPosToGlobalSlotPos(player.DRAGON_SOUL_INVENTORYi)
            if 
slotNumber in self.listHighlightedSlot:
                
self.wndItem.DeactivateSlot(i)
                
self.listHighlightedSlot.remove(slotNumber)
    
    
def __HighlightSlot_RefreshCurrentPage(self):
        for 
i in xrange(self.wndItem.GetSlotCount()):
            
slotNumber self.__InventoryLocalSlotPosToGlobalSlotPos(player.DRAGON_SOUL_INVENTORYi)
            if 
slotNumber in self.listHighlightedSlot:
                
self.wndItem.ActivateSlot(i)
    
    
def HighlightSlot(selfslot):
        if 
not slot in self.listHighlightedSlot:
            
self.listHighlightedSlot.append (slot)
    
# ½½·Ô highlight °ü·Ã ³¡
    
    
def SetDragonSoulRefineWindow(selfwndDragonSoulRefine):
        if 
app.ENABLE_DRAGON_SOUL_SYSTEM:
            
from _weakref import proxy
            self
.wndDragonSoulRefine proxy(wndDragonSoulRefine)

## °*È*ÇÒ ¼ö ¾ø´Â °æ¿ì ³¯¸®´Â ¿¹¿Ü
#class DragonSoulRefineException(Exception):
    #pass

class DragonSoulRefineWindow(ui.ScriptWindow):
    
REFINE_TYPE_GRADEREFINE_TYPE_STEPREFINE_TYPE_STRENGTH xrange(3)
    
DS_SUB_HEADER_DIC = {
        
REFINE_TYPE_GRADE player.DS_SUB_HEADER_DO_UPGRADE,
        
REFINE_TYPE_STEP player.DS_SUB_HEADER_DO_IMPROVEMENT,
        
REFINE_TYPE_STRENGTH player.DS_SUB_HEADER_DO_REFINE 
    
}
    
REFINE_STONE_SLOTDRAGON_SOUL_SLOT xrange(2)

    
INVALID_DRAGON_SOUL_INFO = -1
    
    def __init__
(self):
        
ui.ScriptWindow.__init__(self)
        
self.tooltipItem None
        self
.sellingSlotNumber = -1
        self
.isLoaded 0
        self
.refineChoiceButtonDict None
        self
.doRefineButton None
        self
.wndMoney None
        self
.SetWindowName("DragonSoulRefineWindow")
        
self.__LoadWindow()
        
    
def __del__(self):
        
ui.ScriptWindow.__del__(self)

    
def Show(self):
        
self.__LoadWindow()
        
ui.ScriptWindow.Show(self)

    
def __LoadWindow(self):
        if 
self.isLoaded == 1:
            return
        
self.isLoaded 1
        
try:
            
pyScrLoader ui.PythonScriptLoader()            
            
pyScrLoader.LoadScriptFile(selfuiScriptLocale.LOCALE_UISCRIPT_PATH "dragonsoulrefinewindow.py")

        
except:
            
import exception
            exception
.Abort("dragonsoulrefinewindow.LoadWindow.LoadObject")
        try:
            if 
locale.IsARABIC():
                
self.board self.GetChild("DragonSoulRefineWindowBaseImage")
                
self.board.SetScale(-1.01.0)
                
self.board.SetRenderingRect(-1.00.01.00.0)
                
            
wndRefineSlot self.GetChild("RefineSlot")
            
wndResultSlot self.GetChild("ResultSlot")
            
self.GetChild("TitleBar").SetCloseEvent(ui.__mem_func__(self.Close))            
            
self.refineChoiceButtonDict = {
                
self.REFINE_TYPE_GRADE    self.GetChild("GradeButton"),
                
self.REFINE_TYPE_STEPself.GetChild("StepButton"),
                
self.REFINE_TYPE_STRENGTH    self.GetChild("StrengthButton"),
            }
            
self.doRefineButton self.GetChild("DoRefineButton")
            
self.wndMoney self.GetChild("Money_Slot")
        
        
except:
            
import exception
            exception
.Abort("DragonSoulRefineWindow.LoadWindow.BindObject")
        
    
        
## Item Slots
        
wndRefineSlot.SetOverInItemEvent(ui.__mem_func__(self.__OverInRefineItem))
        
wndRefineSlot.SetOverOutItemEvent(ui.__mem_func__(self.__OverOutItem))
        
wndRefineSlot.SetSelectEmptySlotEvent(ui.__mem_func__(self.__SelectRefineEmptySlot))
        
wndRefineSlot.SetSelectItemSlotEvent(ui.__mem_func__(self.__SelectRefineItemSlot))
        
wndRefineSlot.SetUseSlotEvent(ui.__mem_func__(self.__SelectRefineItemSlot))
        
wndRefineSlot.SetUnselectItemSlotEvent(ui.__mem_func__(self.__SelectRefineItemSlot))
        
        
wndResultSlot.SetOverInItemEvent(ui.__mem_func__(self.__OverInResultItem))
        
wndResultSlot.SetOverOutItemEvent(ui.__mem_func__(self.__OverOutItem))
        
self.wndRefineSlot wndRefineSlot
        self
.wndResultSlot wndResultSlot
        
        
## Button
        
self.refineChoiceButtonDict[self.REFINE_TYPE_GRADE].SetToggleDownEvent(self.__ToggleDownGradeButton)
        
self.refineChoiceButtonDict[self.REFINE_TYPE_STEP].SetToggleDownEvent(self.__ToggleDownStepButton)
        
self.refineChoiceButtonDict[self.REFINE_TYPE_STRENGTH].SetToggleDownEvent(self.__ToggleDownStrengthButton)
        
self.refineChoiceButtonDict[self.REFINE_TYPE_GRADE].SetToggleUpEvent(lambda self.__ToggleUpButton(self.REFINE_TYPE_GRADE))
        
self.refineChoiceButtonDict[self.REFINE_TYPE_STEP].SetToggleUpEvent(lambda self.__ToggleUpButton(self.REFINE_TYPE_STEP))
        
self.refineChoiceButtonDict[self.REFINE_TYPE_STRENGTH].SetToggleUpEvent(lambda self.__ToggleUpButton(self.REFINE_TYPE_STRENGTH))
        
self.doRefineButton.SetEvent(self.__PressDoRefineButton)
        
        
## Dialog
        
self.wndPopupDialog uiCommon.PopupDialog()
        
        
self.currentRefineType self.REFINE_TYPE_GRADE
        self
.refineItemInfo = {}
        
self.resultItemInfo = {}
        
self.currentRecipe = {}
        
        
self.wndMoney.SetText(locale.NumberToMoneyString(0))
        
self.refineChoiceButtonDict[self.REFINE_TYPE_GRADE].Down()
        
        
self.__Initialize()
        
    
def Destroy(self):
        
self.ClearDictionary()
        
self.tooltipItem None
        self
.wndItem 0
        self
.wndEquip 0
        self
.activateButton 0
        self
.questionDialog None
        self
.mallButton None
        self
.inventoryTab = []
        
self.deckTab = []
        
self.equipmentTab = []
        
self.tabDict None
        self
.tabButtonDict None
        
    def Close
(self):
        if 
None != self.tooltipItem:
            
self.tooltipItem.HideToolTip()
        
        
self.__FlushRefineItemSlot()
        
player.SendDragonSoulRefine(player.DRAGON_SOUL_REFINE_CLOSE)
         
self.Hide()

     
def Show(self):
         
self.currentRefineType self.REFINE_TYPE_GRADE
        self
.wndMoney.SetText(locale.NumberToMoneyString(0))
        
self.refineChoiceButtonDict[self.REFINE_TYPE_GRADE].Down()
        
self.refineChoiceButtonDict[self.REFINE_TYPE_STEP].SetUp()
        
self.refineChoiceButtonDict[self.REFINE_TYPE_STRENGTH].SetUp()
        
        
self.Refresh()
         
        
ui.ScriptWindow.Show(self)

    
def SetItemToolTip(selftooltipItem):
        
self.tooltipItem tooltipItem
    
    
# ¹öư ´*·Á Àִ »óŸ¦ Á¦¿ÜÇÑ ¸ğµç °*È*â °ü·Ã º¯¼öµéÀ» ÃʱâÈ*.
    
def __Initialize(self):
        
self.currentRecipe = {}
        
self.refineItemInfo = {}
        
self.resultItemInfo = {}
        
        if 
self.REFINE_TYPE_STRENGTH == self.currentRefineType:
            
self.refineSlotLockStartIndex 2
        
else:
            
self.refineSlotLockStartIndex 1

        
for i in xrange(self.refineSlotLockStartIndex):
            
self.wndRefineSlot.HideSlotBaseImage(i)

        
self.wndMoney.SetText(locale.NumberToMoneyString(0))

    
def __FlushRefineItemSlot(self):
        
## Item slot settings
        # ¿ø·¡ Àκ¥ÀÇ ¾ÆÀÌÅÛ Ä«¿îÆ® È¸º¹
        
for invenTypeinvenPositemCount in self.refineItemInfo.values():
            
remainCount player.GetItemCount(invenTypeinvenPos)
            
player.SetItemCount(invenTypeinvenPosremainCount itemCount)
        
self.__Initialize()
    
     
def __ToggleUpButton(selfidx):
         
#if self.REFINE_TYPE_GRADE == self.currentRefineType:
         
self.refineChoiceButtonDict[idx].Down()
 
     
def __ToggleDownGradeButton(self):
         if 
self.REFINE_TYPE_GRADE == self.currentRefineType:
             return
         
self.refineChoiceButtonDict[self.currentRefineType].SetUp()
         
self.currentRefineType self.REFINE_TYPE_GRADE
         self
.__FlushRefineItemSlot()
        
self.Refresh()
         
     
def __ToggleDownStepButton(self):
         if 
self.REFINE_TYPE_STEP == self.currentRefineType:
             return
         
self.refineChoiceButtonDict[self.currentRefineType].SetUp()
         
self.currentRefineType self.REFINE_TYPE_STEP
        self
.__FlushRefineItemSlot()
        
self.Refresh()

     
def __ToggleDownStrengthButton(self):
         if 
self.REFINE_TYPE_STRENGTH == self.currentRefineType:
             return
         
self.refineChoiceButtonDict[self.currentRefineType].SetUp()
         
self.currentRefineType self.REFINE_TYPE_STRENGTH
         self
.__FlushRefineItemSlot()
         
self.Refresh()

     
def __PopUp(selfmessage):
        
self.wndPopupDialog.SetText(message)
        
self.wndPopupDialog.Open()
     
     
def __SetItem(self, (invenTypeinvenPos), dstSlotIndexitemCount):
        
        if 
dstSlotIndex >= self.refineSlotLockStartIndex:
            return 
FALSE
            
        itemVnum 
player.GetItemIndex(invenTypeinvenPos)
        
maxCount player.GetItemCount(invenTypeinvenPos)
        
        if 
itemCount maxCount:
            
raise Exception, ("Invalid attachedItemCount(%d). (base pos (%d, %d), base itemCount(%d))" % (itemCountinvenTypeinvenPosmaxCount))
            
#return FALSE
        
        # strength °*È*ÀÏ °æ¿ì, 0¹ø¿£ °*È*¼®, 1¹ø¿£ ¿ëÈ¥¼®À» ³õµµ·Ï °*Á¦ÇÔ.
        
if DragonSoulRefineWindow.REFINE_TYPE_STRENGTH == self.currentRefineType:
            if 
self.__IsDragonSoul(itemVnum):
                
dstSlotIndex 1
            
else:
                
dstSlotIndex 0
        
        
# ºó ½½·ÔÀ̾î¾ßÇÔ.
        
if dstSlotIndex in self.refineItemInfo:
            return 
FALSE
            
        
# °*È*â¿¡ ¿Ã¸± ¼ö Àִ ¾ÆÀÌÅÛÀÎÁö °Ë»ç.
        
if FALSE == self.__CheckCanRefine(itemVnum):
            return 
FALSE
        
        
# ²ø¾î´Ù ³õÀº ¾ÆÀÌÅÛ Ä«¿îÆ®¸¸Å* ¿ø·¡ ÀÚ¸®ÀÇ ¾ÆÀÌÅÛ Ä«¿îÆ® °¨¼Ò
        
player.SetItemCount(invenTypeinvenPosmaxCount itemCount)
        
self.refineItemInfo[dstSlotIndex] = (invenTypeinvenPositemCount)
        
self.Refresh()

        return 
TRUE
    
    
# °*È* °¡´ÉÇÑ ¾ÆÀÌÅÛÀÎÁö Ã¼Å©
    # ¿ëÈ¥¼® °*È*´Â °*È* ·¹½ÃÇǸ¦ Á¤Çسõ°í ½ÃÀÛÇϴ °ÍÀÌ ¾Æ´Ï¶ó,
    # Ã³À½¿¡ °*È*â¿¡ ¿Ã¸° ¿ëÈ¥¼®¿¡ ÀÇÇØ °*È* ·¹½ÃÇǰ¡ °áÁ¤µÈ´Ù.
    # ±×·¡¼* __CanRefineGrade, __CanRefineStep, __CanRefineStrength ÇÔ¼ö¿¡¼*
    # °*È* ·¹½ÃÇǰ¡ ¾ø´Ù¸é(óÀ½ ¿Ã¸®´Â ¾ÆÀÌÅÛÀ̶ó¸é), °*È* ·¹½ÃÇǸ¦ ¼³Á¤ÇØÁִ ¿ªÇÒµµ ÇÑ´Ù.
    
def __CheckCanRefine(selfvnum):
        if 
self.REFINE_TYPE_GRADE == self.currentRefineType:
            return 
self.__CanRefineGrade(vnum)

        
elif self.REFINE_TYPE_STEP == self.currentRefineType:
            return 
self.__CanRefineStep(vnum)
                
        
elif self.REFINE_TYPE_STRENGTH == self.currentRefineType:
            return 
self.__CanRefineStrength(vnum)
                
        else:
            return 
FALSE
                
        
return TRUE

    def __CanRefineGrade 
(selfvnum):
        
ds_info self.__GetDragonSoulTypeInfo(vnum)
        
        if 
DragonSoulRefineWindow.INVALID_DRAGON_SOUL_INFO == ds_info:
            
self.__PopUp(locale.DRAGON_SOUL_IS_NOT_DRAGON_SOUL)
            return 
FALSE
            
        
if self.currentRecipe:
            
ds_typegradestepstrength ds_info
            cur_refine_ds_type
cur_refine_gradecur_refine_stepcur_refine_strength self.currentRecipe["ds_info"]
            if 
not (cur_refine_ds_type == ds_type and cur_refine_grade == grade):
                
self.__PopUp(locale.DRAGON_SOUL_INVALID_DRAGON_SOUL)
                return 
FALSE
        
# °*È* Ã¢¿¡ Ã³À½ ¾ÆÀÌÅÛÀ» ¿Ã¸®´Â °æ¿ì, °*È* Àç·á¿¡ °üÇÑ Á¤º¸°¡ ¾ø´Ù.
        # ¿ëÈ¥¼® °*È*°¡, ·¹½ÃÇǸ¦ °¡Áö°í ½ÃÀÛÇϴ °ÍÀÌ ¾Æ´Ï¶ó, °*È*â¿¡ Ã³À½ ¿Ã¸®´Â ¾ÆÀÌÅÛÀÌ ¹«¾ùÀ̳Ŀ¡ µû¶ó,
        # ¹«¾ùÀ» °*È*Çϰí, Àç·á°¡ ¹«¾ùÀÎÁö(ÀÌÇÏ ·¹½ÃÇÇ)°¡ Á¤ÇØÁø´Ù.
        # ·¹½ÃÇǰ¡ ¾ø´Ù¸é, Ã³À½ ¿Ã¸° ¾ÆÀÌÅÛÀ̶ó »ı°¢Çϰí, vnumÀ» ¹ÙÅÁÀ¸·Î ·¹½ÃÇǸ¦ ¼ÂÆÃ.
        
else:
            
self.currentRecipe self.__GetRefineGradeRecipe(vnum)

            if 
self.currentRecipe:
                
self.refineSlotLockStartIndex self.currentRecipe["need_count"]
                
self.wndMoney.SetText(locale.NumberToMoneyString(self.currentRecipe["fee"]))                
                return 
TRUE
            
else:
            
# °*È* Á¤º¸ ¼ÂÆÃ¿¡ ½ÇÆĞÇϸ頿ø± ¼ö ¾ø´Â ¾ÆÀÌÅÛÀ¸·Î ÆÇ´Ü.
                
self.__PopUp(locale.DRAGON_SOUL_CANNOT_REFINE)
                return 
FALSE

    def __CanRefineStep 
(selfvnum):
        
ds_info self.__GetDragonSoulTypeInfo(vnum)
        
        if 
DragonSoulRefineWindow.INVALID_DRAGON_SOUL_INFO == ds_info:
            
self.__PopUp(locale.DRAGON_SOUL_IS_NOT_DRAGON_SOUL)
            return 
FALSE
        
        
if self.currentRecipe:
            
ds_typegradestepstrength ds_info
            cur_refine_ds_type
cur_refine_gradecur_refine_stepcur_refine_strength self.currentRecipe["ds_info"]
            if 
not (cur_refine_ds_type == ds_type and cur_refine_grade == grade and cur_refine_step == step):
                
self.__PopUp(locale.DRAGON_SOUL_INVALID_DRAGON_SOUL)
                return 
FALSE
        
# °*È* Ã¢¿¡ Ã³À½ ¾ÆÀÌÅÛÀ» ¿Ã¸®´Â °æ¿ì, Àç·á¿¡ °üÇÑ Á¤º¸°¡ ¾ø´Ù.
        # ¿ëÈ¥¼® °*È*°¡, ·¹½ÃÇǸ¦ °¡Áö°í ½ÃÀÛÇϴ °ÍÀÌ ¾Æ´Ï¶ó, °*È*â¿¡ Ã³À½ ¿Ã¸®´Â ¾ÆÀÌÅÛÀÌ ¹«¾ùÀ̳Ŀ¡ µû¶ó,
        # ¹«¾ùÀ» °*È*Çϰí, Àç·á°¡ ¹«¾ùÀÎÁö(ÀÌÇÏ ·¹½ÃÇÇ)°¡ Á¤ÇØÁø´Ù.
        # ·¹½ÃÇǰ¡ ¾ø´Ù¸é, Ã³À½ ¿Ã¸° ¾ÆÀÌÅÛÀ̶ó »ı°¢Çϰí, vnumÀ» ¹ÙÅÁÀ¸·Î ·¹½ÃÇǸ¦ ¼ÂÆÃ.
        
else:
            
self.currentRecipe self.__GetRefineStepRecipe(vnum)

            if 
self.currentRecipe:
                
self.refineSlotLockStartIndex self.currentRecipe["need_count"]
                
self.wndMoney.SetText(locale.NumberToMoneyString(self.currentRecipe["fee"]))                
                return 
TRUE

            
else:
            
# °*È* Á¤º¸ ¼ÂÆÃ¿¡ ½ÇÆĞÇϸ頿ø± ¼ö ¾ø´Â ¾ÆÀÌÅÛÀ¸·Î ÆÇ´Ü.
                
self.__PopUp(locale.DRAGON_SOUL_CANNOT_REFINE)
                return 
FALSE

    def __CanRefineStrength 
(selfvnum):
        
# ¿ëÈ¥¼®ÀΠ°æ¿ì, ´õ ÀÌ»ó strength °*È*¸¦ ÇÒ ¼ö ¾ø´ÂÁö Ã¼Å©ÇؾßÇÔ.
        
if self.__IsDragonSoul(vnum):
            
ds_typegradestepstrength self.__GetDragonSoulTypeInfo(vnum)
            
            
import dragon_soul_refine_settings
            
if strength >= dragon_soul_refine_settings.dragon_soul_refine_info[ds_type]["strength_max_table"][grade][step]:
                
self.__PopUp(locale.DRAGON_SOUL_CANNOT_REFINE_MORE)
                return 
FALSE

            
else:
                return 
TRUE
        
        
# strength °*È*ÀÇ °æ¿ì, refine_recipe°¡ ¿ëÈ¥¼®ÀÇ Á¾·ù°¡ ¾Æ´Ñ, °*È*¼®ÀÇ Á¾·ù¿¡ µû¶ó ´Ş¶óÁø´Ù.
        # µû¶ó¼* ¿ëÈ¥¼®ÀÌ ¾Æ´Ï¶ó¸é, 
        # À̹̠·¹½ÃÇǰ¡ Àִ °æ¿ì´Â, °*È*¼®ÀÌ °*È*â¿¡ Àִٴ °ÍÀ̹ǷÎ, return FALSE
        # ·¹½ÃÇǰ¡ ¾ø´Â °æ¿ì´Â, °*È*¼®ÀÎÁö È®ÀÎÇϰí, ·¹½ÃÇǸ¦ ¼ÂÆÃÇÑ´Ù.
        
else:
            if 
self.currentRecipe:
                
self.__PopUp(locale.DRAGON_SOUL_IS_NOT_DRAGON_SOUL)
                return 
FALSE
            
else:
                
refineRecipe self.__GetRefineStrengthInfo(vnum)
                if 
refineRecipe:
                    
self.currentRecipe refineRecipe
                    self
.wndMoney.SetText(locale.NumberToMoneyString(self.currentRecipe["fee"]))
                    return 
TRUE
                
else:
                
# ·¹½ÃÇǸ¦ ¼ÂÆÃÇÒ ¼ö ¾ø´Â °æ¿ì
                    
self.__PopUp(locale.DRAGON_SOUL_NOT_DRAGON_SOUL_REFINE_STONE)
                    return 
FALSE

    def __GetRefineGradeRecipe 
(selfvnum):
        
ds_typegradestepstrength self.__GetDragonSoulTypeInfo(vnum)
        try:
            
import dragon_soul_refine_settings

            
return    {
                
"ds_info"        : (ds_typegradestepstrength),
                
"need_count"    dragon_soul_refine_settings.dragon_soul_refine_info[ds_type]["grade_need_count"][grade],
                
"fee"            dragon_soul_refine_settings.dragon_soul_refine_info[ds_type]["grade_fee"][grade]
                    }
        
except:
            return 
None

    def __GetRefineStepRecipe 
(selfvnum):
        
ds_typegradestepstrength self.__GetDragonSoulTypeInfo(vnum)
        try:
            
import dragon_soul_refine_settings
    
            
return    {
                
"ds_info"        : (ds_typegradestepstrength),
                
"need_count"    dragon_soul_refine_settings.dragon_soul_refine_info[ds_type]["step_need_count"][step],
                
"fee"            dragon_soul_refine_settings.dragon_soul_refine_info[ds_type]["step_fee"][step]
                    }
        
except:
            return 
None
        
    
# strength °*È*ÀÇ °æ¿ì, refineInfo´Â °*È*¼®¿¡ µû¶ó ´Ş¶óÁø´Ù.
    
def __GetRefineStrengthInfo (selfitemVnum):
        try:
            
# À̳ğÀÇ À§Ä¡¸¦ ¾îÂîÇÏÁö....
            # °*È*¼®ÀÌ ¾Æ´Ï¸é ¾ÈµÊ.
            
item.SelectItem(itemVnum)
            if 
not (item.ITEM_TYPE_MATERIAL == item.GetItemType() \
                    and (
item.MATERIAL_DS_REFINE_NORMAL <= item.GetItemSubType() and item.GetItemSubType() <= item.MATERIAL_DS_REFINE_HOLLY)):
                return 
None

            import dragon_soul_refine_settings
            
return { "fee" dragon_soul_refine_settings.strength_fee[item.GetItemSubType()] }
        
except:
            return 
None

    def __IsDragonSoul
(selfvnum):
        
item.SelectItem(vnum)
        return 
item.GetItemType() == item.ITEM_TYPE_DS
        
    
# ¿ëÈ¥¼® Vnum¿¡ ´ëÇÑ comment    
    # ITEM VNUMÀ» 10¸¸ ÀÚ¸®ºÎÅÍ, FEDCBA¶ó°í ÇÑ´Ù¸é
    # FE : ¿ëÈ¥¼® Á¾·ù.    D : µî±Ş
    # C : ´Ü°è            B : °*È*        
    # A : ¿©¹úÀÇ ¹øÈ£µé...     
    
def __GetDragonSoulTypeInfo(selfvnum):
        if 
not self.__IsDragonSoul(vnum):
            return 
DragonSoulRefineWindow.INVALID_DRAGON_SOUL_INFO 
        ds_type 
vnum 10000
        grade 
vnum 10000 /1000
        step 
vnum 1000 100
        strength 
vnum 100 10
        
        
return (ds_typegradestepstrength)
    
    
def __MakeDragonSoulVnum(selfds_typegradestepstrength):
        return 
ds_type 10000 grade 1000 step 100 strength 10

     
## ºó ½½·Ô ¼±ÅàEvent
    
def __SelectRefineEmptySlot(selfselectedSlotPos):
        try:
            if 
constInfo.GET_ITEM_DROP_QUESTION_DIALOG_STATUS() == 1:
                return
            
            if 
selectedSlotPos >= self.refineSlotLockStartIndex:
                return
     
            if 
mouseModule.mouseController.isAttached():
                
attachedSlotType mouseModule.mouseController.GetAttachedType()
                
attachedSlotPos mouseModule.mouseController.GetAttachedSlotNumber()
                
attachedItemCount mouseModule.mouseController.GetAttachedItemCount()
                
attachedItemIndex mouseModule.mouseController.GetAttachedItemIndex()
                
mouseModule.mouseController.DeattachObject()

                if 
uiPrivateShopBuilder.IsBuildingPrivateShop():
                    
chat.AppendChat(chat.CHAT_TYPE_INFOlocale.MOVE_ITEM_FAILURE_PRIVATE_SHOP)
                    return

                
attachedInvenType player.SlotTypeToInvenType(attachedSlotType)

                if 
player.INVENTORY == attachedInvenType and player.IsEquipmentSlot(attachedSlotPos):
                    return

                if 
player.INVENTORY != attachedInvenType and player.DRAGON_SOUL_INVENTORY != attachedInvenType:
                    return

                if 
TRUE == self.__SetItem((attachedInvenTypeattachedSlotPos), selectedSlotPosattachedItemCount):
                    
self.Refresh()

        
except Exceptione:
            
import dbg
            dbg
.TraceError("Exception : __SelectRefineEmptySlot, %s" e)

    
# Å¬¸¯À¸·Î ½½·Ô¿¡¼* »èÁ¦.
    
def __SelectRefineItemSlot(selfselectedSlotPos):
        if 
constInfo.GET_ITEM_DROP_QUESTION_DIALOG_STATUS() == 1:
            return

        try:
            if 
not selectedSlotPos in self.refineItemInfo:
                
# »õ·Î¿î ¾ÆÀÌÅÛÀ» °*È*â¿¡ ¿Ã¸®´Â ÀÛ¾÷.
                
if mouseModule.mouseController.isAttached():
                    
attachedSlotType mouseModule.mouseController.GetAttachedType()
                    
attachedSlotPos mouseModule.mouseController.GetAttachedSlotNumber()
                    
attachedItemCount mouseModule.mouseController.GetAttachedItemCount()
                    
attachedItemIndex mouseModule.mouseController.GetAttachedItemIndex()
                    
mouseModule.mouseController.DeattachObject()

                    if 
uiPrivateShopBuilder.IsBuildingPrivateShop():
                        
chat.AppendChat(chat.CHAT_TYPE_INFOlocaleInfo.MOVE_ITEM_FAILURE_PRIVATE_SHOP)
                        return

                    
attachedInvenType player.SlotTypeToInvenType(attachedSlotType)

                    if 
player.INVENTORY == attachedInvenType and player.IsEquipmentSlot(attachedSlotPos):
                        return

                    if 
player.INVENTORY != attachedInvenType and player.DRAGON_SOUL_INVENTORY != attachedInvenType:
                        return

                    
self.AutoSetItem((attachedInvenTypeattachedSlotPos), 1)
                return
            
elif mouseModule.mouseController.isAttached():
                return
 
            
attachedInvenTypeattachedSlotPosattachedItemCount self.refineItemInfo[selectedSlotPos]
            
selectedItemVnum player.GetItemIndex(attachedInvenTypeattachedSlotPos)
                
            
# °*È*â¿¡¼* »èÁ¦ ¹× ¿ø·¡ Àκ¥ÀÇ ¾ÆÀÌÅÛ Ä«¿îÆ® È¸º¹
            
invenTypeinvenPositemCount self.refineItemInfo[selectedSlotPos]
            
remainCount player.GetItemCount(invenTypeinvenPos)
            
player.SetItemCount(invenTypeinvenPosremainCount itemCount)
            
del self.refineItemInfo[selectedSlotPos]
                
            
# °*È*âÀÌ ºñ¾ú´Ù¸é, ÃʱâÈ*
            
if not self.refineItemInfo:
                
self.__Initialize()
            else:
                
item.SelectItem(selectedItemVnum)
                
# ¾ø¾Ø ¾ÆÀÌÅÛÀÌ °*È*¼®À̾ú´Ù¸é °*È* ·¹ÇǽàÃʱâÈ*
                
if (item.ITEM_TYPE_MATERIAL == item.GetItemType() \
                    and (
item.MATERIAL_DS_REFINE_NORMAL <= item.GetItemSubType() and item.GetItemSubType() <= item.MATERIAL_DS_REFINE_HOLLY)):
                    
self.currentRecipe = {}
                    
self.wndMoney.SetText(localeInfo.NumberToMoneyString(0))
                
# ¿ëÈ¥¼®À̾ú´Ù¸é, 
                # strength°*È*°¡ ¾Æ´Ñ °æ¿ì, °*È*â¿¡ ´Ù¸¥ ¿ëÈ¥¼®ÀÌ ³²¾ÆÀÖÀ¸¹Ç·Î, ·¹½ÃÇǸ¦ ÃʱâÈ*Çϸ頾ȵÊ.
                # strength°*È*ÀÇ °æ¿ì, °*È* ·¹½ÃÇǴ °*È*¼®¿¡ Á¾¼ÓµÈ °ÍÀ̹ǷΠ´Ù¸¥ Ã³¸®ÇÒ Çʿ䰡 ¾øÀ½.
                
else:
                    
pass
                    
        except Exception
e:
            
import dbg
            dbg
.TraceError("Exception : __SelectRefineItemSlot, %s" e)
        
        
self.Refresh()
    
    
def __OverInRefineItem(selfslotIndex):
        if 
self.refineItemInfo.has_key(slotIndex):
            
inven_typeinven_positem_count self.refineItemInfo[slotIndex]
            
self.tooltipItem.SetInventoryItem(inven_posinven_type)

    
def __OverInResultItem(selfslotIndex):
        if 
self.resultItemInfo.has_key(slotIndex):
            
inven_typeinven_positem_count self.resultItemInfo[slotIndex]
            
self.tooltipItem.SetInventoryItem(inven_posinven_type)
        
    
def __OverOutItem(self):
        if 
self.tooltipItem:
            
self.tooltipItem.HideToolTip()

    
def __PressDoRefineButton(self):
        for 
i in xrange(self.refineSlotLockStartIndex):
            if 
not i in self.refineItemInfo:
                
self.wndPopupDialog.SetText(locale.DRAGON_SOUL_NOT_ENOUGH_MATERIAL)
                
self.wndPopupDialog.Open()
                
                return
 
        
player.SendDragonSoulRefine(DragonSoulRefineWindow.DS_SUB_HEADER_DIC[self.currentRefineType], self.refineItemInfo)
            
    
def OnPressEscapeKey(self):
        
self.Close()
        return 
TRUE
    
    def Refresh
(self):
        
self.__RefreshRefineItemSlot()
        
self.__ClearResultItemSlot()
            
    
def __RefreshRefineItemSlot(self):
        try:
            for 
slotPos in xrange(self.wndRefineSlot.GetSlotCount()):
                
self.wndRefineSlot.ClearSlot(slotPos)
                if 
slotPos self.refineSlotLockStartIndex:
                    
# self.refineItemInfo[slotPos]ÀÇ Á¤º¸È®ÀÎ
                    # (½ÇÁ¦·Î ¾ÆÀÌÅÛÀÌ Á¸ÀçÇÏ´ÂÁö È®ÀÎ)
                    # Á¸Àç -> ¾ÆÀÌÅÛ ¾ÆÀÌÄÜÀ» ½½·Ô¿¡ ¼ÂÆÃ.
                    # ºñÁ¸Àç -> ¾ÆÀÌÅÛÀÌ ¾øÀ¸¹Ç·Î °*È*â¿¡¼* »èÁ¦.
                    
if slotPos in self.refineItemInfo:
                        
invenTypeinvenPositemCount self.refineItemInfo[slotPos]
                        
itemVnum player.GetItemIndex(invenTypeinvenPos)

                        
# if itemVnum:
                        
if itemVnum:
                            
self.wndRefineSlot.SetItemSlot(slotPosplayer.GetItemIndex(invenTypeinvenPos), itemCount)
                        else:
                            
del self.refineItemInfo[slotPos]

                    
# ºó ½½·Ô¿¡ reference ¾ÆÀÌÄÜÀ» alpha 0.5·Î ¼ÂÆÃ.
                    
if not slotPos in self.refineItemInfo:
                        try:
                            
reference_vnum 0
                            
# strength °*È*ÀÏ ¶§´Â,
                            # 0¹ø ½½·Ô¿¡ °*È*¼®À», 1¹ø ½½·Ô¿¡ ¿ëÈ¥¼®À» ³õ´Â´Ù.
                            
if DragonSoulRefineWindow.REFINE_TYPE_STRENGTH == self.currentRefineType:
                                if 
DragonSoulRefineWindow.REFINE_STONE_SLOT == slotPos:
                                    
reference_vnum 100300
                            
else:
                                
reference_vnum self.__MakeDragonSoulVnum(*self.currentRecipe["ds_info"])
                            if 
!= reference_vnum:
                                
item.SelectItem(reference_vnum)
                                
itemIcon item.GetIconImage()
                                (
widthheight) = item.GetItemSize()
                                
self.wndRefineSlot.SetSlot(slotPos0widthheightitemIcon, (1.01.01.00.5))
                                
# slot ¿ìÃø ÇÏ´Ü¿¡ ¼ıÀÚ ¶ß¸é ¾È ¿¹»İ...
                                
self.wndRefineSlot.SetSlotCount(slotPos0)
                        
except:
                            
pass
                    
# refineSlotLockStartIndex º¸´Ù ÀÛÀº ½½·ÔÀº ´İÈù À̹ÌÁö¸¦ º¸¿©Áָ頾ȵÊ.
                    
self.wndRefineSlot.HideSlotBaseImage(slotPos)
                
# slotPos >= self.refineSlotLockStartIndex:
                
else:
                    
# Á¤»óÀûÀΠ°æ¿ì¶ó¸é ÀÌ if¹®¿¡ µé¾î°¥ ÀÏÀº ¾ø°ÚÁö¸¸,
                    # (¾ÖÃÊ¿¡ À妽º°¡ refineSlotLockStartIndex ÀÌ»óÀΠ½½·Ô¿¡´Â ¾ÆÀÌÅÛÀ» ³ÖÁö ¸øÇϰԠÇ߱⠶§¹®)
                    # È¤½Ã ¸ğ¸¦ ¿¡·¯¿¡ ´ëºñÇÔ.
                    
if slotPos in self.refineItemInfo:
                        
invenTypeinvenPositemCount self.refineItemInfo[slotPos]
                        
remainCount player.GetItemCount(invenTypeinvenPos)
                        
player.SetItemCount(invenTypeinvenPosremainCount itemCount)
                        
del self.refineItemInfo[selectedSlotPos]
                    
# refineSlotLockStartIndex ÀÌ»óÀΠ½½·ÔÀº ´İÈù À̹ÌÁö¸¦ º¸¿©Áà¾ßÇÔ.
                    
self.wndRefineSlot.ShowSlotBaseImage(slotPos)
            
            
# °*È*â¿¡ ¾Æ¹«·± ¾ÆÀÌÅÛÀÌ ¾ø´Ù¸é, ÃʱâÈ*ÇØÁÜ.
            # À§¿¡¼* Áß°£ Áß°£¿¡ "del self.refineItemInfo[slotPos]"¸¦ Ç߱⠶§¹®¿¡,
            # ¿©±â¼* Çѹø Ã¼Å©ÇØÁà¾ßÇÔ.
            
if not self.refineItemInfo:
                
self.__Initialize()
 
            
self.wndRefineSlot.RefreshSlot()
        
except Exceptione:
            
import dbg
            dbg
.TraceError("Exception : __RefreshRefineItemSlot, %s" e)
    
    
def __GetEmptySlot(selfitemVnum 0):
         
# STRENGTH °*È*ÀÇ °æ¿ì, ¿ëÈ¥¼® ½½·Ô°ú °*È*¼® ½½·ÔÀÌ ±¸ºĞµÇ¾îÀÖ±â ‹š¹®¿¡
         # vnumÀ» ¾Ë¾Æ¾ß ÇÑ´Ù.
         
if DragonSoulRefineWindow.REFINE_TYPE_STRENGTH == self.currentRefineType:
             if 
== itemVnum:
                return -
1
            
            
if self.__IsDragonSoul(itemVnum):
                if 
not DragonSoulRefineWindow.DRAGON_SOUL_SLOT in self.refineItemInfo:
                    return 
DragonSoulRefineWindow.DRAGON_SOUL_SLOT
            
else:
                if 
not DragonSoulRefineWindow.REFINE_STONE_SLOT in self.refineItemInfo:
                    return 
DragonSoulRefineWindow.REFINE_STONE_SLOT
        
else:
            for 
slotPos in xrange(self.wndRefineSlot.GetSlotCount()):
                if 
not slotPos in self.refineItemInfo:
                    return 
slotPos
        
        
return -1

     def AutoSetItem
(self, (invenTypeinvenPos), itemCount):
         
itemVnum player.GetItemIndex(invenTypeinvenPos)
        
emptySlot self.__GetEmptySlot(itemVnum)
        if -
== emptySlot:
            return
        
        
self.__SetItem((invenTypeinvenPos), emptySlotitemCount)

    
def __ClearResultItemSlot(self):
        
self.wndResultSlot.ClearSlot(0)
        
self.resultItemInfo = {}
    
    
def RefineSucceed(selfinven_typeinven_pos):
        
self.__Initialize()
        
self.Refresh()
        
        
itemCount player.GetItemCount(inven_typeinven_pos)
        if 
itemCount 0:
            
self.resultItemInfo[0] = (inven_typeinven_positemCount)
            
self.wndResultSlot.SetItemSlot(0player.GetItemIndex(inven_typeinven_pos), itemCount)
    
    
def    RefineFail(selfreasoninven_typeinven_pos):
        if 
net.DS_SUB_HEADER_REFINE_FAIL == reason:
            
self.__Initialize()
            
self.Refresh()
            
itemCount player.GetItemCount(inven_typeinven_pos)
            if 
itemCount 0:
                
self.resultItemInfo[0] = (inven_typeinven_positemCount)
                
self.wndResultSlot.SetItemSlot(0player.GetItemIndex(inven_typeinven_pos), itemCount)
        else:
            
self.Refresh()

    
def SetInventoryWindows(selfwndInventorywndDragonSoul):
        
self.wndInventory wndInventory
        self
.wndDragonSoul wndDragonSoul 
Add game.py

## Inventory Suche
und fügen Sie es unter


PHP Code:
## DragonSoul
            
elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
                
self.__PutItem(attachedTypeattachedItemIndexattachedItemSlotPosattachedItemCountself.PickingCharacterIndex)
            
            
mouseModule.mouseController.DeattachObject()

        else:
            
hyperlink ui.GetHyperlink()
            if 
hyperlink:
                if 
app.IsPressed(app.DIK_LALT):
                    
link chat.GetLinkFromHyperlink(hyperlink)
                    
ime.PasteString(link)
                else:
                    
self.interface.MakeHyperlinkTooltip(hyperlink)
                return
            else:
                
player.SetMouseState(player.MBT_LEFTplayer.MBS_CLICK)

        
#player.EndMouseWalking()
        
return TRUE

    def __PutItem
(selfattachedTypeattachedItemIndexattachedItemSlotPosattachedItemCountdstChrID):
        if 
player.SLOT_TYPE_INVENTORY == attachedType or player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
            
attachedInvenType player.SlotTypeToInvenType(attachedType)
            if 
TRUE == chr.HasInstance(self.PickingCharacterIndex) and player.GetMainCharacterIndex() != dstChrID:
                if 
player.IsEquipmentSlot(attachedItemSlotPos):
                    
self.stream.popupWindow.Close()
                    
self.stream.popupWindow.Open(locale.EXCHANGE_FAILURE_EQUIP_ITEM0locale.UI_OK)
                else:
                    if 
chr.IsNPC(dstChrID):
                        
net.SendGiveItemPacket(dstChrIDattachedInvenTypeattachedItemSlotPosattachedItemCount)
                    else:
                        
net.SendExchangeStartPacket(dstChrID)
                        
net.SendExchangeItemAddPacket(attachedInvenTypeattachedItemSlotPos0)
            else:
                
self.__DropItem(attachedTypeattachedItemIndexattachedItemSlotPosattachedItemCount
Add Game.py

# END_OF_CUBE

und fügen Sie es unter

PHP Code:
# ¿ëÈ¥¼®    
    
def BINARY_Highlight_Item(selfinven_typeinven_pos):
        
self.interface.Highligt_Item(inven_typeinven_pos)
    
    
def BINARY_DragonSoulGiveQuilification(self):
        
self.interface.DragonSoulGiveQuilification()
        
    
def BINARY_DragonSoulRefineWindow_Open(self):
        
self.interface.OpenDragonSoulRefineWindow()

    
def BINARY_DragonSoulRefineWindow_RefineFail(selfreasoninven_typeinven_pos):
        
self.interface.FailDragonSoulRefine(reasoninven_typeinven_pos)

    
def BINARY_DragonSoulRefineWindow_RefineSucceed(selfinven_typeinven_pos):
        
self.interface.SucceedDragonSoulRefine(inven_typeinven_pos)
    
    
# END of DRAGON SOUL REFINE WINDOW 
Add Game.py



und fügen Sie es unter

PHP Code:
        onPressKeyDict[app.DIK_O]            = lambda self.interface.ToggleDragonSoulWindowWithNoInfo() 
Add Game.py

# UNKNOWN_UPDATE

und fügen Sie es unter

PHP Code:
def BINARY_NEW_AddAffect(selftypepointIdxvalueduration):
        
self.affectShower.BINARY_NEW_AddAffect(typepointIdxvalueduration)
        if 
chr.NEW_AFFECT_DRAGON_SOUL_DECK1 == type or chr.NEW_AFFECT_DRAGON_SOUL_DECK2 == type:
            
self.interface.DragonSoulActivate(type chr.NEW_AFFECT_DRAGON_SOUL_DECK1)
        
elif chr.NEW_AFFECT_DRAGON_SOUL_QUALIFIED == type:
            
self.BINARY_DragonSoulGiveQuilification()

    
def BINARY_NEW_RemoveAffect(selftypepointIdx):
        
self.affectShower.BINARY_NEW_RemoveAffect(typepointIdx)
        if 
chr.NEW_AFFECT_DRAGON_SOUL_DECK1 == type or chr.NEW_AFFECT_DRAGON_SOUL_DECK2 == type:
            
self.interface.DragonSoulDeactivate() 
Virüs Jotti

thank
moneywanters is offline  
Old 06/20/2013, 14:27   #26
 
.Minton™'s Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 126
Received Thanks: 118
Quote:
Originally Posted by moneywanters View Post
thank
bitte
.Minton™ is offline  
Old 06/20/2013, 14:31   #27
 
elite*gold: 0
Join Date: Jan 2012
Posts: 166
Received Thanks: 71
very nice thank you
bakam321 is offline  
Old 06/20/2013, 14:58   #28

 
Ocelot2606's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 4,086
Received Thanks: 3,786
Warum sagen alle Danke? Jeder Depp kann sich das ausm DE Clienten ziehen. Ich würds ja verstehen wenn es funktionieren würde da es dies aber nicht tut versteh ich die Danksagungen hier gar nicht xD
Ocelot2606 is offline  
Thanks
3 Users
Old 06/20/2013, 15:03   #29
 
elite*gold: 5
Join Date: Mar 2013
Posts: 1,986
Received Thanks: 2,254
Quote:
Originally Posted by Ocelot2606 View Post
Warum sagen alle Danke? Jeder Depp kann sich das ausm DE Clienten ziehen. Ich würds ja verstehen wenn es funktionieren würde da es dies aber nicht tut versteh ich die Danksagungen hier gar nicht xD
So siehts aus... Dazu hat er ganz andere sachen rausgezogen, alles was man braucht ist der Cubepart in der game.py, uicube.py, teile in ui.py, costumewindow.py cubreresultwindow.py. Ich glaube es fehlt bei der aufzählung noch was fällt mir gerade nicht ein. Dazu wie sie schreiben ihr braucht ne neue binary 36k ist die höchste für pServer
xGr33n is offline  
Old 06/20/2013, 16:28   #30
 
DasSchwarzeT's Avatar
 
elite*gold: 399
Join Date: Sep 2011
Posts: 5,323
Received Thanks: 3,937
Gibt es das hier wirklich auf DE?? Sorry, spiele kein .DE
DasSchwarzeT is offline  
Reply


Similar Threads Similar Threads
[B] Crafting System
01/27/2013 - Metin2 PServer Guides & Strategies - 19 Replies
Metin2 Pserver Crafting System - YouTube Angebote!! Hier die Formeln: 5 Craft Sand's = 1 Rohdiamant Rohdiamant + Diamanthammer = Diamant Diamant + Diamanthammer+ = Smaragt Perle + Gravurhammer = Gravierte Perle
[Official Release]Prime-SRO - New server files! - Latest job system! - Elite team!
03/20/2012 - SRO PServer Advertising - 97 Replies
http://img221.imageshack.us/img221/116/dasdsav.png http://img46.imageshack.us/img46/6150/descrf.png Welcome e*pvpers! Recently we have seen that none of the current servers are hosting a Silkroad server the way it should be one,therefore we have decided to open the best private server that you have ever seen. With the elite of pSRO server scene we've come up with a private server with the most custom stuff you have ever experienced that we have achieved on the newest vSRO server...
frage: crafting system
06/18/2011 - Last Chaos - 2 Replies
hallo ich spiele auf lc ger und habe ein paar fragen bezüglich des craftingsystems. wie viele taschen braucht man insgesamt, um das maximale herstellungslvl zu erreichen? droppen die taschen bei allen mobs in mooraska, also auch kapelle und altar? was sind die besten ercraftbaren teile für den ns, außer die 30% cast hose?
Crafting System
03/20/2011 - Last Chaos - 3 Replies
Hi mhh hab mal ne Frage Hat jemand einen deutschen Guide oder sowas ähnliches wo dieses Crafting System erklärt wird. Ich weiß es gibt einen englischen aber aus dem werd ich nich so ganz schlau :( Deswegen frag ich Einfachmal ob einer einen deutschen hat oder vorhat einen zu schreiben wäre echt mega nice :) Mfg Maxienne
Mythos - News zum Crafting System !
12/09/2010 - User Submitted News - 11 Replies
Als ich zum ersten mal den Untertitel dieses Spieles gelesen hab, war ich nur noch glücklich. Hack n Slay MMO ? Das würde so ziemlich alle meine Wünsche der letzten Jahre erfüllen. Daher werde ich euch jetzt immer über dieses Spiel auf dem laufendem halten ;) Es wurden Infos zum crafting System bekannt gemacht ! Ein einzigartiges System : Die Items, die man sich hart mit seiner Gruppe in zahlreichen Instanzen erkämpft hat, kann man verwenden um mächtige neue Items zu kreieren. Dabei...



All times are GMT +1. The time now is 01:28.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.