Jump to content

Cube System don´t show items


Recommended Posts

Just now, TheEnd said:

I did not understand but
I am Waiting

make backup file from cube.txt
and try this
 

Spoiler

section
npc    20383
item    3145    1
item    30504    10
item    30508    10
reward    3190    1
percent    50
end


section
npc    20383
item    3146    1
item    30504    10
item    30508    10
reward    3190    1
percent    60
end


section
npc    20383
item    3147    1
item    30504    10
item    30508    10
reward    3190    1
percent    70
end


section
npc    20383
item    3148    1
item    30504    10
item    30508    10
reward    3190    1
percent    80
end


section
npc    20383
item    3149    1
item    30504    10
item    30508    10
reward    3190    1
percent    90
end


section
npc    20383
item    5105    1
item    30507    10
item    30503    10
reward    53440    1
percent    50
end


section
npc    20383
item    5106    1
item    30507    10
item    30503    10
reward    53440    1
percent    60
end


section
npc    20383
item    5107    1
item    30507    10
item    30503    10
reward    53440    1
percent    70
end


section
npc    20383
item    5108    1
item    30507    10
item    30503    10
reward    53440    1
percent    80
end


section
npc    20383
item    5109    1
item    30507    10
item    30503    10
reward    53440    1
percent    90
end


section
npc    20383
item    7145    1
item    30504    10
item    30506    10
reward    7370    1
percent    50
end


section
npc    20383
item    7146    1
item    30504    10
item    30506    10
reward    7370    1
percent    60
end


section
npc    20383
item    7147    1
item    30504    10
item    30506    10
reward    7370    1
percent    70
end


section
npc    20383
item    7148    1
item    30504    10
item    30506    10
reward    7370    1
percent    80
end


section
npc    20383
item    7149    1
item    30504    10
item    30506    10
reward    7370    1
percent    90
end

 

Spoiler

and tell me what are happened don't forget make reboot :D

 

787292068_Nvtelen.png.6faa7b0bbb3398fd29

Link to comment
Share on other sites

9 hours ago, [007]DawisHU said:

make backup file from cube.txt
and try this
 

  Hide contents

section
npc    20383
item    3145    1
item    30504    10
item    30508    10
reward    3190    1
percent    50
end


section
npc    20383
item    3146    1
item    30504    10
item    30508    10
reward    3190    1
percent    60
end


section
npc    20383
item    3147    1
item    30504    10
item    30508    10
reward    3190    1
percent    70
end


section
npc    20383
item    3148    1
item    30504    10
item    30508    10
reward    3190    1
percent    80
end


section
npc    20383
item    3149    1
item    30504    10
item    30508    10
reward    3190    1
percent    90
end


section
npc    20383
item    5105    1
item    30507    10
item    30503    10
reward    53440    1
percent    50
end


section
npc    20383
item    5106    1
item    30507    10
item    30503    10
reward    53440    1
percent    60
end


section
npc    20383
item    5107    1
item    30507    10
item    30503    10
reward    53440    1
percent    70
end


section
npc    20383
item    5108    1
item    30507    10
item    30503    10
reward    53440    1
percent    80
end


section
npc    20383
item    5109    1
item    30507    10
item    30503    10
reward    53440    1
percent    90
end


section
npc    20383
item    7145    1
item    30504    10
item    30506    10
reward    7370    1
percent    50
end


section
npc    20383
item    7146    1
item    30504    10
item    30506    10
reward    7370    1
percent    60
end


section
npc    20383
item    7147    1
item    30504    10
item    30506    10
reward    7370    1
percent    70
end


section
npc    20383
item    7148    1
item    30504    10
item    30506    10
reward    7370    1
percent    80
end


section
npc    20383
item    7149    1
item    30504    10
item    30506    10
reward    7370    1
percent    90
end

 

  Hide contents

and tell me what are happened don't forget make reboot :D

 

Did not work :(  The same problem

Link to comment
Share on other sites

5 minutes ago, TheEnd said:

Did not work :(  The same problem

Spoiler

Try this
 

Spoiler

section
npc    20383
item    155    1
item    30503    10
item    30502    10
reward    470    1
percent    50
end


section
npc    20383
item    156    1
item    30503    10
item    30502    10
reward    470    1
percent    60
end


section
npc    20383
item    157    1
item    30503    10
item    30502    10
reward    470    1
percent    70
end


section
npc    20383
item    158    1
item    30503    10
item    30502    10
reward    470    1
percent    80
end


section
npc    20383
item    159    1
item    30503    10
item    30502    10
reward    470    1
percent    90
end


section
npc    20383
item    1105    1
item    30507    10
item    30506    10
reward    1340    1
percent    50
end


section
npc    20383
item    1106    1
item    30507    10
item    30506    10
reward    1340    1
percent    60
end


section
npc    20383
item    1107    1
item    30507    10
item    30506    10
reward    1340    1
percent    70
end


section
npc    20383
item    1108    1
item    30507    10
item    30506    10
reward    1340    1
percent    80
end


section
npc    20383
item    1109    1
item    30507    10
item    30506    10
reward    1340    1
percent    90
end


section
npc    20383
item    2145    1
item    30501    10
item    30506    10
reward    2370    1
percent    50
end


section
npc    20383
item    2146    1
item    30501    10
item    30506    10
reward    2370    1
percent    60
end


section
npc    20383
item    2147    1
item    30501    10
item    30506    10
reward    2370    1
percent    70
end


section
npc    20383
item    2148    1
item    30501    10
item    30506    10
reward    2370    1
percent    80
end


section
npc    20383
item    2149    1
item    30501    10
item    30506    10
reward    2370    1
percent    90
end

 

 

 

Spoiler

Now we try found what are broken recipe ;)

 

787292068_Nvtelen.png.6faa7b0bbb3398fd29

Link to comment
Share on other sites

9 hours ago, [007]DawisHU said:
  Hide contents

Try this
 

  Hide contents

section
npc    20383
item    155    1
item    30503    10
item    30502    10
reward    470    1
percent    50
end


section
npc    20383
item    156    1
item    30503    10
item    30502    10
reward    470    1
percent    60
end


section
npc    20383
item    157    1
item    30503    10
item    30502    10
reward    470    1
percent    70
end


section
npc    20383
item    158    1
item    30503    10
item    30502    10
reward    470    1
percent    80
end


section
npc    20383
item    159    1
item    30503    10
item    30502    10
reward    470    1
percent    90
end


section
npc    20383
item    1105    1
item    30507    10
item    30506    10
reward    1340    1
percent    50
end


section
npc    20383
item    1106    1
item    30507    10
item    30506    10
reward    1340    1
percent    60
end


section
npc    20383
item    1107    1
item    30507    10
item    30506    10
reward    1340    1
percent    70
end


section
npc    20383
item    1108    1
item    30507    10
item    30506    10
reward    1340    1
percent    80
end


section
npc    20383
item    1109    1
item    30507    10
item    30506    10
reward    1340    1
percent    90
end


section
npc    20383
item    2145    1
item    30501    10
item    30506    10
reward    2370    1
percent    50
end


section
npc    20383
item    2146    1
item    30501    10
item    30506    10
reward    2370    1
percent    60
end


section
npc    20383
item    2147    1
item    30501    10
item    30506    10
reward    2370    1
percent    70
end


section
npc    20383
item    2148    1
item    30501    10
item    30506    10
reward    2370    1
percent    80
end


section
npc    20383
item    2149    1
item    30501    10
item    30506    10
reward    2370    1
percent    90
end

 

 

 

  Hide contents

Now we try found what are broken recipe ;)

 

The same problem :(:( 

Link to comment
Share on other sites

14 minutes ago, Red said:

Can you share it ?

yes


 

Spoiler

Root folder / Game.py

 

Spoiler

    def Open(self):
#Almost in the end add this

        # START_GAME_ERROR_EXIT
        try:
            self.StartGame()
        except:
            import exception
            exception.Abort("GameWindow.Open")
        # END_OF_START_GAME_ERROR_EXIT

        self.cubeInformation = {}
        self.currentCubeNPC = 0
        

 

Spoiler

    def __BuildKeyDict(self):
        # CUBE_TEST
        #onPressKeyDict[app.DIK_K]            = lambda : self.interface.OpenCubeWindow()
        # CUBE_TEST_END


 

Spoiler

Search

    def Gift_Show(self):
        self.interface.ShowGift()


after add this
 

Spoiler


    # CUBE by xGr33n & Lordechen
    def BINARY_Cube_Open(self):
        #constInfo.CRAFTING_NPC_ID_OLD = constInfo.CRAFTING_NPC_ID
        self.interface.OpenCubeWindow()

        
        #if constInfo.CRAFTING_NPC_ID != constInfo.CRAFTING_NPC_ID_OLD:
        self.BINARY_Cube_ResultList()
        self.BINARY_Cube_MaterialInfo()
        self.interface.wndCube.Refresh()
        #constInfo.CRAFTING_NPC_ID_OLD = constInfo.CRAFTING_NPC_ID
        #else:
        #    cubeInfoList = self.cubeInformation[constInfo.CRAFTING_NPC_ID]
        #    
        #    i = 0
        #    for cubeInfo in cubeInfoList:                                
        #        self.interface.wndCube.AddCubeResultItem(cubeInfo["vnum"], cubeInfo["count"])
        #        
        #        j = 0                
        #        for materialList in cubeInfo["materialList"]:
        #            for materialInfo in materialList:
        #                itemVnum, itemCount = materialInfo
        #                self.interface.wndCube.AddMaterialInfo(i, j, itemVnum, itemCount)
        #            j = j + 1                        
        #                
        #        i = i + 1
        #        
        #    self.interface.wndCube.AddMaterialInfo(i, j, itemVnum, itemCount)
        #    self.interface.wndCube.Refresh()

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

    # 제작에 필요한 골드, 예상되는 완성품의 VNUM과 개수 정보 update
    def BINARY_Cube_UpdateInfo(self, gold, itemVnum, count):
        self.interface.UpdateCubeInfo(gold, itemVnum, count)
        
    def BINARY_Cube_Succeed(self, itemVnum, count):
        print "큐브 제작 성공"
        self.interface.SucceedCubeWork(itemVnum, count)
        pass

    def BINARY_Cube_Failed(self):
        print "큐브 제작 실패"
        self.interface.FailedCubeWork()
        pass

    def BINARY_Cube_ResultList(self):
        # ResultList Text Format : 72723,1/72725,1/72730.1/50001,5  이런식으로 "/" 문자로 구분된 리스트를 줌
        #print listText
        listText = constInfo.CRAFTING_RESULT
        self.cubeInformation[constInfo.CRAFTING_NPC_ID] = []
        
        try:
            for eachInfoText in listText.split("/"):
                eachInfo = eachInfoText.split(",")
                itemVnum    = int(eachInfo[0])
                itemCount    = int(eachInfo[1])

                self.cubeInformation[constInfo.CRAFTING_NPC_ID].append({"vnum": itemVnum, "count": itemCount})
                self.interface.wndCube.AddCubeResultItem(itemVnum, itemCount)
            
            resultCount = len(self.cubeInformation[constInfo.CRAFTING_NPC_ID])
            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" % (i * requestCount, requestCount))
                
            if 0 < modCount:
                #print("/cube r_info %d %d" % (splitCount * requestCount, modCount))                
                net.SendChatPacket("/cube r_info %d %d" % (splitCount * requestCount, modCount))

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

            
            
            eachResultList = listText.split("@")

            
            cubeInfo = self.cubeInformation[constInfo.CRAFTING_NPC_ID]            
            
            itemIndex = 0
            for eachResultText in eachResultList:
                cubeInfo[startIndex + itemIndex]["materialList"] = [[], [], [], [], []]
                materialList = cubeInfo[startIndex + itemIndex]["materialList"]
                
                gold = 0
                splitResult = eachResultText.split("/")
                if 1 < len(splitResult):
                    gold = int(splitResult[1])
                    
                #print "splitResult : ", splitResult
                eachMaterialList = splitResult[0].split("&")
                
                i = 0
                for eachMaterialText in eachMaterialList:
                    complicatedList = eachMaterialText.split("|")
                    
                    if 0 < len(complicatedList):
                        for complicatedText in complicatedList:
                            (itemVnum, itemCount) = complicatedText.split(",")
                            itemVnum = int(itemVnum)
                            itemCount = int(itemCount)
                            self.interface.wndCube.AddMaterialInfo(itemIndex + startIndex, i, itemVnum, itemCount)
                            
                            materialList.append((itemVnum, itemCount))
                            
                    else:
                        itemVnum, itemCount = eachMaterialText.split(",")
                        itemVnum = int(itemVnum)
                        itemCount = int(itemCount)
                        self.interface.wndCube.AddMaterialInfo(itemIndex + startIndex, i, itemVnum, itemCount)
                        
                        materialList.append((itemVnum, itemCount))
                        
                    i = i + 1
                    
                    
                    
                itemIndex = itemIndex + 1
                
            #self.interface.wndCube.Refresh()
            
            self.interface.wndCube.SetScrollStep(itemIndex)
        except RuntimeError, msg:
            dbg.TraceError(msg)
            return 0
            
        pass
    
    # END_OF_CUBE 

 

Spoiler

Search
    def __ServerCommand_Build(self):
        serverCommandList={
#Add this
 

Spoiler

            # Craftingsystem by xGr33n & Apo
            "cube_npc_id"                        : self.CraftingCube1,
            "cs_result"                            : self.CraftingResult,
            "cs_need"                            : self.CraftingNeed,
            # Craftingsystem Ende 

 

Game.py end
 

Spoiler

    # Craftingsystem von xGr33n & Apo
    def CraftingCube1(self, npcVNUM):
        constInfo.CRAFTING_NPC_ID = int(npcVNUM)
    def CraftingResult(self, list):
        constInfo.CRAFTING_RESULT = str(list)
    def CraftingNeed(self, list):
        constInfo.CRAFTING_NEED = str(list)
    # Craftingsystem Ende

Spoiler

Server Side
Cube.quest
 

Spoiler

quest cube begin
    state start begin
        function cube_open(vnum)
            local cube_results = {
                [20018] = "50801,1/50802,1/50803,100/50804,100",
                [20017] = "50801,1/50802,1/50803,100/50804,100/50813,1/50814,1/50815,100/50816,100",
                [20022] = "50801,1/50802,1/50803,100/50804,100/50813,1/50814,1/50815,100/50816,100/50817,1/50818,1/50819,1/50820,1/50821,10/50822,10/50823,10/50824,10/50825,10/50826,10",
                [20383] = "17500,1/16500,1/14500,1/17520,1/16520,1/14520,1/17540,1/16540,1/14540,1/17560,1/16560,1/14560,1",
                [203832] = "460,1/470,1/1340,1/2370,1/3190,1/7370,1/5340,1/20000,1/20250,1/20500,1/20750,1",
                [20019] = "20,1/30,1/40,1/50,1/60,1/70,1"
                
            }
            local cube_needs = {
                [20018] = "50721,1@50722,1@50723,1@50724,1",
                [20017] = "50721,1@50722,1@50723,1@50724,1@50801,1&50725,1@50802,1&50725,1@50803,100&50726,1@50804,100&50726,1",
                [20022] = "50721,1@50722,1@50723,1@50724,1@50801,1&50725,1@50802,1&50725,1@50803,100&50726,1@50804,100&50726,1@50813,1&50727,1@50814,1&50727,1@50815,100&50728,1@50816,100&50728,1@50901,10&50814,20@50901,10&50813,20@50901,10&50820,20@50901,10&50819,20@50901,10&50817,20@50901,10&50818,20",
                [20383] = "50635,1&30501,10&30521,10@50635,1&30501,10&30519,10@50635,1&30518,10&30523,10@50636,1&30501,10&30523,10@50636,1&30519,10&30521,10@50636,1&30518,10&30522,10@50637,1&30518,10&30520,10@50637,1&30519,10&30522,10@50637,1&30518,10&30519,10@50638,1&30520,10&30522,10@50638,1&30519,10&30521,10@50638,1&30518,10&30521,10",
                [203832] = "149,1&30505,10&30500,10@159,1&30503,10&30502,10@1109,1&30507,10&30506,10@2149,1&30520,10&30506,10@3149,1&30504,10&30508,10@7149,1&30504,10&30508,10@5109,1&30507,10&30503,10@11299,1&30509,10&30514,10@11499,1&30512,10&30517,10@11699,1&30515,10&30511,10@11899,1&30509,10&30517,10",
                [20019] = "19,1@29,1@39,1@49,1@59,1@69,1"
                
            }
            cmdchat("cube_npc_id "..vnum)
            cmdchat("cs_result "..cube_results[vnum])
            cmdchat("cs_need "..cube_needs[vnum])
            command("cube open")
        end
        
        when login with pc.is_gm() begin
            command("r")
        end
        
        when 20019.chat."Fegyver fejlesztés lvl30-ig" begin
            say_title(mob_name(20019)..":")
            say(" ")
            say("Hello, hogy vagy?")
            say("Érdekel talán a különböző tárgyak előállítása?")
            say("Én tudok segíteni.")
            say(" ")
            wait()
            setskin(NOWINDOW)
            cube.cube_open(20019)
        end

        when 20383.chat."Fegyver és vért fejlesztés" with pc.level >= 90 and game.get_event_flag("cubelezaras") == 0 begin
            say_title(mob_name(20383)..":")
            say(" ")
            say("Hello, hogy vagy?")
            say("Érdekel talán a különböző tárgyak előállítása?")
            say("Én tudok segíteni,")
            say("De az új tárgyba nem kerül át a régi optjai!")
            say(" ")
            say_reward("Vigyázz! A sikeresség esélye 90%!")
            wait()
            setskin(NOWINDOW)
            cube.cube_open(203832)
        end
        
        when 20383.chat."Ékszer fejlesztés" with pc.level >= 90 and game.get_event_flag("cubelezaras") == 0 begin
            say_title(mob_name(20383)..":")
            say(" ")
            say("Hello, hogy vagy?")
            say("Érdekel talán a különböző tárgyak előállítása?")
            say("Én tudok segíteni.")
            say(" ")
            say_reward("Vigyázz! A sikeresség esélye 50%!")
            wait()
            setskin(NOWINDOW)
            cube.cube_open(npc.get_race())
        end
        
        when 20018.chat."Gyógynövény tan" with pc.level >= 15 begin
            say_title(mob_name(20018)..":")
            say(" ")
            say("Hello, hogy vagy?")
            say("Érdekel talán a különböző italok előállítása,")
            say("amik megerősíteni, vagy gyógyítani tudnak téged?")
            say("Én orvosként az italkeveréssel foglalkozok.")
            say("Kitaláltam néhány receptet. Ki akarod őket")
            say("próbálni?")
            say(" ")
            wait()
            setskin(NOWINDOW)
            cube.cube_open(npc.get_race())
        end

        when 20017.chat."Gyógynövény tan" with pc.level >= 30 begin
            say_title(mob_name(20017)..":")
            say(" ")
            say("Mostanában eléggé híres lett a gyógynövény tan.")
            say("Érdekel? Megmutatom néhány receptem, nagyon")
            say("hasznosak a különböző jól ismert erősebb")
            say("bájitalok előállításánál.")
            say(" ")
            wait()
            setskin(NOWINDOW)
            cube.cube_open(npc.get_race())
        end

        when 20022.chat."Titkos recept" with pc.level >=45 begin
            say(" ")
            say_title(mob_name(20022)..":")
            say("Találtam egy titkos családi receptet.")
            say("Ezzel szinte sebezhetetlen vagy!")
            say("Hahaha!")
            say("Állítólag én vagyok az egyetlen, aki ezt ismeri.")
            say("Ezekkel az italokkal szinte semmi rossz nem")
            say("történhet veled.")
            say("Ki akarod próbálni?")
            say(" ")
            wait()
            setskin(NOWINDOW)
            cube.cube_open(npc.get_race())
        end
    end
end

OR
here

 

 

elite*******.com blocked :(

787292068_Nvtelen.png.6faa7b0bbb3398fd29

Link to comment
Share on other sites

9 hours ago, Red said:

Can you share it ?


Try it and give me news
 

9 hours ago, [007]DawisHU said:

yes


 

  Hide contents

Root folder / Game.py

 

  Reveal hidden contents

    def Open(self):
#Almost in the end add this

        # START_GAME_ERROR_EXIT
        try:
            self.StartGame()
        except:
            import exception
            exception.Abort("GameWindow.Open")
        # END_OF_START_GAME_ERROR_EXIT

        self.cubeInformation = {}
        self.currentCubeNPC = 0
        

 

  Reveal hidden contents

    def __BuildKeyDict(self):
        # CUBE_TEST
        #onPressKeyDict[app.DIK_K]            = lambda : self.interface.OpenCubeWindow()
        # CUBE_TEST_END


 

  Reveal hidden contents

Search

    def Gift_Show(self):
        self.interface.ShowGift()


after add this
 

  Reveal hidden contents


    # CUBE by xGr33n & Lordechen
    def BINARY_Cube_Open(self):
        #constInfo.CRAFTING_NPC_ID_OLD = constInfo.CRAFTING_NPC_ID
        self.interface.OpenCubeWindow()

        
        #if constInfo.CRAFTING_NPC_ID != constInfo.CRAFTING_NPC_ID_OLD:
        self.BINARY_Cube_ResultList()
        self.BINARY_Cube_MaterialInfo()
        self.interface.wndCube.Refresh()
        #constInfo.CRAFTING_NPC_ID_OLD = constInfo.CRAFTING_NPC_ID
        #else:
        #    cubeInfoList = self.cubeInformation[constInfo.CRAFTING_NPC_ID]
        #    
        #    i = 0
        #    for cubeInfo in cubeInfoList:                                
        #        self.interface.wndCube.AddCubeResultItem(cubeInfo["vnum"], cubeInfo["count"])
        #        
        #        j = 0                
        #        for materialList in cubeInfo["materialList"]:
        #            for materialInfo in materialList:
        #                itemVnum, itemCount = materialInfo
        #                self.interface.wndCube.AddMaterialInfo(i, j, itemVnum, itemCount)
        #            j = j + 1                        
        #                
        #        i = i + 1
        #        
        #    self.interface.wndCube.AddMaterialInfo(i, j, itemVnum, itemCount)
        #    self.interface.wndCube.Refresh()

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

    # 제작에 필요한 골드, 예상되는 완성품의 VNUM과 개수 정보 update
    def BINARY_Cube_UpdateInfo(self, gold, itemVnum, count):
        self.interface.UpdateCubeInfo(gold, itemVnum, count)
        
    def BINARY_Cube_Succeed(self, itemVnum, count):
        print "큐브 제작 성공"
        self.interface.SucceedCubeWork(itemVnum, count)
        pass

    def BINARY_Cube_Failed(self):
        print "큐브 제작 실패"
        self.interface.FailedCubeWork()
        pass

    def BINARY_Cube_ResultList(self):
        # ResultList Text Format : 72723,1/72725,1/72730.1/50001,5  이런식으로 "/" 문자로 구분된 리스트를 줌
        #print listText
        listText = constInfo.CRAFTING_RESULT
        self.cubeInformation[constInfo.CRAFTING_NPC_ID] = []
        
        try:
            for eachInfoText in listText.split("/"):
                eachInfo = eachInfoText.split(",")
                itemVnum    = int(eachInfo[0])
                itemCount    = int(eachInfo[1])

                self.cubeInformation[constInfo.CRAFTING_NPC_ID].append({"vnum": itemVnum, "count": itemCount})
                self.interface.wndCube.AddCubeResultItem(itemVnum, itemCount)
            
            resultCount = len(self.cubeInformation[constInfo.CRAFTING_NPC_ID])
            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" % (i * requestCount, requestCount))
                
            if 0 < modCount:
                #print("/cube r_info %d %d" % (splitCount * requestCount, modCount))                
                net.SendChatPacket("/cube r_info %d %d" % (splitCount * requestCount, modCount))

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

            
            
            eachResultList = listText.split("@")

            
            cubeInfo = self.cubeInformation[constInfo.CRAFTING_NPC_ID]            
            
            itemIndex = 0
            for eachResultText in eachResultList:
                cubeInfo[startIndex + itemIndex]["materialList"] = [[], [], [], [], []]
                materialList = cubeInfo[startIndex + itemIndex]["materialList"]
                
                gold = 0
                splitResult = eachResultText.split("/")
                if 1 < len(splitResult):
                    gold = int(splitResult[1])
                    
                #print "splitResult : ", splitResult
                eachMaterialList = splitResult[0].split("&")
                
                i = 0
                for eachMaterialText in eachMaterialList:
                    complicatedList = eachMaterialText.split("|")
                    
                    if 0 < len(complicatedList):
                        for complicatedText in complicatedList:
                            (itemVnum, itemCount) = complicatedText.split(",")
                            itemVnum = int(itemVnum)
                            itemCount = int(itemCount)
                            self.interface.wndCube.AddMaterialInfo(itemIndex + startIndex, i, itemVnum, itemCount)
                            
                            materialList.append((itemVnum, itemCount))
                            
                    else:
                        itemVnum, itemCount = eachMaterialText.split(",")
                        itemVnum = int(itemVnum)
                        itemCount = int(itemCount)
                        self.interface.wndCube.AddMaterialInfo(itemIndex + startIndex, i, itemVnum, itemCount)
                        
                        materialList.append((itemVnum, itemCount))
                        
                    i = i + 1
                    
                    
                    
                itemIndex = itemIndex + 1
                
            #self.interface.wndCube.Refresh()
            
            self.interface.wndCube.SetScrollStep(itemIndex)
        except RuntimeError, msg:
            dbg.TraceError(msg)
            return 0
            
        pass
    
    # END_OF_CUBE 

 

  Reveal hidden contents

Search
    def __ServerCommand_Build(self):
        serverCommandList={
#Add this
 

  Reveal hidden contents

            # Craftingsystem by xGr33n & Apo
            "cube_npc_id"                        : self.CraftingCube1,
            "cs_result"                            : self.CraftingResult,
            "cs_need"                            : self.CraftingNeed,
            # Craftingsystem Ende 

 

Game.py end
 

  Reveal hidden contents

    # Craftingsystem von xGr33n & Apo
    def CraftingCube1(self, npcVNUM):
        constInfo.CRAFTING_NPC_ID = int(npcVNUM)
    def CraftingResult(self, list):
        constInfo.CRAFTING_RESULT = str(list)
    def CraftingNeed(self, list):
        constInfo.CRAFTING_NEED = str(list)
    # Craftingsystem Ende

  Hide contents

Server Side
Cube.quest
 

  Hide contents

quest cube begin
    state start begin
        function cube_open(vnum)
            local cube_results = {
                [20018] = "50801,1/50802,1/50803,100/50804,100",
                [20017] = "50801,1/50802,1/50803,100/50804,100/50813,1/50814,1/50815,100/50816,100",
                [20022] = "50801,1/50802,1/50803,100/50804,100/50813,1/50814,1/50815,100/50816,100/50817,1/50818,1/50819,1/50820,1/50821,10/50822,10/50823,10/50824,10/50825,10/50826,10",
                [20383] = "17500,1/16500,1/14500,1/17520,1/16520,1/14520,1/17540,1/16540,1/14540,1/17560,1/16560,1/14560,1",
                [203832] = "460,1/470,1/1340,1/2370,1/3190,1/7370,1/5340,1/20000,1/20250,1/20500,1/20750,1",
                [20019] = "20,1/30,1/40,1/50,1/60,1/70,1"
                
            }
            local cube_needs = {
                [20018] = "50721,1@50722,1@50723,1@50724,1",
                [20017] = "50721,1@50722,1@50723,1@50724,1@50801,1&50725,1@50802,1&50725,1@50803,100&50726,1@50804,100&50726,1",
                [20022] = "50721,1@50722,1@50723,1@50724,1@50801,1&50725,1@50802,1&50725,1@50803,100&50726,1@50804,100&50726,1@50813,1&50727,1@50814,1&50727,1@50815,100&50728,1@50816,100&50728,1@50901,10&50814,20@50901,10&50813,20@50901,10&50820,20@50901,10&50819,20@50901,10&50817,20@50901,10&50818,20",
                [20383] = "50635,1&30501,10&30521,10@50635,1&30501,10&30519,10@50635,1&30518,10&30523,10@50636,1&30501,10&30523,10@50636,1&30519,10&30521,10@50636,1&30518,10&30522,10@50637,1&30518,10&30520,10@50637,1&30519,10&30522,10@50637,1&30518,10&30519,10@50638,1&30520,10&30522,10@50638,1&30519,10&30521,10@50638,1&30518,10&30521,10",
                [203832] = "149,1&30505,10&30500,10@159,1&30503,10&30502,10@1109,1&30507,10&30506,10@2149,1&30520,10&30506,10@3149,1&30504,10&30508,10@7149,1&30504,10&30508,10@5109,1&30507,10&30503,10@11299,1&30509,10&30514,10@11499,1&30512,10&30517,10@11699,1&30515,10&30511,10@11899,1&30509,10&30517,10",
                [20019] = "19,1@29,1@39,1@49,1@59,1@69,1"
                
            }
            cmdchat("cube_npc_id "..vnum)
            cmdchat("cs_result "..cube_results[vnum])
            cmdchat("cs_need "..cube_needs[vnum])
            command("cube open")
        end
        
        when login with pc.is_gm() begin
            command("r")
        end
        
        when 20019.chat."Fegyver fejlesztés lvl30-ig" begin
            say_title(mob_name(20019)..":")
            say(" ")
            say("Hello, hogy vagy?")
            say("Érdekel talán a különböző tárgyak előállítása?")
            say("Én tudok segíteni.")
            say(" ")
            wait()
            setskin(NOWINDOW)
            cube.cube_open(20019)
        end

        when 20383.chat."Fegyver és vért fejlesztés" with pc.level >= 90 and game.get_event_flag("cubelezaras") == 0 begin
            say_title(mob_name(20383)..":")
            say(" ")
            say("Hello, hogy vagy?")
            say("Érdekel talán a különböző tárgyak előállítása?")
            say("Én tudok segíteni,")
            say("De az új tárgyba nem kerül át a régi optjai!")
            say(" ")
            say_reward("Vigyázz! A sikeresség esélye 90%!")
            wait()
            setskin(NOWINDOW)
            cube.cube_open(203832)
        end
        
        when 20383.chat."Ékszer fejlesztés" with pc.level >= 90 and game.get_event_flag("cubelezaras") == 0 begin
            say_title(mob_name(20383)..":")
            say(" ")
            say("Hello, hogy vagy?")
            say("Érdekel talán a különböző tárgyak előállítása?")
            say("Én tudok segíteni.")
            say(" ")
            say_reward("Vigyázz! A sikeresség esélye 50%!")
            wait()
            setskin(NOWINDOW)
            cube.cube_open(npc.get_race())
        end
        
        when 20018.chat."Gyógynövény tan" with pc.level >= 15 begin
            say_title(mob_name(20018)..":")
            say(" ")
            say("Hello, hogy vagy?")
            say("Érdekel talán a különböző italok előállítása,")
            say("amik megerősíteni, vagy gyógyítani tudnak téged?")
            say("Én orvosként az italkeveréssel foglalkozok.")
            say("Kitaláltam néhány receptet. Ki akarod őket")
            say("próbálni?")
            say(" ")
            wait()
            setskin(NOWINDOW)
            cube.cube_open(npc.get_race())
        end

        when 20017.chat."Gyógynövény tan" with pc.level >= 30 begin
            say_title(mob_name(20017)..":")
            say(" ")
            say("Mostanában eléggé híres lett a gyógynövény tan.")
            say("Érdekel? Megmutatom néhány receptem, nagyon")
            say("hasznosak a különböző jól ismert erősebb")
            say("bájitalok előállításánál.")
            say(" ")
            wait()
            setskin(NOWINDOW)
            cube.cube_open(npc.get_race())
        end

        when 20022.chat."Titkos recept" with pc.level >=45 begin
            say(" ")
            say_title(mob_name(20022)..":")
            say("Találtam egy titkos családi receptet.")
            say("Ezzel szinte sebezhetetlen vagy!")
            say("Hahaha!")
            say("Állítólag én vagyok az egyetlen, aki ezt ismeri.")
            say("Ezekkel az italokkal szinte semmi rossz nem")
            say("történhet veled.")
            say("Ki akarod próbálni?")
            say(" ")
            wait()
            setskin(NOWINDOW)
            cube.cube_open(npc.get_race())
        end
    end
end

OR
here

 

 

elite*******.com blocked :(

Is this a complete system?
There is no SRC? ?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.