Jump to content

Recommended Posts

  • Active+ Member

Hi guys,

how can I change disappearing time of dropped items for SetOwnershipEvent - 3mins (180sec)  and DestroyEvent - 6 mins (300sec)? I tried to find solution for my code, but I'm not successful.

There are code of my files:

item.h:

http://pastebin.com/4JbR9sLh

Thank you for your answers!

Kind Regards ReFresh

Edited by ReFresh

I'll be always helpful!  😉

Link to comment
https://metin2.dev/topic/12868-help-with-change-disappearing-time-of-items/
Share on other sites

  • 2 weeks later...
  • 4 weeks later...

Hello,

For destroy item, you need to modified this code in the char_item.cpp:

(60) = time sec

 

	if (pkItemToDrop->AddToGround(GetMapIndex(), pxPos))
	{
		// 한국에는 아이템을 버리고 복구해달라는 진상유저들이 많아서
		// 아이템을 바닥에 버릴 시 속성로그를 남긴다.
		if (LC_IsYMIR())
			item->AttrLog();

		ChatPacket(CHAT_TYPE_INFO, LC_TEXT("떨어진 아이템은 3분 후 사라집니다."));
		pkItemToDrop->StartDestroyEvent(60);

		ITEM_MANAGER::instance().FlushDelayedSave(pkItemToDrop);
		
		char szHint[32 + 1];
		snprintf(szHint, sizeof(szHint), "%s %u %u", pkItemToDrop->GetName(), pkItemToDrop->GetCount(), pkItemToDrop->GetOriginalVnum());
		LogManager::instance().ItemLog(this, pkItemToDrop, "DROP", szHint);
		//Motion(MOTION_PICKUP);
	}

	return true;
}
  • Good 1
  • Love 2

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.