Jump to content

Question

Posted

hello guys I want to have more options for private store currency except adena I want my coin also... I found this code

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
but its structure it's a little bit different for acis and i don't know if it's going to work! Can someone adapt it for acis or give me another? Thanks!

Recommended Posts

  • 0
Posted

 

You could try it and if its not working, remove it.

I would but it's different structure player is owner and owner is player...  

Its not that hard to adapt it its 5 lines

so can you do this for me :p
  • 0
Posted

How can we do this for you? Do you ask us if we have aCis pack or even if we want to download it? Come on people, one day you should start working by yourselves and stop asking everything ready...It's not that hard to do this. It might take you 5 minutes, it might take you 2 hours. Who cares? If you never try it you wont be able to do it without any help in the future....

  • 0
Posted

How can we do this for you? Do you ask us if we have aCis pack or even if we want to download it? Come on people, one day you should start working by yourselves and stop asking everything ready...It's not that hard to do this. It might take you 5 minutes, it might take you 2 hours. Who cares? If you never try it you wont be able to do it without any help in the future....

you have a point on this but I don't have experience to know if something I am going to do will be right... and maybe for you 5 minutes or 2 hours meaning nothing for me it matters I don't want to spend my time for a final wrong code... Also in this section there is a Request prefix for a reason right?

  • 0
Posted

you have a point on this but I don't have experience to know if something I am going to do will be right... and maybe for you 5 minutes or 2 hours meaning nothing for me it matters I don't want to spend my time for a final wrong code... Also in this section there is a Request prefix for a reason right?

 

You already have the code you want m8 ;) you just need adapt...

Start solo to do this and if you stuck somewhere then for sure some members will give u a hand to finish it.. but dont cover urself when you saying you dont want to spend your time...

  • 0
Posted

you have a point on this but I don't have experience to know if something I am going to do will be right... and maybe for you 5 minutes or 2 hours meaning nothing for me it matters I don't want to spend my time for a final wrong code... Also in this section there is a Request prefix for a reason right?

Spending time without finishing the code correctly is one of the principles of programming. Get use to it if you are going to choose this path ;)

  • 0
Posted

This code is from l2jbrasil if you try add it to acis you will face problems like every single line where player is written at l2jbrasil code meaning owner at acis and owner meaning player or at least what I have understood ...

I already tried but I couldn't do it so why I have create this topic... If you say that is so easy for you you could do it for the time you 've spend here to write...

  • 0
Posted

This code is from l2jbrasil if you try add it to acis you will face problems like every single line where player is written at l2jbrasil code meaning owner at acis and owner meaning player or at least what I have understood ...

I already tried but I couldn't do it so why I have create this topic... If you say that is so easy for you you could do it for the time you 've spend here to write...

can u tell us which line caused you problems?

  • 0
Posted

can u tell us which line caused you problems?

every single line at tradelist java where owner is written at acis it's player or at least I think that and because I am not sure I didn't apply it you will understand me only if you try to apply it

  • 0
Posted

every single line at tradelist java where owner is written at acis it's player or at least I think that and because I am not sure I didn't apply it you will understand me only if you try to apply it

I will never ever try to apply it since i am not gonna download and install aCis on my PC. Neither any other guy will do it. I already mentioned that.

 

Can you post a screenshot with the errors? Also upload your tradelist.java in pastebin and let us see it...

  • 0
Posted

I will never ever try to apply it since i am not gonna download and install aCis on my PC. Neither any other guy will do it. I already mentioned that.

 

Can you post a screenshot with the errors? Also upload your tradelist.java in pastebin and let us see it...

There isn't any errors i adapt it but i didn't save it...

  • 0
Posted

I didn't a

I will never ever try to apply it since i am not gonna download and install aCis on my PC. Neither any other guy will do it. I already mentioned that.

 

Can you post a screenshot with the errors? Also upload your tradelist.java in pastebin and let us see it...

I didn't apply it via patch cause if I did this way nothing will be applied because the code doesn't match acis... I tried manually... And said you
  • 0
Posted

I didn't a I didn't apply it via patch cause if I did this way nothing will be applied because the code doesn't match acis... I tried manually... And said you

So try  it again and post the error that eclipse says. And a screen if possible...

  • 0
Posted

I didn't a

I will never ever try to apply it since i am not gonna download and install aCis on my PC. Neither any other guy will do it. I already mentioned that.

 

Can you post a screenshot with the errors? Also upload your tradelist.java in pastebin and let us see it...

