Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Eclipse Workspace Patch 1.0
- #P aCis_gameserver
- Index: java/net/sf/l2j/gameserver/network/clientpackets/RequestRestartPoint.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/network/clientpackets/RequestRestartPoint.java (revision 7)
- +++ java/net/sf/l2j/gameserver/network/clientpackets/RequestRestartPoint.java (working copy)
- @@ -37,6 +37,21 @@
- protected int _requestedPointType;
- protected boolean _continuation;
- + static int radius;
- + static int[][] spawn_loc =
- + {
- + {
- + 9512,
- + -21960,
- + -3680
- + },
- + {
- + 11240,
- + -24584,
- + -3640
- + }
- + };
- +
- @Override
- protected void readImpl()
- {
- @@ -142,9 +157,15 @@
- if (!activeChar.isInJail())
- return;
- loc = new Location(-114356, -249645, -2984);
- break;
- default:
- + if (activeChar.isInsideZone(ZoneId.PVP_ZONE) && activeChar.isDead())
- + {
- + int[] loca = spawn_loc[Rnd.get(spawn_loc.length)];
- + activeChar.doRevive();
- + activeChar.teleToLocation(loca[0] + Rnd.get(-radius, radius), loca[1] + Rnd.get(-radius, radius), loca[2], 0);
- + return;
- + }
- if (activeChar.isInsideZone(ZoneId.RANDOM_PVP_ZONE) && activeChar.isDead())
- {
- Location location = ZoneRandom.getInstance().getCurrentZone();
- Index: java/net/sf/l2j/gameserver/model/zone/ZoneId.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/model/zone/ZoneId.java (revision 7)
- +++ java/net/sf/l2j/gameserver/model/zone/ZoneId.java (working copy)
- @@ -40,7 +40,8 @@
- NO_RESTART(17),
- SCRIPT(18),
- FLAG(19),
- - RANDOM_PVP_ZONE(20);
- + RANDOM_PVP_ZONE(20),
- + PVP_ZONE(21);
- private final int _id;
- Index: java/net/sf/l2j/gameserver/model/zone/type/L2PvPZone.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/model/zone/type/L2PvPZone.java (nonexistent)
- +++ java/net/sf/l2j/gameserver/model/zone/type/L2PvPZone.java (working copy)
- @@ -0,0 +1,65 @@
- +package net.sf.l2j.gameserver.model.zone.type;
- +
- +import net.sf.l2j.gameserver.datatables.SkillTable;
- +import net.sf.l2j.gameserver.model.L2Skill;
- +import net.sf.l2j.gameserver.model.actor.L2Character;
- +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- +import net.sf.l2j.gameserver.model.zone.L2ZoneType;
- +import net.sf.l2j.gameserver.model.zone.ZoneId;
- +import net.sf.l2j.gameserver.network.SystemMessageId;
- +
- +/**
- + * @author Baggos
- + */
- +public class L2PvPZone extends L2ZoneType
- +{
- + L2Skill noblesse = SkillTable.getInstance().getInfo(1323, 1);
- +
- + public L2PvPZone(int id)
- + {
- + super(id);
- + }
- +
- + @Override
- + protected void onEnter(L2Character character)
- + {
- + character.setInsideZone(ZoneId.PVP_ZONE, true);
- + if (character instanceof L2PcInstance)
- + {
- + L2PcInstance player = character.getActingPlayer();
- + noblesse.getEffects(player, player);
- + ((L2PcInstance) character).sendPacket(SystemMessageId.ENTERED_COMBAT_ZONE);
- + character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, true);
- + }
- + }
- +
- + @Override
- + protected void onExit(L2Character character)
- + {
- + character.setInsideZone(ZoneId.PVP_ZONE, false);
- + if (character instanceof L2PcInstance)
- + {
- + ((L2PcInstance) character).sendPacket(SystemMessageId.LEFT_COMBAT_ZONE);
- + character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, false);
- + }
- + }
- +
- + @Override
- + public void onDieInside(L2Character character)
- + {
- + }
- +
- + @Override
- + public void onReviveInside(L2Character character)
- + {
- + if (character instanceof L2PcInstance)
- + {
- + final L2PcInstance player = (L2PcInstance) character;
- + noblesse.getEffects(player, player);
- +
- + player.setCurrentHp(player.getMaxHp());
- + player.setCurrentCp(player.getMaxCp());
- + player.setCurrentMp(player.getMaxMp());
- + }
- + }
- +}
- \ No newline at end of file
- #P aCis_datapack
- Index: data/xml/zones/PvPZone.xml
- ===================================================================
- --- data/xml/zones/PvPZone.xml (nonexistent)
- +++ data/xml/zones/PvPZone.xml (working copy)
- @@ -0,0 +1,11 @@
- +<?xml version="1.0" encoding="UTF-8"?>
- +<list>
- + <zone type="PvPZone" shape="NPoly" minZ="-4290" maxZ="-1290"><!-- Primeval Isle -->
- + <node X="10408" Y="-27395" />
- + <node X="12065" Y="-25334" />
- + <node X="15834" Y="-19850" />
- + <node X="8791" Y="-10223" />
- + <node X="3487" Y="-12137" />
- + <node X="4110" Y="-34245" />
- + </zone>
- +</list>
- \ No newline at end of file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement