Jump to content
  • 0

How to change adena for other item in trade?


Question

4 answers to this question

Recommended Posts

  • 0
Posted

any admin can move to correct session?

 

When you sit for sell, I dont want to be Adena. I want other coin... one exemple is festival adena..

Is very complex for change? I tried many time... but I could not.

  • 0
Posted

You can edit the currency of private store buy and private store sell (separately) in config

(l2jmod.properties)

Index: java/com/l2jserver/Config.java
===================================================================
--- java/com/l2jserver/Config.java	(revision 4410)
+++ java/com/l2jserver/Config.java	(working copy)
@@ -676,6 +676,8 @@
	public static String L2JMOD_MULTILANG_DEFAULT;
	public static boolean L2JMOD_MULTILANG_VOICED_ALLOW;
	public static boolean L2WALKER_PROTECTION;
+	public static int STORE_BUY_CURRENCY;
+	public static int STORE_SELL_CURRENCY;

	//--------------------------------------------------
	// NPC Settings
@@ -2285,6 +2287,8 @@
					L2JMOD_MULTILANG_VOICED_ALLOW = Boolean.parseBoolean(L2JModSettings.getProperty("MultiLangVoiceCommand", "True"));

					L2WALKER_PROTECTION = Boolean.parseBoolean(L2JModSettings.getProperty("L2WalkerProtection", "False"));
+					STORE_BUY_CURRENCY = Integer.parseInt(L2JModSettings.getProperty("PrivateStoreBuyMoneda", "57"));
+					STORE_SELL_CURRENCY = Integer.parseInt(L2JModSettings.getProperty("PrivateStoreSellMoneda", "57"));
				}
				catch (Exception e)
				{
Index: java/com/l2jserver/gameserver/model/TradeList.java
===================================================================
--- java/com/l2jserver/gameserver/model/TradeList.java	(revision 4410)
+++ java/com/l2jserver/gameserver/model/TradeList.java	(working copy)
@@ -802,9 +802,10 @@
				slots++;
		}

-		if (totalPrice > playerInventory.getAdena())
+		if (totalPrice > player.getBuyStoreCurrency())
		{
-			player.sendPacket(new SystemMessage(SystemMessageId.YOU_NOT_ENOUGH_ADENA));
+			final String name = ItemTable.getInstance().getTemplate(Config.STORE_BUY_CURRENCY).getName();
+			player.sendMessage("You dont have enough "+name);
			return 1;
		}

@@ -823,12 +824,12 @@
		// Prepare inventory update packets
		final InventoryUpdate ownerIU = new InventoryUpdate();
		final InventoryUpdate playerIU = new InventoryUpdate();
-		
-		final L2ItemInstance adenaItem = playerInventory.getAdenaInstance();
-		playerInventory.reduceAdena("PrivateStore", totalPrice, player, _owner);
+		final int moneda = Config.STORE_BUY_CURRENCY;
+		final L2ItemInstance adenaItem = playerInventory.getItemByItemId(moneda);
+		player.destroyItemByItemId("PrivateStore", moneda, totalPrice, _owner, true);
		playerIU.addItem(adenaItem);
-		ownerInventory.addAdena("PrivateStore", totalPrice, _owner, player);
-		ownerIU.addItem(ownerInventory.getAdenaInstance());
+		ownerInventory.addItem("PrivateStore", moneda, totalPrice, _owner, player);
+		ownerIU.addItem(ownerInventory.getItemByItemId(moneda));

		boolean ok = true;

@@ -965,7 +966,7 @@
				break;
			}

-			if (ownerInventory.getAdena() < _totalPrice)
+			if (_owner.getSellStoreCurrency() < _totalPrice)
				continue;

			// Check if requested item is available for manipulation
@@ -1043,11 +1044,12 @@
			if (totalPrice > ownerInventory.getAdena())
				// should not happens, just a precaution
				return false;
-			final L2ItemInstance adenaItem = ownerInventory.getAdenaInstance();
-			ownerInventory.reduceAdena("PrivateStore", totalPrice, _owner, player);
+			final int moneda = Config.STORE_SELL_CURRENCY;
+			final L2ItemInstance adenaItem = ownerInventory.getItemByItemId(moneda);
+			ownerInventory.destroyItemByItemId("PrivateStore", moneda, totalPrice, _owner, player);
			ownerIU.addItem(adenaItem);
