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

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

    • fixed the flickering , if you noticed to an other specific page please let me know
    • And Discord: https://discord.gg/3aYqWNqb
    • Ofc: https://discord.gg/3aYqWNqb
    • You can find some H5 skins shared in old L2 modding Discords, but most of the higher‑quality ones are either paid or come bundled with full client edits. I usually mix in commissioned work and whatever I can patch myself. On a side note, I fund a lot of these commissions by selling off game items through instant sell cs2 skins, which has been a quick way for me to get some cash for projects.
    • There is no need for gRPC in this case, even tho originally it was gRPC based but since we don't need it to be bi-directional, we switched to simple http requests for the web calls and SSEs for the data streamed from the server. There are distributed locks in place to precent race conditions between actions that can happen between multiple web instances and the server.   Local models can also be slow depending on the model, and most external models can actually be faster than local ones if you use Flash 2.5 or something along those lines. I am running on 512GB of Unified Memory on my Mac Studio M3 Ultra so the speed of the local model for a small model is pretty good but I tested it with Gemini too and it works equally as fast and in some cases faster. The way it works is that I'm using pgvector (one of the benefits of moving to Postgres) to search the data and see what the player can see etc and there is some batching of the next few actions for 2-4 seconds for the user until the next LLM request fires. The batching also includes branching on logic so if they for example fall under some HP they will move to kiting instead of attacking or maybe they heal etc.   Everything is authed and permission-based. The server and the backend of the frontend have secure communication between them, either with a symmetric key (not recommended for production) or a certificate (the recommended way), so there is no worry. It's all tied to the account's access level, etc., so nobody can make an action that they normally wouldn't be allowed to do. Even the MCP is token-based, and there are prompt injection protections in place. The MCP is audited, and every mutation needs confirmation. The admin area is only accessible to the admin account anyway so normal users can't access it.  
  • 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..