Jump to content

Karbust

Management
  • Posts

    1161
  • Joined

  • Days Won

    10
  • Feedback

    100%

Posts posted by Karbust

  1. On 2/22/2021 at 2:20 PM, displayjokes said:

    Hey, everything working fine except some effects like white lion smoke / blue armor smoke, what am i doing wrong or missing?

    Here's what i mean:

    spacer.png

     

    Also:

    Check this:

      Hide contents

    uitooltip.py

    search for:

    		elif item.ITEM_TYPE_WEAPON == itemType:

     

    at the end of that elif check if you have it like this:

    
    			if preview != 0:
    				if item.WEAPON_SWORD == itemSubType: 
    					if player.GetRace() != 7 and player.GetRace() != 3:
    						self.__ModelPreview(itemVnum, 3, player.GetRace())
    				if item.WEAPON_DAGGER == itemSubType or item.WEAPON_BOW == itemSubType: 
    					if player.GetRace() == 5 or player.GetRace() == 1:
    						self.__ModelPreview(itemVnum, 3, player.GetRace())
    				if item.WEAPON_TWO_HANDED == itemSubType: 
    					if player.GetRace() == 0 or player.GetRace() == 4:
    						self.__ModelPreview(itemVnum, 3, player.GetRace())
    				if item.WEAPON_BELL == itemSubType or item.WEAPON_FAN == itemSubType: 
    					if player.GetRace() == 7 or player.GetRace() == 3:
    						self.__ModelPreview(itemVnum, 3, player.GetRace())

     

     

    Hey, did you manage to fix the effects?

    It is working but not on everything, somehow some mounts don't get the effect:

     

     

  2. 1 minute ago, TMP4 said:

    I will have a look on your patcher thanks because looks like it's not possible to solve this detection, it's 100% on Visual Studio and Antivirus vendors side unfortunately.

    You could also probably try using JetBrains's CLion with Qt, or only Qt (C++).

    CLion CMake's projects are also detected by Windows Defender, but the final executable isn't.

    For C#, you could try JetBrains's Rider. It doesn't require Visual Studio installed, only .NET.

    • Good 1
  3. 17 minutes ago, TMP4 said:

    Microsoft Defender currently not detecting it, that's why. Can you scan your patcher exe at virsutotal or upload it for me? I'm just curious about your false positive rate.

    After all, it's getting detected. I haven't used this patcher in almost 2 years. I made a fresh compilation just in case.

    This is the hidden content, please

    I'm currently using the patcher I made in Electron, it isn't being detected.

    This is the hidden content, please

    • Metin2 Dev 22
    • Angry 1
    • Confused 1
    • Good 7
    • Love 7
  4. I keep getting this error in Debug mode:

    7otFd8t.png

    std::shared_ptr<CGrannyMotion> CGraphicThing::GetMotionPointer(int iMotion)
    {
    	assert(CheckMotionIndex(iMotion)); //line 131
    
    	if (iMotion >= m_pgrnFileInfo->AnimationCount)
    		return NULL;
    
    	if (m_motions.empty())
    		return NULL;
    
    	return m_motions.at(iMotion);
    }

    Any idea?

    Thank you

  5. 3 minutes ago, VegaS™ said:

    Hi, thanks for the release, but you don't need any extra function, you just need to select the change look vnum.

    item.SelectItem(changelookVnum)
    valu3 = item.GetValue(3)
    
    # Set selected item as the old one because it's used later in other conditions
    item.SelectItem(oldItemVnum)

     

    So, the code should looks like:

    				elif itemSubType == item.COSTUME_TYPE_HAIR:
    					if self.__ItemGetRace() == player.GetRace():
    						value3 = item.GetValue(3)
    						if app.ENABLE_CHANGE_LOOK_SYSTEM and getChangelookVnum:
    							item.SelectItem(getChangelookVnum)
    							value3 = item.GetValue(3)
    
    						self.__ModelPreview(value3, 1, player.GetRace())
    						item.SelectItem(itemVnum)

    Well, actually didn't try that option, tried others and none worked so, made a new one.

    I though the SelectItem only worked with items in the inventory/safebox/etc., based on the code I saw, so I didn't even test it.

    Thanks for your input as always ?

    • Love 1
  6. Sup bois

    I needed a way to get the value3 on hair costumes to be used on render target:

    But, I needed to get the value3 with the change look system, for which there wasn't a function already.

    Open UserInterface -> PythonItemModule.cpp, and after:

    PyObject* itemLoadItemTable(PyObject* poSelf, PyObject* poArgs)

    Add:

    PyObject* itemGetValueByVnum(PyObject* poSelf, PyObject* poArgs) {
    	int iValueIndex;
    	if (!PyTuple_GetInteger(poArgs, 0, &iValueIndex))
    		return Py_BadArgument();
    
    	int iVnum;
    	if (!PyTuple_GetInteger(poArgs, 1, &iVnum))
    		return Py_BadArgument();
    
    	CItemData* pItemData;
    	CItemManager::Instance().GetItemDataPointer(iVnum, &pItemData);
    	if (!pItemData)
    		return Py_BuildException("Not yet select item data");
    
    	return Py_BuildValue("i", pItemData->GetValue(iValueIndex));
    }

    Then, after:

    { "LoadItemTable",					itemLoadItemTable,						METH_VARARGS },

    Add:

    { "GetValueByVnum",					itemGetValueByVnum,						METH_VARARGS },

    How to use it? On uitooltip.py

    				elif itemSubType == item.COSTUME_TYPE_HAIR: #Hair 
    					if self.__ItemGetRace() == player.GetRace():
    						itemVnum_prv = itemVnum
    						if app.ENABLE_CHANGE_LOOK_SYSTEM and getChangelookVnum:
    							itemVnum_prv = getChangelookVnum
    							self.__ModelPreview(item.GetValueByVnum(3, itemVnum_prv), 1, player.GetRace())
    						else:
    							self.__ModelPreview(item.GetValue(3), 1, player.GetRace())

    Result:

    244648LIX1bKp.png

    • Metin2 Dev 1
    • Eyes 1
    • Good 1
    • Love 2
  7. On 7/9/2020 at 8:49 PM, Shahin said:

     

    Thank you for your help, Karbust

     

    I have tried the steps from the link, compiled the source with the new modifications and set-up the configs with

    BIND_IP: Local IP  &  PROXY_IP: External IP

    Still Nothing...

     

    Can you help me with a hand via DIscord? I would appreciate it. This problem has wasted a few weeks of mine already..

      Hide contents

     

    ( I also have another question with "why does mysql service not running" after i start the game ? aka rc.config/network config problem ? 

    zAI5hkr.png

    but this is a new topic:

    I have tried on another dedicated server and the login process was successful, but i could've open only 1 channel and the mysql service went down immediately (that means no available way to open more than one channel). The same serverfile tried on Local VM (VB) and no problem with the mysql service what so ever either with 4 channels opened, the service was still running with pid x )

     

     

    Thank you

     

    Use like this:

    PUBLIC_IP: internal ip
    PROXY_IP: external ip

    Like I said, I use this both on cloud (AWS) and localhost, when I want friends to join.

     

    About the mysql, check the logs (/var/db/mysql) for errors.

  8. 5 hours ago, Premium said:

    hiiiii  Karbust, 

     

     

    how are you? so... some lines I can't find, should I add them?

    For exemple

    in my desc.cpp

    https://metin2.download/picture/M3k0cu0WQI2rYE59zMPZNk5r4mHGUDt5/.png

    in topic 

    https://metin2.download/picture/M0UiQ369b1AQ72e3FAm04KKw4rEh4IVj/.png

    Ignore my define, I usually disable it on localhost, unless I have friends joining in.

    void DESC::SendLoginSuccessPacket()
    {
    	TAccountTable & rTable = GetAccountTable();
    
    	TPacketGCLoginSuccess p;
    
    	p.bHeader    = HEADER_GC_LOGIN_SUCCESS_NEWSLOT;
    
    	p.handle     = GetHandle();
    	p.random_key = DESC_MANAGER::instance().MakeRandomKey(GetHandle()); // FOR MARK
    	thecore_memcpy(p.players, rTable.players, sizeof(rTable.players));
    
    	for (int i = 0; i < PLAYER_PER_ACCOUNT; ++i)
    	{   
    #ifdef ENABLE_PROXY_IP
    		if (!g_stProxyIP.empty())
    			rTable.players[i].lAddr=inet_addr(g_stProxyIP.c_str());
    #endif
    			
    		CGuild* g = CGuildManager::instance().GetLinkedGuild(rTable.players[i].dwID);
    
    		if (g)
    		{   
    			p.guild_id[i] = g->GetID();
    			strlcpy(p.guild_name[i], g->GetName(), sizeof(p.guild_name[i]));
    		}   
    		else
    		{
    			p.guild_id[i] = 0;
    			p.guild_name[i][0] = '\0';
    		}
    	}
    
    	Packet(&p, sizeof(TPacketGCLoginSuccess));
    }

     

     

  9. 24 minutes ago, PetePeter said:

    It's a common bug, it's not only happen with Dragon Soul but with any item you will try to drop. The ESC key close the window but don't close the "screen lock" feature.

    Try to edit like that :

     

    # game.py
    # Search def OnKeyDown(self, key):
    
    	def OnKeyDown(self, key):
    		if self.interface.wndWeb and self.interface.wndWeb.IsShow():
    			return
    
    		constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(0)
    
    # Replace by
    
    
    	def OnKeyDown(self, key):
    		if self.interface.wndWeb and self.interface.wndWeb.IsShow():
    			return
    
    		if key == app.DIK_ESC:
    			self.RequestDropItem(False)
    			constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)

     

    I already have it like this:
     

    	def OnKeyDown(self, key):
    		if self.interface.wndWeb and self.interface.wndWeb.IsShow():
    			return
    
    		if key == app.DIK_ESC:
    			self.RequestDropItem(FALSE)
    			constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(0)
    
    		try:
    			self.onPressKeyDict[key]()
    		except KeyError:
    			pass
    		except:
    			raise
    
    		return TRUE

    It happens with ESC and clicking Cancel...

     

    EDIT:

    Solved. Thanks @PACI

    On game.py, on RequestDropItem function, at the end was SET_ITEM_DROP_QUESTION_DIALOG_STATUS, but on uidragonsoul.py it was checking for GET_ITEM_QUESTION_DIALOG_STATUS...

    ?

  10. 13 minutes ago, PetePeter said:

    It's happen when you using Escape to close the drop window ?

    Yes

    I added dbg on the RequestDropItem function

        def RequestDropItem(self, answer):
            dbg.LogBox("Got here")
            if not self.itemDropQuestionDialog:
                dbg.LogBox("Got here 2")
                return
    
            if answer:
                dropType = self.itemDropQuestionDialog.dropType
                dropCount = self.itemDropQuestionDialog.dropCount
                dropNumber = self.itemDropQuestionDialog.dropNumber
    
                if player.SLOT_TYPE_INVENTORY == dropType or\
                    (player.SLOT_TYPE_SKILL_BOOK_INVENTORY == dropType or\
                    player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == dropType or\
                    player.SLOT_TYPE_STONE_INVENTORY == dropType or\
                    player.SLOT_TYPE_GIFT_BOX_INVENTORY == dropType or\
                    player.SLOT_TYPE_CHANGERS_INVENTORY == dropType and app.ENABLE_SPECIAL_INVENTORY_SYSTEM):
    
                    if dropNumber == player.ITEM_MONEY:
                        net.SendGoldDropPacketNew(dropCount)
                        snd.PlaySound("sound/ui/money.wav")
                    else:
                        # PRIVATESHOP_DISABLE_ITEM_DROP
                        self.__SendDropItemPacket(dropNumber, dropCount)
                        # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
                elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == dropType:
                        # PRIVATESHOP_DISABLE_ITEM_DROP
                        self.__SendDropItemPacket(dropNumber, dropCount, player.DRAGON_SOUL_INVENTORY)
                        # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
    
            self.itemDropQuestionDialog.Close()
            self.itemDropQuestionDialog = None
            
            dbg.LogBox("Got here 3")
    
            constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(0)

    It's reaching "Got here" and "Got here 3"

  11. 4 minutes ago, Shahin said:

    Hello, i have a code but it is in a diff format and i saw a few months back that some users were offering a website for their code which was compressed in a diff line.

    Does anyone know that website?

    part of code below:

      Hide contents

     Srcs/Client/EterLib/GrpBase.cpp               |   44 +-
     Srcs/Client/EterLib/GrpBase.h                 |   19 +-
     Srcs/Client/EterLib/GrpDevice.cpp             |   83 +-
     Srcs/Client/EterLib/GrpFontTexture.cpp        |    8 +
     Srcs/Client/EterLib/GrpFontTexture.h          |    3 +
     Srcs/Client/EterLib/GrpTextInstance.cpp       | 1327 ++++++++++-------
     Srcs/Client/UserInterface/Locale_inc.h        |    1 +
     .../UserInterface/PythonApplication.cpp       |   61 +-
     8 files changed, 953 insertions(+), 593 deletions(-)

    diff --git a/Srcs/Client/EterLib/GrpBase.cpp b/Srcs/Client/EterLib/GrpBase.cpp
    index a54f8b0..320e561 100644
    --- a/Srcs/Client/EterLib/GrpBase.cpp
    +++ b/Srcs/Client/EterLib/GrpBase.cpp
    @@ -94,7 +94,12 @@ std::vector<TIndex>        CGraphicBase::ms_fillCubeIdxVector;
     LPD3DXMESH                CGraphicBase::ms_lpSphereMesh = NULL;
     LPD3DXMESH                CGraphicBase::ms_lpCylinderMesh = NULL;
     

     

    Those are git changes, not sure what website "reverses" them.

    You can easily apply the changes by hand.

    Where you find a "-" it's the line that got removed/edit. Where you find a "+" it's the new line.

  12. 6 minutes ago, Abel(Tiger) said:

    Did you try to increase this char list ? 

    screenshot-800.png

    Actually, I did not, but from the calculations I just did, that string is well bellow the 512 max size, and that function works fine (when the db doesn't crash while loading another character). But thank you anyway.

  13. 1 minute ago, Denizeri24 said:

    you said;

    c = new CItemCache; //crashes here...

     

    and your core said "c" variable is fucking NULL (0x0) ;

    BvtY24D.png

     

    you cant create new pointer. check your fucking system libraries(freebsd and compiler(gcc or clang)) and optimization flags.

    GetItemCache already returns NULL in case it doesn't find the item...

    CItemCache * CClientManager::GetItemCache(DWORD id)
    {
    	TItemCacheMap::iterator it = m_map_itemCache.find(id);
    
    	if (it == m_map_itemCache.end())
    		return NULL;
    
    	return it->second;
    }

    In here:

    	CItemCache * c;     
    
    	if (!pNew)
    		return;
    	
    	c = GetItemCache(pNew->id);
    	
    	// 아이템 새로 생성
    	if (!c)
    	{
    		if (g_log)
    			sys_log(0, "ITEM_CACHE: PutItemCache ==> New CItemCache id%d vnum%d new owner%d", pNew->id, pNew->vnum, pNew->owner);
    
    		c = new CItemCache;
    		m_map_itemCache.insert(TItemCacheMap::value_type(pNew->id, c));
    	}

    Declares "c", then if GetItemCache doesn't return an object of type CItemCache, it will return a NULL value, then it's the if... Doing "!c" or "c == NULL" it's the same thing.

    The problem is why the "new CItemCache" crashes the db, and only when the 6 slots are enabled, otherwise it runs without any problem...

  14. 55 minutes ago, Denizeri24 said:

    nevermind...

     

    just try this;

     

    find;

     

    	if (!c)
    	{
    		if (g_log)
    			sys_log(0, "ITEM_CACHE: PutItemCache ==> New CItemCache id%d vnum%d new owner%d", pNew->id, pNew->vnum, pNew->owner);
    
    		c = new CItemCache; //crashes here...
    		m_map_itemCache.insert(TItemCacheMap::value_type(pNew->id, c));
    	}

     

     

    and change;

     

    	if (!c && c != NULL)
    	{
    		if (g_log)
    			sys_log(0, "ITEM_CACHE: PutItemCache ==> New CItemCache id%d vnum%d new owner%d", pNew->id, pNew->vnum, pNew->owner);
    
    		c = new CItemCache; //crashes here...
    		m_map_itemCache.insert(TItemCacheMap::value_type(pNew->id, c));
    	}

     

     

    this is will fix the crash but you probably take new problems.

    That's the complete opposite of the previous instruction... Obviously it will crash on the else when it tries to access anything inside and find nothing...

  15. I recently noticed that the client closes after the character levels up, but not always, but almost always.

    On the client syserr I get different packets, like this:

    Unknown packet header: 194, last: 17 75
    Unknown packet header: 235, last: 17 75

    Nothing reported on the server side syserr.

    packet.h

    typedef struct packet_point_change
    {
    	int		header;
    	DWORD		dwVID;
    	BYTE		type;
    	long long	amount;
    	long long	value;
    } TPacketGCPointChange;

    char.h

    typedef struct character_point
    {
    	long long		points[POINT_MAX_NUM];
    
    	BYTE			job;
    	BYTE			voice;
    
    	int			level;
    	DWORD			exp;
    	long long		gold;
    
    	long			hp;
    	int			sp;
    
    	long			iRandomHP;
    	int			iRandomSP;
    
    	int			stamina;
    
    	BYTE			skill_group;
    } CHARACTER_POINT;

    I used this: 

     

    Any idea? Like I said, it doesn't happen every time, but it happens more times than it doesn't.

     

  16. 11 hours ago, Abel(Tiger) said:

    I think it's a compiling problem, not a source problem (I had a similar problem in the past) so try these things:
    1. Don't compile with -j flag when you move to production

    2. Try downgrade c++2a to c++14 or c++11

    3. If 1 and 2 don't work try to upgrade clang to version 10 (I think you use 9)

     

    Tried without the -j flag, same error.

    Also without the -j flag, tried c++17 and c++14, nothing.

    My clang version:
     

    # clang++ -v
    FreeBSD clang version 11.0.1 ([email protected]:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c3fe)
    Target: i386-unknown-freebsd13.0
    Thread model: posix
    InstalledDir: /usr/bin

    Without using the 6 slots it works completely, that PutItemCache function isn't something new, so I wasn't expecting changes to make it work

  17. 24 minutes ago, Abel(Tiger) said:

    What compiler do you use for compiling the db, what freebsd for compiling and what freebsd for runing, also do you compile with -j ?

    clang with c++2a on FreeBSD 13 (just upgraded from 12, same error) (compiling and running), and yes, I use the -j flag...

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