Jump to content
  • 0

acis 370 shop zone


Question

11 answers to this question

Recommended Posts

  • 0
Posted

Create a file NoStoreZone.xml and paste there your coords (create a shape) where you do not allow stores. There is core support for NO_STORE zone inside aCis.

If you ask me, easier, fast would be to do opposite rename/create a StoreZone, then add/change some checks.

  • 0
Posted
13 minutes ago, melron said:

There exists a file named L2NoStoreZone.java....

You have to create your zone and in type just write "NoStoreZone"

yes but then that zone will be noshop zone, i make all towns no shop now but i need to make giran harbor (Not all just small space) like shop area..

  • 0
Posted

Here you are. Btw you only need one, either nostore zone or store zone.

### Eclipse Workspace Patch 1.0
#P aCis_gameserver
Index: java/net/sf/l2j/gameserver/model/zone/type/L2NoStoreZone.java
===================================================================
--- java/net/sf/l2j/gameserver/model/zone/type/L2NoStoreZone.java	(revision 2)
+++ java/net/sf/l2j/gameserver/model/zone/type/L2NoStoreZone.java	(nonexistent)
@@ -1,42 +0,0 @@
-package net.sf.l2j.gameserver.model.zone.type;
-
-import net.sf.l2j.gameserver.model.actor.Character;
-import net.sf.l2j.gameserver.model.actor.instance.Player;
-import net.sf.l2j.gameserver.model.zone.L2ZoneType;
-import net.sf.l2j.gameserver.model.zone.ZoneId;
-
-/**
- * Zone where store is not allowed.
- * @author fordfrog
- */
-public class L2NoStoreZone extends L2ZoneType
-{
-	public L2NoStoreZone(final int id)
-	{
-		super(id);
-	}
-	
-	@Override
-	protected void onEnter(final Character character)
-	{
-		if (character instanceof Player)
-			character.setInsideZone(ZoneId.NO_STORE, true);
-	}
-	
-	@Override
-	protected void onExit(final Character character)
-	{
-		if (character instanceof Player)
-			character.setInsideZone(ZoneId.NO_STORE, false);
-	}
-	
-	@Override
-	public void onDieInside(final Character character)
-	{
-	}
-	
-	@Override
-	public void onReviveInside(final Character character)
-	{
-	}
-}
\ No newline at end of file

Index: java/net/sf/l2j/gameserver/model/zone/type/L2StoreZone.java
===================================================================
--- java/net/sf/l2j/gameserver/model/zone/type/L2StoreZone.java	(nonexistent)
+++ java/net/sf/l2j/gameserver/model/zone/type/L2StoreZone.java	(working copy)
@@ -0,0 +1,42 @@
+package net.sf.l2j.gameserver.model.zone.type;
+
+import net.sf.l2j.gameserver.model.actor.Character;
+import net.sf.l2j.gameserver.model.actor.instance.Player;
+import net.sf.l2j.gameserver.model.zone.L2ZoneType;
+import net.sf.l2j.gameserver.model.zone.ZoneId;
+
+/**
+ * Zone where store is allowed.
+ * @author fordfrog
+ */
+public class L2StoreZone extends L2ZoneType
+{
+	public L2StoreZone(final int id)
+	{
+		super(id);
+	}
+	
+	@Override
+	protected void onEnter(final Character character)
+	{
+		if (character instanceof Player)
+			character.setInsideZone(ZoneId.STORE, true);
+	}
+	
+	@Override
+	protected void onExit(final Character character)
+	{
+		if (character instanceof Player)
+			character.setInsideZone(ZoneId.STORE, false);
+	}
+	
+	@Override
+	public void onDieInside(final Character character)
+	{
+	}
+	
+	@Override
+	public void onReviveInside(final Character character)
+	{
+	}
+}
\ No newline at end of file
Index: java/net/sf/l2j/gameserver/model/zone/type/L2JailZone.java
===================================================================
--- java/net/sf/l2j/gameserver/model/zone/type/L2JailZone.java	(revision 2)
+++ java/net/sf/l2j/gameserver/model/zone/type/L2JailZone.java	(working copy)
@@ -25,7 +25,6 @@
 		{
 			character.setInsideZone(ZoneId.JAIL, true);
 			character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, true);
-			character.setInsideZone(ZoneId.NO_STORE, true);
 		}
 	}
 	
@@ -36,7 +35,6 @@
 		{
 			character.setInsideZone(ZoneId.JAIL, false);
 			character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, false);
