Jump to content
×
×
  • Create New...
  • 0

Linking items in chat with other's equipment


Shahin

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 comment
Share on other sites

  • Answers 7
  • Created
  • Last Reply

Top Posters For This Question

7 answers to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Activity

    1. 0

      Looking for Someone to create the queries etc for armors and weapons

    2. 13

      Official Private Shop Search

    3. 944

      [40250] Reference Serverfile + Client + Src [15 Available Languages]

    4. 79

      GUI Teleport System

    5. 0

      inventory slot marking system cant compile

    6. 8

      Inventory Bug

    7. 63

      Metin2 Dev - Changelogs

  • Recently Browsing

    • No registered users viewing this page.

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.