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/DrChaos.java

    r7924 r8630  
    2323import com.l2jserver.gameserver.model.quest.Quest; 
    2424import com.l2jserver.gameserver.network.serverpackets.PlaySound; 
    25 import com.l2jserver.gameserver.network.serverpackets.SocialAction; 
    2625import com.l2jserver.gameserver.network.serverpackets.SpecialCamera; 
    27  
    2826 
    2927/** 
    3028 * DrChaos AI 
    3129 * @author Kerberos 
    32  * 
    3330 */ 
    3431public class DrChaos extends Quest 
     
    5047        public L2Npc findTemplate(int npcId) 
    5148        { 
    52                 for(L2Spawn spawn : SpawnTable.getInstance().getSpawnTable()) 
     49                for (L2Spawn spawn : SpawnTable.getInstance().getSpawnTable()) 
    5350                { 
    5451                        if (spawn != null && spawn.getNpcid() == npcId) 
     
    6158         
    6259        @Override 
    63         public String onAdvEvent (String event, L2Npc npc, L2PcInstance player) 
     60        public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) 
    6461        { 
    6562                if (event.equalsIgnoreCase("1")) 
     
    6966                        { 
    7067                                npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, machine_instance); 
    71                                 machine_instance.broadcastPacket(new SpecialCamera(machine_instance.getObjectId(),1,-200,15,10000,20000,0,0,1,0)); 
     68                                machine_instance.broadcastPacket(new SpecialCamera(machine_instance.getObjectId(), 1, -200, 15, 10000, 20000, 0, 0, 1, 0)); 
    7269                        } 
    7370                        else 
    74                                 //print "Dr Chaos AI: problem finding Strange Machine (npcid = "+STRANGE_MACHINE+"). Error: not spawned!" 
    75                                 startQuestTimer("2",2000,npc,player); 
    76                         startQuestTimer("3",10000,npc,player); 
     71                                // print "Dr Chaos AI: problem finding Strange Machine (npcid = "+STRANGE_MACHINE+"). Error: not spawned!" 
     72                                startQuestTimer("2", 2000, npc, player); 
     73                        startQuestTimer("3", 10000, npc, player); 
    7774                } 
    7875                else if (event.equalsIgnoreCase("2")) 
    79                         npc.broadcastPacket(new SocialAction(npc,3)); 
     76                        npc.broadcastSocialAction(3); 
    8077                else if (event.equalsIgnoreCase("3")) 
    8178                { 
    82                         npc.broadcastPacket(new SpecialCamera(npc.getObjectId(),1,-150,10,3000,20000,0,0,1,0)); 
    83                         startQuestTimer("4",2500,npc,player); 
     79                        npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1, -150, 10, 3000, 20000, 0, 0, 1, 0)); 
     80                        startQuestTimer("4", 2500, npc, player); 
    8481                } 
    8582                else if (event.equalsIgnoreCase("4")) 
    8683                { 
    87                         npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new L2CharPosition(96055,-110759,-3312,0)); 
    88                         startQuestTimer("5",2000,npc,player); 
     84                        npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new L2CharPosition(96055, -110759, -3312, 0)); 
     85                        startQuestTimer("5", 2000, npc, player); 
    8986                } 
    9087                else if (event.equalsIgnoreCase("5")) 
    9188                { 
    92                         player.teleToLocation(94832,-112624,-3304); 
    93                         npc.teleToLocation(-113091,-243942,-15536); 
     89                        player.teleToLocation(94832, -112624, -3304); 
     90                        npc.teleToLocation(-113091, -243942, -15536); 
    9491                        if (!_IsGolemSpawned) 
    9592                        { 
    96                                 L2Npc golem = addSpawn(CHAOS_GOLEM,94640,-112496,-3336,0,false,0); 
     93                                L2Npc golem = addSpawn(CHAOS_GOLEM, 94640, -112496, -3336, 0, false, 0); 
    9794                                _IsGolemSpawned = true; 
    98                                 startQuestTimer("6",1000,golem,player); 
    99                                 player.sendPacket(new PlaySound(1,"Rm03_A",0,0,0,0,0)); 
     95                                startQuestTimer("6", 1000, golem, player); 
     96                                player.sendPacket(new PlaySound(1, "Rm03_A", 0, 0, 0, 0, 0)); 
    10097                        } 
    10198                } 
    10299                else if (event.equalsIgnoreCase("6")) 
    103                         npc.broadcastPacket(new SpecialCamera(npc.getObjectId(),30,-200,20,6000,8000,0,0,1,0)); 
     100                        npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 30, -200, 20, 6000, 8000, 0, 0, 1, 0)); 
    104101                return super.onAdvEvent(event, npc, player); 
    105102        } 
    106103         
    107104        @Override 
    108         public String onFirstTalk (L2Npc npc, L2PcInstance player) 
     105        public String onFirstTalk(L2Npc npc, L2PcInstance player) 
    109106        { 
    110107                if (npc.getNpcId() == DOCTER_CHAOS) 
    111108                { 
    112                         npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new L2CharPosition(96323,-110914,-3328,0)); 
    113                         this.startQuestTimer("1",3000,npc,player); 
     109                        npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new L2CharPosition(96323, -110914, -3328, 0)); 
     110                        this.startQuestTimer("1", 3000, npc, player); 
    114111                } 
    115112                return ""; 
     
    118115        public static void main(String[] args) 
    119116        { 
    120                 new DrChaos(-1,"Doctor Chaos","ai"); 
     117                new DrChaos(-1, "Doctor Chaos", "ai"); 
    121118        } 
    122119} 
Note: See TracChangeset for help on using the changeset viewer.