Jump to content
  • 0

[HELP] Change Private Shop Adena To Custom?


Question

10 answers to this question

Recommended Posts

  • 0
Posted

Is not so hard my friend you haft to add 1 path and compile again your server.

This path

 

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Posts

    • Server mid rate craft PvP   CLIENTE INTERLUDE Website server Discord olympus x25 &nbsp;server 🇧🇷🇦🇷🇨🇱🇬🇷🇲🇽🇵🇪🇸🇰🇪🇸🇺🇾 Server mid rate craft PvP 🔱CLIENTE INTERLUDE🔱 🔅xpx25 🔅Sp x25 🔅Adena x15 🔅Droop x2 🔅Spoil x2 🔅Raidboss xp x2 🔅Raidboss sp x2 🔅Raidboss droop x1 🔅All Rate quest reward  x1 ⚠️All Quest drop reward. x1 🔅Manor x 3 🔅Seal stone x1 🛡️🗡️INFO GRADO S🗡️🛡️ ⚠️Inicia desabilitado drop/spoil/quest. 🔱PROFESIONES/SUBCLASS🔱 🛡️1st profession - 50medal 🛡️2nd profession - 500 medal 🛡️3rd profession - 1k medal +30kk adena 🛡️Sub class - Quest. No necesita matar raids. ⚙️Configuraciones⚙️ 🛡️Gmshop  grade - B. 🛡️Grade A-S Craft - yes x1 chance 🛡️Globlal teleport - yes 🛡️Buffer 1hora. 🛡️Buffer slot 24(+4divine)+12 dances-song 🛡️Auto learn skils - yes 🛡️Autoloot - yes 🛡️Mana potion recarga 1000 ,9segundos delay. 🛡️Champions system:     ▫️lvl 30 - 76     ▫️chance respawn 0.5%.     ▫️adena x20 🛡️Max lvl party 14 lvl. 🛡️Festive sweeper on. 🛡️Max client pc 2. 🛡️Raid boss respawn retail. 🛡️Nobleza quest - yes. 🛡️Barakiel respawn 6 horas + -30 min. 🛡️Olimpiada duracion 14 dias. 🛡️Olimpiada de 18:00 a 00:00 🛡️Safe enchant +3 🛡️Normal enchant scroll 50% ⚠️+11-16 chance 30% 🛡️Bleesed enchant scroll 55% ⚠️+11-16 chance 35% 🛡️Rate dinamico x1 lvl 77-80   🛡️🗡️CLANES INFO🗡️🛡️ 🔅Crear clan min. level 20 🔅Max Alianzas 1 🔅Duracion penalidades clan / alianzas 8 horas. 🔅Cambio de lider 24 horas. 🛡️⚔️ ASEDIOS ⚔️🛡️ 🔅Cada 2 semanas. 🔅Proteccion hwid 1 pc. 🔅Clanes registrados. acceden a zona de asedio. 🔅Castillo asediable Aden. 🔅Reward 1000 FA 🔅Horario 16:00 GMT-3 🎊PACK DE INICIO🎊 🔅Start set - armor\weapon no grade. 🔅Level 20  - 5 shadow cuppon grado D 🔅Level 40 - 5 shadow cuppon grado C 🔅Free Autofarm 24 horas. 💰 INFO PREMIUM 💰 🔅Free autofarm. 🔅xp x30 🔅sp x30 🔅adena x17 🔅drop x4 🔅spoil x4 🔅enchant +2% 🔅seal stone x1 🔅Altb Gk-Gmshop/buffe ⚔️ RAID  BOSS INFO ⚔️ 🔅Raid boss 70 ++ respawn 5 días despues. 🔅Raid boss 75 ++ respawn 15 días despues 🔅Drop LETTER L2DAY para tradear en GMshop. ⚔️ INFO SEVEN SING ⚔️ 🔅Inicio del drop Seal stones dia 5 de iniciado el server. 🎊 EPIC RAID INFO 🎊 🔅Queen Ant (lvl 40)respawn Lunes a Viernes 22:00 GMT-3 drop chance 30%. 🔅Core (lvl 80)respawn Martes-miercoles 20:20 GMT-3 drop chance 100%. 🔅Orfen (lvl 80)respawn Martes-miercoles 21:00 GMT-3 drop chance 100%. 🔅Zaken (lvl 80)respawn Jueves 23:00 GMT-3 drop chance 100%. 🔅Frintezza (lvl 80)respawn Viernes 23:00 GMT-3 drop chance 100%. 🔅Baium (lvl 80)respawn Sabado 22:00 GMT-3 drop chance 100%. 🔅Valakas (lvl 80)respawn Domingo 20:00 GMT-3 drop chance 100%. 🔅Antharas (lvl 80)respawn Domingo 22:00 GMT-3 drop chance 100%.
    • The server is running in l2house.com.ar with C4 mode and in L2Tekila within the same login you can also test it in C5, if you want me to raise another chronicle to test, just let me know.
    • video nice song TopGear  gaming 1990    ....  
    • I have a system where Accounts are saved on login screen for fast login. I am playing a server where this feature is not on the logic screen. How I can try to add this feature to the system? I don't know what files I would have to touch.   Thanks!!
  • Topics

×
×
  • Create New...