Jump to content

4peppe

Member
  • Posts

    79
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by 4peppe

  1. If applied correctly, everything works fine;
    To also have the translations of the items in the strings you need to replace in
     

    server -> conf -> item_names.txt

    the item names with [IN;VALUEOFITEM]

    The only flaw I'm finding is that it translates the names of the mobs but not those of the npcs;

  2. On 1/20/2022 at 1:28 PM, blaxis said:

    spacer.png

     

    After buy.. any idea?

    @blaxis
    The fix for the problem is the following:
    go to Client -> src -> UserInterface -> GameType.h

    // search for typedef struct packet_shop_item 
    // and make sure the order of the variables is as follows
    
    typedef struct packet_shop_item
    {
        DWORD       vnum;
        DWORD       price;
        BYTE        count;
    	BYTE		display_pos;
    	long		alSockets[ITEM_SOCKET_SLOT_MAX_NUM];
        TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM];
    #if defined(__BL_SHOP_SOLD__)	// this if with the following variables must be the last
    	char		szBuyerName[/*CHARACTER_NAME_MAX_LEN*/24 + 1];
    	char		szBuyTime[19 + 1];
    #endif
    } TShopItemData;

    go to Server -> game -> src -> packet.h

    // look for struct packet_shop_item 
    // and make sure the order is the same as the file edited before
    
    struct packet_shop_item
    {   
    	DWORD       vnum;
    	DWORD       price;
    	BYTE        count;
    	BYTE		display_pos;
    	long	alSockets[ITEM_SOCKET_MAX_NUM];
    	TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_MAX_NUM];
    #if defined(__BL_SHOP_SOLD__)
    	char	szBuyerName[CHARACTER_NAME_MAX_LEN + 1];
    	char	szBuyTime[19 + 1];
    #endif
    };
  3. On 4/19/2022 at 10:34 AM, MrQuin said:

    .jpg
     

    It's a method to see the dews & water potions affect icons on the affectshower using the python side only, It's bit late to share this but it's an idea given by a dear friend of mine long ago.

    I tested this on both normal and extended blend system.

    I uploaded guide  for easier implementation..

     

    This is the hidden content, please
     / 
    This is the hidden content, please

    1@ ClientSource/UserInterface/InstanceBase.h:

    Before:

    			NEW_AFFECT_AUTO_HP_RECOVERY		= 534,

    Add:

    			NEW_AFFECT_BLEND = 531,

    2@ ClientSource/UserInterface/PythonCharacterModule.cpp:

    At the end of the file and before:

    }

    Add:

    	PyModule_AddIntConstant(poModule, "NEW_AFFECT_BLEND", CInstanceBase::NEW_AFFECT_BLEND);

    3@ ClientSource/UserInterface/PythonPlayerModule.cpp:

    At the end of the file and before:

    }

    Add:

    	PyModule_AddIntConstant(poModule, "RESIST_MAGIC",	POINT_RESIST_MAGIC);

    3@ root/constInfo.py:

    Add:

    ENABLE_POTIONS_AFFECTSHOWER = 1 ## 0=Disable / 1=Enable

    4@ root/uiAffectShower.py:

    Add at top of the file:

    import constInfo

    Search:

    	MALL_DESC_IDX_START = 1000

    Add:

    	if constInfo.ENABLE_POTIONS_AFFECTSHOWER:
    		## As long the values arent reserved
    		WATER_DESC_IDX_START = 1100
    		DEW_DESC_IDX_START = 1200
    		

     

    Search:

    	chr.NEW_AFFECT_DRAGON_SOUL_DECK2: (localeInfo.TOOLTIP_DRAGON_SOUL_DECK2, "d:/ymir work/ui/dragonsoul/buff_ds_land1.tga",),

    Add:

    	if constInfo.ENABLE_POTIONS_AFFECTSHOWER:
    		AFFECT_DATA_DICT[WATER_DESC_IDX_START+player.POINT_PENETRATE_PCT] = (localeInfo.TOOLTIP_APPLY_PENETRATE_PCT, 	"icon/item/50813.tga")
    		AFFECT_DATA_DICT[WATER_DESC_IDX_START+player.POINT_CRITICAL_PCT] = (localeInfo.TOOLTIP_APPLY_CRITICAL_PCT, 	"icon/item/50814.tga")
    		AFFECT_DATA_DICT[WATER_DESC_IDX_START+player.ATT_BONUS] = (localeInfo.TOOLTIP_ATT_GRADE, 			"icon/item/50817.tga")
    		AFFECT_DATA_DICT[WATER_DESC_IDX_START+player.DEF_BONUS] = (localeInfo.TOOLTIP_DEF_GRADE, 			"icon/item/50818.tga")
    		AFFECT_DATA_DICT[WATER_DESC_IDX_START+player.RESIST_MAGIC] = (localeInfo.TOOLTIP_MAGIC_DEF_GRADE, 		"icon/item/50819.tga")
    		AFFECT_DATA_DICT[WATER_DESC_IDX_START+player.ATT_SPEED] = (localeInfo.TOOLTIP_ATT_SPEED, 			"icon/item/50820.tga")
    		AFFECT_DATA_DICT[DEW_DESC_IDX_START+player.POINT_CRITICAL_PCT] = (localeInfo.TOOLTIP_APPLY_CRITICAL_PCT, 	"icon/item/50821.tga")
    		AFFECT_DATA_DICT[DEW_DESC_IDX_START+player.POINT_PENETRATE_PCT] = (localeInfo.TOOLTIP_APPLY_PENETRATE_PCT, 	"icon/item/50822.tga")
    		AFFECT_DATA_DICT[DEW_DESC_IDX_START+player.ATT_SPEED] = (localeInfo.TOOLTIP_ATT_SPEED, 			"icon/item/50823.tga")
    		AFFECT_DATA_DICT[DEW_DESC_IDX_START+player.RESIST_MAGIC] = (localeInfo.TOOLTIP_RESIST_MAGIC, 			"icon/item/50824.tga")
    		AFFECT_DATA_DICT[DEW_DESC_IDX_START+player.ATT_BONUS] = (localeInfo.TOOLTIP_ATT_GRADE, 			"icon/item/50825.tga")
    		AFFECT_DATA_DICT[DEW_DESC_IDX_START+player.DEF_BONUS] = (localeInfo.TOOLTIP_DEF_GRADE, 			"icon/item/50826.tga")
    		AFFECT_DATA_DICT[DEW_DESC_IDX_START+player.ENERGY] = (localeInfo.TOOLTIP_ENERGY, 			"icon/item/51002.tga")

    Do this next step twice(Inside def BINARY_NEW_AddAffect & def BINARY_NEW_RemoveAffect) :

    After:

    		if type == chr.NEW_AFFECT_MALL:
    			affect = self.MALL_DESC_IDX_START + pointIdx

    Add:

    		elif constInfo.ENABLE_POTIONS_AFFECTSHOWER and type == chr.NEW_AFFECT_EXP_BONUS_EURO_FREE:
    			affect = self.WATER_DESC_IDX_START + pointIdx
    		elif constInfo.ENABLE_POTIONS_AFFECTSHOWER and type == chr.NEW_AFFECT_BLEND:
    			affect = self.DEW_DESC_IDX_START + pointIdx

    ## Note: If you want to use the dews & water potions together!
    ## If you use the water potions before the dews(specifically Mong Water == 50819), You won't be able to use any of the dews.

    @ GameSource/char_item.cpp:

    Search:

    		case ITEM_BLEND:

    Replace:

    					if (FindAffect(AFFECT_EXP_BONUS_EURO_FREE, POINT_RESIST_MAGIC))
    					{
    						ChatPacket(CHAT_TYPE_INFO, LC_TEXT("This effect is already activated."));
    					}
    					else
    					{
    						AddAffect(affect_type, apply_type, apply_value, 0, apply_duration, 0, false);
    						item->SetCount(item->GetCount() - 1);
    					}

    With:

    					AddAffect(affect_type, apply_type, apply_value, 0, apply_duration, 0, false);
    					item->SetCount(item->GetCount() - 1);

     

    You can do the same for the Dragon god affects(Affect 510==NEW_AFFECT_MALL).

    Hi, thanks for the release! Unfortunately in my client the icons of the dews are displayed but not of the waters, can you help me? Syerr is empty!
    EDIT: Fixed: Icon files were missing in my client

    • Good 1
  4. 45 minutes ago, covfefe said:

    Interestingly, I don't have this issue. Here is one thing though, if you pick up an item you already have in inventory, it won't have the new item effect.

    edit for clarification: I mean stacked Items already In your Inventory. 

    in my case the problem occurs only with automatic potions and/or some items that occupy only 1 slot

  5. 23 hours ago, 4peppe said:

    Hi, i have found a bug:
    when you have the mouse on the button, and you press the I to close the inventory, the tooltip remains open, you have to move the mouse from the button and close the inventory to do so that doesn't happen;
    Here is the fix:
    look in the file client->root->uiinventory.py, inside class InventoryWindow(ui.ScriptWindow) (it's the third def Close(self) you'll find):
     

    	def Close(self):
    		self.Hide(

    add below:

    		if app.ENABLE_SORT_INVEN:
    			for i in xrange(len(self.tooltipInfo)):
    				self.tooltipInfo[i].Hide()

    @ Mali

  6. The system has a bug: if you add it as is the effect will disappear from automatic potions and if there are other items that use this effect. The solution is as follows,
    you simply need to create a folder called slot1  and add files from 00.sub to 12.sub in it, the files and folder in question can be found in:

    client->ymir_work->ui->public->slotactiveeffect

    @ Mali

  7. Hi, i have found a bug:
    when you have the mouse on the button, and you press the I to close the inventory, the tooltip remains open, you have to move the mouse from the button and close the inventory to do so that doesn't happen;
    Here is the fix:
    look in the file client->root->uiinventory.py, inside class InventoryWindow(ui.ScriptWindow) (it's the third def Close(self) you'll find):
     

    	def Close(self):
    		self.Hide(

    add below:

    		if app.ENABLE_SORT_INVEN:
    			for i in xrange(len(self.tooltipInfo)):
    				self.tooltipInfo[i].Hide()
    • Love 1
  8. Hi all, have installed the sort inventory system by blackdragonx61 and it works perfectly (obviously). The system has only one bug, when you have the mouse over the key and close the inventory with its key the tooltip remains bugged, the only way to remove it is to press again and reopen the inventory. tried to fix it in several ways:
    tried to put an elif where if you press the the tooltip should close;
    tried adding an and to the if so that the tooltip should only be shown if the inventory is loaded/opened/shown;
    tried to add an and to the if so that if the mouse is outside the inventory area it shouldn't show it;
    Nope, couldn't get it to work. The offending piece of code is this (client, root, uiinventory.py):

    https://pastebin.com/NcKxTK0m

    Here are two screenshots with the bugs:


    https://metin2.download/picture/sj105dSBs9lU2RmcHkaJNUPr2Uawsed8/.jpg
    https://metin2.download/picture/ULdgJ02w6Wc7BQvsf7Oho2GuD3x143H8/.jpg

    Can some good soul more experienced than me with python help me, please? Thanks in advance to whoever answers me!

  9. 7 hours ago, TMP4 said:

    Mega archive updated. 

    2023.01.11: - DevIL's libs are now statically linked to the game file by default, so you don't need
                  to install any libs on your vps. Also cleaned libdevil and libmysql and some Makefiles.
                  Modified files and folders to grab if you want to update manually:
                  /usr/metin2/server/src/etc/libmysql
                  /usr/metin2/server/src/etc/libdevil
                  /usr/metin2/server/src/game/src/Makefile
                  /usr/metin2/server/src/db/src/Makefile
                  /usr/metin2/server/src/libsql/src/Makefile
                  /usr/metin2/server/src/Makefile
                  If you want to use shared objects (.so) again for DevIL, there's a switch for it in the
                  game's Makefile: ENABLE_STATIC_DEVIL = 1, set it to 0.
                - Libs.txt and Libs.zip deleted since you don't need them anymore.
                - FAQ.txt updated with "What packages are needed to compile the source?"
                - Installed a fix about player change name item duplication exploit:
                  https://metin2.dev/topic/30075-player-change-name-item-duplication-exploit-fix/#comment-153815

    I compiled the DevIL myself from the ports, only modification is in cmake to make static lib instead of shared, so there should be no problem, but if you experience anything unusual with images (guild logo) please let me know. 

    I wanted to make this change at least a year ago since people always had trouble with dependencies, and other serverfiles especially paid serverfiles doing the same to make it easier for customers. Well better to do it now than never 😄

    Hello, first of all thanks for the updates to the file servers, I see you are working so hard! Is martysama's pc.change_name fix server side or client side? In which file should it be applied?
    ok, i think i found where to put it:
    game->src->questlua_pc.cpp

    • Good 1
  10. 40 minutes ago, chriisey said:

    @4peppe can u tell me how did you solve that syserr error on visual studio? The error Is the same as me.

    Hi chriisey, I don't remember now exactly how I solved the problem because then I stopped using this switchbot, but I can tell you it's just a matter of syntax, also use notepad ++ but open the file in the right format, so .py not .txt and him itself will give you directions on tabs

  11. Hello everyone, as the title suggests, I have a problem with this system (Link to system) when I have the mouse on the button, and I press the I to close the inventory, the tooltip remains open, I have to move the mouse from the button and close the inventory to do so that doesn't happen. It's a small bug but I want to fix it, can someone help me?

    Spoiler

    spacer.pngspacer.png

    I think the cause is this file: root/uiinventory.py, exactly this part:

    		if app.ENABLE_SORT_INVEN and self.tooltipInfo:
    			for i in xrange(len(self.tooltipInfo)):
    				if self.yenilebutton.IsIn():
    					self.tooltipInfo[i].Show()
    				else:
    					self.tooltipInfo[i].Hide()

    Because would I have to put it in "def OnUpdate (self) :", it's just not there so I created this def

  12. 7 hours ago, Mitachi said:

    I think you need check in uiTooltip.py 

    spacer.png

    Check def __AppendHairIcon

    Thank you so much, I solved it! It was enough to change:
     

    Spoiler

            itemImage.SetPosition(itemImage.GetWidth()/2, self.toolTipHeight)
            self.toolTipHeight += itemImage.GetHeight()
            #self.toolTipWidth += itemImage.GetWidth()/2
            self.childrenList.append(itemImage)
            self.ResizeToolTip()

    in:
     

    Spoiler

            itemImage.SetPosition(itemImage.GetWidth()/14, self.toolTipHeight)
            self.toolTipHeight += itemImage.GetHeight()
            #self.toolTipWidth += itemImage.GetWidth()/2
            self.childrenList.append(itemImage)
            self.ResizeToolTip()

     

    @ Mitachi spacer.png

    • Good 1
  13. Hi, I am creating an oldstyle server and am modifying the hair system, having removed the costume system. I had to make some changes but I'm almost done, I just have to move the position of the prieview image, I checked the files and from the item_list its position is given by

    ETC  \ ymir work \ ui \ items \ quest \ 73001.sub

    I just can't find it, can someone more experienced than me help me?
    Here is a screen to let you understand the problem:

    Spoiler

    spacer.png

  14. 17 hours ago, TMP4 said:

    Ciao, puoi fare una lista di acconciature buggate per favore?

    Ma sai che i capelli femminili e maschili hanno un valore diverso3, quindi es. /poly non funziona per controllarli. Devi controllare le acconciature femminili nel personaggio femminile e maschile nel maschio.

    Hi, I am aware of it, if with a female war / sura you try to equip the hair of a female war / sura they are not seen on the model, if instead you equip those of the male model on the female character they work; if with a male ninja / shamana you try to equip the male ninja / shamana hair they are not seen on the model, if instead you equip those of the female model on the male character they work.

    War/Sura male: work
    War/Sura female: don't wok
    Ninja/Shamana female: work
    Ninja/Shamana male: don't work

×
×
  • 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.