-			playerInventory.addAdena("PrivateStore", totalPrice, player, _owner);
-			playerIU.addItem(playerInventory.getAdenaInstance());
+			playerInventory.addItem("PrivateStore", moneda, totalPrice, player, _owner);
+			playerIU.addItem(playerInventory.getItemByItemId(moneda));
		}

		if (ok)
Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java	(revision 4410)
+++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -14889,4 +14889,18 @@
			addSkill(SkillTable.getInstance().getInfo(id, nextLevel), true);
		}
	}
+	
+	public synchronized long getBuyStoreCurrency()
+	{
+		L2ItemInstance item = this.getInventory().getItemByItemId(Config.STORE_BUY_CURRENCY);
+		
+		return item == null? 0 : item.getCount();
+	}
+	
+	public synchronized long getSellStoreCurrency()
+	{
+		L2ItemInstance item = this.getInventory().getItemByItemId(Config.STORE_SELL_CURRENCY);
+		
+		return item == null? 0 : item.getCount();
+	}
}
Index: java/com/l2jserver/gameserver/model/itemcontainer/PcInventory.java
===================================================================
--- java/com/l2jserver/gameserver/model/itemcontainer/PcInventory.java	(revision 4410)
+++ java/com/l2jserver/gameserver/model/itemcontainer/PcInventory.java	(working copy)
@@ -85,11 +85,14 @@
		FastList<L2ItemInstance> list = FastList.newInstance();
		for (L2ItemInstance item : _items)
		{
-			if ((!allowAdena && item.getItemId() == 57))
+			final int itemId = item.getItemId();
+			if ((!allowAdena && itemId == 57))
				continue;
-			if ((!allowAncientAdena && item.getItemId() == 5575))
+			if ((!allowAncientAdena && itemId == 5575))
				continue;
-
+			if(itemId == Config.STORE_BUY_CURRENCY)
+				continue;
+			
			boolean isDuplicate = false;
			for (L2ItemInstance litem : list)
			{
Index: java/com/l2jserver/gameserver/network/clientpackets/SetPrivateStoreListBuy.java
===================================================================
--- java/com/l2jserver/gameserver/network/clientpackets/SetPrivateStoreListBuy.java	(revision 4410)
+++ java/com/l2jserver/gameserver/network/clientpackets/SetPrivateStoreListBuy.java	(working copy)
@@ -140,7 +140,7 @@
		}

		// Check for available funds
-		if (totalCost > player.getAdena())
+		if (totalCost > player.getBuyStoreCurrency())
		{
			player.sendPacket(new PrivateStoreManageListBuy(player));
			player.sendPacket(new SystemMessage(SystemMessageId.THE_PURCHASE_PRICE_IS_HIGHER_THAN_MONEY));
Index: java/com/l2jserver/gameserver/network/serverpackets/PrivateStoreListBuy.java
===================================================================
--- java/com/l2jserver/gameserver/network/serverpackets/PrivateStoreListBuy.java	(revision 4410)
+++ java/com/l2jserver/gameserver/network/serverpackets/PrivateStoreListBuy.java	(working copy)
@@ -33,7 +33,7 @@
	public PrivateStoreListBuy(L2PcInstance player, L2PcInstance storePlayer)
	{
		_objId = storePlayer.getObjectId();
-		_playerAdena = player.getAdena();
+		_playerAdena = player.getBuyStoreCurrency();
		storePlayer.getSellList().updateItems(); // Update SellList for case inventory content has changed
		_items = storePlayer.getBuyList().getAvailableItems(player.getInventory());
	}
Index: java/com/l2jserver/gameserver/network/serverpackets/PrivateStoreListSell.java
===================================================================
--- java/com/l2jserver/gameserver/network/serverpackets/PrivateStoreListSell.java	(revision 4410)
+++ java/com/l2jserver/gameserver/network/serverpackets/PrivateStoreListSell.java	(working copy)
@@ -34,7 +34,7 @@
	public PrivateStoreListSell(L2PcInstance player, L2PcInstance storePlayer)
	{
		_objId = storePlayer.getObjectId();
-		_playerAdena = player.getAdena();
+		_playerAdena = player.getSellStoreCurrency();
		_items = storePlayer.getSellList().getItems();
		_packageSale = storePlayer.getSellList().isPackaged();
	}
Index: java/com/l2jserver/gameserver/network/serverpackets/PrivateStoreManageListBuy.java
===================================================================
--- java/com/l2jserver/gameserver/network/serverpackets/PrivateStoreManageListBuy.java	(revision 4410)
+++ java/com/l2jserver/gameserver/network/serverpackets/PrivateStoreManageListBuy.java	(working copy)
@@ -34,7 +34,7 @@
	public PrivateStoreManageListBuy(L2PcInstance player)
	{
		_objId = player.getObjectId();
-		_playerAdena = player.getAdena();
+		_playerAdena = player.getBuyStoreCurrency();
		_itemList = player.getInventory().getUniqueItems(false, true);
		_buyList = player.getBuyList().getItems();
	}
Index: java/com/l2jserver/gameserver/network/serverpackets/PrivateStoreManageListSell.java
===================================================================
--- java/com/l2jserver/gameserver/network/serverpackets/PrivateStoreManageListSell.java	(revision 4410)
+++ java/com/l2jserver/gameserver/network/serverpackets/PrivateStoreManageListSell.java	(working copy)
@@ -42,7 +42,7 @@
	public PrivateStoreManageListSell(L2PcInstance player, boolean isPackageSale)
	{
		_objId = player.getObjectId();
-		_playerAdena = player.getAdena();
+		_playerAdena = player.getSellStoreCurrency();
		player.getSellList().updateItems();
		_packageSale = isPackageSale;
		_itemList = player.getInventory().getAvailableItems(player.getSellList());
Index: java/config/l2jmods.properties
===================================================================
--- java/config/l2jmods.properties	(revision 4410)
+++ java/config/l2jmods.properties	(working copy)
@@ -379,3 +379,14 @@
# Basic protection against L2Walker.
# Default: False
L2WalkerProtection = False
+
+# ---------------------------------------------------------------------------
+# Private Store Buy/Sell - Moneda de cambio
+# ---------------------------------------------------------------------------
+# Elige que moneda quieres que se use como pago en los Private Store Buy (amarillos)
+# Retail: 57, Por Defecto: 57
+PrivateStoreBuyMoneda = 57
+
+# Elige que moneda quieres que se use como pago en los Private Store Sell (morados)
+# Retail: 57, Por Defecto: 57
+PrivateStoreSellMoneda = 57

by b1ggboss

Guest
This topic is now closed to further replies.


  • Posts

    • Advanced Lineage II Event Engine – Flexible, Scalable, and Developer-Friendly Introducing a powerful and fully customizable event engine designed to enhance gameplay, increase player engagement, and simplify event management. Whether you're running a high-rate PvP server or a low-rate retail-like experience, this engine provides the flexibility you need to create and automate dynamic in-game events.   ✅ Compatible with aCis 401 – Fully coded for aCis project (revision 401) and ready for seamless integration. 📜 Delivered as a .diff Patch – Simply apply it and start using it right away!   📸 Check out the screenshots & features: Imgur Album (more soon). Key Features ✔ Fully Configurable – Every aspect of each event can be customized, including timers, rules, rewards, and restrictions. ✔ Seamless Integration – Works with existing server configurations and supports custom scripts or modifications. ✔ Automated Event Rotation – Events can be scheduled or started via a voting phase where players choose the next event. ✔ Multi-Mode Participation – Players can join via commands (.register | .leave | .events) or NPC interactions. ✔ Real-Time Tracking – An on-screen HUD displays kills, scores, and time remaining. ✔ Enhanced PvP Mechanics – Auto-respawn, score-based rewards, and First Blood announcements. ✔ Spectator Mode – Allows non-participants to watch events live. ✔ Detailed Event Logs – Administrators can track player performance, winners, and event results for analysis. Reward System Player-Based Rewards: Configurable options for winning, losing, ranking in the top X, or achieving First Blood. Kill-Based Rewards: Earn rewards per kill or based on streaks. Team-Based Rewards: Incentivize team victories with shared prizes. Included Event Modes Team Fights (TDM): Classic team-based PvP with configurable duration, respawn rules, and score limits. Solo Fights (Deathmatch): Free-for-all PvP—highest kill count wins. Last Survivor (LMS): No respawns—last player standing wins. Lucky Chests: Random chests with rewards, traps, or debuffs. Treasure Hunt: Players race to find a hidden treasure. Monster Massacre (PvE Race): Teams compete to slay the most monsters. Territory Clash: Players battle to control a zone and earn points over time. Ultra Rapid Fire (URF Mode): Boosted stats, reduced skill cooldowns, and enhanced combat speed. Assassin Hunt: A random player is marked as the target—others must eliminate them. Monster Mayhem (Boss Raid): A powerful boss spawns; players must cooperate (or fight each other) to take it down. Power-Up Clash: Players collect battlefield buffs for a combat advantage. Why Choose This Event Engine? ✅ Fast Implementation – Set up new events in minutes with an intuitive configuration system. ✅ Performance Optimized – Lightweight and designed for high player counts without impacting server stability. ✅ Extensive Customization – Easily modify or extend functionality to suit your server’s needs. ✅ Developer Support – Well-documented API and configuration options for easy integration. Transform your server’s event experience with a feature-rich, developer-friendly solution. 🚀 Ready to integrate? Contact us for licensing details! Get Your Copy Today! Upgrade your Lineage II server with this powerful event engine and bring next-level gameplay to your players. With fully customizable settings, automated event management, and seamless integration, this system is a must-have for any serious server administrator.   💰 Pricing: Full License: 100e (One-time payment) Support & Updates: included on full licence   📩 How to Purchase: PM me directly for inquiries and purchases. Discord: @Luminous
    • we sell website templates, make websites to order. Great selection at very good prices. My contacts   discord - adver745645   telegram - @mmopromo
    • Hello everyone, people often ask me how to help me. Here I will describe the general principle of how to create a simple window for ui (unity l2)   Here I am looking at an already created ActionWindows window   1. Assets\Resources\Data\UI\_Elements\Game 2.    Let's call it ActionWindows 3. Let's go to the newly created window 4.as you can see it is empty. But we already have a ready-made window template so that we don’t have to assemble it again every time. We will connect a ready-made design for a new window 5. open the window code 6. 7. Add new code  <ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xmlns="UnityEngine.UIElements" editor-extension-mode="False"> <ui:Template name="DefaultWindowsAction" src="project://database/Assets/Resources/Data/UI/_Elements/Template/DefaultWindowsAction.uxml?fileID=9197481963319205126&amp;guid=2fdd4636702f00a4e98644cfa7468b14&amp;type=3#DefaultWindowsAction" /> <ui:Instance name="defaultWindowsAction" template="DefaultWindowsAction" style="width: 317px; height: 575px; position: absolute;"> <AttributeOverrides element-name="windows-name-label" text="Actions" /> <ui:VisualElement name="Background" class="background_over" style="flex-grow: 1; min-width: auto; min-height: auto; justify-content: flex-start; align-items: flex-start; position: absolute; background-image: resource(&apos;Data/UI/Window/Frame_DF_Large_Bg_Darker_Center_Alpha&apos;); height: 91%; top: 38px; width: 95%; left: 8px; display: flex; visibility: visible; overflow: visible; opacity: 1;" /> <ui:GroupBox name="BoxHeader" class="drag-area" style="margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; padding-top: 0; padding-bottom: 0; padding-left: 0; position: absolute; top: 15px; align-self: stretch; height: 4%; width: 88%;" /> </ui:Instance> </ui:UXML>   8.We take a template  project://database/Assets/Resources/Data/UI/_Elements/Template/DefaultWindowsAction.uxml 9. This piece of code can be taken from other windows so as not to write every time 10. Save 11.Drag the GroupBox node   12. Changing its position settings   I can change all the settings from the editor. But if you knew, then a very similar technology to CSS is better   if you open the window code you can notice everything is the same as in css you can create settings in the window code or use a file with all the styles   Assets\Resources\Data\UI\_Elements\L2StyleSheet.uss In the next issue we will write code to connect it to the game logic. Unless of course you delete the article.  
    • Hey, can you please renew download link?
  • Topics

×
×
  • Create New...