- 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/Valakas.java (modified) (16 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/Valakas.java
r8406 r8630 30 30 import com.l2jserver.gameserver.model.L2Object; 31 31 import com.l2jserver.gameserver.model.L2Skill; 32 import com.l2jserver.gameserver.model.StatsSet; 32 33 import com.l2jserver.gameserver.model.actor.L2Character; 33 34 import com.l2jserver.gameserver.model.actor.L2Npc; … … 41 42 import com.l2jserver.gameserver.network.serverpackets.SocialAction; 42 43 import com.l2jserver.gameserver.network.serverpackets.SpecialCamera; 43 import com.l2jserver.gameserver.templates.StatsSet;44 44 import com.l2jserver.gameserver.util.Util; 45 45 import com.l2jserver.util.Rnd; … … 47 47 /** 48 48 * Valakas AI 49 *50 49 * @author Kerberos 51 50 */ … … 68 67 private static final int VALAKAS = 29028; 69 68 70 // Valakas Status Tracking :71 private static final byte DORMANT = 0; // Valakas is spawned and no one has entered yet. Entry is unlocked72 private static final byte WAITING = 1; // Valakas is spawend and someone has entered, triggering a 30 minute window for additional people to enter73 // before he unleashes his attack. Entry is unlocked74 private static final byte FIGHTING = 2; // Valakas is engaged in battle, annihilating his foes. Entry is locked75 private static final byte DEAD = 3; // Valakas has been killed. Entry is locked69 // Valakas Status Tracking : 70 private static final byte DORMANT = 0; // Valakas is spawned and no one has entered yet. Entry is unlocked 71 private static final byte WAITING = 1; // Valakas is spawend and someone has entered, triggering a 30 minute window for additional people to enter 72 // before he unleashes his attack. Entry is unlocked 73 private static final byte FIGHTING = 2; // Valakas is engaged in battle, annihilating his foes. Entry is locked 74 private static final byte DEAD = 3; // Valakas has been killed. Entry is locked 76 75 77 76 private static L2BossZone _Zone; … … 83 82 int[] mob = 84 83 { 85 VALAKAS84 VALAKAS 86 85 }; 87 86 registerMobs(mob); … … 101 100 long temp = (info.getLong("respawn_time") - System.currentTimeMillis()); 102 101 // if valakas is locked until a certain time, mark it so and start the unlock timer 103 // the unlock time has not yet expired. Mark valakas as currently locked.Setup a timer102 // the unlock time has not yet expired. Mark valakas as currently locked. Setup a timer 104 103 // to fire at the correct time (calculate the time between now and the unlock time, 105 104 // setup a timer to fire after that many msec) … … 127 126 } 128 127 catch (Throwable e) 129 {} 128 { 129 } 130 130 } 131 131 }, 100L); … … 158 158 } 159 159 catch (Throwable e) 160 {} 160 { 161 } 161 162 } 162 163 }, 100L); … … 198 199 } 199 200 catch (Throwable e) 200 {} 201 { 202 } 201 203 } 202 204 }, 1L); … … 276 278 { 277 279 startQuestTimer("1102", 1500, npc, null); 278 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1300,180,-5,3000,15000,0,-5,1,0));280 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1300, 180, -5, 3000, 15000, 0, -5, 1, 0)); 279 281 } 280 282 else if (event.equalsIgnoreCase("1102")) 281 283 { 282 284 startQuestTimer("1103", 3300, npc, null); 283 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 500,180,-8,600,15000,0,60,1,0));285 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 500, 180, -8, 600, 15000, 0, 60, 1, 0)); 284 286 } 285 287 else if (event.equalsIgnoreCase("1103")) 286 288 { 287 289 startQuestTimer("1104", 2900, npc, null); 288 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 800,180,-8,2700,15000,0,30,1,0));290 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 800, 180, -8, 2700, 15000, 0, 30, 1, 0)); 289 291 } 290 292 else if (event.equalsIgnoreCase("1104")) 291 293 { 292 294 startQuestTimer("1105", 2700, npc, null); 293 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 200,250,70,0,15000,30,80,1,0));295 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 200, 250, 70, 0, 15000, 30, 80, 1, 0)); 294 296 } 295 297 else if (event.equalsIgnoreCase("1105")) 296 298 { 297 299 startQuestTimer("1106", 1, npc, null); 298 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1100,250,70,2500,15000,30,80,1,0));300 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1100, 250, 70, 2500, 15000, 30, 80, 1, 0)); 299 301 } 300 302 else if (event.equalsIgnoreCase("1106")) 301 303 { 302 304 startQuestTimer("1107", 3200, npc, null); 303 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 700,150,30,0,15000,-10,60,1,0));305 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 700, 150, 30, 0, 15000, -10, 60, 1, 0)); 304 306 } 305 307 else if (event.equalsIgnoreCase("1107")) 306 308 { 307 309 startQuestTimer("1108", 1400, npc, null); 308 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1200,150,20,2900,15000,-10,30,1,0));310 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1200, 150, 20, 2900, 15000, -10, 30, 1, 0)); 309 311 } 310 312 else if (event.equalsIgnoreCase("1108")) 311 313 { 312 314 startQuestTimer("1109", 6700, npc, null); 313 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 750,170,15,3400,15000,10,-15,1,0));315 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 750, 170, 15, 3400, 15000, 10, -15, 1, 0)); 314 316 } 315 317 else if (event.equalsIgnoreCase("1109")) 316 318 { 317 319 startQuestTimer("1110", 5700, npc, null); 318 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 750,170,-10,3400,15000,4000,-15,1,0));320 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 750, 170, -10, 3400, 15000, 4000, -15, 1, 0)); 319 321 } 320 322 else if (event.equalsIgnoreCase("1110")) 321 323 { 322 GrandBossManager.getInstance().setBossStatus(VALAKAS, FIGHTING);324 GrandBossManager.getInstance().setBossStatus(VALAKAS, FIGHTING); 323 325 startQuestTimer("1002", 60000, npc, null, true); 324 326 npc.setIsInvul(false); … … 328 330 { 329 331 startQuestTimer("1112", 3500, npc, null); 330 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1100,210,-5,3000,10000,-13,0,1,1));332 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1100, 210, -5, 3000, 10000, -13, 0, 1, 1)); 331 333 } 332 334 else if (event.equalsIgnoreCase("1112")) 333 335 { 334 336 startQuestTimer("1113", 4500, npc, null); 335 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1300,200,-8,3000,10000,0,15,1,1));337 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1300, 200, -8, 3000, 10000, 0, 15, 1, 1)); 336 338 } 337 339 else if (event.equalsIgnoreCase("1113")) 338 340 { 339 341 startQuestTimer("1114", 500, npc, null); 340 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1000,190,0,3000,10000,0,10,1,1));342 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1000, 190, 0, 3000, 10000, 0, 10, 1, 1)); 341 343 } 342 344 else if (event.equalsIgnoreCase("1114")) 343 345 { 344 346 startQuestTimer("1115", 4600, npc, null); 345 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1700,120,0,2500,10000,12,40,1,1));347 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1700, 120, 0, 2500, 10000, 12, 40, 1, 1)); 346 348 } 347 349 else if (event.equalsIgnoreCase("1115")) 348 350 { 349 351 startQuestTimer("1116", 750, npc, null); 350 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1700,20,0,3000,10000,10,10,1,1));352 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1700, 20, 0, 3000, 10000, 10, 10, 1, 1)); 351 353 } 352 354 else if (event.equalsIgnoreCase("1116")) 353 355 { 354 356 startQuestTimer("1117", 2500, npc, null); 355 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1700,10,0,3000,10000,20,70,1,1));357 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1700, 10, 0, 3000, 10000, 20, 70, 1, 1)); 356 358 } 357 359 else if (event.equalsIgnoreCase("1117")) 358 360 { 359 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1700,10,0,3000,250,20,-20,1,1));361 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1700, 10, 0, 3000, 250, 20, -20, 1, 1)); 360 362 addSpawn(31759, 212852, -114842, -1632, 0, false, 900000); 361 363 int radius = 1500; 362 364 for (int i = 0; i < 20; i++) 363 365 { 364 int x = (int) (radius * Math.cos(i * .331)); // .331~2pi/19366 int x = (int) (radius * Math.cos(i * .331)); // .331~2pi/19 365 367 int y = (int) (radius * Math.sin(i * .331)); 366 368 addSpawn(31759, 212852 + x, -114842 + y, -1632, 0, false, 900000); … … 385 387 return super.onAdvEvent(event, npc, player); 386 388 } 387 389 388 390 @Override 389 391 public String onSpawn(L2Npc npc) … … 392 394 return super.onSpawn(npc); 393 395 } 394 396 395 397 @Override 396 398 public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isPet, L2Skill skill) … … 975 977 { 976 978 startQuestTimer("1111", 500, npc, null); 977 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1700,2000,130,-1,0,10000,-20,1,1));979 npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1700, 2000, 130, -1, 0, 10000, -20, 1, 1)); 978 980 npc.broadcastPacket(new PlaySound(1, "B03_D", 1, npc.getObjectId(), npc.getX(), npc.getY(), npc.getZ())); 979 GrandBossManager.getInstance().setBossStatus(VALAKAS, DEAD);981 GrandBossManager.getInstance().setBossStatus(VALAKAS, DEAD); 980 982 long respawnTime = (long) Config.Interval_Of_Valakas_Spawn + Rnd.get(Config.Random_Of_Valakas_Spawn); 981 983 startQuestTimer("valakas_unlock", respawnTime, null, null); … … 1305 1307 public void broadcastSpawn(L2Npc npc) 1306 1308 { 1307 Collection<L2Object> objs = npc.getKnownList().getKnownObjects().values(); 1308 { 1309 for (L2Object obj : objs) 1310 { 1311 if (obj instanceof L2PcInstance) 1312 { 1313 if (Util.checkIfInRange(10000, npc, obj, true)) 1314 { 1315 ((L2Character) obj).sendPacket(new PlaySound(1, "B03_A", 1, npc.getObjectId(), 212852, -114842, -1632)); 1316 ((L2Character) obj).sendPacket(new SocialAction(npc, 3)); 1317 } 1309 Collection<L2PcInstance> players = npc.getKnownList().getKnownPlayers().values(); 1310 { 1311 for (L2PcInstance player : players) 1312 { 1313 if (Util.checkIfInRange(10000, npc, player, true)) 1314 { 1315 player.sendPacket(new PlaySound(1, "B03_A", 1, npc.getObjectId(), 212852, -114842, -1632)); 1316 player.sendPacket(new SocialAction(npc.getObjectId(), 3)); 1318 1317 } 1319 1318 } … … 1325 1324 { 1326 1325 FastList<L2Character> result = new FastList<L2Character>(); 1327 Collection<L2 Object> objs = npc.getKnownList().getKnownObjects().values();1328 { 1329 for (L2 Object obj: objs)1330 { 1331 if ( obj instanceof L2PcInstance || obj instanceof L2Summon || objinstanceof L2DecoyInstance)1332 { 1333 if (Util.checkIfInRange(5000, npc, obj, true) && !((L2Character) obj).isDead() && !((L2Character) obj).isGM())1334 result.add( (L2Character) obj);1326 Collection<L2Character> objs = npc.getKnownList().getKnownCharacters(); 1327 { 1328 for (L2Character cha : objs) 1329 { 1330 if (cha instanceof L2PcInstance || cha instanceof L2Summon || cha instanceof L2DecoyInstance) 1331 { 1332 if (Util.checkIfInRange(5000, npc, cha, true) && !cha.isDead() && !cha.isGM()) 1333 result.add(cha); 1335 1334 } 1336 1335 }
Note: See TracChangeset
for help on using the changeset viewer.
