Jump to content
  • 0

Linking items in chat with other's equipment


Shahin
Go to solution Solved by M2Dev,

Question

I can Tag back in chat any item sent by anyone.. 

b41ca98794239b10a582734f9e91b574.gif

 

Here is my input_main.cpp for Item_prism: ( if any changes need to be done, i want the Prism to not be needed in chat item linking)

Spoiler
int ProcessTextTag(LPCHARACTER ch, const char * c_pszText, size_t len)
{
	//개인상점중에 금강경을 사용할 경우
	//0 : 정상적으로 사용
	//1 : 금강경 부족
	//2 : 금강경이 있으나, 개인상점에서 사용중
	//3 : 기타
	//4 : 에러
	int hyperlinks;
	bool colored;

	GetTextTagInfo(c_pszText, len, hyperlinks, colored);

	if (colored == true && hyperlinks == 0)
		return 4;

#ifdef ENABLE_NEWSTUFF
	if (g_bDisablePrismNeed)
		return 0;
#endif
	int nPrismCount = ch->CountSpecifyItem(ITEM_PRISM);

	if (nPrismCount < hyperlinks)
		return 1;


	if (!ch->GetMyShop())
	{
		ch->RemoveSpecifyItem(ITEM_PRISM, hyperlinks);
		return 0;
	} else
	{
		int sellingNumber = ch->GetMyShop()->GetNumberByVnum(ITEM_PRISM);
		if(nPrismCount - sellingNumber < hyperlinks)
		{
			return 2;
		} else
		{
			ch->RemoveSpecifyItem(ITEM_PRISM, hyperlinks);
			return 0;
		}
	}

	return 0;
}

 

 

Thank You :D

Link to post

7 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.


  • Activity

    1. 1

      TRANSMUTATION WITH BLESSING SCROLL AND MAGIC STONE 100%

    2. 1

      [HowTo] The "hello world" of metin2

    3. 1

      TRANSMUTATION WITH BLESSING SCROLL AND MAGIC STONE 100%

    4. 0

      Sash absorb bug

    5. 0

      Debug DB vanilla Core

    6. 0

      Give item after kill monster [c++]

    7. 6

      Current Peer host names...

  • Recently Browsing

    No registered users viewing this page.

Shoutbox

Shoutbox

Chatroom Rules

 

Join our Discord

A request for help = Shoutbox Ban

Be respectful & Respect the rules

 

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