Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/Server3.5/build/gameserver/config/Custom/Annunces.properties b/Server3.5/build/gameserver/config/Custom/Annunces.properties
- index e9e9471..bf97d2c 100644
- --- a/Server3.5/build/gameserver/config/Custom/Annunces.properties
- +++ b/Server3.5/build/gameserver/config/Custom/Annunces.properties
- @@ -15,3 +15,18 @@
- AllowPkRewardSystem = True
- # PK reward itemId,itemCount;
- PkRewardItem = 5592,5;
- +
- +#============================================================
- +# Chaotic Zone Messenge
- +#============================================================
- +# Message to enter to Chaotic Zone
- +ChaoticZoneMessageTextEnter = You have entered the Chaotic Zone!
- +
- +# Time Show Message to player Entre to Zone
- +ChaoticZoneMessegeTimeEnter = 4
- +
- +# Message to enter to Chaotic Zone
- +ChaoticZoneMessageTextExit = You have left the Chaotic Zone!
- +
- +# Time Show Message to player Exit the Zone
- +ChaoticZoneMessegeTimeExit = 4
- diff --git a/Server3.5/build/gameserver/data/xml/zones/ArenaZone.xml b/Server3.5/build/gameserver/data/xml/zones/ArenaZone.xml
- index 2bfa9f5..1a7aa17 100644
- --- a/Server3.5/build/gameserver/data/xml/zones/ArenaZone.xml
- +++ b/Server3.5/build/gameserver/data/xml/zones/ArenaZone.xml
- @@ -15,13 +15,6 @@
- <node x="-88408" y="142708"/>
- <spawn type="NORMAL" x="-86979" y="142402" z="-3643" />
- </zone>
- - <zone shape="NPoly" minZ="-3850" maxZ="-3350"><!-- giran_pvp_battle -->
- - <node x="72493" y="142263"/>
- - <node x="73493" y="142264"/>
- - <node x="73493" y="143261"/>
- - <node x="72495" y="143258"/>
- - <spawn type="NORMAL" x="73890" y="142656" z="-3778" />
- - </zone>
- <zone shape="NPoly" minZ="-3498" maxZ="-3298"><!-- colosseum_battle -->
- <node x="150948" y="46483" />
- <node x="151210" y="46186" />
- diff --git a/Server3.5/build/gameserver/data/xml/zones/ChaoticZone.xml b/Server3.5/build/gameserver/data/xml/zones/ChaoticZone.xml
- new file mode 100644
- index 0000000..113f736
- --- /dev/null
- +++ b/Server3.5/build/gameserver/data/xml/zones/ChaoticZone.xml
- @@ -0,0 +1,12 @@
- +<?xml version="1.0" encoding="UTF-8"?>
- +<list>
- +
- + <zone type="ChaoticZone" shape="NPoly" minZ="-3850" maxZ="-3350"><!-- giran_pvp_battle -->
- + <node x="72493" y="142263"/>
- + <node x="73493" y="142264"/>
- + <node x="73493" y="143261"/>
- + <node x="72495" y="143258"/>
- + <spawn type="NORMAL" x="73890" y="142656" z="-3778" />
- + </zone>
- +
- +</list>
- \ No newline at end of file
- diff --git a/aCis_gameserver/java/net/sf/l2j/Config.java b/aCis_gameserver/java/net/sf/l2j/Config.java
- index c365362..de0cb3e 100644
- --- a/aCis_gameserver/java/net/sf/l2j/Config.java
- +++ b/aCis_gameserver/java/net/sf/l2j/Config.java
- @@ -80,6 +80,11 @@
- public static int BANKING_SYSTEM_GOLDBARS;
- public static int BANKING_SYSTEM_ADENA;
- + public static String ENTER_CHAOTIC_ZONE_MESSEGE;
- + public static int TIME_MESSEGE_CHAOTIC_ZONE_ENTER;
- + public static String EXIT_CHAOTIC_ZONE_MESSEGE;
- + public static int TIME_MESSEGE_CHAOTIC_ZONE_EXIT;
- +
- // --------------------------------------------------
- // Clans settings
- // --------------------------------------------------
- @@ -1210,6 +1215,11 @@
- ALLOW_PK_REWARD = Boolean.parseBoolean(Annunce.getProperty("AllowPkRewardSystem", "False"));
- PK_REWARD_ITEM = parseItemsList(Annunce.getProperty("PkRewardItem", "57,400"));
- + ENTER_CHAOTIC_ZONE_MESSEGE = Annunce.getProperty("ChaoticZoneMessageTextEnter", "You have entered the Chaotic Zone!");
- + TIME_MESSEGE_CHAOTIC_ZONE_ENTER = Integer.parseInt(Annunce.getProperty("ChaoticZoneMessegeTimeEnter", "6")) * 1000;
- + EXIT_CHAOTIC_ZONE_MESSEGE = Annunce.getProperty("ChaoticZoneMessageTextExit", "You have left the Chaotic Zone!");
- + TIME_MESSEGE_CHAOTIC_ZONE_EXIT = Integer.parseInt(Annunce.getProperty("ChaoticZoneMessegeTimeExit", "6")) * 1000;
- +
- }
- private static final void loadProtect()
- diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/enums/ZoneId.java b/aCis_gameserver/java/net/sf/l2j/gameserver/enums/ZoneId.java
- index 5fb0f95..d219bc9 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/enums/ZoneId.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/enums/ZoneId.java
- @@ -23,7 +23,8 @@
- SCRIPT(18),
- BOSS(19),
- PAGAN(20),
- - SSQ(21);
- + SSQ(21),
- + CHAOTIC_ZONE(22);
- private final int _id;
- diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/model/zone/type/ChaoticZone.java b/aCis_gameserver/java/net/sf/l2j/gameserver/model/zone/type/ChaoticZone.java
- new file mode 100644
- index 0000000..4c26c75
- --- /dev/null
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/model/zone/type/ChaoticZone.java
- @@ -0,0 +1,50 @@
- +package net.sf.l2j.gameserver.model.zone.type;
- +
- +import net.sf.l2j.Config;
- +import net.sf.l2j.gameserver.enums.ZoneId;
- +import net.sf.l2j.gameserver.model.actor.Creature;
- +import net.sf.l2j.gameserver.model.actor.Player;
- +import net.sf.l2j.gameserver.model.zone.type.subtype.ZoneType;
- +import net.sf.l2j.gameserver.network.serverpackets.ExShowScreenMessage;
- +import net.sf.l2j.gameserver.taskmanager.PvpFlagTaskManager;
- +
- +/**
- + * @author Sarada
- + * = TioPatinhaS =
- + */
- +public class ChaoticZone extends ZoneType
- +{
- + public ChaoticZone(int id)
- + {
- + super(id);
- + }
- +
- + @Override
- + protected void onEnter(Creature creature)
- + {
- + if (creature instanceof Player)
- + {
- + final Player player = (Player) creature;
- +
- + creature.setInsideZone(ZoneId.CHAOTIC_ZONE, true);
- + creature.setInsideZone(ZoneId.NO_SUMMON_FRIEND, true);
- + player.updatePvPFlag(1);
- + creature.sendPacket(new ExShowScreenMessage(Config.ENTER_CHAOTIC_ZONE_MESSEGE, Config.TIME_MESSEGE_CHAOTIC_ZONE_ENTER));
- + return;
- + }
- + }
- + @Override
- + protected void onExit(Creature creature)
- + {
- + if (creature instanceof Player)
- + {
- + final Player activeChar = (Player) creature;
- + creature.setInsideZone(ZoneId.CHAOTIC_ZONE, false);
- + creature.setInsideZone(ZoneId.NO_SUMMON_FRIEND, false);
- + activeChar.updatePvPFlag(0);
- + PvpFlagTaskManager.getInstance().add(activeChar, Config.PVP_NORMAL_TIME);
- + creature.sendPacket(new ExShowScreenMessage(Config.EXIT_CHAOTIC_ZONE_MESSEGE, Config.TIME_MESSEGE_CHAOTIC_ZONE_EXIT));
- + return;
- + }
- + }
- +}
- \ No newline at end of file
- diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/taskmanager/PvpFlagTaskManager.java b/aCis_gameserver/java/net/sf/l2j/gameserver/taskmanager/PvpFlagTaskManager.java
- index 113b1c2..2a79481 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/taskmanager/PvpFlagTaskManager.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/taskmanager/PvpFlagTaskManager.java
- @@ -4,7 +4,7 @@
- import java.util.concurrent.ConcurrentHashMap;
- import net.sf.l2j.commons.pool.ThreadPool;
- -
- +import net.sf.l2j.gameserver.enums.ZoneId;
- import net.sf.l2j.gameserver.model.actor.Player;
- /**
- @@ -35,6 +35,13 @@
- {
- // Get time left and check.
- final Player player = entry.getKey();
- +
- + if (player.isInsideZone(ZoneId.CHAOTIC_ZONE))
- + {
- + _players.remove(player);
- + continue;
- + }
- +
- final long timeLeft = entry.getValue();
- // Time is running out, clear PvP flag and remove from list.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement