Jump to content

Marcos17

Member
  • Posts

    62
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Marcos17

  1. On 3/14/2024 at 7:49 PM, Jimmermania said:

    This is the fix. item.cpp , search:
     

    		case ITEM_COSTUME:
    			{
    				DWORD toSetValue = this->GetVnum();
    				EParts toSetPart = PART_MAX_NUM;
    				
    				if (GetSubType() == COSTUME_BODY)

    Replace the whole function with this:
     

    				if (GetSubType() == COSTUME_BODY)
    				{
    					toSetPart = PART_MAIN;
    					if (false == bAdd)
    					{
    						const CItem* pArmor = m_pOwner->GetWear(WEAR_BODY);
    #if defined(__BL_TRANSMUTATION__)
    						if (pArmor != NULL)
    						{
    							const DWORD dwVnum = pArmor->GetVnum();
    							const DWORD dwTransmutationVnum = pArmor->GetTransmutationVnum();
    							toSetValue = dwTransmutationVnum != 0 ? dwTransmutationVnum : dwVnum;
    						}
    						else
    						{
    							toSetValue = m_pOwner->GetOriginalPart(PART_MAIN);
    						}
    #else
    						toSetValue = (NULL != pArmor) ? pArmor->GetVnum() : m_pOwner->GetOriginalPart(PART_MAIN);
    #endif
    					}
    				}

     

    Working perfectly...
    Thank you bro

    • Love 1
  2. On 3/14/2024 at 7:49 PM, Jimmermania said:

    This is the fix. item.cpp , search:
     

    		case ITEM_COSTUME:
    			{
    				DWORD toSetValue = this->GetVnum();
    				EParts toSetPart = PART_MAX_NUM;
    				
    				if (GetSubType() == COSTUME_BODY)

    Replace the whole function with this:
     

    				if (GetSubType() == COSTUME_BODY)
    				{
    					toSetPart = PART_MAIN;
    					if (false == bAdd)
    					{
    						const CItem* pArmor = m_pOwner->GetWear(WEAR_BODY);
    #if defined(__BL_TRANSMUTATION__)
    						if (pArmor != NULL)
    						{
    							const DWORD dwVnum = pArmor->GetVnum();
    							const DWORD dwTransmutationVnum = pArmor->GetTransmutationVnum();
    							toSetValue = dwTransmutationVnum != 0 ? dwTransmutationVnum : dwVnum;
    						}
    						else
    						{
    							toSetValue = m_pOwner->GetOriginalPart(PART_MAIN);
    						}
    #else
    						toSetValue = (NULL != pArmor) ? pArmor->GetVnum() : m_pOwner->GetOriginalPart(PART_MAIN);
    #endif
    					}
    				}

     

    It's the same as mine

  3. On 7/31/2022 at 6:21 PM, Elders said:

    you can help me with this error?

    17>PythonItemModule.obj : error LNK2001: unresolved external symbol "public: __thiscall CGrid::CGrid(int,int)" (??0CGrid@@QAE@HH@Z)
    17>PythonItemModule.obj : error LNK2001: unresolved external symbol "public: __thiscall CGrid::~CGrid(void)" (??1CGrid@@QAE@XZ)
    17>PythonItemModule.obj : error LNK2001: unresolved external symbol "public: void __thiscall CGrid::Clear(void)" (?Clear@CGrid@@QAEXXZ)
    17>PythonItemModule.obj : error LNK2001: unresolved external symbol "public: int __thiscall CGrid::FindBlank(int,int)" (?FindBlank@CGrid@@QAEHHH@Z)
    17>PythonItemModule.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CGrid::Put(int,int,int)" (?Put@CGrid@@QAE_NHHH@Z)

     

    Did not add EterBase files to Visual Studio

    Working perfectly...

    Thanks @ Mali...

    .jpg

    .jpg

  4. On 12/29/2021 at 3:16 PM, EAkar said:
    if app.BL_MOVE_CHANNEL:
    	class MoveChannelDialog(ui.ScriptWindow):
    		def __init__(self):
    			ui.ScriptWindow.__init__(self)
    			self.__LoadDialog()
    			
    			self.IsShow = False
    			
    		def __del__(self):
    			ui.ScriptWindow.__del__(self)
    			
    		def __LoadDialog(self) :	
    			try:
    				pyScrLoader = ui.PythonScriptLoader()
    				pyScrLoader.LoadScriptFile(self, "UIScript/MoveChannelDialog.py")
    			except:
    				import exception
    				exception.Abort("MoveChannelDialog.__LoadDialog")
    			
    
    			self.ParentBoard = self.GetChild("MoveChannelBoard")
    			self.ChildBoard = self.GetChild("BlackBoard")
    			self.GetChild("MoveChannelTitle").SetCloseEvent(ui.__mem_func__(self.Close))
    			
    			self.ChannelList = []
    			cnt = 5
    			cnt = cnt - 1 # 99서버 제외
    			
    			self.DlgWidht = 190
    			self.BlackBoardHeight = 23*cnt + 5*(cnt-1) + 13
    			self.DlgHeight = self.BlackBoardHeight + 75
    			
    			self.AcceptBtn = ui.MakeButton(self.ParentBoard, 13, self.DlgHeight - 33, "", "d:/ymir work/ui/public/", "middle_button_01.sub", "middle_button_02.sub", "middle_button_03.sub")
    			self.AcceptBtn.SetText( localeInfo.MOVE_CHANNEL_SELECT )
    			self.AcceptBtn.SetEvent(ui.__mem_func__(self.AcceptButton))
    			self.CloseBtn = ui.MakeButton(self.ParentBoard, self.DlgWidht - 73, self.DlgHeight - 33, "", "d:/ymir work/ui/public/", "middle_button_01.sub", "middle_button_02.sub", "middle_button_03.sub")
    			self.CloseBtn.SetText( localeInfo.MOVE_CHANNEL_CANCEL )
    			self.CloseBtn.SetEvent(ui.__mem_func__(self.Close))
    
    			for i in xrange(cnt):
    				btn = ui.MakeButton(self.ChildBoard, 8, 6 + i*28, "", "d:/ymir work/ui/game/myshop_deco/", "select_btn_01.sub", "select_btn_02.sub", "select_btn_03.sub")
    				btn.SetText("Kanal {0}".format(int(i+1)))
    				btn.SetEvent(ui.__mem_func__(self.__SelectChannel), i+1)
    				self.ChannelList.append(btn)
    			
    			self.ParentBoard.SetSize(self.DlgWidht, self.DlgHeight)
    			self.ChildBoard.SetSize(self.DlgWidht - 26, self.BlackBoardHeight)
    			self.SetSize(self.DlgWidht, self.DlgHeight)
    			
    			self.UpdateRect()
    			
    		def __SelectChannel(self, idx):
    			self.ChangeChannelNumber = idx
    			
    			for btn in self.ChannelList:
    				btn.SetUp()
    				btn.Enable()
    				
    			self.ChannelList[idx-1].Down()
    			self.ChannelList[idx-1].Disable()
    			
    		def AcceptButton(self):
    			if self.ChangeChannelNumber == self.StartChannelNumber:
    				return
    			
    			net.MoveChannelGame(self.ChangeChannelNumber)
    			self.StartChannelNumber = self.ChangeChannelNumber
    			self.Close()
    						
    		def Show(self) :
    			ui.ScriptWindow.Show(self)
    			
    			self.StartChannelNumber = net.GetChannelNumber()
    			self.__SelectChannel(self.StartChannelNumber)
    			
    			self.IsShow = True
    		
    		def Close(self):
    			self.Hide()
    			
    			self.IsShow = False
    			
    		def OnPressEscapeKey(self):
    			self.Close()
    			return True
    			
    		def IsShowWindow(self):
    			return self.IsShow

    İnterFaceModule.py

        if app.BL_MOVE_CHANNEL:
            def RefreshServerInfo(self, channelNumber):
                if self.wndMiniMap:
                    self.wndMiniMap.RefreshServerInfo(channelNumber)

    Game.py

        if app.BL_MOVE_CHANNEL:
            def __SeverInfo(self, channelNumber, mapIndex):
                #print "__SeverInfo %s %s" % (channelNumber, mapIndex)
                
                _chNum    = int(channelNumber.strip())
                _mapIdx    = int(mapIndex.strip())
                
                if _chNum == 99:
                    chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.MOVE_CHANNEL_NOTICE_GAME_99)
                elif _mapIdx >= 10000:
                    chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.MOVE_CHANNEL_NOTICE_DUNGEON)
                else:
                    chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.MOVE_CHANNEL_NOTICE % _chNum)
                    
                net.SetChannelName(_chNum)
                net.SetMapIndex(_mapIdx)
                self.interface.RefreshServerInfo(channelNumber)

    Following your help, now I have the following error:

    0216 21:10:26587 :: Traceback (most recent call last):
    0216 21:10:26588 ::   File "game.py", line 2007, in BINARY_ServerCommand_Run
    0216 21:10:26588 ::   File "stringCommander.py", line 63, in Run
    0216 21:10:26588 ::   File "stringCommander.py", line 31, in __call__
    0216 21:10:26588 ::   File "stringCommander.py", line 20, in __call__
    0216 21:10:26588 ::   File "game.py", line 2432, in __SeverInfo
    0216 21:10:26588 ::   File "interfaceModule.py", line 2550, in RefreshServerInfo
    0216 21:10:26588 ::   File "uiMiniMap.py", line 566, in RefreshServerInfo
    0216 21:10:26588 :: AttributeError
    0216 21:10:26588 :: : 
    0216 21:10:26588 :: 'module' object has no attribute 'SERVER_1'
    0216 21:10:26588 :: 
    0216 21:10:26588 :: Unknown Server Command server_info 1 21 | server_info

    Can you help, thanks in advance

  5. I'm having this problem, could anyone help me?

    Spoiler
    0131 17:28:23861 :: Traceback (most recent call last):
    
    0131 17:28:23862 ::   File "networkModule.py", line 236, in SetGamePhase
    
    0131 17:28:23862 ::   File "game.py", line 96, in __init__
    
    0131 17:28:23862 ::   File "interfaceModule.py", line 412, in MakeInterface
    
    0131 17:28:23862 ::   File "interfaceModule.py", line 225, in __MakeWindows
    
    0131 17:28:23862 ::   File "uiInventory.py", line 275, in __init__
    
    0131 17:28:23862 ::   File "ui.py", line 3704, in __init__
    
    0131 17:28:23862 ::   File "ui.py", line 108, in __init__
    
    0131 17:28:23862 ::   File "uiInventory.py", line 690, in Hide
    
    0131 17:28:23862 :: AttributeError
    0131 17:28:23862 :: : 
    0131 17:28:23862 :: 'InventoryWindow' object has no attribute 'wndExpandedMoneyBar'
    0131 17:28:23862 :: 
    

     

     

  6. 1 hour ago, nazox said:

    I have the same problem of the last time, in day and night the lantern is on, i try add with crc, without crc, reinstaling 10 times the system and reinstall the system DayType, compare with other guys from this post working but i can't, i try to add effect with World Editor but idk, any idea?, thanks. 🙂

    I can implement one or the other, apparently few or no one has managed to implement both.

  7. On 1/1/2024 at 4:21 PM, Shiki007 said:

    SORRY GUYS,

    i implemented all in this costume but the weapons dont appear the effect blade can anyone helpme please?

    You need to add the effects in playersetingmodule.py or have the glow system posted here on the forum

    • Love 1
  8. Good afternoon / night...

    I implemented the system and I have the same python error, I tried the same user's correction, but it didn't work for me...

    Error in question:

    1229 13:50:28709 :: Traceback (most recent call last):
    1229 13:50:28709 ::   File "ui.py", line 1512, in CallEvent
    1229 13:50:28709 ::   File "ui.py", line 88, in _call_
    1229 13:50:28709 ::   File "ui.py", line 70, in _call_
    1229 13:50:28709 ::   File "uiSystem.py", line 194, in __ClickMoveChannelButton
    1229 13:50:28709 ::   File "uiSystem.py", line 271, in Show
    1229 13:50:28710 ::   File "uiSystem.py", line 256, in __SelectChannel

    1229 13:50:28710 :: IndexError
    1229 13:50:28710 :: : 
    1229 13:50:28710 :: list index out of range
    1229 13:50:28710 ::

    I thank you for your help

     

  9. Good afternoon...

    I have this problem in the Custom part:

    https://metin2.download/video/9WcL1E5Irkk7fs2vYVeT019aI3EkP1Pi/.mp4

    Sysser's are clean
    @ Mali any idea what it could be?

    I leave the part of the code with the error below:

    				if (GetSubType() == COSTUME_BODY)
    				{
    					toSetPart = PART_MAIN;
    
    					if (false == bAdd)
    					{
    
    						const CItem* pArmor = m_pOwner->GetWear(WEAR_BODY);
    #if defined(__BL_TRANSMUTATION__)
    						 if (pArmor)
    						{
    							const DWORD dwVnum = GetVnum();
    							const DWORD dwTransmutationVnum = GetTransmutationVnum();
    							toSetValue = dwTransmutationVnum != 0 ? dwTransmutationVnum : dwVnum;
    						}
    						else
    						{
    							toSetValue = m_pOwner->GetOriginalPart(PART_MAIN);
    						}
    #else
    						toSetValue = (NULL != pArmor) ? pArmor->GetVnum() : m_pOwner->GetOriginalPart(PART_MAIN);
    #endif
    					}
    				}

     

  10. 3 hours ago, nazox said:

    PropertyManager.cpp:

    Por falar nisso@ Mali obrigado, funcionou muito bem, mas estou com uma dúvida, quando coloco /x1 (dia) a luz acende, e sabe como posso corrigir o efeito? Você pode ver o brilho, mas as lâmpadas parecem apagadas

    008b2334376474e087ba0d3c8567b39e.png

     

    I have the same problem, whether day or night the flashlights have the effect...

  11. On 5/11/2023 at 11:42 PM, Grzyb said:

    Video:

    Code:

    import os
    import shutil
    
    source_folder = '/txt/src'
    target_folder = '/txt/src2'
    
    if not os.path.exists(target_folder):
        os.makedirs(target_folder)
    
    ifdef = '#ifdef '
    ifndef = '#ifndef '
    define = 'ENABLE_SWITCHBOT'
    
    def process_files(source_folder, target_folder):
        for entry in os.scandir(source_folder):
            if entry.is_file() and entry.name.endswith(('.cpp', '.h')):
                with open(entry.path, 'r', encoding='latin1') as file:
                    new_file = None
                    copy = False
                    lines = file.readlines()
                    line_num = 0
                    for line in lines:
                        if ifdef + define in line or ifndef + define in line:
                            copy = True
                            if not new_file:
                                new_file = open(os.path.join(target_folder, entry.name), 'w', encoding='latin1')
                            for i in range(max(0, line_num - 30), line_num):
                                new_file.write(lines[i])
                        if copy:
                            new_file.write(line)
                        if '#endif' in line:
                            if copy:
                                new_file.write("\n // =================== INNA FUNKCJA ================= \n \n")
                                new_file.write("// ====== WYSZUKAJ: ")
                                new_file.write(define)
                                new_file.write("\n// Tutorial wygenerowany automatycznie przez Grzyb.ovh \n")
                                new_file.write("\n \n")
                            copy = False
                        line_num += 1
                    if new_file:
                        new_file.close()
            elif entry.is_dir():
                new_target_folder = os.path.join(target_folder, entry.name)
                if not os.path.exists(new_target_folder):
                    os.makedirs(new_target_folder)
                process_files(entry.path, new_target_folder)
    
    process_files(source_folder, target_folder)

     

    Is it possible to use cmd?

     

    • Metin2 Dev 1
×
×
  • 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.