Jump to content

Recommended Posts

Posted

Hello. I share nothing special but i think many will use it right way.

 

With this patch you can make zones with only craft,sell and buy.

 

For example, on Giran, you can make right side only buy, left side only sell and back side only craft.

 

market_map_giran.thumb.png.63990d2e02b14[/img]

### Eclipse Workspace Patch 1.0
#P Hero-GS
Index: java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreBuy.java
===================================================================
--- java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreBuy.java (revision 14)
+++ java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreBuy.java (working copy)
@@ -23,6 +23,7 @@
 import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
 import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.PrivateStoreType;
 import net.sf.l2j.gameserver.model.tradelist.TradeList;
+import net.sf.l2j.gameserver.model.zone.ZoneId;
 import net.sf.l2j.gameserver.network.SystemMessageId;
 import net.sf.l2j.gameserver.util.Util;
 
@@ -79,6 +80,12 @@
  if (!player.isInsideRadius(storePlayer, 150, true, false))
  return;
  
+ if(!player.isInsideZone(ZoneId.BUY))
+ {
+ player.sendMessage("You can't buy items on this area.");
+ return;
+ }
+ 
  if (!(storePlayer.getPrivateStoreType() == PrivateStoreType.SELL || storePlayer.getPrivateStoreType() == PrivateStoreType.PACKAGE_SELL))
  return;
  
Index: java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopListSet.java
===================================================================
--- java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopListSet.java (revision 14)
+++ java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopListSet.java (working copy)
@@ -61,13 +61,13 @@
  player.sendPacket(SystemMessageId.CANT_OPERATE_PRIVATE_STORE_DURING_COMBAT);
  return;
  }
- 
- if (player.isInsideZone(ZoneId.NO_STORE))
+ 
+ if(!player.isInsideZone(ZoneId.CRAFT))
  {
  player.sendPacket(SystemMessageId.NO_PRIVATE_WORKSHOP_HERE);
  player.sendPacket(ActionFailed.STATIC_PACKET);
  return;
- }
+ } 
  
  if (_count == 0)
  player.forceStandUp();
Index: java/net/sf/l2j/gameserver/model/zone/type/L2CraftZone.java
===================================================================
--- java/net/sf/l2j/gameserver/model/zone/type/L2CraftZone.java (revision 0)
+++ java/net/sf/l2j/gameserver/model/zone/type/L2CraftZone.java (working copy)
@@ -0,0 +1,55 @@
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package net.sf.l2j.gameserver.model.zone.type;
+
+import net.sf.l2j.gameserver.model.actor.L2Character;
+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
+import net.sf.l2j.gameserver.model.zone.L2ZoneType;
+import net.sf.l2j.gameserver.model.zone.ZoneId;
+
+/**
+ * @author Leki
+ */
+public class L2CraftZone extends L2ZoneType
+{
+ public L2CraftZone(final int id)
+ {
+ super(id);
+ }
+ 
+ @Override
+ protected void onEnter(final L2Character character)
+ {
+ if (character instanceof L2PcInstance)
+ character.setInsideZone(ZoneId.CRAFT, true);
+ }
+ 
+ @Override
+ protected void onExit(final L2Character character)
+ {
+ if (character instanceof L2PcInstance)
+ character.setInsideZone(ZoneId.CRAFT, false);
+ }
+ 
+ @Override
+ public void onDieInside(final L2Character character)
+ {
+ }
+ 
+ @Override
+ public void onReviveInside(final L2Character character)
+ {
+ }
+}
\ No newline at end of file
Index: java/net/sf/l2j/gameserver/model/zone/type/L2BuyZone.java
===================================================================
--- java/net/sf/l2j/gameserver/model/zone/type/L2BuyZone.java (revision 0)
+++ java/net/sf/l2j/gameserver/model/zone/type/L2BuyZone.java (working copy)
@@ -0,0 +1,55 @@
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package net.sf.l2j.gameserver.model.zone.type;
+
+import net.sf.l2j.gameserver.model.actor.L2Character;
+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
+import net.sf.l2j.gameserver.model.zone.L2ZoneType;
+import net.sf.l2j.gameserver.model.zone.ZoneId;
+
+/**
+ * @author Leki
+ */
+public class L2BuyZone extends L2ZoneType
+{
+ public L2BuyZone(final int id)
+ {
+ super(id);
+ }
+ 
+ @Override
+ protected void onEnter(final L2Character character)
+ {
+ if (character instanceof L2PcInstance)
+ character.setInsideZone(ZoneId.BUY, true);
+ }
+ 
+ @Override
+ protected void onExit(final L2Character character)
+ {
+ if (character instanceof L2PcInstance)
+ character.setInsideZone(ZoneId.BUY, false);
+ }
+ 
+ @Override
+ public void onDieInside(final L2Character character)
+ {
+ }
+ 
+ @Override
+ public void onReviveInside(final L2Character character)
+ {
+ }
+}
\ No newline at end of file
Index: java/net/sf/l2j/gameserver/model/zone/ZoneId.java
===================================================================
--- java/net/sf/l2j/gameserver/model/zone/ZoneId.java (revision 14)
+++ java/net/sf/l2j/gameserver/model/zone/ZoneId.java (working copy)
@@ -38,7 +38,10 @@
  DANGER_AREA(15),
  CAST_ON_ARTIFACT(16),
  NO_RESTART(17),
