Jump to content

ridetpro

Banned
  • Posts

    106
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

Posts posted by ridetpro

  1. Acum 14 minute, brtk23 a spus:

    Add a delay to the equipement change after 10 switches, for example if he changed his eq 10 times under 10 seconds then add a 10 sec delay before he's able to change it again. Simplest fix, allowing the eq changer to work at the same time. To not make it seem so obvious and maybe to make it look more professional and as if you've added something new to the server add maybe a chat message "Don't lag the server!" and kick the abuser after 10 failed tries.

     

    It's just an idea I'm too stupid to write it myself. But tbh it seems so simple that everyone would be able to do this after studying some metin2 code.

    Soon, he'll ask how can I do that? I'm not good with C ++. And if nobody answers it will give a reply *bump*

    :lol: Just wait, I can read the future.

    I will write the code (One Minute), but I will wait for him to ask.
     

    • Love 1
  2. La 07.05.2018 la 13:08, Chyu ^^ a spus:

    Hi devs,
    I just discovered many clients are using old versions of Unicows.dll, DevIL.dll and ILU.dll.
    It's not as hard to update them and if you are deeply into a client development you appreciate those SDK or PDB.

    DevIL & ILU (?)
    Default client is using 16 years old version. Come clean, looks horrible, right?
    These libraries are open source so you can modify them. Here you can download latest SDK.
    During those 16 years of development there have been a lot of changes, here is excerpt of them.

    Changes:

    • DirectX 9 & 10 support
    • New bilinear scaling routine
    • Support for alpha-only formats
    • Better support for ICO, GIF and DDS format
    • Fixed minor bugs with BMP and PNG formats
    • Fixed a lot of issues about DDS format
    • A lot of bug fixes

    Unicows (?)
    Well, actually you can delete this library from your client and it won't have any effect on client proper working (Windows Vista and newer).
    However, you have to keep this library if you want to support compatibility with Windows 95, Windows 98 and Windows Millenium Edition.
    Here is available package which contains library, it's PDB and license.

    Sources:

     

    Why people click like to such pointless how-to ?

  3. Acum 20 minute, gummyantifi a spus:

    /shutdown -> wait -> sh close.sh

     

    I do not make a mistake when I turn off the server.
    Otherwise, this problem would have happened to other servers I have.

    What does /shutdown do ?

    Show me what's inside the close.sh

    Try to close to close the server with command

    killall game db

    I think that you close db core before it save the query. 

  4. Acum 43 minute, kasko30 a spus:

    Hello guys...

    So my problem is whenever i try to open privateshop the client closes and this is the syserr

    
    0727 11:34:55146 :: CResourceManager::GetResourcePointer: filename error!
    0727 11:34:55146 :: CResourceManager::GetResourcePointer: filename error!
    0727 11:34:55146 :: CResourceManager::GetResourcePointer: filename error!
    0727 11:34:55146 :: CResourceManager::GetResourcePointer: filename error!
    0727 11:34:55146 :: ResourceManager::GetResourcePointer: NOT SUPPORT FILE ��
    ��áh��ƀt
    9d��@òC=\��


    Even thought the offline shop works just fine.

    // Replace this if statement
    // EterLib/ResourceManager.cpp
    	if (!c_szFileName || !*c_szFileName)
    	{
    		TraceError("CResourceManager::GetResourcePointer: filename error!");
    		return NULL;
    	}
    
    // With
    
    	if (!c_szFileName || !*c_szFileName)
    	{
    		TraceError("CResourceManager::GetResourcePointer: filename %s error!", c_szFileName);
    		return NULL;
    	}

    Then wait for the crash again :)

    • Love 1
  5. Acum 11 minute, kasko30 a spus:

    Or just this simple code:

    find in char_item.cpp :

    
            case ITEM_PICK:
                // END_OF_MINING
                if (!item->IsEquipped())
                    EquipItem(item);
                else
                    UnequipItem(item);
                break;

    replace with:

    
            case ITEM_PICK:
                if (!item->IsEquipped())
                    {
                    if (GetQuestFlag("ARMOR.CHECKER") && get_global_time() < GetQuestFlag("ARMOR.CHECKER"))
                    {
                         ChatPacket(CHAT_TYPE_INFO, " you need to wait %d sec.",  (GetQuestFlag("ARMOR.CHECKER") - get_global_time()) % 60);
                        return false;
                    }
                    EquipItem(item);
                    SetQuestFlag("ARMOR.CHECKER", get_global_time() + 3);
                    }
                else
                    UnequipItem(item);
                break;

     

    I do not like working with QuestFlags where it is not necessary.

     

  6. //char.h
    //search
    boost::unordered_map<VID, size_t> TargetVIDMap;
    
    //replace for normal compilers
    boost::unordered_map<DWORD, size_t> TargetVIDMap;
    
    //replace for modern compilers
    /*At top of the file include <unordered_map> */
    std::unordered_map<uint32_t, size_t> TargetVIDMap;

    It looks like you have the problem regarding higher boost versions

     

  7. // CHAR.H
    
    public:
    	DWORD GetLastEquipCostumeTime() const { return m_dwLastEquipCostumeTime; }
    
    private:
    	DWORD m_dwLastEquipCostumeTime;
    
    };
    
    CHAR.CPP
    //	m_dwKillerPID = 0;
    //	m_iMoveCount = 0;
    	m_dwLastEquipCostumeTime = 0;
    
    
    //CHAR_ITEM.CPP
    
    		case ITEM_COSTUME:
    		{
    			int CalcLastEquipSec = (get_dword_time() - ch->GetLastEquipCostumeTime()) / 3000;
    
    			if (CalcLastMoveSec < 3) // Replace 3 with seconds number.
    			{
    				ChatPacket(CHAT_TYPE_INFO, "Wait three seconds");
    				return false;
    			}
    
    			if (!item->IsEquipped())
    			{
    				EquipItem(item);
    			}
    			else
    			{
    				UnequipItem(item);
    			}
    		}
    		break;

     

    • Love 2
  8. Acum 53 minute, Aliano a spus:

    Thank you ridetpro but i cant see your pic :(

    NOW :) 

    		int iLoss = ((GetNextExp() * aiExpLossPercents[MINMAX(1, GetLevel(), PLAYER_EXP_TABLE_MAX)]) / 100);
    		iLoss = MIN(800000, iLoss);
    
    		if (bTown)
    		{
    			iLoss = 0;
    		}
    
    		if (IsEquipUniqueItem(UNIQUE_ITEM_TEARDROP_OF_GODNESS))
    		{
    			iLoss /= 2;
    		}
    
    		sys_log(0, "DEATH_PENALTY(%s) EXP_LOSS: %d percent %d%%", GetName(), iLoss, aiExpLossPercents[MIN(gPlayerMaxLevel, GetLevel())]);
    		PointChange(POINT_EXP, -iLoss, true);

     

  9. // PythonNetworkStreamPhaseGame.cpp
    // Under  bool CPythonNetworkStream::SendClientVersionPacket() from
    // add
    
    bool CPythonNetworkStream::SendClientVersionPacketNew(int32_t arg)
    {
    	auto ver_arg = std::to_string(arg);
    
    	std::string filename;
    	GetExcutedFileName(filename);
    	filename = CFileNameHelper::NoPath(filename);
    	CFileNameHelper::ChangeDosPath(filename);
    	TPacketCGClientVersion kVersionPacket;
    	kVersionPacket.header = HEADER_CG_CLIENT_VERSION;
    	strncpy(kVersionPacket.filename, filename.c_str(), sizeof(kVersionPacket.filename) - 1);
    	strncpy(kVersionPacket.timestamp, ver_arg.c_str(), sizeof(kVersionPacket.timestamp) - 1);
    
    	if (!Send(sizeof(kVersionPacket), &kVersionPacket))
    	{
    		Tracef("SendClientReportPacket Error");
    	}
    
    	return true;
    }
    
    //PythnNetworkStram.h 
    //	bool SendClientVersionPacket(); Under
    // add
    
    	bool SendClientVersionPacketNew(int32_t arg);
    
    // PythonNetwoStramModule.cpp
    PyObject* netSendCheckVersionPacket(PyObject* poSelf, PyObject* poArgs)
    {
    	int32_t iVer;
    
    	if (!PyTuple_GetInteger(poArgs, 0, &iVer))
    	{
    		return Py_BuildException();
    	}
    
    	CPythonNetworkStream &rns = CPythonNetworkStream::Instance();
    	rns.SendClientVersionPacketNew(iVer);
    	return Py_BuildNone();
    }
    
    // static PyMethodDef s_methods[] =
    
    { "SendVersionPacket", netSendVersionPacket, METH_VARARGS },

     

    Python usage

    def IsVersion(self, arg)
    	net.SendClientVersionPacket(arg)
    
    
    if IsVersion(1111)
    	#Do stuff

    I did not test it.

    :)

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