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

    • sell adena l2rebon signature x1 - 1kk = 1 dollars l2reborn x10 - 500kk = 4 dollars E-Global x Lu4 - 1kk = 2 dollars BOHPTS - x20-x500 TOP PRICE DISCORD - GODDARDSHOP TELEGRAM - MMOPROMO Also on sale are Epic jewelry, Clothes at a very good price
    • So few things for this guy:   He asked me to implement a code like EXP, SP, DROP runes in his server that did not work and he paid 27 Euro via Revolut.  He has no idea what compile, source is and he work with ubuntu.  I entered to his PC and using eclipse i add the code and compile as usually, i ask him to replace the jar with the new jar. He did not know how so i did it my self. Later on the ubuntu which im not familiar with could not continue and did not throw any error. I did not know what was happening until i asked Nightwolf who is experienced with Ubuntu and told me probably some error and can't continue. I was surprized since i only added few lines not edit or changed anything so i knew that the Login, Gameserver from source had mismatch with the compiled one. Later on i fix an error he had in raidboss_spawnlist where Long value tried to store inside Int value and explained him:   https://postimg.cc/F1zxMfDW   later on i explained him that source and compiled that he had had many issues and it was not my problem and he said that my code destroyed all his compiled.    In this point i ask @flatronnto post source or compile with my code inside to check the code i made and how he claim it destroyed his source. If he post then all can see what i added and it did not affect the source in an way other than edit the addExperience method - drop method and L2ItemInstance class. If he deny then all his trash talk is fake.   Then i tried contact him to resolve the issue even tho is not my problem, he paid for the code, i did the code, i was done but he ignored me:   https://postimg.cc/ts4RkjXt   I stopped after he claimed i destroyed intentionally his server, that i enter to other's PC to hack / destroy their compiles and when he said he will false advertise my server.    If @Nightw0lf can post he can also verify this guy is mentally ill not only he don't know compile, server, source, java differences but he also claim fake things that any other person with much money and good knowledge and patience could sue him online. He can't even open a proper report topic, he post in L2 OFF section.    In addition this guy offenses rudeness and treats is on another level, we had appointment at 18:00 GR time i was waiting for him 25 min and then i left PC for a bit, he showed up after 30 minutes and he said you're not here ill false advertisent you e.t.c.    https://postimg.cc/pmKNKcjV   He is mentally unstable and nobody should trade with this person. @Celestine Anyone can request LOG from my discord to see all conversation if he want. I have nothing to hide i worked for the money he paid and i did my job perfectly. I have 4-5 clients a week in last year and nobody had issues. Read the answer i just posted and you see who is right and who is wrong.
    • dsgl2 Pm me on discord i will try to help you to talk with winter , but again deal only with him or they will scam you 
    • I have what you're looking for already made, if you want, contact me. Greetings.
  • 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