Not a member of Pastebin yet?
                        Sign Up,
                        it unlocks many cool features!                    
                - ### Eclipse Workspace Patch 1.0
 - #P aCis_datapack
 - Index: data/xml/zones/RaidLimitZone.xml
 - ===================================================================
 - --- data/xml/zones/RaidLimitZone.xml (revision 0)
 - +++ data/xml/zones/RaidLimitZone.xml (revision 0)
 - @@ -0,0 +1,8 @@
 - +<?xml version="1.0" encoding="UTF-8"?>
 - +<list>
 - + <zone shape="Cuboid" minZ="-3000" maxZ="-2500"> <!-- Barakel Example -->
 - + <stat name="bossId" val="25325" />
 - + <node X="90792" Y="-85439" />
 - + <node X="91291" Y="-86537" />
 - + </zone>
 - +</list>
 - \ No newline at end of file
 - #P aCis_gameserver
 - Index: java/net/sf/l2j/gameserver/model/zone/ZoneId.java
 - ===================================================================
 - --- java/net/sf/l2j/gameserver/model/zone/ZoneId.java (revision 5)
 - +++ java/net/sf/l2j/gameserver/model/zone/ZoneId.java (working copy)
 - @@ -21,7 +21,8 @@
 - CAST_ON_ARTIFACT(16),
 - NO_RESTART(17),
 - SCRIPT(18),
 - - BOSS(19);
 - + BOSS(19),
 - + RAID_LIMIT(20);
 - private final int _id;
 - Index: java/net/sf/l2j/gameserver/model/zone/type/RaidLimitZone.java
 - ===================================================================
 - --- java/net/sf/l2j/gameserver/model/zone/type/RaidLimitZone.java (revision 0)
 - +++ java/net/sf/l2j/gameserver/model/zone/type/RaidLimitZone.java (revision 0)
 - @@ -0,0 +1,46 @@
 - +package net.sf.l2j.gameserver.model.zone.type;
 - +
 - +import net.sf.l2j.gameserver.model.actor.Creature;
 - +import net.sf.l2j.gameserver.model.actor.ai.CtrlIntention;
 - +import net.sf.l2j.gameserver.model.actor.instance.RaidBoss;
 - +import net.sf.l2j.gameserver.model.zone.SpawnZoneType;
 - +import net.sf.l2j.gameserver.model.zone.ZoneId;
 - +
 - +public class RaidLimitZone extends SpawnZoneType
 - +{
 - + private int _bossId;
 - +
 - + public RaidLimitZone(int id)
 - + {
 - + super(id);
 - + }
 - +
 - + @Override
 - + public void setParameter(String name, String value)
 - + {
 - + if (name.equals("bossId"))
 - + _bossId = Integer.parseInt(value);
 - + }
 - +
 - + @Override
 - + protected void onEnter(Creature character)
 - + {
 - + character.setInsideZone(ZoneId.RAID_LIMIT, true);
 - + }
 - +
 - + @Override
 - + protected void onExit(Creature character)
 - + {
 - + character.setInsideZone(ZoneId.RAID_LIMIT, false);
 - + if (character instanceof RaidBoss)
 - + {
 - + final RaidBoss raidboss = ((RaidBoss) character);
 - + if (raidboss.getNpcId() == _bossId)
 - + {
 - + raidboss.teleportTo(raidboss.getSpawn().getLoc(), 0);
 - + raidboss.setTarget(null);
 - + raidboss.getAI().setIntention(CtrlIntention.IDLE);
 - + }
 - + }
 - + }
 - +}
 - \ No newline at end of file
 
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment