Jump to content
  • 0

Gold Bars in Private Store (Buy/Sell)


Question

Posted

Hello, in some servers I have seen that private stores made by players use gold bars instead of adena as the currency. How can I do this? Is there a patch available?

8 answers to this question

Recommended Posts

  • 0
Posted

Hello, in some servers I have seen that private stores made by players use gold bars instead of adena as the currency. How can I do this? Is there a patch available?

Which client?

  • 0
Posted

I will be willing to pay someone to get this working.

 

dont worry, you dont have to buy anything, I will code it as soon as I go home, cause now Im from the phone

 

dont waste ur money ;)

  • 0
Posted

here is your code:

### Eclipse Workspace Patch 1.0
#P aCis_gameserver
Index: java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreListBuy.java
===================================================================
--- java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreListBuy.java	(revision 42)
+++ java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreListBuy.java	(working copy)
@@ -28,7 +28,7 @@
	{
		_storePlayer = storePlayer;
		_activeChar = player;
-		_playerAdena = _activeChar.getAdena();
+		_playerAdena = _activeChar.getInventory().getItemByItemId(3470)==null?0:_activeChar.getInventory().getItemByItemId(3470).getCount();
		_storePlayer.getSellList().updateItems(); // Update SellList for case inventory content has changed
		_items = _storePlayer.getBuyList().getAvailableItems(_activeChar.getInventory());
	}
### Eclipse Workspace Patch 1.0
#P aCis_gameserver
Index: java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreListSell.java
===================================================================
--- java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreListSell.java	(revision 42)
+++ java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreListSell.java	(working copy)
@@ -30,7 +30,7 @@
	{
		_activeChar = player;
		_storePlayer = storePlayer;
-		_playerAdena = _activeChar.getAdena();
+		_playerAdena = _activeChar.getInventory().getItemByItemId(3470)==null?0:_activeChar.getInventory().getItemByItemId(3470).getCount();
		_items = _storePlayer.getSellList().getItems();
		_packageSale = _storePlayer.getSellList().isPackaged();
	}
### Eclipse Workspace Patch 1.0
#P aCis_gameserver
Index: java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreManageListBuy.java
===================================================================
--- java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreManageListBuy.java	(revision 42)
+++ java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreManageListBuy.java	(working copy)
@@ -28,7 +28,7 @@
	public PrivateStoreManageListBuy(L2PcInstance player)
	{
		_objId = player.getObjectId();
-		_playerAdena = player.getAdena();
+		_playerAdena = player.getInventory().getItemByItemId(3470)==null?0:player.getInventory().getItemByItemId(3470).getCount();
		_itemList = player.getInventory().getUniqueItems(false, true);
		_buyList = player.getBuyList().getItems();
	}
### Eclipse Workspace Patch 1.0
#P aCis_gameserver
Index: java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreManageListSell.java
===================================================================
--- java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreManageListSell.java	(revision 42)
+++ java/net/sf/l2j/gameserver/network/serverpackets/PrivateStoreManageListSell.java	(working copy)
@@ -31,7 +31,7 @@
	public PrivateStoreManageListSell(L2PcInstance player, boolean isPackageSale)
	{
		_objId = player.getObjectId();
-		_playerAdena = player.getAdena();
+		_playerAdena = player.getInventory().getItemByItemId(3470)==null?0:player.getInventory().getItemByItemId(3470).getCount();
		player.getSellList().updateItems();
		_packageSale = isPackageSale;
		_itemList = player.getInventory().getAvailableItems(player.getSellList());
### Eclipse Workspace Patch 1.0
#P aCis_gameserver
Index: java/net/sf/l2j/gameserver/model/TradeList.java
===================================================================
--- java/net/sf/l2j/gameserver/model/TradeList.java	(revision 42)
+++ java/net/sf/l2j/gameserver/model/TradeList.java	(working copy)
@@ -759,10 +759,10 @@
			else if (playerInventory.getItemByItemId(item.getItemId()) == null)
				slots++;
		}
-		
-		if (totalPrice > playerInventory.getAdena())
+		int gbcount=playerInventory.getItemByItemId(3470)==null?0:playerInventory.getItemByItemId(3470).getCount();
+		if (totalPrice > gbcount)
		{
-			player.sendPacket(SystemMessageId.YOU_NOT_ENOUGH_ADENA);
+			player.sendMessage("Incorrect item count");
			return 1;
		}

@@ -782,15 +782,11 @@
		final InventoryUpdate ownerIU = new InventoryUpdate();
		final InventoryUpdate playerIU = new InventoryUpdate();

-		final L2ItemInstance adenaItem = playerInventory.getAdenaInstance();
-		if (!playerInventory.reduceAdena("PrivateStore", totalPrice, player, _owner))
-		{
-			player.sendPacket(SystemMessageId.YOU_NOT_ENOUGH_ADENA);
-			return 1;
-		}
+		final L2ItemInstance adenaItem = playerInventory.getItemByItemId(3470);

		playerIU.addItem(adenaItem);
-		ownerInventory.addAdena("PrivateStore", totalPrice, _owner, player);
+		ownerInventory.addItem("PrivateStore", 3470, totalPrice, player, null);
+		ownerInventory.destroyItem("PrivateStore", adenaItem, totalPrice, player, null);

		boolean ok = true;

@@ -932,7 +928,7 @@
				break;
			}

-			if (ownerInventory.getAdena() < _totalPrice)
+			if (ownerInventory.getItemByItemId(3470).getCount() < _totalPrice)
				continue;

			// TODO: eventually test and fix this.
@@ -1015,15 +1011,16 @@
		// Transfer adena
		if (totalPrice > 0)
		{
-			if (totalPrice > ownerInventory.getAdena())
+			int gbcount=ownerInventory.getItemByItemId(3470)==null?0:playerInventory.getItemByItemId(3470).getCount();
+			if (totalPrice > gbcount)
				return false;

-			final L2ItemInstance adenaItem = ownerInventory.getAdenaInstance();
-			ownerInventory.reduceAdena("PrivateStore", totalPrice, _owner, player);
+			final L2ItemInstance adenaItem = ownerInventory.getItemByItemId(3470);
+			playerInventory.destroyItem("PrivateStore", adenaItem, totalPrice, _owner, null);
			ownerIU.addItem(adenaItem);

-			playerInventory.addAdena("PrivateStore", totalPrice, player, _owner);
-			playerIU.addItem(playerInventory.getAdenaInstance());
+			ownerInventory.addItem("PrivateStore", 3470, totalPrice, player, null);
+			playerIU.addItem(playerInventory.getItemByItemId(3470));
		}

		if (ok)

 

Its handwritten and not tested, but im 95% sure that you wont have any problems

 

PS: Coded on aCis (it will be very similar with freya since aCis is based on freya)

PS2: I used the Gold Bar 3470 as ID, feel free to change it with replace all ;)

 

PS3: Dont test on live server ;D

Guest
This topic is now closed to further replies.


  • Posts

    • Dear users of the SocNet service! We are actively looking for suppliers for the following product positions: — Snapchat old and new accounts | With snapscores | Geo: Europe/USA | Full access via email/phone number — Reddit old accounts (brute or hacked origin, self-registered) with post and comment karma from 100 to 100,000+ | Full access with email included — LinkedIn old accounts with real connections | Geo: Europe/USA | Full access via email + active 2FA password — Instagram old accounts (2010-2023) | Full access via email (possibly also linked 2FA password) — Facebook old accounts (2010-2023) | Full access via email (possibly also linked 2FA password) | With friends or without friends | Geo: Europe/USA/Asia — Threads accounts | Full access via email (possibly also linked 2FA password) — TikTok/Facebook/Google ADS agency advertising accounts Contact us at the details below — we’ll discuss the conditions! We are always open to other partnership offers as well. Contacts and support: ➡ Telegram: https://t.me/socnet_support✅ ➡ WhatsApp: https://wa.me/79051904467✅ ➡ Discord: socnet_support ✅ ➡ ✉ Email: solomonbog@socnet.store ✅ Relevant links: Digital goods store (Website): Go Telegram bot for buying Telegram Stars: Go SMM Panel: Go – promotion of your social media accounts. Store Telegram bot: Go We would like to present you with the current list of promotions and special offers for purchasing products and services of our service: 1. Promo code SEPTEMBER2025 (10% discount) for purchases in our store (Website, bot) in September! You can also use the promo code for the first purchase: SOCNET (15% discount) 2. Get $1 to your store balance or a 10-20% discount, just write your username after registration on our site in the following format "SEND ME BONUS, MY USERNAME IS..." — you need to write it in our forum thread! 3. Get $1 for the first trial run of the SMM Panel: just open a ticket with the subject “Get Trial Bonus” on our website (Support). 4. Weekly giveaways of Telegram Stars in our Telegram channel and in our bot for buying stars! News resources: ➡ Telegram channel: https://t.me/accsforyou_shop✅ ➡ WhatsApp channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n✅ ➡ Discord server: https://discord.gg/y9AStFFsrh✅ Also through these contacts you can: — get consultation on wholesale purchases — establish a partnership (current partners: https://socnet.bgng.io/partners) — become our supplier
    • Dear users of the SocNet service! We are actively looking for suppliers for the following product positions: — Snapchat old and new accounts | With snapscores | Geo: Europe/USA | Full access via email/phone number — Reddit old accounts (brute or hacked origin, self-registered) with post and comment karma from 100 to 100,000+ | Full access with email included — LinkedIn old accounts with real connections | Geo: Europe/USA | Full access via email + active 2FA password — Instagram old accounts (2010-2023) | Full access via email (possibly also linked 2FA password) — Facebook old accounts (2010-2023) | Full access via email (possibly also linked 2FA password) | With friends or without friends | Geo: Europe/USA/Asia — Threads accounts | Full access via email (possibly also linked 2FA password) — TikTok/Facebook/Google ADS agency advertising accounts Contact us at the details below — we’ll discuss the conditions! We are always open to other partnership offers as well. Contacts and support: ➡ Telegram: https://t.me/socnet_support✅ ➡ WhatsApp: https://wa.me/79051904467✅ ➡ Discord: socnet_support ✅ ➡ ✉ Email: solomonbog@socnet.store ✅ Relevant links: Digital goods store (Website): Go Telegram bot for buying Telegram Stars: Go SMM Panel: Go – promotion of your social media accounts. Store Telegram bot: Go We would like to present you with the current list of promotions and special offers for purchasing products and services of our service: 1. Promo code SEPTEMBER2025 (10% discount) for purchases in our store (Website, bot) in September! You can also use the promo code for the first purchase: SOCNET (15% discount) 2. Get $1 to your store balance or a 10-20% discount, just write your username after registration on our site in the following format "SEND ME BONUS, MY USERNAME IS..." — you need to write it in our forum thread! 3. Get $1 for the first trial run of the SMM Panel: just open a ticket with the subject “Get Trial Bonus” on our website (Support). 4. Weekly giveaways of Telegram Stars in our Telegram channel and in our bot for buying stars! News resources: ➡ Telegram channel: https://t.me/accsforyou_shop✅ ➡ WhatsApp channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n✅ ➡ Discord server: https://discord.gg/y9AStFFsrh✅ Also through these contacts you can: — get consultation on wholesale purchases — establish a partnership (current partners: https://socnet.bgng.io/partners) — become our supplier
    • Dear users of the SocNet service! We are actively looking for suppliers for the following product positions: — Snapchat old and new accounts | With snapscores | Geo: Europe/USA | Full access via email/phone number — Reddit old accounts (brute or hacked origin, self-registered) with post and comment karma from 100 to 100,000+ | Full access with email included — LinkedIn old accounts with real connections | Geo: Europe/USA | Full access via email + active 2FA password — Instagram old accounts (2010-2023) | Full access via email (possibly also linked 2FA password) — Facebook old accounts (2010-2023) | Full access via email (possibly also linked 2FA password) | With friends or without friends | Geo: Europe/USA/Asia — Threads accounts | Full access via email (possibly also linked 2FA password) — TikTok/Facebook/Google ADS agency advertising accounts Contact us at the details below — we’ll discuss the conditions! We are always open to other partnership offers as well. Contacts and support: ➡ Telegram: https://t.me/socnet_support✅ ➡ WhatsApp: https://wa.me/79051904467✅ ➡ Discord: socnet_support ✅ ➡ ✉ Email: solomonbog@socnet.store ✅ Relevant links: Digital goods store (Website): Go Telegram bot for buying Telegram Stars: Go SMM Panel: Go – promotion of your social media accounts. Store Telegram bot: Go We would like to present you with the current list of promotions and special offers for purchasing products and services of our service: 1. Promo code SEPTEMBER2025 (10% discount) for purchases in our store (Website, bot) in September! You can also use the promo code for the first purchase: SOCNET (15% discount) 2. Get $1 to your store balance or a 10-20% discount, just write your username after registration on our site in the following format "SEND ME BONUS, MY USERNAME IS..." — you need to write it in our forum thread! 3. Get $1 for the first trial run of the SMM Panel: just open a ticket with the subject “Get Trial Bonus” on our website (Support). 4. Weekly giveaways of Telegram Stars in our Telegram channel and in our bot for buying stars! News resources: ➡ Telegram channel: https://t.me/accsforyou_shop✅ ➡ WhatsApp channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n✅ ➡ Discord server: https://discord.gg/y9AStFFsrh✅ Also through these contacts you can: — get consultation on wholesale purchases — establish a partnership (current partners: https://socnet.bgng.io/partners) — become our supplier
    • Dear users of the SocNet service! We are actively looking for suppliers for the following product positions: — Snapchat old and new accounts | With snapscores | Geo: Europe/USA | Full access via email/phone number — Reddit old accounts (brute or hacked origin, self-registered) with post and comment karma from 100 to 100,000+ | Full access with email included — LinkedIn old accounts with real connections | Geo: Europe/USA | Full access via email + active 2FA password — Instagram old accounts (2010-2023) | Full access via email (possibly also linked 2FA password) — Facebook old accounts (2010-2023) | Full access via email (possibly also linked 2FA password) | With friends or without friends | Geo: Europe/USA/Asia — Threads accounts | Full access via email (possibly also linked 2FA password) — TikTok/Facebook/Google ADS agency advertising accounts Contact us at the details below — we’ll discuss the conditions! We are always open to other partnership offers as well. Contacts and support: ➡ Telegram: https://t.me/socnet_support✅ ➡ WhatsApp: https://wa.me/79051904467✅ ➡ Discord: socnet_support ✅ ➡ ✉ Email: solomonbog@socnet.store ✅ Relevant links: Digital goods store (Website): Go Telegram bot for buying Telegram Stars: Go SMM Panel: Go – promotion of your social media accounts. Store Telegram bot: Go We would like to present you with the current list of promotions and special offers for purchasing products and services of our service: 1. Promo code SEPTEMBER2025 (10% discount) for purchases in our store (Website, bot) in September! You can also use the promo code for the first purchase: SOCNET (15% discount) 2. Get $1 to your store balance or a 10-20% discount, just write your username after registration on our site in the following format "SEND ME BONUS, MY USERNAME IS..." — you need to write it in our forum thread! 3. Get $1 for the first trial run of the SMM Panel: just open a ticket with the subject “Get Trial Bonus” on our website (Support). 4. Weekly giveaways of Telegram Stars in our Telegram channel and in our bot for buying stars! News resources: ➡ Telegram channel: https://t.me/accsforyou_shop✅ ➡ WhatsApp channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n✅ ➡ Discord server: https://discord.gg/y9AStFFsrh✅ Also through these contacts you can: — get consultation on wholesale purchases — establish a partnership (current partners: https://socnet.bgng.io/partners) — become our supplier
    • [CENTER] [B][SIZE=5]09-06-2025[/SIZE][/B][SIZE=5] - OUR TOPIC IS RELEVANT! CONTACT US BY THE CONTACTS BELOW[/SIZE] ~ [B]CONTACT: TELEGRAM[/B] - [URL]https://t.me/Gpdhack[/URL] (@Gpdhack) [B]SESSION[/B]: 05335c223c1ca08d17f6a3db0ad0d779809974d8e2d202dedb633ad57fedf1971d [/CENTER]
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock