Jump to content

[Gaya System] Buy the item just once?


Recommended Posts

  • Bronze

Hello, dear community!

I come here with this problem... and i dont have any idea how to solve it..

Video:

.gif

Hmm, how to explain.. i want after the player x buy the item he chooses.. to disappear the item or appear another... 
And if you ask why.. is simple they will exploit on this.. they gather 999 gaya and wait for the best item to appear and buy with all gaya money the same item over and over.. and destroy the whole concept of gaya system.. and is sad :(

 

Any help guys please?

  • Love 1
  • Love 1
Link to comment
Share on other sites

  • Bronze
On 1/10/2020 at 2:42 AM, iFreakTime~.~ said:

Easiest solution ? Refresh the whole shop when someone buys something.

Search in game/char.cpp in void CHARACTER::GemShopBuy(BYTE bPos)

   LPITEM item = ITEM_MANAGER::instance().CreateItem(dwVnum, bCount);
    if(item)

{

add before }

RefreshGemShopItems();

respect sir for answer ty for helping me but now another little problem :D

.gif

  • Love 1
Link to comment
Share on other sites

void CHARACTER::GemShopBuy(BYTE bPos)
{
	if (bPos >= GEM_SLOTS_MAX_NUM){
		ChatPacket(CHAT_TYPE_INFO, LC_TEXT("[Gaya] Slot overflow."));
		return;
	}
	
	DWORD	dwVnum = CShopManager::instance().GemShopGetVnumById(m_gemItems[bPos].bItemId);
	BYTE	bCount = CShopManager::instance().GemShopGetCountById(m_gemItems[bPos].bItemId);
	DWORD	dwPrice = CShopManager::instance().GemShopGetPriceById(m_gemItems[bPos].bItemId);
	
	if (GetGem() < (int) dwPrice){
		ChatPacket(CHAT_TYPE_INFO, LC_TEXT("[Gaya] Nu ai suficient Gaya."));
		return;
	}
	
	if(m_gemItems[bPos].bSlotStatus == 1){
		ChatPacket(CHAT_TYPE_INFO, LC_TEXT("[Gaya] Acest slot nu este deblocat."));
		return;
	}
	
	LPITEM item = AutoGiveItem(dwVnum, bCount);
	
	if(item)
		PointChange(POINT_GEM, -dwPrice, false);

	RefreshGemShopItems();
}

 

  • Love 1
Link to comment
Share on other sites

  • Bronze
On 1/10/2020 at 9:16 PM, ManiacRobert said:

void CHARACTER::GemShopBuy(BYTE bPos)
{
	if (bPos >= GEM_SLOTS_MAX_NUM){
		ChatPacket(CHAT_TYPE_INFO, LC_TEXT("[Gaya] Slot overflow."));
		return;
	}
	
	DWORD	dwVnum = CShopManager::instance().GemShopGetVnumById(m_gemItems[bPos].bItemId);
	BYTE	bCount = CShopManager::instance().GemShopGetCountById(m_gemItems[bPos].bItemId);
	DWORD	dwPrice = CShopManager::instance().GemShopGetPriceById(m_gemItems[bPos].bItemId);
	
	if (GetGem() < (int) dwPrice){
		ChatPacket(CHAT_TYPE_INFO, LC_TEXT("[Gaya] Nu ai suficient Gaya."));
		return;
	}
	
	if(m_gemItems[bPos].bSlotStatus == 1){
		ChatPacket(CHAT_TYPE_INFO, LC_TEXT("[Gaya] Acest slot nu este deblocat."));
		return;
	}
	
	LPITEM item = AutoGiveItem(dwVnum, bCount);
	
	if(item)
		PointChange(POINT_GEM, -dwPrice, false);

	RefreshGemShopItems();
}

 

Hello sir. thanks for trying to help me with this little problem!

 

 

UPDATE: i test this code and no result.. :(

 

Link to comment
Share on other sites

  • Bronze
4 hours ago, iFreakTime~.~ said:

With original function you will get the correct item ?

yep.. but i need something like after a player buy a item to be unable to buy again same item or to remain after a empty slot or replace with another item.. something like this.. i hope you can come with a method sir :(

Link to comment
Share on other sites

  • Bronze
21 hours ago, iFreakTime~.~ said:

Hmm.. I will test something in my test server and i come with a solution.

test it because if you use same gaya system like me you will have a problem.. and is a BIG problem can destroy the hole gameplay this little function.

 

PS: is a high chance to have same system gaya like me.. because i ask a friend and he builds the gameplay with gaya and guesses what.. this friend have the same problem as me and he didn't notice.. test it also for you sir on your server to see if is the same. (OFICIAL WORKS IS: after buying an item to replace with another.. but for me, i like also do not have access to buy another or to remain an empty slot.. one of this all 3 is perfect)

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.