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>

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
Reply to this topic...

×   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

    • It's also the players' fault, because there have been decent servers implementing some of the things you said plus some other 'innovations', plus many QOL things for newbies (ingame bestiary, with drops searchers, etc). In the end, it's the players who decide to feed into that shit and play the most garbage servers simply because the owners of the servers gave their clan leaders 100 euros, or they insta quit the server because they didn't win the first QA, etc, etc, etc.   In the end, if a server is garbage or great it doesn't really matter if the players don't wanna stay in there.   Players are no better than the devs themselves, in the end it seems there are abusive devs who will milk the shit out of their willingly milkable players, or there are none, goes both ways.
    • In my opinion, L2 is dead because the people who make servers didn’t adapt to today’s reality. People are getting older, life moves faster, there are more responsibilities, and less free time. And I’m not even talking about newcomers—how can you expect someone new to this game to learn by Googling every drop location or quest requirement? These things should’ve been integrated into the game, made accessible with just a few clicks through the interface. Instead, so much time was wasted trying to recreate retail-like features that no one asked for. Everyone hates autofarm, but why? Because admins never found a smart way to implement it. You could have made it available only in specific zones, with reduced drops, working like Adrenaline, or auto-teleporting to farm for a limited time per day—just enough to help people with limited time stay relevant in-game. There should also be zones with better drops, where active farming actually matters. Other features feel pointless—like the Life Stone system. Spamming LS to get a skill? Instead, you could create a system where you level up the skill with low chances per level, something that feels progressive and fair. Crafting should be simpler too. Right-click a recipe, and the required materials should show up right there. As for sieges, why not create daily clan war events at peak hours—one for Europeans, one for Latinos? You could spawn crystals inside or outside castles that give points and trigger PvP. Add a boss during the event that gives even more points, and let the top clan in the ranking take the castle. I could go on forever, but what’s the point? The community died because the people who had the knowledge to improve the game just took the easy way out, copying the same server formula over and over until no one could enjoy playing it anymore.
    • It's not because I'm an admin that he treated me differently. I actually gave him several clients from my side without him even knowing they came from me, and most of them had no issues. I was also waiting 3–4 weeks at times for things I bought from AvE, even when I was in a rush. He still delivered in the end. That said, I'm not defending him blindly. I'm just saying it's unlikely he’d risk scamming someone over 60–100€, especially knowing how quickly word spreads here.
    • For exact same reason - there were accusation that I scammed. When was it? 2016? But in that time, admins actually didn't listen. I got banned, then unbaned (when I prooved I've refunded) but I was trash talking to mods. When few months later same shit happened, Grisom (?) old global mod, banned me anyway. You can read somewhere on forum how I was shitting on him for doing that (from other account because original account was banned) - which was banned too. He is not here anymore I think. Back in the days I was well know for not carring that much if I was talking to mod or admin, I didn't hold my tongue. Now You know. Just like You know - if I delay, I deliver or refund. I'm not a scammer, even if my old time haterz love to repeat themselfs like mantra. I don't care.
    • Okay I respect that but why is your other account banned?   I don't think this happened just because you delayed somebodys work even in 2012
  • Topics

×
×
  • Create New...