Ignore:
Timestamp:
Jan 16, 2012 7:56:19 AM (4 months ago)
Author:
MELERIX
Message:

STABLE: Sync with BETA [8629]

Location:
trunk/L2J_DataPack
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/L2J_DataPack

  • trunk/L2J_DataPack/dist/game/data/scripts/ai/individual/Orfen.java

    r8406 r8630  
    2727import com.l2jserver.gameserver.model.L2Skill; 
    2828import com.l2jserver.gameserver.model.L2Spawn; 
     29import com.l2jserver.gameserver.model.Location; 
     30import com.l2jserver.gameserver.model.StatsSet; 
    2931import com.l2jserver.gameserver.model.actor.L2Attackable; 
    3032import com.l2jserver.gameserver.model.actor.L2Character; 
     
    3638import com.l2jserver.gameserver.network.serverpackets.NpcSay; 
    3739import com.l2jserver.gameserver.network.serverpackets.PlaySound; 
    38 import com.l2jserver.gameserver.templates.StatsSet; 
    3940import com.l2jserver.util.Rnd; 
    4041 
    4142/** 
    4243 * Orfen AI 
    43  *  
    4444 * @author Emperorc 
    45  *  
    4645 */ 
    4746public class Orfen extends L2AttackableAIScript 
    4847{ 
    4948         
    50         private static final int[][] Pos = 
    51         { 
    52                 { 
    53                         43728, 17220, -4342 
    54                 }, 
    55                 { 
    56                         55024, 17368, -5412 
    57                 }, 
    58                 { 
    59                         53504, 21248, -5486 
    60                 }, 
    61                 { 
    62                         53248, 24576, -5262 
    63                 } 
     49        //@formatter:off 
     50        private static final Location[] Pos = 
     51        { 
     52                new Location(43728, 17220, -4342),  
     53                new Location(55024, 17368, -5412), 
     54                new Location(53504, 21248, -5486),  
     55                new Location(53248, 24576, -5262) 
    6456        }; 
    6557         
     
    6759        { 
    6860                NpcStringId.S1_STOP_KIDDING_YOURSELF_ABOUT_YOUR_OWN_POWERLESSNESS, 
    69                 NpcStringId.S1_ILL_MAKE_YOU_FEEL_WHAT_TRUE_FEAR_IS, 
    70                 NpcStringId.YOURE_REALLY_STUPID_TO_HAVE_CHALLENGED_ME_S1_GET_READY, 
     61                NpcStringId.S1_ILL_MAKE_YOU_FEEL_WHAT_TRUE_FEAR_IS,  
     62                NpcStringId.YOURE_REALLY_STUPID_TO_HAVE_CHALLENGED_ME_S1_GET_READY,  
    7163                NpcStringId.S1_DO_YOU_THINK_THATS_GOING_TO_WORK 
    7264        }; 
     65        //@formatter:on 
    7366         
    7467        private static final int ORFEN = 29014; 
    75         //private static final int RAIKEL = 29015; 
     68        // private static final int RAIKEL = 29015; 
    7669        private static final int RAIKEL_LEOS = 29016; 
    77         //private static final int RIBA = 29017; 
     70        // private static final int RIBA = 29017; 
    7871        private static final int RIBA_IREN = 29018; 
    7972         
     
    9083                int[] mobs = 
    9184                { 
    92                                 ORFEN, RAIKEL_LEOS, RIBA_IREN 
     85                        ORFEN, RAIKEL_LEOS, RIBA_IREN 
    9386                }; 
    9487                registerMobs(mobs); 
    9588                _IsTeleported = false; 
    96                 _Zone = GrandBossManager.getInstance().getZone(Pos[0][0], Pos[0][1], Pos[0][2]); 
     89                _Zone = GrandBossManager.getInstance().getZone(Pos[0]); 
    9790                StatsSet info = GrandBossManager.getInstance().getStatsSet(ORFEN); 
    9891                int status = GrandBossManager.getInstance().getBossStatus(ORFEN); 
     
    109102                                // the time has already expired while the server was offline. Immediately spawn Orfen. 
    110103                                int i = Rnd.get(10); 
    111                                 int x = 0; 
    112                                 int y = 0; 
    113                                 int z = 0; 
     104                                Location loc; 
    114105                                if (i < 4) 
    115106                                { 
    116                                         x = Pos[1][0]; 
    117                                         y = Pos[1][1]; 
    118                                         z = Pos[1][2]; 
     107                                        loc = Pos[1]; 
    119108                                } 
    120109                                else if (i < 7) 
    121110                                { 
    122                                         x = Pos[2][0]; 
    123                                         y = Pos[2][1]; 
    124                                         z = Pos[2][2]; 
     111                                        loc = Pos[2]; 
    125112                                } 
    126113                                else 
    127114                                { 
    128                                         x = Pos[3][0]; 
    129                                         y = Pos[3][1]; 
    130                                         z = Pos[3][2]; 
     115                                        loc = Pos[3]; 
    131116                                } 
    132                                 L2GrandBossInstance orfen = (L2GrandBossInstance) addSpawn(ORFEN, x, y, z, 0, false, 0); 
     117                                L2GrandBossInstance orfen = (L2GrandBossInstance) addSpawn(ORFEN, loc, false, 0); 
    133118                                GrandBossManager.getInstance().setBossStatus(ORFEN, ALIVE); 
    134119                                spawnBoss(orfen); 
     
    154139                npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE, null, null); 
    155140                L2Spawn spawn = npc.getSpawn(); 
    156                 spawn.setLocx(Pos[index][0]); 
    157                 spawn.setLocy(Pos[index][1]); 
    158                 spawn.setLocz(Pos[index][2]); 
    159                 npc.teleToLocation(Pos[index][0], Pos[index][1], Pos[index][2]); 
     141                spawn.setLocation(Pos[index]);; 
     142                npc.teleToLocation(Pos[index], false); 
    160143        } 
    161144         
     
    165148                npc.broadcastPacket(new PlaySound(1, "BS01_A", 1, npc.getObjectId(), npc.getX(), npc.getY(), npc.getZ())); 
    166149                startQuestTimer("check_orfen_pos", 10000, npc, null, true); 
    167                 //Spawn minions 
     150                // Spawn minions 
    168151                int x = npc.getX(); 
    169152                int y = npc.getY(); 
    170153                L2Attackable mob; 
    171                 mob = (L2Attackable)addSpawn(RAIKEL_LEOS, x + 100, y + 100, npc.getZ(), 0, false, 0); 
     154                mob = (L2Attackable) addSpawn(RAIKEL_LEOS, x + 100, y + 100, npc.getZ(), 0, false, 0); 
    172155                mob.setIsRaidMinion(true); 
    173156                _Minions.add(mob); 
    174                 mob = (L2Attackable)addSpawn(RAIKEL_LEOS, x + 100, y - 100, npc.getZ(), 0, false, 0); 
     157                mob = (L2Attackable) addSpawn(RAIKEL_LEOS, x + 100, y - 100, npc.getZ(), 0, false, 0); 
    175158                mob.setIsRaidMinion(true); 
    176159                _Minions.add(mob); 
    177                 mob = (L2Attackable)addSpawn(RAIKEL_LEOS, x - 100, y + 100, npc.getZ(), 0, false, 0); 
     160                mob = (L2Attackable) addSpawn(RAIKEL_LEOS, x - 100, y + 100, npc.getZ(), 0, false, 0); 
    178161                mob.setIsRaidMinion(true); 
    179162                _Minions.add(mob); 
    180                 mob = (L2Attackable)addSpawn(RAIKEL_LEOS, x - 100, y - 100, npc.getZ(), 0, false, 0); 
     163                mob = (L2Attackable) addSpawn(RAIKEL_LEOS, x - 100, y - 100, npc.getZ(), 0, false, 0); 
    181164                mob.setIsRaidMinion(true); 
    182165                _Minions.add(mob); 
     
    190173                { 
    191174                        int i = Rnd.get(10); 
    192                         int x = 0; 
    193                         int y = 0; 
    194                         int z = 0; 
     175                        Location loc; 
    195176                        if (i < 4) 
    196177                        { 
    197                                 x = Pos[1][0]; 
    198                                 y = Pos[1][1]; 
    199                                 z = Pos[1][2]; 
     178                                loc = Pos[1]; 
    200179                        } 
    201180                        else if (i < 7) 
    202181                        { 
    203                                 x = Pos[2][0]; 
    204                                 y = Pos[2][1]; 
    205                                 z = Pos[2][2]; 
     182                                loc = Pos[2]; 
    206183                        } 
    207184                        else 
    208185                        { 
    209                                 x = Pos[3][0]; 
    210                                 y = Pos[3][1]; 
    211                                 z = Pos[3][2]; 
    212                         } 
    213                         L2GrandBossInstance orfen = (L2GrandBossInstance) addSpawn(ORFEN, x, y, z, 0, false, 0); 
     186                                loc = Pos[3]; 
     187                        } 
     188                        L2GrandBossInstance orfen = (L2GrandBossInstance) addSpawn(ORFEN, loc, false, 0); 
    214189                        GrandBossManager.getInstance().setBossStatus(ORFEN, ALIVE); 
    215190                        spawnBoss(orfen); 
     
    250225                else if (event.equalsIgnoreCase("spawn_minion")) 
    251226                { 
    252                         L2Attackable mob = (L2Attackable)addSpawn(RAIKEL_LEOS, npc.getX(), npc.getY(), npc.getZ(), 0, false, 0); 
     227                        L2Attackable mob = (L2Attackable) addSpawn(RAIKEL_LEOS, npc.getX(), npc.getY(), npc.getZ(), 0, false, 0); 
    253228                        mob.setIsRaidMinion(true); 
    254229                        _Minions.add(mob); 
     
    342317                        npc.broadcastPacket(new PlaySound(1, "BS02_D", 1, npc.getObjectId(), npc.getX(), npc.getY(), npc.getZ())); 
    343318                        GrandBossManager.getInstance().setBossStatus(ORFEN, DEAD); 
    344                         //time is 48hour        +/- 20hour 
     319                        // time is 48hour +/- 20hour 
    345320                        long respawnTime = (long) Config.Interval_Of_Orfen_Spawn + Rnd.get(Config.Random_Of_Orfen_Spawn); 
    346321                        startQuestTimer("orfen_unlock", respawnTime, null, null); 
Note: See TracChangeset for help on using the changeset viewer.