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);
+ }
+}
Childhood - the most magical and carefree time
Bright memories filled with vivid colors, where we could be anyone and go anywhere.
Everyone had their own playground, a tight-knit group of kids who knew each other inside out.
All free time was spent together - no tablets, no phones, just football, climbing on bars, and collecting bottle caps, badges, stamps, and wrappers.
Thinking back brings a smile to your face.
And everyone remembers that moment: sitting in the yard, waiting for a friend. He said, “I’ll be out in a minute.”
At first, you wait patiently… then frustration creeps in — why isn’t he out yet?
Minutes stretch endlessly, and every 30 seconds you check the clock, hoping he’ll appear.
Back then, waiting was part of the fun.
Today, waiting for a verification code from a service isn’t so enjoyable seconds feel like hours, and your fingers get tired of hitting “refresh.”
With VibeSMS, that feeling disappears: codes arrive instantly, with no unnecessary waiting or annoying pauses.
🌐 Website: https://vibe-sms.net/
📲 Telegram: https://t.me/vibe_sms
I add my external ip at the ip at the dbo.server of l2c4_lin2db and the ports 7777 and 2106 are opened and i checked that they are opened but still other players are unable to join, what should i change to make it work?
Hello, dear friends, we are the GAMEMONEY in-game currency store. We offer adena, donation coins, and items from all top projects. Please contact us with any questions.
DISCORD - GODDARDSHOP
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:
3 answers to this question
Recommended Posts