- SCRIPT(18);
+ SCRIPT(18),
+ SELL(19),
+ BUY(20),
+ CRAFT(21);
  
  private final int _id;
  
Index: java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreSell.java
===================================================================
--- java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreSell.java (revision 14)
+++ java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreSell.java (working copy)
@@ -20,6 +20,7 @@
 import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
 import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.PrivateStoreType;
 import net.sf.l2j.gameserver.model.tradelist.TradeList;
+import net.sf.l2j.gameserver.model.zone.ZoneId;
 import net.sf.l2j.gameserver.network.SystemMessageId;
 
 public final class RequestPrivateStoreSell extends L2GameClientPacket
@@ -74,6 +75,12 @@
  if (!player.isInsideRadius(storePlayer, 150, true, false))
  return;
  
+ if(!player.isInsideZone(ZoneId.SELL))
+ {
+ player.sendMessage("You can't sell items on this area.");
+ return;
+ } 
+ 
  if (storePlayer.getPrivateStoreType() != PrivateStoreType.BUY)
  return;
  
Index: java/net/sf/l2j/gameserver/model/zone/type/L2SellZone.java
===================================================================
--- java/net/sf/l2j/gameserver/model/zone/type/L2SellZone.java (revision 0)
+++ java/net/sf/l2j/gameserver/model/zone/type/L2SellZone.java (working copy)
@@ -0,0 +1,55 @@
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package net.sf.l2j.gameserver.model.zone.type;
+
+import net.sf.l2j.gameserver.model.actor.L2Character;
+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
+import net.sf.l2j.gameserver.model.zone.L2ZoneType;
+import net.sf.l2j.gameserver.model.zone.ZoneId;
+
+/**
+ * @author Leki
+ */
+public class L2SellZone extends L2ZoneType
+{
+ public L2SellZone(final int id)
+ {
+ super(id);
+ }
+ 
+ @Override
+ protected void onEnter(final L2Character character)
+ {
+ if (character instanceof L2PcInstance)
+ character.setInsideZone(ZoneId.SELL, true);
+ }
+ 
+ @Override
+ protected void onExit(final L2Character character)
+ {
+ if (character instanceof L2PcInstance)
+ character.setInsideZone(ZoneId.SELL, false);
+ }
+ 
+ @Override
+ public void onDieInside(final L2Character character)
+ {
+ }
+ 
+ @Override
+ public void onReviveInside(final L2Character character)
+ {
+ }
+}
\ No newline at end of file
 
After this go to data/xml/zones. Create files SellZone.xml, BuyZone.xml and CraftZone.xml
 
and put inside
<zone type="SellZone" shape="NPoly" minZ="-x" maxZ="-z">
<node X="-x" Y="y" />
<node X="-x" Y="y" />
</zone>
 
Zone type put that type you want, and about making zone you can look on SweeTs  Guide
 
Thank you.

 

Posted (edited)

PRO:

This is good when you have entire Giran full of vendors. ;)

 

CONS:

This is NOT recommended for live servers, lol! You don't know where to add your vendors (as player) CONFUSED! :)

Edited by Irelia#1
Posted

This is NOT recommended for live servers, lol! You don't know where to add your vendors (as player) CONFUSED! :)

What about reading server features? It's players stupidity :)

Posted

What about reading server features? It's players stupidity :)

LOL dafaq did i just read.. ye you gonna read things like

 

PEOPLE the right side of aden (while you look the sun i mean right) is the sell zone xDDDDDDD xaaxxaxxaax

Posted

LOL dafaq did i just read.. ye you gonna read things like

 

PEOPLE the right side of aden (while you look the sun i mean right) is the sell zone xDDDDDDD xaaxxaxxaax

^^ :))

Posted

LOL dafaq did i just read.. ye you gonna read things like

 

PEOPLE the right side of aden (while you look the sun i mean right) is the sell zone xDDDDDDD xaaxxaxxaax

You try hard, but you are not funny. Sorry.

 

It's like asking for enchant rate.. Read godamn features you lazy ass. :)

  • 3 weeks later...
Posted

Is there any wrong in my xml file?

 

<?xml version="1.0" encoding="UTF-8"?>
<list>
    <!-- SellZone -->
    <zone type="SellZone" shape="Cuboid" minZ="-3472" maxZ="0"><!-- Town of Giran Sell Area -->
      <node X="82713" Y="147909" />
      <node X="81150" Y="149312" />
    </zone>
</list>

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • https://jumpshare.com/share/kIdeKALOhgtMKpBKqxpg Test Equip Armors-> FullPlate, Gloves, Legs, Chest , Boots
    • 黑色星期五 — 为您的流量提供高级福利 仅在11月28日,我们的特别促销码可为您提供13%的商店折扣。 促销码: BLACKFRIDAY (13% 折扣) 您可以通过我们的网站或 Telegram 机器人在商店购物! 有效链接: 数字商品商店(网站): 前往 商店 Telegram 机器人: 前往 – 通过 Telegram Messenger 方便访问商店。 其他服务: 虚拟号码服务: 前往 用于购买 Telegram Stars 的机器人: 前往 – 快速且优惠地在 Telegram 中购买 Stars。 SMM 面板: 前往 – 推广您的社交媒体账户。 我们向您呈现当前的 促销和特惠活动 列表,用于购买我们服务的产品和服务: 1. 您可以在首次购买时使用促销码:SOCNET(15% 折扣) 2. 获取 $1 商店余额或 10–20% 折扣 — 只需在我们网站注册后发送您的用户名,格式如下:“SEND ME BONUS, MY USERNAME IS...” — 您需要在我们的论坛帖子中写下这句话! 3. SMM 面板首次试用可获得 $1:只需在我们的网站(支持)提交主题为“Get Trial Bonus”的工单。 4. 我们的 Telegram 频道和 Stars 购买机器人每周都会举办 Telegram Stars 抽奖活动! 新闻: ➡ Telegram 频道: https://t.me/accsforyou_shop ➡ WhatsApp 频道: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord 服务器: https://discord.gg/y9AStFFsrh 联系方式与支持: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ 邮箱: solomonbog@socnet.store
    • BLACK FRIDAY — PREMIUM BENEFITS FOR YOUR TRAFFIC Only on November 28 our special promo code gives you a 13% discount in the store. PROMO CODE: BLACKFRIDAY (13% Discount) Shop in our store on the website or via the Telegram bot! Active links: Digital goods store (Website): Go Store Telegram bot: Go – convenient access to the store via Telegram messenger. Other services: Virtual numbers service: Go Telegram bot for purchasing Telegram Stars: Go – fast and profitable purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We want to present you the current list of promotions and special offers for purchasing our service's products and services: 1. You can use a promo code for your first purchase: SOCNET (15% discount) 2. Get $1 to your store balance or a 10–20% discount — just send your username after registering on our website using the following template: "SEND ME BONUS, MY USERNAME IS..." — you need to write this in our forum thread! 3. Get $1 for the first trial start of the SMM Panel: just open a ticket with the subject "Get Trial Bonus" on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our bot for purchasing stars! News: ➡ Telegram channel: https://t.me/accsforyou_shop ➡ WhatsApp channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Usually, I work alone on my projects, but sometimes the work is much more than I've expected. Could you provide a price list? It would be good if we knew your price before contacting you. 
    • BLACK FRIDAY — PREMIUM BENEFITS FOR YOUR TRAFFIC Only on November 28 our special promo code gives you a 13% discount in the store. PROMO CODE: BLACKFRIDAY (13% Discount) Shop in our store on the website or via the Telegram bot! Active links: Digital goods store (Website): Go Store Telegram bot: Go – convenient access to the store via Telegram messenger. Other services: Virtual numbers service: Go Telegram bot for purchasing Telegram Stars: Go – fast and profitable purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We want to present you the current list of promotions and special offers for purchasing our service's products and services: 1. You can use a promo code for your first purchase: SOCNET (15% discount) 2. Get $1 to your store balance or a 10–20% discount — just send your username after registering on our website using the following template: "SEND ME BONUS, MY USERNAME IS..." — you need to write this in our forum thread! 3. Get $1 for the first trial start of the SMM Panel: just open a ticket with the subject "Get Trial Bonus" on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our bot for purchasing stars! News: ➡ Telegram channel: https://t.me/accsforyou_shop ➡ WhatsApp channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
  • 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