Jump to content

Recommended Posts

Hi there , i have a problem with 6/7 i try to add them in char_item.cpp 

case 71051 : // Add 6/7
			{
				LPITEM item2;
 
				if (!IsValidItemPosition(DestCell) || !(item2 = GetInventoryItem(wDestCell)))
					return false;
 
				if (item2->IsExchanging() == true)
					return false;
 
				if (item2->IsEquipped())
				{
					ChatPacket(CHAT_TYPE_INFO, "You cannot Change Equipped BNS");
					return false;
				}
 
				if (item2->AddRareAttribute() == true)
				{
					ChatPacket(CHAT_TYPE_INFO, "Change Succesfull!");
 
					int iAddedIdx = item2->GetRareAttrCount() + 4;
					char buf[21];
					snprintf(buf, sizeof(buf), "%u", item2->GetID());
 
					item->SetCount(item->GetCount() - 1);
				}
				else
				{
					ChatPacket(CHAT_TYPE_INFO, "You cannot change more bns");
				}
			}
			break;
 
			case 71052 : // Change 6/7
			{
				LPITEM item2;
 
				if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell)))
					return false;
 
				if (item2->IsExchanging() == true)
					return false;
 
				if (item2->IsEquipped())
				{
					ChatPacket(CHAT_TYPE_INFO, "You cannot Change Equipped BNS");
					return false;
				}
 
				if (item2->ChangeRareAttribute() == true)
				{
					ChatPacket(CHAT_TYPE_INFO, "Change SuccesFull");
 
					char buf[21];
					snprintf(buf, sizeof(buf), "%u", item2->GetID());
					item->SetCount(item->GetCount() - 1);
				}
				else
				{
					ChatPacket(CHAT_TYPE_INFO, "You cannot change more bns");
				}
			}
			break;

i added in char_item.cpp i use . USE_SPECIAL witch is in my Protoreader.cpp but dose not work at all any help?

 

this is the item_proto.txt (i use txt not sql)

71051	재경비서	ITEM_USE	USE_ADD_ATTRIBUTE2	1	DROP | SELL | GIVE | MYSHOP	ITEM_STACKABLE | LOG	NONE	NONE	100000	150000	0	0	0	LIMIT_NONE	0	LIMIT_NONE	0	APPLY_NONE	0	APPLY_NONE	0	APPLY_NONE	0	APPLY_NONE	0	APPLY_NONE	0	APPLY_NONE	0	0	0	0	0	0	0	0	0	0												
71052	재가비서	ITEM_USE	USE_CHANGE_ATTRIBUTE2	1	DROP | SELL | GIVE | MYSHOP	ITEM_STACKABLE | LOG	NONE	NONE	100000	100000	0	0	0	LIMIT_NONE	0	LIMIT_NONE	0	APPLY_NONE	0	APPLY_NONE	0	APPLY_NONE	0	APPLY_NONE	0	APPLY_NONE	0	APPLY_NONE	0	0	0	0	0	0	0	0	0	0												

Thanks!

Edited by ilgryu
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

#Solve 

 

	switch (item->GetVnum())
	{
		case 71051 : // Add 6/7
		{
			LPITEM item2;

			if (!IsValidItemPosition(DestCell) || !(item2 = GetInventoryItem(wDestCell)))
				return false;

			if (item2->IsExchanging() == true)
				return false;

			if (item2->IsEquipped())
			{
				ChatPacket(CHAT_TYPE_INFO, "You cannot Change Equipped BNS");
				return false;
			}
			
			if (item2->GetType() == ITEM_COSTUME)
				return false;

			if (item2->AddRareAttribute() == true)
			{
				ChatPacket(CHAT_TYPE_INFO, "Change Succesfull!");

				int iAddedIdx = item2->GetRareAttrCount() + 4;
				char buf[21];
				snprintf(buf, sizeof(buf), "%u", item2->GetID());

				item->SetCount(item->GetCount() - 1);
			}
			else
			{
				ChatPacket(CHAT_TYPE_INFO, "You cannot change more bns");
			}
			
			return true;
		}
		break;

		case 71052 : // Change 6/7
		{
			LPITEM item2;

			if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell)))
				return false;

			if (item2->IsExchanging() == true)
				return false;

			if (item2->IsEquipped())
			{
				ChatPacket(CHAT_TYPE_INFO, "You cannot Change Equipped BNS");
				return false;
			}

			if (item2->GetType() == ITEM_COSTUME)
				return false;

			if (item2->ChangeRareAttribute() == true)
			{
				ChatPacket(CHAT_TYPE_INFO, "Change SuccesFull");

				char buf[21];
				snprintf(buf, sizeof(buf), "%u", item2->GetID());
				item->SetCount(item->GetCount() - 1);
			}
			else
			{
				ChatPacket(CHAT_TYPE_INFO, "You cannot change more bns");
			}
			
			return true;
		}
		break;
	}

this is what i come with and also i put in txt instead of USE_SPECIAL i put USE_ADD_ATTRIBUTE on both. You can close this topic thanks!

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



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