Jump to content
  • 0

Chaotic Zone


Question

Posted

Sorry if ever im in the wrong section

 

I've been looking for 2 year about this zone i really wanted, i already used search button from different search site,including maxcheaters... i was looking for "CHAOTIC ZONE" , it's like a pvp zone, but in this zone your name can be flag, and you can pk. but you cannot drop anything even if you have 5000 pks... hope you got my point.. Btw this zone is not rare, because most lineage server have this kind of zone, which makes the server fun... thanks in advance! i hope.

12 answers to this question

Recommended Posts

  • 0
Posted

I explained in at least 3 topics how a zone should work/must be implemented. I even given an existing example of zones integration from my own pack. Search on that section for 'artifact', you should go on related topics.

 

http://maxcheaters.com/forum/index.php?topic=216998.msg1881526#msg1881526

 

PS : a zone is a zone, once you know how to implement one type you can implement any type.

  • 0
Posted

i wish i was java expert... for real, i don't know how to do it..

 

I think learning Java ought to be your first step. If you don't know Java, how to plan to be able to do anything with your server?

 

There is a generic L2ZoneType, you create a class that extends that and you can define the behavior of your zone there.

  • 0
Posted

I think learning Java ought to be your first step. If you don't know Java, how to plan to be able to do anything with your server?

 

There is a generic L2ZoneType, you create a class that extends that and you can define the behavior of your zone there.

well, not all server owner do have expertise in java, some of them just learned by Annalise and research,that's what I'm doing now.. And ofc by asking to those who know deeply about java.. As what the title said, why would i ask this kind of topic if i know about it? and if someone can't help it, then this topic is helpless.. someone should lock it. my last post <-- .

  • 0
Posted

well, not all server owner do have expertise in java, some of them just learned by Annalise and research,that's what I'm doing now.. And ofc by asking to those who know deeply about java.. As what the title said, why would i ask this kind of topic if i know about it? and if someone can't help it, then this topic is helpless.. someone should lock it. my last post <-- .

 

That's true, and it really shows when people who don't know what they're doing run servers. However, it sounds like you just want to depend on everybody else's knowledge to do what you want and that's not fair to be people who have done all the work for it.

 

My thinking is that if you've tried implementing something and it's not working, then you should ask for help. Analysing what other people do won't help you as much as you think. You should have knowledge of Java and/or other programming languages first.

 

As TrySkell said he's explained it multiple times, and also I just told you what object you need.

  • 0
Posted

That's true, and it really shows when people who don't know what they're doing run servers. However, it sounds like you just want to depend on everybody else's knowledge to do what you want and that's not fair to be people who have done all the work for it.

 

My thinking is that if you've tried implementing something and it's not working, then you should ask for help. Analysing what other people do won't help you as much as you think. You should have knowledge of Java and/or other programming languages first.

 

As TrySkell said he's explained it multiple times, and also I just told you what object you need.

 

no ofc not, im not depending everytime to someone else.. and P.S I'm not running any server,and i don't want too, it's a waste of money.. but i wanna learn java,because someday, mb i can help some of my friend's server, etc..... yup i'm doin research and Annalise now.. anyways tnx for the response..  This chaotic zone is getting on my nerves. :D

  • 0
Posted

no ofc not, im not depending everytime to someone else.. and P.S I'm not running any server,and i don't want too, it's a waste of money.. but i wanna learn java,because someday, mb i can help some of my friend's server, etc..... yup i'm doin research and Annalise now.. anyways tnx for the response..  This chaotic zone is getting on my nerves. :D

 

Java is based entirely on object oriented programming. You have an object L2ZoneType, which you extend via your new zone class to get the properties such as what happens when people die. You say you've been looking for 2 years, but this can implemented in under 2 hours and fully working probably.

 

The only way you learn by watching other people do things if you already have basic knowledge of what's going on. Don't pretend to be something you're not. Pick up a java book and/or read online tutorials. Once you get the basics you'll be able to make your zone you want it no time.

  • 0
Posted

Well in previous post I gave link to another thread (which itself links to another thread)...

 

Just use http://trac.assembla.com/acis_project/changeset/115 and analyze how I implement it. It's easy, as the timeline is clean you will see only related stuff speaking of zone implementation.

 

PS : I never opened a Java book, and learnt only by analyzing L2J existing code. 1,5 year ago, I didn't know how to compile a pack, not even the difference between a compiled pack and sources. I never read a tutorial aswell, except Eclipse checkout/compile.

 

You learn everyday and that's the funny part. Same about people who help me doing quests. My main helper is correcting the first quests he did some months ago. He is able to make easy and medium quests from A to Z, without need to test them.

 

That's a long process, but when you're able to do what you want, well... That's the interesting part :). Don't give up, do it all alone and you will see in a couple of months you will laugh reading that post ("how noob I was").

 

