Changeset 8630 for trunk/L2J_DataPack/dist/game/data/scripts/ai/group_template/SeedOfAnnihilation.java
- 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/group_template/SeedOfAnnihilation.java (modified) (13 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/group_template/SeedOfAnnihilation.java
r7691 r8630 24 24 import com.l2jserver.gameserver.instancemanager.ZoneManager; 25 25 import com.l2jserver.gameserver.model.L2Spawn; 26 import com.l2jserver.gameserver.model.Location; 26 27 import com.l2jserver.gameserver.model.actor.L2Character; 27 28 import com.l2jserver.gameserver.model.actor.L2Npc; … … 37 38 { 38 39 final private static String qn = "SeedOfAnnihilation"; 39 private static final Map<Integer, int[]> _teleportZones = new FastMap<Integer, int[]>();40 private static final Map<Integer, Location> _teleportZones = new FastMap<>(); 40 41 private static final int ANNIHILATION_FURNACE = 18928; 42 41 43 // Strength, Agility, Wisdom 42 private static final int[] ZONE_BUFFS = { 0, 6443, 6444, 6442 }; 43 private static final int[][] ZONE_BUFFS_LIST = { {1,2,3},{1,3,2},{2,1,3},{2,3,1},{3,2,1},{3,1,2} }; 44 private static final int[] ZONE_BUFFS = 45 { 46 0, 6443, 6444, 6442 47 }; 48 49 private static final int[][] ZONE_BUFFS_LIST = 50 { 51 { 52 1, 2, 3 53 }, 54 { 55 1, 3, 2 56 }, 57 { 58 2, 1, 3 59 }, 60 { 61 2, 3, 1 62 }, 63 { 64 3, 2, 1 65 }, 66 { 67 3, 1, 2 68 } 69 }; 44 70 45 71 // 0: Bistakon, 1: Reptilikon, 2: Cokrakon 46 private SeedRegion[] _regionsData = new SeedRegion[3];72 private final SeedRegion[] _regionsData = new SeedRegion[3]; 47 73 private Long _seedsNextStatusChange; 48 74 … … 67 93 static 68 94 { 69 _teleportZones.put(60002, new int[]{ -213175, 182648, -10992 });70 _teleportZones.put(60003, new int[]{ -181217, 186711, -10528 });71 _teleportZones.put(60004, new int[]{ -180211, 182984, -15152 });72 _teleportZones.put(60005, new int[]{ -179275, 186802, -10720 });95 _teleportZones.put(60002, new Location(-213175, 182648, -10992)); 96 _teleportZones.put(60003, new Location(-181217, 186711, -10528)); 97 _teleportZones.put(60004, new Location(-180211, 182984, -15152)); 98 _teleportZones.put(60005, new Location(-179275, 186802, -10720)); 73 99 } 74 100 … … 76 102 { 77 103 // Bistakon data 78 _regionsData[0] = new SeedRegion(new int[]{ 22750, 22751, 22752, 22753 }, 79 new int[][]{ { 22746, 22746, 22746 }, { 22747, 22747, 22747 }, 80 { 22748, 22748, 22748 }, { 22749, 22749, 22749 } }, 60006, 81 new int[][]{ {-180450,185507,-10544,11632},{-180005,185489,-10544,11632} }); 104 _regionsData[0] = new SeedRegion(new int[] 105 { 106 22750, 22751, 22752, 22753 107 }, new int[][] 108 { 109 { 110 22746, 22746, 22746 111 }, 112 { 113 22747, 22747, 22747 114 }, 115 { 116 22748, 22748, 22748 117 }, 118 { 119 22749, 22749, 22749 120 } 121 }, 60006, new int[][] 122 { 123 { 124 -180450, 185507, -10544, 11632 125 }, 126 { 127 -180005, 185489, -10544, 11632 128 } 129 }); 82 130 83 131 // Reptilikon data 84 _regionsData[1] = new SeedRegion(new int[]{ 22757, 22758, 22759 }, 85 new int[][]{ { 22754, 22755, 22756 } }, 60007, 86 new int[][]{ {-179600,186998,-10704,11632},{-179295,186444,-10704,11632} }); 132 _regionsData[1] = new SeedRegion(new int[] 133 { 134 22757, 22758, 22759 135 }, new int[][] 136 { 137 { 138 22754, 22755, 22756 139 } 140 }, 60007, new int[][] 141 { 142 { 143 -179600, 186998, -10704, 11632 144 }, 145 { 146 -179295, 186444, -10704, 11632 147 } 148 }); 87 149 88 150 // Cokrakon data 89 _regionsData[2] = new SeedRegion(new int[]{ 22763, 22764, 22765 }, 90 new int[][]{ { 22760, 22760, 22761 }, { 22760, 22760, 22762 }, 91 { 22761, 22761, 22760 }, { 22761, 22761, 22762 }, { 22762, 22762, 22760 }, 92 { 22762, 22762, 22761 } }, 60008, 93 new int[][]{ {-180971,186361,-10528,11632},{-180758,186739,-10528,11632} }); 151 _regionsData[2] = new SeedRegion(new int[] 152 { 153 22763, 22764, 22765 154 }, new int[][] 155 { 156 { 157 22760, 22760, 22761 158 }, 159 { 160 22760, 22760, 22762 161 }, 162 { 163 22761, 22761, 22760 164 }, 165 { 166 22761, 22761, 22762 167 }, 168 { 169 22762, 22762, 22760 170 }, 171 { 172 22762, 22762, 22761 173 } 174 }, 60008, new int[][] 175 { 176 { 177 -180971, 186361, -10528, 11632 178 }, 179 { 180 -180758, 186739, -10528, 11632 181 } 182 }); 183 94 184 int buffsNow = 0; 95 185 String var = loadGlobalQuestVar("SeedNextStatusChange"); … … 126 216 super(questId, name, descr); 127 217 loadSeedRegionData(); 128 for (int i : _teleportZones.keySet())218 for (int i : _teleportZones.keySet()) 129 219 addEnterZoneId(i); 130 for (int i = 0; i < _regionsData.length; i++)131 for (int j = 0; j < _regionsData[i].elite_mob_ids.length; j++)220 for (int i = 0; i < _regionsData.length; i++) 221 for (int j = 0; j < _regionsData[i].elite_mob_ids.length; j++) 132 222 addSpawnId(_regionsData[i].elite_mob_ids[j]); 133 223 addStartNpc(32739); … … 139 229 private void startEffectZonesControl() 140 230 { 141 for (int i = 0; i < _regionsData.length; i++)142 { 143 for (int j = 0; j < _regionsData[i].af_spawns.length; j++)231 for (int i = 0; i < _regionsData.length; i++) 232 { 233 for (int j = 0; j < _regionsData[i].af_spawns.length; j++) 144 234 { 145 235 _regionsData[i].af_npcs[j] = addSpawn(ANNIHILATION_FURNACE, _regionsData[i].af_spawns[j][0], _regionsData[i].af_spawns[j][1], _regionsData[i].af_spawns[j][2], _regionsData[i].af_spawns[j][3], false, 0); … … 157 247 if (spawn == null) 158 248 continue; 159 for (int i = 0; i < _regionsData.length; i++)249 for (int i = 0; i < _regionsData.length; i++) 160 250 { 161 251 if (Util.contains(_regionsData[i].elite_mob_ids, spawn.getNpcid())) … … 178 268 public String onSpawn(L2Npc npc) 179 269 { 180 for (int i = 0; i < _regionsData.length; i++)270 for (int i = 0; i < _regionsData.length; i++) 181 271 { 182 272 if (Util.contains(_regionsData[i].elite_mob_ids, npc.getNpcId())) 183 spawnGroupOfMinion((L2MonsterInstance) npc, _regionsData[i].minion_lists[Rnd.get(_regionsData[i].minion_lists.length)]);273 spawnGroupOfMinion((L2MonsterInstance) npc, _regionsData[i].minion_lists[Rnd.get(_regionsData[i].minion_lists.length)]); 184 274 } 185 275 return super.onSpawn(npc); … … 187 277 188 278 @Override 189 public String onAdvEvent (String event, L2Npc npc, L2PcInstance player)279 public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) 190 280 { 191 281 if (event.equalsIgnoreCase("ChangeSeedsStatus")) … … 195 285 _seedsNextStatusChange = getNextSeedsStatusChangeTime(); 196 286 saveGlobalQuestVar("SeedNextStatusChange", String.valueOf(_seedsNextStatusChange)); 197 for (int i = 0; i < _regionsData.length; i++)287 for (int i = 0; i < _regionsData.length; i++) 198 288 { 199 289 _regionsData[i].activeBuff = ZONE_BUFFS_LIST[buffsNow][i]; 200 290 201 for (L2Npc af : _regionsData[i].af_npcs)291 for (L2Npc af : _regionsData[i].af_npcs) 202 292 af.setDisplayEffect(_regionsData[i].activeBuff); 203 293 … … 224 314 225 315 @Override 226 public String onKill (L2Npc npc, L2PcInstance killer, boolean isPet)227 { 228 return super.onKill(npc, killer,isPet);316 public String onKill(L2Npc npc, L2PcInstance killer, boolean isPet) 317 { 318 return super.onKill(npc, killer, isPet); 229 319 } 230 320 … … 234 324 if (_teleportZones.containsKey(zone.getId())) 235 325 { 236 int[]teleLoc = _teleportZones.get(zone.getId());237 character.teleToLocation(teleLoc [0],teleLoc[1],teleLoc[2]);326 Location teleLoc = _teleportZones.get(zone.getId()); 327 character.teleToLocation(teleLoc, false); 238 328 } 239 329 return super.onEnterZone(character, zone); … … 242 332 public static void main(String[] args) 243 333 { 244 new SeedOfAnnihilation(-1, qn,"ai");334 new SeedOfAnnihilation(-1, qn, "ai"); 245 335 } 246 336 }
Note: See TracChangeset
for help on using the changeset viewer.