I didn't apply it via patch cause if I did this way nothing will be applied because the code doesn't match acis... I tried manually... And said you
Guest
This topic is now closed to further replies.


  • Posts

    • (3241-100)/9 = 349 online xD     WHAT I WILL SEE ON NEW SEASON ? *Free VIP characters for everyone for first 3 days after opening ! Unique augmentation trade/sell system (NEW PATCH V3.2). Improved server stability. No more lagg / dc. Pvp map area HIDE Names/clans unique system. Big changes on augmentation system.  rotfl Lucky fortune monsters on levelling area with 10min spawn. Also we will try to push longer seasons ever !  HAHAHAHAHAHA XD Increased giran trading area for sell. New raid boss events in coliseum. Fixed reflect damage skills. New raid boss banshee. Fixed pvp area flag issues. Fixed castle siege pray issues. New pvp map in sea of spores. Increased all mob drops rate by +20%. And much more...   Augment diammond 100% 3x winter xDD   And now the best part   HAHAHAH 1-10 random level LS Augment Also we will try to push longer seasons ever !  HAHAHAHAHAHA XD   GRAND START FROM - 15/08/2025, FRIDAY, 20:00 +3 GMT ! GRAND OPENING FROM - 10/10/2025, FRIDAY, 20:00 +3 GRAND OPENING FROM - 05 DECEMBER 2025, FRIDAY, 20:00 +2 GMT ! GRAND OPENING FROM - 12/052025, FRIDAY, 20:00 +3 GMT ! GRAND OPENING FROM - 23 JANUARY 2026, FRIDAY, 20:00 +2 GMT ! WIPE ! NEW SEASON GRAND OPENING FROM TODAY ! - 23/01/2026, FRIDAY, 20:00 +3 GMT ! OPENING TODAY !!! FROM - 06/03/2026, FRIDAY, 20:00 +3 GMT !   1. When wipe?  2. When will there be any response to the allegations? 3. When will they stop deceiving players with the actual number of players online? 4. When change server name to L2][Wipe the best waste Time][Money?
    • Don't spam my post again. Do you need attention? That guy doesn't work at L2Devs, he's not a programmer, and I've never spoken to him. You should respond to the people you scammed. Regards!
    • “WRONG EMAIL – AND EVERYTHING FALLS APART.” ▪ Requests are different. Sometimes a task takes three days, sometimes thirty minutes. ▪ Recently a regular client contacted us. The account had one e-mail, but another one was required for a specific service. ▪ The screenshot was sent immediately. Task – carefully replace the e-mail in the document so that everything looks natural and leaves no editing traces. ▪ Small details like this are often underestimated. › What usually happens: – one symbol in the e-mail doesn’t match – the system starts checking metadata – questions appear about the file origin – the document goes to additional verification ▪ We simply did it properly: the e-mail matches, the file structure remained intact, the document looks original. ▪ Sometimes a good result is not “magic”, but precision in details. ▪ If your document were checked right now – are you sure there are no small details that could ruin everything? › TG: https://t.me/mustang_service ( https:// t.me/ mustang_service ) › Channel: https://t.me/+JPpJCETg-xM1NjNl ( https:// t.me/ +JPpJCETg-xM1NjNl ) #documentdesign #verification #documents #case #antifraud
    • Skylord  = L2Gold.eu ;   Skylord is the programmer at L2Devs. Look what he posted in my thread. I reported him, and they automatically deleted his post and closed my thread.   They need to trick people into buying this garbage.   You can safely use this extender:   https://maxcheaters.com/topic/253977-%F0%9F%94%A5-l2ext-custom-interlude-vang-%E2%80%93-2026-release/  
    • 💙 PRIDE ESSENCE X1  ✅ Start: 14.03.2026  ✅ UPDATE: SAMURAI CROW  ✅ ONLINE: 2000+  💜 NO P2W / BIG CLANS / INTERNATIONAL COMMUNITY / STAGE SYSTEM  🎮 Discord bonus: https://discord.gg/prideessence Pride Essence Official Server Wiki Here you can find all features, systems, and detailed information to fully understand the server.   - General Features - https://prideessence.club/general-features - Road Map - https://prideessence.club/roadmap/ - Class Balance – 14/03 - https://prideessence.club/class-balance-14-03/ - Referral System - https://prideessence.club/referral-system/ - Party Synergy System - https://prideessence.club/party-synergy-system/ - Dual Class System - https://prideessence.club/dual-class-system-3/ - Premium Account - https://prideessence.club/premium-account/ - Game Store - https://prideessence.club/game-store/ - L-Coin Store - https://prideessence.club/l-coin-store/ - Command Channel Skill Availability - https://prideessence.club/command-channel-skill-availability/ - Clan DKP System - https://prideessence.club/clan-dkp-system/ - Target Priority System - https://prideessence.club/target-priority-system/ - Skins - https://prideessence.club/skins/ - Players Inspect - https://prideessence.club/players-inspect/ - Gear Score Ranking - https://prideessence.club/gear-score-ranking/ - Guaranteed Enchant System - https://prideessence.club/guaranteed-enchant-system/ - Account Shield - https://prideessence.club/account-shield/ - VIP Level Ranking - https://prideessence.club/vip-level-ranking/ - Tournament - https://prideessence.club/tournament-2/ - Fortress Siege - https://prideessence.club/fortress-siege/ - Olympiad - https://prideessence.club/olympiad/ - Enchant and Compound Limit - https://prideessence.club/enchant-and-compound-limit/ - Enchant Rates - https://prideessence.club/enchant-rates/ - Pride World Marketplace - https://prideessence.club/pride-world-marketplace/ - Raid Boss Lootbox - https://prideessence.club/raid-boss-lootbox/
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and 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..