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

    • What webhosting are you using? You'll need to talk with administrators of the webhosting to open outgoing connections to port 1433, maybe they won't open it for you, instead, you should get a webhosting for mu online since they always have 1433 port open for outgoing connections. Also, make sure you have your 1433 TCP port open for incoming connections, for security, I suggest you exclusively add the cPanel IP Address to connect to your port 1433 in your firewall, so no one else can try to connect to your database. Let me know if you have any questions, happy to help.
    • He just doesn't answer, I've tried everything, Telegram, his own forum, everything, I don't know what's his deal, but I've tried for months
    • Send direct message to @Maxtor
    • Hello guys , does anyone know what files needed to use those cloaks for H5 client? I’m not using an interface and I don’t want to use one so there are any way to use them without interface? 
    • Closed beta testing starts in early October!        We’re looking for the most active and attentive players to help fine-tune the project before launch. This is your chance to be among the first to try out our new features and directly influence how the server develops.   What beta testers will do: — Check the client and core mechanics — Find bugs, errors, and inconsistencies — Evaluate the convenience and practicality of current solutions — Share detailed, constructive suggestions for improvement      Your feedback will be key to making the project balanced and comfortable for everyone.   Requirements: — Willingness to complete specific tasks — Experience playing on Interlude (PTS, clean client) — Experience with the HF client is a plus   Ready to help? The server launch is planned for early December, so now is the perfect time to join the test and make your contribution. To participate, you must send a direct message (DM) to one of the following: - Send a DM to our Telegram channel - Send a DM to our forum moderators: PrintF or EchØ - Send a DM to our Discord server admin @EchØ
  • 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