If you got troubles to adapt, just post your errors, and we (I) will answer.

  • 0
Posted

ok here's my work.. i based it on siege, i can attack directly other chars(without holding CTRL or macro with /attackforce), since i added pvp_zone in it, but my problem is i can't get the characters flag, so that they can get pvp/pk(+karma) points.. give me some corrections plox

 

Index: java/com/l2jserver/gameserver/model/zone/type/L2ChaoticZone.java
===================================================================
--- java/com/l2jserver/gameserver/model/zone/type/L2ChaoticZone.java	(revision 0)
+++ java/com/l2jserver/gameserver/model/zone/type/L2ChaoticZone.java	(revision 0)
@@ -0,0 +1,77 @@
+/*
+ * 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 com.l2jserver.gameserver.model.zone.type;
+
+import com.l2jserver.gameserver.model.actor.L2Character;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.zone.L2ZoneType;
+import com.l2jserver.gameserver.network.SystemMessageId;
+import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
+
+/**
+ * Chaotic Zone
+ *
+ * @author  ShawShaw
+ */
+public class L2ChaoticZone extends L2ZoneType
+{
+	/**
+	 * @param id
+	 */
+	protected L2ChaoticZone(int id)
+	{
+		super(id);
+		// TODO Auto-generated constructor stub
+	}
+
+	@Override
+	protected void onEnter(L2Character character)
+	{
+		character.setInsideZone(L2Character.ZONE_PVP, true);
+		character.setInsideZone(L2Character.ZONE_CHAOTIC, true);
+		character.setInsideZone(L2Character.ZONE_NOITEMDROP, true);
+		
+		
+		if (character instanceof L2PcInstance)
+		{
+			if (!character.isInsideZone(L2Character.ZONE_PVP))
+				((L2PcInstance) character).sendPacket(SystemMessage.getSystemMessage(SystemMessageId.ENTERED_CHAOTIC_ZONE));
+		}
+	}
+	
+	@Override
+	protected void onExit(L2Character character)
+	{
+		character.setInsideZone(L2Character.ZONE_PVP, false);
+		character.setInsideZone(L2Character.ZONE_CHAOTIC, false);
+		character.setInsideZone(L2Character.ZONE_NOITEMDROP, false);
+		
+		if (character instanceof L2PcInstance)
+		{
+			if (!character.isInsideZone(L2Character.ZONE_PVP))
+				((L2PcInstance) character).sendPacket(SystemMessage.getSystemMessage(SystemMessageId.LEFT_CHAOTIC_ZONE));
+		}
+	}
+	
+	@Override
+	public void onDieInside(L2Character character)
+	{
+	}
+	
+	@Override
+	public void onReviveInside(L2Character character)
+	{
+	}
+}

Index: java/com/l2jserver/gameserver/network/SystemMessageId.java
===================================================================
--- java/com/l2jserver/gameserver/network/SystemMessageId.java	(revision 4967)
+++ java/com/l2jserver/gameserver/network/SystemMessageId.java	(working copy)
@@ -14693,6 +14693,18 @@
	public static final SystemMessageId THOMAS_D_TURKEY_DISAPPEARED;

	/**
+	 * ID: 6508<br>
+	 * Message: You have entered a chaotic zone.
+	 */
+	public static final SystemMessageId ENTERED_CHAOTIC_ZONE;
+	
+	/**
+	 * ID: 6509<br>
+	 * Message: You have left a chaotic zone.
+	 */
+	public static final SystemMessageId LEFT_CHAOTIC_ZONE;
+	
+	/**
	 * Array containing all SystemMessageIds<br>
	 * Important: Always initialize with a length of the highest SystemMessageId + 1!!!
	 */
@@ -17116,6 +17128,8 @@
		THOMAS_D_TURKEY_APPEARED = new SystemMessageId(6503);
		THOMAS_D_TURKEY_DEFETED = new SystemMessageId(6504);
		THOMAS_D_TURKEY_DISAPPEARED = new SystemMessageId(6505);
+		ENTERED_CHAOTIC_ZONE = new SystemMessageId(6508); //Must be added in systemessage (client side) too (example: you have entered chaotic zone)
+		LEFT_CHAOTIC_ZONE = new SystemMessageId(6509); //Must be added in systemessage (client side) too (example:you have left chaotic zone

		buildFastLookupTable();
	}

Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java	(revision 4967)
+++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java	(working copy)

@@ -2000,6 +2004,13 @@
			ExSetCompassZoneCode cz = new ExSetCompassZoneCode(ExSetCompassZoneCode.SIEGEWARZONE2);
			sendPacket(cz);
		}
