- Timestamp:
- Jan 16, 2012 7:56:19 AM (4 months ago)
- Location:
- trunk/L2J_DataPack
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
dist/game/data/scripts/ai/individual/DrChaos.java (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/L2J_DataPack
- Property svn:mergeinfo changed
/branches/unstable/L2J_DataPack_BETA merged: 8407-8426,8428-8480,8482-8491,8493-8588,8590-8629
- Property svn:mergeinfo changed
-
trunk/L2J_DataPack/dist/game/data/scripts/ai/individual/DrChaos.java
r7924 r8630 23 23 import com.l2jserver.gameserver.model.quest.Quest; 24 24 import com.l2jserver.gameserver.network.serverpackets.PlaySound; 25 import com.l2jserver.gameserver.network.serverpackets.SocialAction;26 25 import com.l2jserver.gameserver.network.serverpackets.SpecialCamera; 27 28 26 29 27 /** 30 28 * DrChaos AI 31 29 * @author Kerberos 32 *33 30 */ 34 31 public class DrChaos extends Quest … … 50 47 public L2Npc findTemplate(int npcId) 51 48 { 52 for (L2Spawn spawn : SpawnTable.getInstance().getSpawnTable())49 for (L2Spawn spawn : SpawnTable.getInstance().getSpawnTable()) 53 50 { 54 51 if (spawn != null && spawn.getNpcid() == npcId) … … 61 58 62 59 @Override 63 public String onAdvEvent (String event, L2Npc npc, L2PcInstance player)60 public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) 64 61 { 65 62 if (event.equalsIgnoreCase("1")) … … 69 66 { 70 67 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)); 72 69 } 73 70 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); 77 74 } 78 75 else if (event.equalsIgnoreCase("2")) 79 npc.broadcast Packet(new SocialAction(npc,3));76 npc.broadcastSocialAction(3); 80 77 else if (event.equalsIgnoreCase("3")) 81 78 { 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); 84 81 } 85 82 else if (event.equalsIgnoreCase("4")) 86 83 { 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); 89 86 } 90 87 else if (event.equalsIgnoreCase("5")) 91 88 { 92 player.teleToLocation(94832, -112624,-3304);93 npc.teleToLocation(-113091, -243942,-15536);89 player.teleToLocation(94832, -112624, -3304); 90 npc.teleToLocation(-113091, -243942, -15536); 94 91 if (!_IsGolemSpawned) 95 92 { 96 L2Npc golem = addSpawn(CHAOS_GOLEM, 94640,-112496,-3336,0,false,0);93 L2Npc golem = addSpawn(CHAOS_GOLEM, 94640, -112496, -3336, 0, false, 0); 97 94 _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)); 100 97 } 101 98 } 102 99 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)); 104 101 return super.onAdvEvent(event, npc, player); 105 102 } 106 103 107 104 @Override 108 public String onFirstTalk (L2Npc npc, L2PcInstance player)105 public String onFirstTalk(L2Npc npc, L2PcInstance player) 109 106 { 110 107 if (npc.getNpcId() == DOCTER_CHAOS) 111 108 { 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); 114 111 } 115 112 return ""; … … 118 115 public static void main(String[] args) 119 116 { 120 new DrChaos(-1, "Doctor Chaos","ai");117 new DrChaos(-1, "Doctor Chaos", "ai"); 121 118 } 122 119 }
Note: See TracChangeset
for help on using the changeset viewer.
