Jump to content

item drop check (source) problem


Recommended Posts

Hello guys, I tried to add the check that Sanchez posted , but it doesn't work properly

 

The check was ment to kick the player if he drops 4 or more items per second, but it kicks the player if he drops the 4 items even if he drops them at a interval of 1 minute.

 

This is the tutorial which I followed

 1. Open game/char_item.cpp and search for this:
 

 
if (pkItemToDrop->AddToGround(GetMapIndex(), pxPos))

 
     2. Add this under that:
 

 
		// If the user dropped min. 4 items in 1 second
		if (thecore_pulse() < (LastDropTime + 1 * 25) && CountDrops >= 4)
		{
			// Close the connection with the player
			CountDrops = 0;
			sys_err("%s[%d] has been disconnected because of drophack using", GetName(), GetPlayerID());
			GetDesc()->SetPhase(PHASE_CLOSE);
			return false;
		}

 
     3. Search for this still in game/char_item.cpp:
 

 
LogManager::instance().ItemLog(this, pkItemToDrop, "DROP", szHint);

 
     4. Add this under that:
 

 
		LastDropTime = thecore_pulse();
		CountDrops++;

 
     5. Open game/char.h and add these:
 

 
		int					LastDropTime;
		int					CountDrops;

 
     6. Open game/char.cpp and search for this:
 

 
void CHARACTER::Initialize()

 
     7. Add these to the event:
 

 
	CountDrops = 0;
	LastDropTime = 0;

Kind Regards, DaNy3LL

  • Metin2 Dev 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 6

      Voooxy aka m2core.tech scammer

    2. 117

      Ulthar SF V2 (TMP4 Base)

    3. 0

      UI types and attributes

    4. 12

      Shaman Skills Problem

    5. 19

      Mount like Horse

    6. 0

      System yohara

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.