+		else if (isInsideZone(ZONE_CHAOTIC))
+		{
+			if (_lastCompassZone == ExSetCompassZoneCode.SIEGEWARZONE2) return;
+			_lastCompassZone = ExSetCompassZoneCode.SIEGEWARZONE2;
+			ExSetCompassZoneCode cz = new ExSetCompassZoneCode(ExSetCompassZoneCode.SIEGEWARZONE2);
+			sendPacket(cz);
+		}
		else if (isInsideZone(ZONE_PVP))
		{

Index: java/com/l2jserver/gameserver/model/actor/L2Character.java
===================================================================
--- java/com/l2jserver/gameserver/model/actor/L2Character.java	(revision 4967)
+++ java/com/l2jserver/gameserver/model/actor/L2Character.java	(working copy)
@@ -205,8 +205,9 @@
	public static final byte ZONE_ALTERED = 19;
	public static final byte ZONE_NOBOOKMARK = 20;
	public static final byte ZONE_NOITEMDROP = 21;
+	public static final byte ZONE_CHAOTIC = 22;

-	private final byte[] _zones = new byte[22];
+	private final byte[] _zones = new byte[23];
	protected byte _zoneValidateCounter = 4;

	private L2Character _debugger = null;
			if (_lastCompassZone == ExSetCompassZoneCode.PVPZONE) return;

 

 

  • 0
Posted

ok here's my work.. i based it on siege, i can attack directly other chars(without holding CTRL or macro with /attackforce), since i added pvp_zone in it, but my problem is i can't get the characters flag, so that they can get pvp/pk(+karma) points.. give me some corrections plox

 

Are you using Eclipse? If so, right click on L2ZoneType and select Open Call Hierarchy

v0sTQ.jpg

 

You can see all the other zones that use this

nUkHV.jpg

 

Check these for examples

  • 0
Posted

Are you using Eclipse? If so, right click on L2ZoneType and select Open Call Hierarchy

v0sTQ.jpg

 

You can see all the other zones that use this

nUkHV.jpg

 

Check these for examples

yep im using eclipse... btw is it possible to disable holding CTRL for all skill if ever a player enter this zone? because i think that should do it, + i already added no_dropitem if ever a char has a karma..

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

    • Inventory restock: Premium business accounts are now available.   ✔ Wallester Business EU 🇪🇺|💳 Unlimited virtual cards, physical cards, 🏦 multi-currency IBAN, ₿ crypto & stablecoin deposits. ✔ Stripe Business UK 🇬🇧|💳 Instant virtual cards (Visa/Mastercard), high-conversion checkout, multi-currency payouts, ₿ crypto payments, no-code payment links. ✔ Mercury Business US 🇺🇸|🏦 US checking & savings, 💳 unlimited virtual cards, domestic & International wires, native stablecoin settlement. ✔ Payset Business EU 🇪🇺|🏦 Multiple IBANs, UK sort code, SEPA Instant, 💳 unlimited virtual cards, multi-currency accounts. ✔ Novo Business US 🇺🇸|🏦 Business checking account, ACH payments & invoicing, 💳 virtual & physical cards, novo boost.
    • Let me see if I understand correctly, older gentlemen, when a newcomer shows up to create modern things with the help of AI, doing what you charge them to do, you point the finger and laugh. I believe that's why everything is stagnant. The product isn't for programming experts, it's for newcomers. Don't buy from you if they can do it themselves using this base. You're going to deliver a similar product, maybe even worse than this one, so why are you complaining? PowerShell, as you well know, started with it, then came new platforms and new apps, new creation models, all with different languages; I chose the simplest one for my taste. This is about being organized and knowing how to choose the right words for each situation. It's not 100%, but it already gives a good impression. Nothing is 100%, so a topic written by AI, and all the code that you charge an absurd amount for to prohibit and sell hacks, could be open source so that everyone can create new practices, new models, new information for passing packets, prohibiting the use of cheats that cause server owners to break so much. Let's remember that the Admin doesn't always shut down the server; it's the players who find problems and take advantage by buying and reselling items, and they say that the GM shuts down the server every week, but that's a lie. What they do is duplicate items with packages and sell them, but perhaps this could give some future developers a starting point to create their own protection following the model in the initial documentation. Because none of you answer a question from a newbie, you think you're superior because you have knowledge, but with AI, people like that can have the same knowledge as you, but with less practice. And if they practice a lot, 10,000 hours, they can be as good as all of you older developers in the L2J field.
    • ✨ Exclusive Offer for Marketplace Growth 🔥 Elevate your performance with a premium bonus. 💲 Top up your balance with $100 or more and receive an additional $5 credit — seamlessly added to your account. ⭐️ Designed for those who value efficiency, scale, and results. ⚡️ Effortless. Refined. Effective. 💥 Enhance your strategy today 💥
  • 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..