-			character.setInsideZone(ZoneId.NO_STORE, false);
 			
 			final Player player = ((Player) character);
 			if (player.isInJail() && !player.isInsideZone(ZoneId.JAIL))
Index: java/net/sf/l2j/gameserver/model/zone/ZoneId.java
===================================================================
--- java/net/sf/l2j/gameserver/model/zone/ZoneId.java	(revision 2)
+++ java/net/sf/l2j/gameserver/model/zone/ZoneId.java	(working copy)
@@ -18,7 +18,7 @@
 	CASTLE(9),
 	SWAMP(10),
 	NO_SUMMON_FRIEND(11),
-	NO_STORE(12),
+	STORE(12),
 	TOWN(13),
 	HQ(14),
 	DANGER_AREA(15),
Index: java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminZone.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminZone.java	(revision 2)
+++ java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminZone.java	(working copy)
@@ -91,7 +91,7 @@
 		html.replace("%CASTLE%", (activeChar.isInsideZone(ZoneId.CASTLE) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
 		html.replace("%SWAMP%", (activeChar.isInsideZone(ZoneId.SWAMP) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
 		html.replace("%NOSUMMONFRIEND%", (activeChar.isInsideZone(ZoneId.NO_SUMMON_FRIEND) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
-		html.replace("%NOSTORE%", (activeChar.isInsideZone(ZoneId.NO_STORE) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
+		html.replace("%STORE%", (activeChar.isInsideZone(ZoneId.STORE) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
 		html.replace("%TOWN%", (activeChar.isInsideZone(ZoneId.TOWN) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
 		html.replace("%HQ%", (activeChar.isInsideZone(ZoneId.HQ) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
 		html.replace("%DANGERAREA%", (activeChar.isInsideZone(ZoneId.DANGER_AREA) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
Index: java/net/sf/l2j/gameserver/model/actor/instance/Player.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/Player.java	(revision 2)
+++ java/net/sf/l2j/gameserver/model/actor/instance/Player.java	(working copy)
@@ -3623,7 +3623,7 @@
 		if (getActiveTradeList() != null)
 			cancelActiveTrade();
 		
-		return !isAlikeDead() && !isInOlympiadMode() && !isMounted() && !isInsideZone(ZoneId.NO_STORE) && !isCastingNow();
+		return !isAlikeDead() && !isInOlympiadMode() && !isMounted() && isInsideZone(ZoneId.STORE) && !isCastingNow();
 	}
 	
 	public void tryOpenPrivateBuyStore()
@@ -3643,7 +3643,7 @@
 		}
 		else
 		{
-			if (isInsideZone(ZoneId.NO_STORE))
+			if (!isInsideZone(ZoneId.STORE))
 				sendPacket(SystemMessageId.NO_PRIVATE_STORE_HERE);
 			
 			sendPacket(ActionFailed.STATIC_PACKET);
@@ -3667,7 +3667,7 @@
 		}
 		else
 		{
-			if (isInsideZone(ZoneId.NO_STORE))
+			if (!isInsideZone(ZoneId.STORE))
 				sendPacket(SystemMessageId.NO_PRIVATE_STORE_HERE);
 			
 			sendPacket(ActionFailed.STATIC_PACKET);
@@ -3693,7 +3693,7 @@
 		}
 		else
 		{
-			if (isInsideZone(ZoneId.NO_STORE))
+			if (!isInsideZone(ZoneId.STORE))
 				sendPacket(SystemMessageId.NO_PRIVATE_WORKSHOP_HERE);
 			
 			sendPacket(ActionFailed.STATIC_PACKET);
Index: java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopListSet.java
===================================================================
--- java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopListSet.java	(revision 2)
+++ java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopListSet.java	(working copy)
@@ -45,7 +45,7 @@
 			return;
 		}
 		
-		if (player.isInsideZone(ZoneId.NO_STORE))
+		if (!player.isInsideZone(ZoneId.STORE))
 		{
 			player.sendPacket(SystemMessageId.NO_PRIVATE_WORKSHOP_HERE);
 			player.sendPacket(ActionFailed.STATIC_PACKET);
Index: java/net/sf/l2j/gameserver/network/clientpackets/SetPrivateStoreListBuy.java
===================================================================
--- java/net/sf/l2j/gameserver/network/clientpackets/SetPrivateStoreListBuy.java	(revision 2)
+++ java/net/sf/l2j/gameserver/network/clientpackets/SetPrivateStoreListBuy.java	(working copy)
@@ -69,7 +69,7 @@
 			return;
 		}
 		
-		if (player.isInsideZone(ZoneId.NO_STORE))
+		if (!player.isInsideZone(ZoneId.STORE))
 		{
 			player.sendPacket(SystemMessageId.NO_PRIVATE_STORE_HERE);
 			player.sendPacket(new PrivateStoreManageListBuy(player));
Index: java/net/sf/l2j/gameserver/network/clientpackets/SetPrivateStoreListSell.java
===================================================================
--- java/net/sf/l2j/gameserver/network/clientpackets/SetPrivateStoreListSell.java	(revision 2)
+++ java/net/sf/l2j/gameserver/network/clientpackets/SetPrivateStoreListSell.java	(working copy)
@@ -70,7 +70,7 @@
 			return;
 		}
 		
-		if (player.isInsideZone(ZoneId.NO_STORE))
+		if (!player.isInsideZone(ZoneId.STORE))
 		{
 			player.sendPacket(SystemMessageId.NO_PRIVATE_STORE_HERE);
 			player.sendPacket(new PrivateStoreManageListSell(player, _packageSale));

Make a StoreZone.xml with the zones you want and you are ready.

  • 0
Posted (edited)
	@Override
	protected void onEnter(final Character character)
	{
		if (character instanceof Player)
			character.setInsideZone(ZoneId.STORE, true);
	}
	
	@Override
	protected void onExit(final Character character)
	{
		if (character instanceof Player)
			character.setInsideZone(ZoneId.STORE, false);
	}

wrong

Quote

+	@Override
+	protected void onEnter(final Character character)
+	{
+		if (character instanceof Player)
+			character.setInsideZone(ZoneId.STORE,false);
+	}
+	
+	@Override
+	protected void onExit(final Character character)
+	{
+		if (character instanceof Player)
+			character.setInsideZone(ZoneId.STORE, true);
+	}

right

Edited by zFritS

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

    • https://prnt.sc/Bkkc0ShGXv9m https://prnt.sc/-JFLvZXsn27A
    • Hello guys want to sell adena in L2 Reborn Signature x1  Stock =14kk good price 
    • Hi guys, I have the following problem, I want to set up two servers on the same dedicated server and I can't.   L2jacis 409 Linux Server. The first gameserver has the following configuration: # ================================================================ # Gameserver setting # ================================================================ # This is transmitted to the clients, so it has to be an IP or resolvable hostname. If this ip is resolvable by Login just leave * Hostname = 190.25.103.103 # Bind ip of the gameserver, use * to bind on all available IPs. GameserverHostname = * GameserverPort = 7777 # The Loginserver host and port. LoginHost = 127.0.0.1 LoginPort = 9014 # This is the server id that the gameserver will request. RequestServerID = 1 # If set to true, the login will give an other id to the server (if the requested id is already reserved). AcceptAlternateID = True UseBlowfishCipher = True # ================================================================ # Database informations # ================================================================ URL = jdbc:mariadb://localhost/server1 Login = server1 Password = server1 I configured the second gameserver like this:   # ================================================================ # Gameserver setting # ================================================================ # This is transmitted to the clients, so it has to be an IP or resolvable hostname. If this ip is resolvable by Login just leave * Hostname = 0.0.0.0 # Bind ip of the gameserver, use * to bind on all available IPs. GameserverHostname = * GameserverPort = 7788 # The Loginserver host and port. LoginHost = 127.0.0.1 LoginPort = 9014 # This is the server id that the gameserver will request. RequestServerID = 2 # If set to true, the login will give an other id to the server (if the requested id is already reserved). AcceptAlternateID = True UseBlowfishCipher = True # ================================================================ # Database informations # ================================================================ URL = jdbc:mariadb://localhost/server2 Login = server2 Password = server2 apart from having tested 0.0.0.0 on the second gameserver I also tried 127.0.0.1 In both cases I see the two servers in the login when I log in, but I try to enter the one with the lowest ping and it kicks me out. The other server always appears with ping 9999 and I try to enter but it doesn't do anything and it freezes the login so I have to log in again. The hexids are in their respective folders. For server 1, it has its hexid inside the gameserver config folder, and I checked that the hexid id is the same id, for example id 1 in the gameserver is also id1 for server 1, and hexid 2 has its hexid 2 for server 2. The server ports are open and listening when I turn on both gameservers. I really don't know what could be wrong. If you could give me some help I would appreciate it. Excuse my English.
    • We have both old channels from 2006-2009 with the 3rd verification function enabled, and new ones.   For availability, please contact us below: Link - Telegram Link - Facebook WhatsApp - Click here to go to WhatsApp chat
    • You can contact me on skype: niedziolek50
  • Topics

×
×
  • Create New...