[Admin] tierrilopes Posted March 7, 2018 at 01:02 AM Share Posted March 7, 2018 at 01:02 AM Go to file shop.cpp Look for: LPITEM item; if (m_pkPC) { item = r_item.pkItem; } else { item = ITEM_MANAGER::instance().CreateItem (r_item.vnum, r_item.count); } if (!item) { return SHOP_SUBHEADER_GC_SOLD_OUT; } Add below: //block duplicate item purchase begin if (ch->CountSpecifyItem(item->GetVnum()) >= 1) { ch->ChatPacket(CHAT_TYPE_INFO, "You can only buy one item of each type."); return SHOP_SUBHEADER_GC_END; } //block duplicate item purchase end It should look like this: Link to comment
LuizFernando Posted March 7, 2018 at 01:43 AM Share Posted March 7, 2018 at 01:43 AM Nice! Link to comment
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 accountSign in
Already have an account? Sign in here.
Sign In Now