I m trying to make a player get Flag status when enter on X zone for example lets say Coly, i m using this code:
Index: java/com/l2jserver/gameserver/model/zone/type/L2FlagZone.java
===================================================================
--- java/com/l2jserver/gameserver/model/zone/type/L2FlagZone.java (revision 0)
+++ java/com/l2jserver/gameserver/model/zone/type/L2FlagZone.java (revision 0)
@@ -0,0 +1,62 @@
+/*
+ * 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;
+
+/**
+ * @author UnAfraid
+ */
+public class L2FlagZone extends L2ZoneType
+{
+ public L2FlagZone(int id)
+ {
+ super(id);
+ }
+
+ @Override
+ protected void onEnter(L2Character character)
+ {
+ if (character instanceof L2PcInstance)
+ {
+ ((L2PcInstance) character).startPvPFlag();
+ ((L2PcInstance) character).broadcastUserInfo();
+ }
+ }
+
+ @Override
+ protected void onExit(L2Character character)
+ {
+ if (character instanceof L2PcInstance)
+ {
+ ((L2PcInstance) character).stopPvPFlag();
+ ((L2PcInstance) character).broadcastUserInfo();
+ }
+ }
+
+ @Override
+ public void onDieInside(L2Character character)
+ {
+ onExit(character);
+ }
+
+ @Override
+ public void onReviveInside(L2Character character)
+ {
+ onEnter(character);
+ }
+}
Responsibilities
• Working with the Lineage 2 server datapack
• Editing and maintaining:
• NPCs, mobs, raids, minions
• Skills, items, multisell, buylists
• Quests (XML + HTML)
• Spawn lists, territories, siege data
• Balancing:
• EXP / SP / Drop / Spoil
• Economy, shops, crafting
• PvE progression without PvP bias
• Testing changes:
• clean characters + GM testing
• server restarts
• log analysis
Required Skills
• Excellent knowledge of the Lineage 2 datapack structure
• Confident work with XML / CSV / TXT
• Understanding of Interlude mechanics:
• aggro, AI, land-rate
• champion / raid mechanics
• Understanding of interdependencies:
• item ↔ skill ↔ NPC ↔ quest
• Careful handling of IDs (without breaking compatibility)
Would Be a Big Plus
• Experience with L2J forks
• Understanding of the Java side of the server (datapack ↔ code integration level)
• Experience with custom systems:
• dynamic rates
• stage-based progression
• seasonal / PvE events
• Ability to balance using tables and formulas rather than “by feel”
We Are Not Looking for Someone Who
• Copies datapacks from other servers
• Changes IDs without understanding the consequences
• Creates multisells with infinite profit
• Does not test changes after a restart
• Balances “by intuition”
We've added 5% discounts for bulk purchases of Google accounts for orders of 300 or more, and 10% for orders of 500 or more. The discount is applied automatically when you place your order! The discount is indicated in the product title and description for each category.
Question
Chakl22
I m trying to make a player get Flag status when enter on X zone for example lets say Coly, i m using this code:
Index: java/com/l2jserver/gameserver/model/zone/type/L2FlagZone.java =================================================================== --- java/com/l2jserver/gameserver/model/zone/type/L2FlagZone.java (revision 0) +++ java/com/l2jserver/gameserver/model/zone/type/L2FlagZone.java (revision 0) @@ -0,0 +1,62 @@ +/* + * 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; + +/** + * @author UnAfraid + */ +public class L2FlagZone extends L2ZoneType +{ + public L2FlagZone(int id) + { + super(id); + } + + @Override + protected void onEnter(L2Character character) + { + if (character instanceof L2PcInstance) + { + ((L2PcInstance) character).startPvPFlag(); + ((L2PcInstance) character).broadcastUserInfo(); + } + } + + @Override + protected void onExit(L2Character character) + { + if (character instanceof L2PcInstance) + { + ((L2PcInstance) character).stopPvPFlag(); + ((L2PcInstance) character).broadcastUserInfo(); + } + } + + @Override + public void onDieInside(L2Character character) + { + onExit(character); + } + + @Override + public void onReviveInside(L2Character character) + { + onEnter(character); + } +}3 answers to this question
Recommended Posts