Jump to content

Johnny69

Inactive Member
  • Posts

    83
  • Joined

  • Last visited

  • Days Won

    5
  • Feedback

    0%

Posts posted by Johnny69

  1. On 3/10/2019 at 6:30 PM, Redeemed said:

    Hey guys, i have this problem with the Render Target system:

    renderproblem.thumb.png.758e9ea1034e78e40dcd735ce84e79fc.png

    Things 've tried:

    -Checked the scale functions several times

    -Checked the layer part in the RegisterRenderTarget

    This base is kinda clean the only thing what's in it is just the Acce and new emotion.

    Thanks in advance for the answers!

    screenshot_110.png.dba5816aece0adebade29eb3be31f681.png

    • Love 3
  2. Just change PichFont from DEFAULT_PITCH to VARIABLE_PITCH:

    DEFAULT_PITCH:  The default pitch, which is implementation-dependent.

    FIXED_PITCH:  A fixed pitch, which means that all the characters in the font occupy the same width when output in a string.
    VARIABLE_PITCH:  A variable pitch, which means that the characters in the font occupy widths that are proportional to the actual widths of the glyphs when output in a string. For example, the "i" and space characters usually have much smaller widths than a "W" or "O" character.

     

    https://msdn.microsoft.com/en-us/library/cc250403.aspx

    • Metin2 Dev 1
  3. M2 Download Center

    This is the hidden content, please
    ( Internal )

    New class used in official servers for minigameokey (move cards).

    Code can be improved, who have a better code please make a new topic. No one is forced to use my code.

    This is the hidden content, please

    Screen (Shang) : pomZ7_LWTOiiYypGKneM0w.gif

    • Metin2 Dev 14
    • Good 1
    • Love 12
  4. This item type is the new type from official servers used for battle boxes and recently for boss chest and fish event boxes. You can open boxes few times (set in item_proto).

    1. You can use macro ENABLE_BATTLE_FIELD because was added with battle zone.

    2. Number of openings is in item_proto -> LimitValue1 (Like official)

    Let's start:

    Server Source Part:

    #db\src\ProtoReader.cpp (same steps in ItemCSVReader.cpp)
    //Search:
    		"ITEM_BELT",
    //Add after:
    		"ITEM_GACHA"
              
    //Search: in array string* arSubType
    		0,			//34
    //Add after:
    		0,			//37
    
    //Search: in array int arNumberOfSubtype
    		0,			//34
    //Add after:
    		0,			//37
    
    
    #common\item_length.h
    //Search:
    	ITEM_BELT,	
    //Add after:
    	ITEM_GACHA,
    
    
    #game\src\item_manager.cpp
    //Search:
    	if (id == 0)
    //Add before: (be careful , before)
    	if(item->GetType() == ITEM_GACHA)
    		item->SetSocket(0, item->GetLimitValue(1));
    
    
    #game\src\char_item.cpp
    //Search: (CHARACTER::UseItemEx)
    		case ITEM_EXTRACT:
    			...
    			break;
    //Add after:
    		case ITEM_GACHA:
    			{
    				DWORD dwBoxVnum = item->GetVnum();
    				std::vector <DWORD> dwVnums;
    				std::vector <DWORD> dwCounts;
    				std::vector <LPITEM> item_gets(0);
    				int count = 0;
    
    				if (GiveItemFromSpecialItemGroup(dwBoxVnum, dwVnums, dwCounts, item_gets, count))
    				{
    					if(item->GetSocket(0) > 1)
    						item->SetSocket(0, item->GetSocket(0) - 1);
    					else
    						ITEM_MANAGER::instance().RemoveItem(item, "REMOVE (ITEM_GACHA)");
    				}
    			}
    			break;

     

    Client Source Part:

    #GameLib\ItemData.h
    //Search:
    			ITEM_TYPE_BELT,
    //Add after:
    			ITEM_TYPE_GACHA,
    
    #UserInterface\PythonItemModule.cpp
    //Search:
    	PyModule_AddIntConstant(poModule, "ITEM_TYPE_BELT",				CItemData::ITEM_TYPE_BELT);
    //Add after:
    	PyModule_AddIntConstant(poModule, "ITEM_TYPE_GACHA",			CItemData::ITEM_TYPE_GACHA);

     

    Client root part:

    #root\uitooltip.py
    #Search:
    		elif item.ITEM_TYPE_FISH == itemType:
    			if 0 != metinSlot:
    				self.__AppendFishInfo(metinSlot[0])
    #Add after:
    		### Gacha = Battle Shop Chest ###
    		elif item.ITEM_TYPE_GACHA == itemType:
    			if 0 != metinSlot:
    				if self.isShopItem:
    					restUsableCount = int(item.GetLimit(1)[1])
    				else:
    					restUsableCount = int(metinSlot[0])
    
    				self.AppendSpace(5)
    				self.AppendTextLine(localeInfo.TOOLTIP_REST_USABLE_COUNT % (restUsableCount), grp.GenerateColor(0.5, 1.0, 0.3, 1.0))

     

    Client locale part:

    #locale_game.txt
    #Add:
    TOOLTIP_REST_USABLE_COUNT	Left: %d

     

    Server Item_proto example:

    25111	fish 보상상자	ITEM_GACHA	0	1	NONE	NONE	NONE	NONE	0	0	0	0	0	LIMIT_NONE	0	LIMIT_NONE	1	APPLY_NONE	0	APPLY_NONE	0	APPLY_NONE	0	0	0	0	0	0	0	0	0	0	12
    25112	fish 보상상자	ITEM_GACHA	0	1	NONE	NONE	NONE	NONE	0	0	0	0	0	LIMIT_NONE	0	LIMIT_NONE	2	APPLY_NONE	0	APPLY_NONE	0	APPLY_NONE	0	0	0	0	0	0	0	0	0	0	12
    25113	fish 보상상자	ITEM_GACHA	0	1	NONE	NONE	NONE	NONE	0	0	0	0	0	LIMIT_NONE	0	LIMIT_NONE	3	APPLY_NONE	0	APPLY_NONE	0	APPLY_NONE	0	0	0	0	0	0	0	0	0	0	12

     

    • Metin2 Dev 1
    • Love 9
  5. I think you are using marty source.(there i saw this problem)

    So let's explain:

    Active slot effect is set when skill affect is set. PythonPlayerSkill.cpp -> SetAffect

    In SetAffect function is called AffectIndexToSkillIndex to get skill index by affect type. (passing by reference)

    AffectIndexToSkillIndex search values in a vector and skill 174 (red possession) is not in that vector.

    Fix:

    Go in PythonPlayer.cpp , search:

    m_kMap_dwAffectIndexToSkillIndex.insert(make_pair(int(CInstanceBase::AFFECT_HEUKSIN), 79));

    Add after:

    #ifdef ENABLE_WOLFMAN_CHARACTER
    	m_kMap_dwAffectIndexToSkillIndex.insert(make_pair(int(CInstanceBase::AFFECT_RED_POSSESSION), 174));
    #endif

     

  6. That "bug" is because the quest window is not destroyed properly.

    In interfaceModule.py search:
    				eachQuestWindow.CloseSelf()
    Replace with:
    				eachQuestWindow.OnPressEscapeKey()

    How to test that "bug". Press logout button and in those 3 seconds open a quest, when you login again you can't click in quest area but quest is not there.

    • Metin2 Dev 1
    • Love 3
  7. A few tips from me: (after i saw your code)

    1. Before you start coding a "system" try to find out how this system work.

    2. Try to use english in variable name.

    3. Learn how to use a loop (for, while, do while)

    PS: No hate, just try to take these tips into account.

    • Love 1
  8. @Ken You can connect to those servers only with ip from Brazil. They have an intern VPN blocker (in binary source). If you know reverse you can check this.

    @xP3NG3Rx Xigncode check your file history from last 48h and e.g you use an unpacker for another client he see that and kill your process. Xigncode and Xtrap = same shit. Scan for file history from last 48h is not even the haviest scan , he scan log all files and paths that you modified in the last 48 hours and all executables with prefetch files into their logs.

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