Рейтинг темы:
  • 0 Голос(ов) - 0 в среднем
  • 1
  • 2
  • 3
  • 4
  • 5
Лаги при убийстве Тиад
#11
LineOFWar Написал:какая рева сборки? свн вроде жив глянь там последний скрипт не помню заливал или нетSmile about корзину почистил а там была большая тема про содSmile да и про что то там брали из фени из этой ушербной сборки брать нечего а вот так вот пиз.деть нечего:negodue:
rev1294.....
Ответ
#12
тиаду то совсем не били?
[HTML]/*
Todo:
- Traps not done
- no random mob spawns after mob kill
*/
//author by d0S
package instances.SeedOfDestruction;

import java.util.Calendar;
import java.util.Map;

import javolution.util.FastMap;

import ru.l2open.gameserver.model.zone.L2ZoneType;
import ru.l2open.gameserver.model.actor.L2Summon;
import ru.l2open.gameserver.model.actor.L2Character;
import ru.l2open.gameserver.network.serverpackets.*;
import ru.l2open.gameserver.network.serverpackets.L2GameServerPacket;
import ru.l2open.gameserver.network.serverpackets.SocialAction;
import ru.l2open.gameserver.network.serverpackets.SpecialCamera;
import ru.l2open.gameserver.datatables.SkillTable;
import ru.l2open.gameserver.ai.CtrlIntention;
import ru.l2open.gameserver.instancemanager.GraciaSeedManager;
import ru.l2open.gameserver.instancemanager.InstanceManager;
import ru.l2open.gameserver.instancemanager.InstanceManager.InstanceWorld;
import ru.l2open.gameserver.model.L2CharPosition;
import ru.l2open.gameserver.model.L2Object;
import ru.l2open.gameserver.model.L2Skill;
import ru.l2open.gameserver.model.L2Effect;
import ru.l2open.gameserver.model.L2World;
import ru.l2open.gameserver.model.L2Object.InstanceType;
import ru.l2open.gameserver.model.actor.L2Attackable;
import ru.l2open.gameserver.model.actor.L2Npc;
import ru.l2open.gameserver.model.entity.Instance;
import ru.l2open.gameserver.model.actor.instance.L2DoorInstance;
import ru.l2open.gameserver.model.actor.instance.L2PcInstance;
import ru.l2open.gameserver.model.quest.Quest;
import ru.l2open.gameserver.model.quest.QuestState;
import ru.l2open.gameserver.network.SystemMessageId;
import ru.l2open.gameserver.network.serverpackets.ExShowScreenMessage;
import ru.l2open.gameserver.network.serverpackets.SystemMessage;
import ru.l2open.gameserver.util.Util;
import ru.l2open.util.Rnd;
import javolution.util.FastList;

import java.util.List;

public class SeedOfDestruction extends Quest
{
//author by d0S
private class SODWorld extends InstanceWorld
{
public Map<L2Npc,Boolean> npcList = new FastMap<L2Npc,Boolean>();
public int killedDevice = 0;
public int deviceSpawnedMobCount = 0;
public boolean ZoneWaitForTP = true;
public List<L2Npc> naezds = new FastList<L2Npc>();
public List<L2PcInstance> PlayersInInstance = new FastList<L2PcInstance>();
public List<L2Npc> _mags = new FastList<L2Npc>();
private L2Npc _tiada, _priest, _ChangePortal, _MovePeltast, _naezdTR1, _naezdTR2, _naezdTL1, _naezdTL2, _portalForCamera;
//author by d0S
public SODWorld(Long time)
{
InstanceManager.getInstance().super();

}
}
//author by d0S
private static final String qn = "SeedOfDestruction";
private static final int INSTANCEID = 110; // this is the client number
private static final int MAX_DEVICESPAWNEDMOBCOUNT = 100; // prevent too much mob spawn
private static final boolean debug = true;
// private static final int EMPTY_DESTROY_TIME = 5;
private static final int EXIT_TIME = 5;

//author by d0S
// Items
//author by d0S
// NPCs,mobs
private static final int ALENOS = 32526;
private static final int TELEPORT = 32601;
private static final int OBELISK = 18776;
private static final int POWERFUL_DEVICE = 18777;
private static final int THRONE_POWERFUL_DEVICE = 18778;
private static final int SPAWN_DEVICE = 18696;
private static final int TIADA = 29163;
private static final int ChangePortal = 29172;
private static final int PRIEST = 29173;
private static final int NAEZD = 29162;
private static final int PELTAST = 22581;
private static final int PORTAL = 18696;
private static final int[] SPAWN_MOB_IDS = { 22536, 22537, 22538, 22539, 22540, 22541, 22542, 22543, 22544, 22547, 22550, 22551, 22552, 22596 };
private static final int[] MOB_IDS = { 22536, 22537, 22538, 22539, 22540, 22541, 22542, 22543, 22544, 22547, 22550, 22551, 22552, 22596, 29162 };
private static final L2CharPosition MOVE_TO_TIADA = new L2CharPosition( -250403, 207273, -11952, 16384 );
//author by d0S
// Doors/Walls/Zones
private static final int[] ATTACKABLE_DOORS = { 12240005, 12240006, 12240007, 12240008, 12240009, 12240010,
12240013, 12240014, 12240015, 12240016, 12240017, 12240018, 12240021, 12240022, 12240023, 12240024, 12240025,
12240026, 12240028, 12240029, 12240030
};
private static final int[] ENTRANCE_ROOM_DOORS = { 12240001, 12240002 };
private static final int[] SQUARE_DOORS = { 12240003, 12240004, 12240011, 12240012, 12240019, 12240020 };
private static final int SCOUTPASS_DOOR = 12240027;
private static final int THRONE_DOOR = 12240031;
//author by d0S
// spawns
private static final int[][] ENTRANCE_UPPER_SPAWNS = {{ 22549, -239298, 220214, -9792, 32637 },
{ 22549, -239294, 220064, -9760, 30975 }, { 22549, -239290, 219890, -9760, 29173 },
{ 22549, -239294, 219728, -9800, 27648 }, { 22549, -239294, 220137, -9768, 31778 },
{ 22549, -239294, 219806, -9776, 28351 }, { 22593, -239294, 219984, -9752, 32767 }
};
private static final int[][] ENTRANCE_GROUND_SPAWNS_1 = {{ 22541, -240640, 220424, -10144, 0 },
{ 22541, -240010, 219423, -10144, 0 }, { 22541, -240073, 219696, -10144, 0 },
{ 22541, -239629, 220296, -10144, 54894 }, { 22541, -240502, 219707, -10144, 32238 },
{ 22550, -240577, 220242, -10144, 0 }, { 22550, -239947, 219514, -10144, 0 },
{ 22550, -240262, 220697, -10144, 0 }, { 22550, -240325, 220151, -10144, 0 },
{ 22550, -239846, 220660, -10139, 31613 }, { 22551, -240199, 220606, -10144, 0 },
{ 22551, -240577, 219969, -10136, 0 }, { 22551, -240514, 220424, -10144, 0 },
{ 22551, -240010, 220606, -10144, 0 }, { 22551, -240307, 219543, -10144, 64355 },
{ 22552, -240640, 219332, -10144, 0 }, { 22552, -239769, 219463, -10128, 19399 },
{ 22552, -240073, 220333, -10144, 0 }, { 22552, -240262, 220151, -10144, 0 },
{ 22552, -239886, 219923, -10144, 44774 }, { 22596, -239504, 219984, -10136, 32767 }
};
private static final int[][] ENTRANCE_GROUND_SPAWNS_2 = {{ 22541, -238845, 219557, -10144, 22378 },
{ 22541, -238971, 220184, -10144, 40988 }, { 22541, -238498, 219515, -10144, 47694 },
{ 22544, -238728, 220066, -10144, 35011 }, { 22544, -238524, 220521, -10144, 0 },
{ 22544, -238675, 220632, -10135, 16075 }, { 22597, -239151, 220044, -10128, 32767 },
{ 22597, -239152, 219988, -10128, 32767 }, { 22597, -239152, 219934, -10128, 32767 },
{ 32601, -238310, 219984, -10104, 0}
};
private static final int[][] SQUARE_SPAWNS_STATIC = {
{ 18776, -245817, 217075, -12208, 0 },
{ 32601, -245820, 220921, -12091, 0 }
};
private static final int[][] SQUARE_SPAWNS_MAIN = {{ 22541, -245714, 216761, -12208, 11487 },
{ 22541, -245563, 217294, -12208, 33720 }, { 22544, -246104, 217132, -12208, 62589 },
{ 22543, -245857, 217391, -12208, 57177 }, { 22544, -245408, 216484, -12224, 18467 },
{ 22543, -247062, 216734, -12227, 23550 }, { 22541, -244854, 218073, -12224, 0 },
{ 22543, -245052, 217890, -12224, 0 }, { 22544, -245459, 218451, -12224, 0 },
{ 22543, -247057, 217496, -12227, 33700 }, { 22543, -246631, 217874, -12227, 34490 },
{ 22541, -246571, 218141, -12227, 10158 }, { 22547, -246398, 217639, -12227, 33120 },
{ 22542, -245427, 217725, -12227, 36580 }, { 22544, -244803, 217927, -12227, 5277 },
{ 22547, -245291, 217577, -12227, 51169 }, { 22540, -245607, 217891, -12227, 20383 },
{ 22544, -245685, 218236, -12227, 6661 }, { 22543, -245808, 218103, -12227, 41367 },
{ 22541, -245931, 217830, -12227, 44736 }, { 22543, -245579, 217581, -12227, 57648 },
{ 22540, -245447, 218056, -12227, 23464 }, { 22544, -245521, 216836, -12210, 52857 },
{ 22543, -245248, 216647, -12227, 7152 }, { 22543, -245985, 216854, -12209, 4136 },
{ 22542, -246093, 217649, -12227, 59266 }, { 22544, -245460, 217107, -12209, 41136 },
{ 22541, -245721, 217415, -12209, 51094 }, { 22544, -246027, 217339, -12209, 44597 },
{ 22540, -245981, 218357, -12227, 36676 }, { 22541, -246027, 218150, -12227, 46567 },
{ 22544, -246158, 217947, -12227, 42906 }, { 22540, -246255, 218286, -12227, 13265 },
{ 22541, -246642, 217365, -12227, 28136 }, { 22543, -246202, 217349, -12224, 39524 },
{ 22543, -246508, 216967, -12227, 47366 }, { 22547, -246915, 216896, -12227, 43613 },
{ 22540, -245805, 216469, -12227, 6356 }, { 22542, -244730, 217074, -12227, 1751 },
{ 22541, -244853, 217477, -12227, 21465 }, { 22540, -245141, 217286, -12227, 39311 },
{ 22544, -244639, 217274, -12229, 63192 }, { 22541, -244880, 216618, -12227, 65082 },
{ 22544, -244755, 216345, -12229, 4993 }, { 22547, -245129, 216296, -12227, 32123 },
{ 22542, -245407, 216273, -12227, 29439 }, { 22541, -245389, 215889, -12227, 40959 },
{ 22541, -246288, 216516, -12227, 56087 }, { 22544, -246252, 216765, -12227, 14886 },
{ 22542, -246067, 216269, -12229, 52690 }, { 22544, -246301, 216092, -12227, 39522 },
{ 22541, -246056, 215948, -12227, 59993 }, { 22540, -245786, 215821, -12227, 60950 },
{ 22547, -245841, 216144, -12229, 7010 }, { 22543, -246883, 217291, -12227, 35363 },
{ 22543, -246642, 216317, -12227, 35363 }, { 22544, -246935, 216456, -12227, 27131 }
};
private static final int[][] SQUARE_SPAWNS_HALF = {{ 22541, -245714, 216761, -12208, 11487 },
{ 22543, -245857, 217391, -12208, 57177 }, { 22544, -245408, 216484, -12224, 18467 },
{ 22543, -245052, 217890, -12224, 0 }, { 22544, -245459, 218451, -12224, 0 },
{ 22541, -246571, 218141, -12227, 10158 }, { 22547, -246398, 217639, -12227, 33120 },
{ 22547, -245291, 217577, -12227, 51169 }, { 22540, -245607, 217891, -12227, 20383 },
{ 22541, -245931, 217830, -12227, 44736 }, { 22543, -245579, 217581, -12227, 57648 },
{ 22543, -245248, 216647, -12227, 7152 }, { 22543, -245985, 216854, -12209, 4136 },
{ 22541, -245721, 217415, -12209, 51094 }, { 22544, -246027, 217339, -12209, 44597 },
{ 22544, -246158, 217947, -12227, 42906 }, { 22540, -246255, 218286, -12227, 13265 },
{ 22543, -246508, 216967, -12227, 47366 }, { 22547, -246915, 216896, -12227, 43613 },
{ 22541, -244853, 217477, -12227, 21465 }, { 22540, -245141, 217286, -12227, 39311 },
{ 22544, -244755, 216345, -12229, 4993 }, { 22547, -245129, 216296, -12227, 32123 },
{ 22541, -246288, 216516, -12227, 56087 }, { 22544, -246252, 216765, -12227, 14886 },
{ 22541, -246056, 215948, -12227, 59993 }, { 22540, -245786, 215821, -12227, 60950 },
{ 22543, -246642, 216317, -12227, 35363 }, { 22544, -246935, 216456, -12227, 27131 }
};
private static final int[][] CORRIDOR_SPAWNS_UPPER = { { 22593, -245888, 211792, -12000, 16384 },
{ 22593, -246029, 211797, -12016, 16384 }, { 22593, -246119, 211796, -12040, 16384 },
{ 22593, -245754, 211796, -12016, 16384 }, { 22593, -245652, 211793, -12032, 16384 },
{ 22547, -245892, 208165, -12128, 16384 }, { 22593, -246032, 208176, -12144, 16384 },
{ 22593, -246128, 208176, -12168, 16384 }, { 22593, -245728, 208176, -12144, 16384 },
{ 22593, -245632, 208160, -12176, 16384 }, { 22549, -242559, 213163, -12168, 16384 },
{ 22549, -242912, 213166, -12136, 16384 }, { 22549, -242676, 213164, -12136, 16384 },
{ 22549, -243003, 213166, -12152, 16384 }, { 22593, -242800, 213152, -12128, 16384 },
{ 22549, -241168, 218256, -12016, 32767 }, { 22549, -241168, 218176, -12008, 32767 },
{ 22593, -241173, 218104, -12000, 32767 }, { 22549, -241168, 218336, -12040, 32767 },
{ 22549, -241168, 218032, -12008, 32767 }, { 22549, -241168, 217936, -12016, 32767 },
{ 22549, -241168, 217840, -12048, 32767 }, { 22549, -238634, 215891, -12264, 16384 },
{ 22593, -238736, 215888, -12256, 16384 }, { 22549, -238545, 215891, -12272, 16384 },
{ 22549, -238853, 215888, -12264, 16384 }, { 22549, -238466, 215890, -12304, 16384 },
{ 22549, -238939, 215886, -12280, 16384 }, { 22549, -242026, 209558, -12320, 16384 },
{ 22549, -242103, 209561, -12320, 16384 }, { 22549, -242180, 209563, -12320, 16384 },
{ 22549, -242270, 209565, -12320, 16384 }, { 22549, -242349, 209565, -12320, 16384 },
{ 22549, -242494, 209567, -12312, 16384 }, { 22549, -242422, 209568, -12312, 16384 },
{ 22549, -242661, 209569, -12272, 16384 }, { 22549, -242560, 209568, -12296, 16384 },
{ 22549, -243616, 209568, -12320, 16384 }, { 22549, -243035, 209559, -12296, 16384 },
{ 22549, -242920, 209561, -12264, 16384 }, { 22593, -242800, 209557, -12256, 16384 },
{ 22549, -243537, 209567, -12320, 16384 }, { 22549, -243375, 209564, -12320, 16384 },
{ 22549, -243448, 209565, -12320, 16384 }, { 22549, -243310, 209564, -12320, 16384 },
{ 22549, -243239, 209563, -12320, 16384 }, { 22549, -243158, 209561, -12312, 16384 },
{ 22549, -239033, 215892, -12316, 17195 }, { 22593, -242969, 206669, -12416, 32764 },
{ 22593, -242969, 206541, -12392, 32764 }, { 22593, -242969, 206349, -12392, 32764 },
{ 22593, -242969, 206237, -12416, 32764 }, { 22593, -242969, 206445, -12384, 32764 },
{ 22549, -239881, 208591, -12576, 32764 }, { 22549, -239881, 208447, -12576, 32764 },
{ 22549, -239881, 208511, -12576, 32764 }, { 22549, -239897, 208351, -12576, 32764 },
{ 22549, -239897, 208271, -12576, 32764 }, { 22549, -239897, 208207, -12568, 32764 },
{ 22549, -239897, 208143, -12568, 32764 }, { 22549, -239897, 207135, -12576, 32764 },
{ 22549, -239897, 207199, -12576, 32764 }, { 22549, -239897, 207263, -12576, 32764 },
{ 22549, -239897, 207327, -12576, 32764 }, { 22549, -239897, 207391, -12576, 32764 },
{ 22549, -239897, 207455, -12568, 32764 }, { 22549, -239897, 207519, -12568, 32764 },
{ 22549, -238912, 212272, -12400, 16384 }, { 22593, -238738, 212263, -12384, 16384 },
{ 22549, -238464, 212256, -12432, 16384 }, { 22549, -238960, 212272, -12416, 16384 },
{ 22549, -238848, 212272, -12392, 16384 }, { 22549, -238640, 212272, -12392, 16384 },
{ 22549, -238560, 212272, -12400, 16384 }, { 22547, -239792, 207824, -12512, 32764 },
{ 22549, -239840, 207680, -12528, 32764 }, { 22549, -239840, 207776, -12512, 32764 },
{ 22549, -239840, 207888, -12520, 32764 }, { 22549, -239840, 207984, -12528, 32764 },
{ 22549, -239893, 207943, -12528, 32764 }, { 22549, -239893, 208036, -12544, 32764 },
{ 22549, -239890, 207623, -12536, 32764 }, { 22549, -239890, 207714, -12520, 32764 },
{ 22593, -239885, 207822, -12512, 32764 }
};
private static final int[][] CORRIDOR_SPAWNS_GROUND = {{ 22597, -245879, 211967, -12384, 16384 },
{ 22541, -245436, 211460, -12384, 0 }, { 18720, -245888, 213056, -12376, 0 },
{ 18737, -245696, 212608, -12384, 0 }, { 18721, -245920, 212256, -12384, 0 },
{ 22541, -245997, 208982, -12512, 0 }, { 22541, -245733, 209162, -12512, 0 },
{ 18739, -245888, 211296, -12384, 0 }, { 18722, -245888, 211008, -12384, 0 },
{ 22540, -246513, 207291, -12512, 0 }, { 22541, -245909, 208682, -12512, 0 },
{ 22597, -245882, 208369, -12512, 16384 }, { 22540, -245445, 207291, -12512, 0 },
{ 18740, -245888, 209984, -12464, 0 }, { 18729, -245664, 209376, -12512, 0 },
{ 18723, -246048, 209376, -12512, 0 }, { 18724, -246080, 208960, -12512, 0 },
{ 18730, -246080, 208608, -12512, 0 }, { 22546, -243926, 205814, -12768, 0 },
{ 18742, -245632, 208608, -12512, 0 }, { 18741, -245632, 208960, -12512, 0 },
{ 18731, -246048, 207744, -12512, 0 }, { 18744, -246048, 207424, -12512, 0 },
{ 18725, -245664, 207424, -12512, 0 }, { 18743, -245664, 207776, -12512, 0 },
{ 18745, -245888, 206816, -12512, 0 }, { 18777, -241936, 206432, -12744, 0 },
{ 22596, -242770, 206496, -12760, 32767 }, { 22596, -242770, 206384, -12760, 32767 },
{ 22596, -242770, 206439, -12760, 32767 }, { 22544, -242620, 205989, -12768, 0 },
{ 22541, -243611, 206269, -12768, 0 }, { 22541, -243233, 206633, -12768, 0 },
{ 22597, -243177, 206476, -12768, 16384 }, { 22544, -242416, 207081, -12760, 0 },
{ 22544, -242586, 206990, -12768, 0 }, { 18732, -243872, 206464, -12768, 0 },
{ 18771, -243808, 206112, -12768, 0 }, { 22541, -243978, 206204, -12768, 0 },
{ 22544, -243849, 206017, -12768, 0 }, { 18749, -243520, 206464, -12768, 0 },
{ 18748, -243520, 206112, -12768, 0 }, { 22546, -240767, 208544, -12896, 0 },
{ 18753, -242528, 206336, -12768, 0 }, { 18754, -242144, 206336, -12760, 0 },
{ 18755, -242496, 206592, -12768, 0 }, { 18756, -242176, 206656, -12768, 0 },
{ 18758, -242176, 206976, -12768, 0 }, { 22541, -245316, 211237, -12380, 8721 },
{ 22541, -246223, 211076, -12389, 28836 }, { 22540, -245284, 207708, -12518, 1253 },
{ 22540, -245836, 207628, -12518, 34643 }, { 22544, -243850, 206761, -12774, 15146 },
{ 22546, -244017, 206672, -12774, 37875 }, { 22541, -243715, 206647, -12774, 64674 },
{ 22544, -242237, 206167, -12774, 50344 }, { 22544, -242190, 206866, -12774, 6294 },
{ 22548, -242723, 213682, -12512, 0 }, { 22548, -242987, 213922, -12512, 0 },
{ 22548, -242195, 214102, -12512, 0 }, { 22541, -241550, 218362, -12384, 0 },
{ 22596, -240992, 218032, -12368, 32767 }, { 22596, -240992, 218080, -12368, 32767 },
{ 22596, -240992, 218176, -12368, 32767 }, { 22596, -240992, 218128, -12368, 32767 },
{ 22541, -241994, 218628, -12384, 44063 }, { 22541, -242296, 218109, -12384, 38227 },
{ 22597, -238784, 215696, -12624, 16384 }, { 22597, -238696, 215696, -12624, 16384 },
{ 22596, -238736, 215696, -12624, 16384 }, { 22541, -238634, 215102, -12640, 0 },
{ 22548, -238901, 215168, -12640, 0 }, { 22541, -238812, 215564, -12640, 0 },
{ 22548, -239435, 215333, -12640, 0 }, { 22546, -238492, 213146, -12768, 0 },
{ 22546, -238844, 213326, -12768, 0 }, { 22596, -238736, 212400, -12760, 16384 },
{ 22546, -238932, 212606, -12768, 15087 }, { 22546, -238668, 212606, -12768, 0 },
{ 22597, -238784, 212400, -12752, 16384 }, { 22597, -238688, 212400, -12752, 16384 },
{ 22596, -238688, 212096, -12752, 16384 }, { 22596, -238784, 212095, -12752, 16384 },
{ 22541, -238733, 212038, -12760, 16311 }, { 18777, -238736, 211248, -12744, 0 },
{ 22596, -238736, 212096, -12752, 16384 }, { 22541, -238332, 211956, -12768, 30167 },
{ 22546, -238736, 211527, -12768, 0 }, { 22543, -243503, 212324, -12512, 0 },
{ 22540, -242613, 212489, -12512, 0 }, { 22543, -243147, 212852, -12504, 0 },
{ 22540, -242524, 212786, -12512, 0 }, { 22540, -242346, 212588, -12512, 0 },
{ 22548, -242282, 209234, -12640, 0 }, { 22546, -243627, 209944, -12640, 0 },
{ 22548, -242638, 208640, -12632, 0 }, { 22548, -242104, 208838, -12640, 0 },
{ 22596, -239696, 207776, -12888, 32767 }, { 22596, -239696, 207872, -12880, 32767 },
{ 22596, -239696, 207824, -12888, 32767 }, { 22546, -240767, 207452, -12896, 0 },
{ 22596, -240064, 207888, -12888, 32767 }, { 22596, -240016, 207872, -12880, 32767 },
{ 22596, -240064, 207760, -12888, 32767 }, { 22596, -240016, 207776, -12880, 32767 },
{ 22596, -240048, 207824, -12888, 32767 }, { 22548, -239100, 208369, -12896, 0 },
{ 22548, -239495, 208098, -12896, 40057 }, { 22548, -239333, 208181, -12896, 41061 },
{ 18777, -238848, 207824, -12864, 0 }, { 22539, -242826, 210708, -12645, 30758 },
{ 22548, -243039, 210619, -12645, 2023 }, { 22548, -242570, 210599, -12645, 59674 },
{ 22546, -242791, 210481, -12645, 24959 }, { 22548, -242925, 208656, -12631, 21437 },
{ 22541, -243013, 209077, -12645, 33289 }, { 22547, -242759, 209004, -12645, 60509 },
{ 22548, -243293, 208875, -12637, 29114 }, { 22541, -242335, 208954, -12639, 21264 },
{ 22546, -240636, 208019, -12901, 26402 }, { 22548, -239507, 207680, -12901, 59320 },
{ 22548, -239134, 207369, -12901, 30709 }, { 22548, -239376, 207273, -12896, 31526 },
{ 22548, -239263, 207801, -12901, 26788 }, { 22539, -239070, 216742, -12644, 37062 },
{ 22539, -238494, 216907, -12644, 1821 }, { 22546, -238485, 216645, -12644, 49855 },
{ 22546, -238364, 216961, -12644, 16658 }, { 22546, -238901, 217073, -12644, 12726 },
{ 22548, -238425, 215265, -12647, 27478 }, { 22539, -238495, 213307, -12773, 22966 },
{ 22539, -238720, 213414, -12773, 42528 }, { 22546, -239014, 213051, -12773, 2058 },
{ 22546, -239086, 211737, -12773, 12789 }, { 22541, -238688, 211910, -12773, 63943 },
{ 22546, -238472, 211813, -12773, 21462 }, { 22541, -242276, 217966, -12389, 34120 },
{ 22540, -242085, 218093, -12389, 36123 }
};
private static final int[][] SCOUTPASS_SPAWNS_UPPER = {{ 22593, -249696, 220496, -12128, 0 },
{ 22549, -249696, 220416, -12120, 0 }, { 22549, -249696, 220576, -12128, 0 },
{ 22593, -249696, 220640, -12128, 0 }, { 22549, -249696, 220704, -12128, 0 },
{ 22593, -249696, 220768, -12128, 0 }, { 22549, -249712, 219984, -12072, 0 },
{ 22549, -249696, 220848, -12128, 0 }, { 22549, -249712, 219888, -12080, 0 },
{ 22549, -249712, 220272, -12088, 0 }, { 22549, -249712, 220176, -12072, 0 },
{ 22593, -249712, 220080, -12064, 0 }, { 22549, -249714, 219498, -12128, 0 },
{ 22593, -249721, 219421, -12128, 0 }, { 22549, -249732, 219349, -12128, 0 },
{ 22593, -249730, 219266, -12128, 0 }, { 22549, -249717, 219565, -12128, 0 },
{ 22593, -249727, 219649, -12128, 0 }, { 22549, -249728, 219728, -12120, 0 }
};
private static final int[][] SCOUTPASS_SPAWNS_GROUND = {{ 22538, -248393, 219615, -12448, 0 },
{ 22539, -250349, 219423, -12440, 0 }, { 22539, -250315, 220060, -12448, 0 },
{ 22539, -250553, 220879, -12448, 0 }, { 22538, -250451, 220879, -12448, 0 },
{ 22538, -250553, 220242, -12448, 0 }, { 22540, -250485, 220333, -12448, 0 },
{ 22538, -250485, 219423, -12448, 0 }, { 22540, -250553, 219969, -12440, 0 },
{ 22540, -250417, 219423, -12448, 0 }, { 22540, -248671, 220289, -12453, 53437 },
{ 22546, -248743, 219598, -12453, 61908 }, { 22546, -248778, 219835, -12453, 10079 },
{ 22539, -248779, 220177, -12453, 757}
};
private static final int[][] PREFORT_SPAWNS = {{ 22540, -249856, 216729, -12248, 0 },
{ 22541, -250718, 217437, -12288, 0 }, { 22541, -250184, 217107, -12288, 0 },
{ 22544, -251074, 217317, -12288, 0 }, { 22540, -250540, 217497, -12288, 0 },
{ 22546, -250184, 217287, -12288, 0 }, { 22546, -250362, 217347, -12288, 0 },
{ 22547, -252676, 217137, -12288, 0 }, { 22544, -253032, 217137, -12288, 0 },
{ 22546, -252320, 217617, -12288, 0 }, { 22546, -253032, 217437, -12288, 0 },
{ 22546, -252142, 217437, -12288, 0 }, { 22536, -252675, 215945, -12208, 0 },
{ 22537, -252707, 215897, -12208, 0 }, { 22539, -252835, 215945, -12216, 0 },
{ 22542, -252835, 216009, -12224, 0 }, { 22546, -252786, 216450, -12248, 0 },
{ 22539, -253056, 216510, -12248, 0 }, { 22541, -252786, 216675, -12248, 0 },
{ 22541, -252726, 216525, -12248, 0 }, { 22541, -253086, 216555, -12248, 0 },
{ 22540, -252606, 216645, -12248, 0 }, { 22540, -252606, 216540, -12248, 0 },
{ 22537, -250206, 215762, -12208, 0 }, { 22536, -250078, 215906, -12208, 0 },
{ 22539, -250270, 215874, -12200, 0 }, { 22542, -249886, 215794, -12208, 0 },
{ 22546, -251536, 215728, -12208, 16384 }, { 22546, -251345, 215712, -12208, 16384 },
{ 22546, -251265, 215856, -12208, 16384 }, { 22546, -251584, 215856, -12208, 16384 },
{ 22546, -251425, 215856, -12208, 16384 }, { 22540, -249891, 216649, -12248, 0 },
{ 22547, -250031, 216585, -12248, 0 }, { 22548, -250136, 216505, -12248, 0 },
{ 22544, -251106, 216546, -12248, 0 }, { 22544, -251596, 216578, -12248, 0 },
{ 22548, -249961, 216697, -12248, 0 }, { 22547, -251631, 216690, -12248, 0 },
{ 22542, -251771, 216674, -12248, 0 }, { 22544, -251456, 216482, -12248, 0 },
{ 22543, -251701, 216514, -12248, 0 }, { 22546, -251529, 217852, -12328, 0 },
{ 22538, -251476, 217718, -12296, 0 }, { 22537, -251422, 217874, -12328, 0 },
{ 22546, -252266, 217005, -12288, 0 }, { 22546, -252215, 216823, -12256, 0 },
{ 22538, -252215, 216823, -12256, 0 }, { 22537, -252106, 216942, -12280, 0 },
{ 22546, -251378, 217733, -12301, 2743 }, { 22543, -251364, 216662, -12253, 2891 },
{ 22548, -250154, 216667, -12253, 4364 }, { 22541, -249982, 216487, -12253, 57106}
};
private static final int[][] FORT_SPAWNS_UPPER = {{ 22549, -252747, 213732, -11552, 0 },
{ 22549, -252779, 213627, -11552, 0 }, { 22549, -252781, 213527, -11552, 0 },
{ 22549, -252736, 213452, -11552, 0 }, { 22549, -252665, 213390, -11552, 0 },
{ 22549, -252337, 213645, -11552, 0 }, { 22549, -252342, 213712, -11552, 0 },
{ 22549, -252383, 213776, -11552, 0 }, { 22549, -252443, 213819, -11552, 0 },
{ 22549, -250462, 213441, -11552, 0 }, { 22549, -250269, 213387, -11552, 0 },
{ 22549, -250378, 213389, -11552, 0 }, { 22549, -252480, 213364, -11552, 49152 },
{ 22549, -252407, 213415, -11552, 49152 }, { 22549, -252362, 213478, -11552, 49152 },
{ 22549, -252569, 213372, -11552, 49152 }, { 22549, -252603, 213852, -11552, 16384 },
{ 22549, -252674, 213818, -11552, 16384 }, { 22549, -252339, 213566, -11552, 16384 },
{ 18778, -252556, 213600, -11544, 16384 }, { 22549, -252016, 214446, -11704, 16384 },
{ 22549, -252096, 214446, -11704, 16384 }, { 22549, -252160, 214446, -11704, 16384 },
{ 22549, -252288, 214446, -11704, 16384 }, { 22549, -252224, 214446, -11704, 16384 },
{ 22549, -250172, 213429, -11552, 16384 }, { 18778, -250324, 213588, -11544, 16384 },
{ 22593, -251326, 214460, -11640, 16384 }, { 22549, -250097, 213617, -11552, 16384 },
{ 22549, -252514, 213830, -11552, 16384 }, { 22549, -250110, 213513, -11552, 16384 },
{ 22549, -250534, 213627, -11552, 32767 }, { 22549, -250151, 213713, -11552, 16384 },
{ 22549, -250543, 213547, -11552, 32767 }, { 22549, -250515, 213689, -11552, 32767 },
{ 22549, -250432, 213808, -11552, 16384 }, { 22549, -250485, 213745, -11552, 32767 },
{ 22549, -250368, 213824, -11552, 16384 }, { 22549, -250222, 213775, -11552, 16384 },
{ 22549, -250288, 213824, -11552, 16384 }, { 22593, -251550, 214460, -11640, 16384 },
{ 22593, -251730, 214460, -11640, 16384 }, { 22549, -250644, 214446, -11704, 16384 },
{ 22549, -250832, 214446, -11704, 16384 }, { 22549, -250704, 214446, -11704, 16384 },
{ 22549, -250768, 214446, -11704, 16384 }, { 22549, -250896, 214446, -11704, 16384 },
{ 22537, -251434, 214460, -11640, 16384 }, { 22593, -251157, 214564, -11640, 16384 },
{ 22593, -251154, 214222, -11640, 16384 }, { 22593, -251720, 214564, -11640, 16384 },
{ 22593, -251718, 214222, -11640, 16384 }, { 22593, -251722, 214290, -11640, 16384 },
{ 22593, -251633, 214290, -11640, 16384 }, { 22593, -251540, 214290, -11640, 16384 },
{ 22593, -251331, 214290, -11640, 16384 }, { 22593, -251147, 214290, -11640, 16384 },
{ 22593, -251237, 214290, -11640, 16384 }, { 22593, -251146, 214460, -11640, 16384 },
{ 22593, -251643, 214460, -11640, 16384 }, { 22593, -251237, 214460, -11640, 16384 },
{ 22549, -252407, 213415, -11552, 3865 }, { 22549, -252480, 213364, -11552, 49152 }
};
private static final int[][] FORT_SPAWNS_GROUND = {{ 22596, -251494, 214912, -12088, 16384 },
{ 22596, -251280, 214911, -12088, 16384 }, { 22596, -251565, 214912, -12088, 16384 },
{ 22549, -251921, 213570, -12080, 16384 }, { 22597, -251929, 213686, -12080, 16384 },
{ 22536, -251264, 214224, -12080, 16384 }, { 22596, -250803, 213178, -12056, 32767 },
{ 22547, -250732, 213177, -12024, 32767 }, { 22596, -250797, 213103, -12048, 32767 },
{ 22596, -250799, 213260, -12048, 32767 }, { 22549, -251114, 213570, -12080, 16384 },
{ 22547, -251522, 213558, -12080, 16384 }, { 22593, -251424, 213565, -12080, 16384 },
{ 22547, -251332, 213563, -12080, 16384 }, { 22593, -251264, 213566, -12080, 16384 },
{ 22593, -251183, 213564, -12080, 16384 }, { 22549, -251781, 213572, -12080, 16384 },
{ 22593, -251696, 213566, -12080, 16384 }, { 22593, -251613, 213561, -12080, 16384 },
{ 22597, -251114, 213686, -12080, 16384 }, { 22549, -251854, 213572, -12080, 16384 },
{ 22549, -251039, 213570, -12080, 16384 }, { 22549, -250960, 213573, -12080, 16384 },
{ 22597, -250966, 213689, -12080, 16384 }, { 22597, -251040, 213689, -12080, 16384 },
{ 22597, -251261, 213681, -12080, 16384 }, { 22597, -251183, 213684, -12080, 16384 },
{ 22597, -251853, 213683, -12080, 16384 }, { 22597, -251774, 213683, -12080, 16384 },
{ 22597, -251693, 213683, -12080, 16384 }, { 22597, -251606, 213684, -12080, 16384 },
{ 22596, -251351, 214912, -12088, 16384 }, { 22596, -251338, 213683, -12080, 16384 },
{ 22596, -251522, 213683, -12080, 16384 }, { 22596, -251430, 213684, -12080, 16384 },
{ 22537, -251431, 213567, -12080, 16384 }, { 22537, -251289, 213567, -12080, 16384 },
{ 22536, -251373, 214220, -12080, 16384 }, { 22536, -251482, 214219, -12080, 16384 },
{ 22536, -251600, 214224, -12080, 16384 }, { 22537, -251566, 213565, -12088, 15826 },
{ 22593, -251495, 214792, -12080, 16384 }, { 22593, -251281, 214786, -12080, 16384 },
{ 22593, -251352, 214787, -12080, 16384 }, { 22593, -251568, 214789, -12080, 16384 },
{ 22596, -251441, 214672, -12080, 16384 }, { 22547, -251427, 214790, -12080, 16384 },
{ 22596, -251281, 214671, -12080, 16384 }, { 22596, -251361, 214671, -12080, 16384 },
{ 22596, -251505, 214672, -12080, 16384 }, { 22596, -251569, 214672, -12080, 16384 },
{ 22596, -251424, 214912, -12088, 16384 }, { 22537, -251262, 214226, -12080, 18077 },
{ 22596, -252094, 213194, -12048, 0 }, { 22547, -252210, 213189, -11992, 0 },
{ 22596, -252096, 213120, -12048, 0 }, { 22596, -252089, 213271, -12048, 0 }
};

//author by d0S

private static int[][] FIVETR = {
{-250123, 207338, -11966},{-249948, 207338, -11951},
{-249773, 207338, -11946},{-250687, 207338, -11968},
{-250862, 207338, -11963},{-251037, 207338, -11958}
};
//author by d0S

private static int[][] FORTR = {
{-251037, 207563, -11954},{-250862, 207563, -11949},
{-250687, 207563, -11944},{-250123, 207563, -11966},
{-249948, 207563, -11961},{-249773, 207563, -11956}
};
//author by d0S

private static int[][] FRETR = {
{22547, -250123, 207738, -11939},{22546, -249948, 207738, -11934},
{22546, -249773, 207738, -11949},{22547, -250687, 207738, -11909},
{22546, -250862, 207738, -11904},{22546, -251037, 207738, -11889}
};
//author by d0S

private static int[][] TWOTR = {
{-251562, 207913, -11969},{-251387, 207913, -11964},
{-251212, 207913, -11959},{-251037, 207913, -11954},
{-250862, 207913, -11949},{-250687, 207913, -11944},
{-250123, 207913, -11909},{-249948, 207913, -11904},
{-249773, 207913, -11899},{-249598, 207913, -11894},
{-249423, 207913, -11894},{-249248, 207913, -11889}
};
//author by d0S

private static int[][] ONETR = {
{-251562, 208088, -11969},{-251387, 208088, -11964},
{-251212, 208088, -11959},{-251037, 208088, -11954},
{-250862, 208088, -11949},{-250687, 208088, -11944},
{-250123, 208088, -11909},{-249948, 208088, -11904},
{-249773, 208088, -11899},{-249598, 208088, -11894},
{-249423, 208088, -11894},{-249248, 208088, -11889}
};
//author by d0S
private static int[][] NAEZDSPAWNS = {
{-250304, 206624, -11908, 26492},{-250304, 206529, -11908, 26492},
{-250506, 206624, -11907, 8191},{-250506, 206529, -11909, 8191}
};


// Initialization at 6:30 am on Wednesday and Saturday
private static final int RESET_HOUR = 6;
private static final int RESET_MIN = 30;
private static final int RESET_DAY_1 = 4;
private static final int RESET_DAY_2 = 7;
private class teleCoord {int instanceId; int x; int y; int z;}
//author by d0S

private boolean checkConditions(L2PcInstance player)
{
if (player.getParty() == null)
{
player.sendPacket(new SystemMessage(2101));
return false;
}
if (player.getParty().getCommandChannel() == null)
{
player.sendPacket(new SystemMessage(2103));
return false;
}
else if (player.getParty().getCommandChannel().getChannelLeader() != player)
{
player.sendPacket(new SystemMessage(2185));
return false;
}
else if (player.getParty().getCommandChannel().getMemberCount() < 36 || player.getParty().getCommandChannel().getMemberCount() > 45)
{
player.sendPacket(new SystemMessage(2102));
return false;
}
for (L2PcInstance channelMember : player.getParty().getCommandChannel().getMembers())
{
if (channelMember.getLevel() < 75)
{
SystemMessage sm = new SystemMessage(2097);
sm.addPcName(channelMember);
player.getParty().getCommandChannel().broadcastToChannelMembers(sm);
return false;
}
if (!Util.checkIfInRange(1000, player, channelMember, true))
{
SystemMessage sm = new SystemMessage(2096);
sm.addPcName(channelMember);
player.getParty().getCommandChannel().broadcastToChannelMembers(sm);
return false;
}
Long reentertime = InstanceManager.getInstance().getInstanceTime(channelMember.getObjectId(), INSTANCEID);
if (System.currentTimeMillis() < reentertime)
{
SystemMessage sm = new SystemMessage(2100);
sm.addPcName(channelMember);
player.getParty().getCommandChannel().broadcastToChannelMembers(sm);
return false;
}
}
return true;
}
//author by d0S
private int checkworld(L2PcInstance player)
{
InstanceWorld checkworld = InstanceManager.getInstance().getPlayerWorld(player);
if (checkworld != null)
{
if (!(checkworld instanceof SODWorld))
{
return 0;
}
return 1;
}
return 2;
}

protected int enterInstance(L2PcInstance player, String template, teleCoord teleto)
{
InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
int inst = checkworld(player);
if (inst == 0)
{
player.sendPacket(new SystemMessage(SystemMessageId.ALREADY_ENTERED_ANOTHER_INSTANCE_CANT_ENTER));
return 0;
}
else if (inst == 1)
{
teleto.instanceId = world.instanceId;
teleportplayer(player,teleto,(SODWorld)world);
return world.instanceId;

}
else
{
if (!checkConditions(player))
return 0;
int instanceId = InstanceManager.getInstance().createDynamicInstance(template);
world = new SODWorld(System.currentTimeMillis() + 5400000);
world.instanceId = instanceId;
world.templateId = INSTANCEID;
world.status = 0;
InstanceManager.getInstance().addWorld(world);
spawnState((SODWorld)world);
for (L2DoorInstance door : InstanceManager.getInstance().getInstance(instanceId).getDoors())
if (contains(ATTACKABLE_DOORS, door.getDoorId()))
door.setIsAttackableDoor(true);
_log.info("Seed of Destruction started " + template + " Instance: " + instanceId + " created by player: " + player.getName());
((SODWorld)world).ZoneWaitForTP = true;
teleto.instanceId = instanceId;
if (debug)
{

InstanceManager.getInstance().setInstanceTime(player.getObjectId(), INSTANCEID, (System.currentTimeMillis()));
teleportplayer(player,teleto,(SODWorld)world);
removeBuffs(player);
world.allowed.add(player.getObjectId());

}
else
{
for (L2PcInstance partyMember : player.getParty().getCommandChannel().getMembers())
{

InstanceManager.getInstance().setInstanceTime(partyMember.getObjectId(), INSTANCEID, (System.currentTimeMillis()));
teleportplayer(partyMember,teleto,(SODWorld)world);
removeBuffs(partyMember);
world.allowed.add(partyMember.getObjectId());

}
}
return instanceId;
}
}
protected void openDoor(int doorId,int instanceId)
{
for (L2DoorInstance door : InstanceManager.getInstance().getInstance(instanceId).getDoors())
if (door.getDoorId() == doorId)
door.openMe();
}
//author by d0S
protected void closeDoor(int doorId,int instanceId)
{
for (L2DoorInstance door : InstanceManager.getInstance().getInstance(instanceId).getDoors())
if (door.getDoorId() == doorId)
if (door.getOpen())
door.closeMe();
}
public static boolean contains(int[] array, int obj)
{
for (int i = 0; i < array.length; i++)
{
if (array[i] == obj)
{
return true;
}
}
return false;
}
//author by d0S
private void teleportplayerEnergy(L2PcInstance player, teleCoord teleto)
{
player.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
player.setInstanceId(teleto.instanceId);
player.teleToLocation(teleto.x, teleto.y, teleto.z);
return;
}
private static final void removeBuffs(L2Character ch)
{
for (L2Effect e : ch.getAllEffects())
{
if (e == null)
continue;
L2Skill skill = e.getSkill();
if (skill.isDebuff() || skill.isStayAfterDeath())
continue;
e.exit();
}
if (ch.getPet() != null)
{
for (L2Effect e : ch.getPet().getAllEffects())
{
if (e == null)
continue;
L2Skill skill = e.getSkill();
if (skill.isDebuff() || skill.isStayAfterDeath())
continue;
e.exit();
}
}
}

private void teleportplayer(L2PcInstance player, teleCoord teleto, SODWorld world )
{
player.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
player.setInstanceId(teleto.instanceId);
player.teleToLocation(teleto.x, teleto.y, teleto.z);
L2Summon pet = player.getPet();
if (pet != null)
{
pet.setInstanceId(teleto.instanceId);
pet.teleToLocation(teleto.x, teleto.y, teleto.z);
}
world.PlayersInInstance.add(player);
}
/* protected void exitInstance(L2PcInstance player, teleCoord tele)
{
player.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
player.setInstanceId(0);
player.teleToLocation(tele.x, tele.y, tele.z);
}*/
//author by d0S
protected boolean checkKillProgress(L2Npc mob, SODWorld world)
{
if (world.npcList.containsKey(mob))
world.npcList.put(mob, true);
for(boolean isDead: world.npcList.values())
if (!isDead)
return false;
return true;
}
//author by d0S
protected void spawnState(SODWorld world)
{
world.npcList.clear();
switch(world.status)
{
case 0:
spawn(world, ENTRANCE_GROUND_SPAWNS_1, true, false);
spawn(world, ENTRANCE_GROUND_SPAWNS_2, false, false);
spawn(world, ENTRANCE_UPPER_SPAWNS, false, true);
break;
case 1:
ExShowScreenMessage message1 = new ExShowScreenMessage(1,0,5,0,1,0,0,false,10000,1,"The enemies have attacked. Everyone come out and fight!!!! ... Urgh~!");
sendScreenMessage(world, message1);
for(int i : ENTRANCE_ROOM_DOORS)
openDoor(i,world.instanceId);
spawn(world, SQUARE_SPAWNS_STATIC, false, true);
spawn(world, SQUARE_SPAWNS_MAIN, true, false);
break;
case 2:
case 3:
// handled elsewhere
return;
case 4:
ExShowScreenMessage message2 = new ExShowScreenMessage(1,0,5,0,1,0,0,false,10000,1,"Obelisk has collapsed. Don't let the enemies jump around wildly anymore!!!!");
sendScreenMessage(world, message2);
for(int i : SQUARE_DOORS)
openDoor(i,world.instanceId);
spawn(world, CORRIDOR_SPAWNS_UPPER, false, true);
spawn(world, CORRIDOR_SPAWNS_GROUND, false, false);
world.killedDevice = 0;
break;
case 5:
openDoor(SCOUTPASS_DOOR,world.instanceId);
spawn(world, SQUARE_SPAWNS_HALF, false, false);
spawn(world, SCOUTPASS_SPAWNS_UPPER, false, true);
spawn(world, SCOUTPASS_SPAWNS_GROUND, false, false);
spawn(world, PREFORT_SPAWNS, false, false);
spawn(world, FORT_SPAWNS_UPPER, false, true);
spawn(world, FORT_SPAWNS_GROUND, false, false);
world.killedDevice = 0;
break;
case 6:
runThrone(world);
openDoor(THRONE_DOOR,world.instanceId);
break;
case 7:
// handled elsewhere
return;
case 8:
break;
case 9:

// instance end
break;
}
world.status++;
}
//author by d0S
protected void spawn(SODWorld world, int[][] spawnTable, boolean addToKillTable, boolean isImmobilized)
{
for (int[] mob : spawnTable)
{
L2Npc npc = addSpawn(mob[0], mob[1], mob[2], mob[3], mob[4], false,0,false,world.instanceId);
if (addToKillTable)
world.npcList.put(npc, false);
npc.setIsImmobilized(TIADA == mob[0] ? true : isImmobilized);
npc.setIsNoRndWalk(true);
if (npc.isInstanceType(InstanceType.L2Attackable))
((L2Attackable)npc).setSeeThroughSilentMove(true);

}
}
//author by d0S
protected void setInstanceTimeRestrictions(SODWorld world)
{
Calendar reenter = Calendar.getInstance();
reenter.set(Calendar.MINUTE, RESET_MIN);
reenter.set(Calendar.HOUR_OF_DAY, RESET_HOUR);
// if time is >= RESET_HOUR - roll to the next day
if (reenter.getTimeInMillis() <= System.currentTimeMillis())
reenter.add(Calendar.DAY_OF_MONTH, 1);
if (reenter.get(Calendar.DAY_OF_WEEK) <= RESET_DAY_1)
while(reenter.get(Calendar.DAY_OF_WEEK) != RESET_DAY_1)
reenter.add(Calendar.DAY_OF_MONTH, 1);
else
while(reenter.get(Calendar.DAY_OF_WEEK) != RESET_DAY_2)
reenter.add(Calendar.DAY_OF_MONTH, 1);
//author by d0S
SystemMessage sm = new SystemMessage(SystemMessageId.INSTANT_ZONE_RESTRICTED);
sm.addString(InstanceManager.getInstance().getInstanceIdName(INSTANCEID));

// set instance reenter time for all allowed players
for (int objectId : world.allowed)
{
L2PcInstance player = L2World.getInstance().getPlayer(objectId);
InstanceManager.getInstance().setInstanceTime(objectId, INSTANCEID, reenter.getTimeInMillis());
if (player != null && player.isOnline() > 0)
player.sendPacket(sm);
}
}
//author by d0S
private void sendScreenMessage(SODWorld world, ExShowScreenMessage message)
{
for(int objId : world.allowed)
{
L2PcInstance player = L2World.getInstance().getPlayer(objId);
if (player != null)
player.sendPacket(message);
}
}
//author by d0S
protected void runThrone(SODWorld world)
{

L2Npc portal1 = addSpawn(PORTAL, -248781, 209587, -11966, 0, false,0,false,world.instanceId);
portal1.setIsNoRndWalk(true);
L2Npc portal2 = addSpawn(PORTAL, -252025, 209587, -11966, 0, false,0,false,world.instanceId);
portal2.setIsNoRndWalk(true);
world._portalForCamera = addSpawn(PORTAL, -248781, 206325, -11966, 0, false,0,false,world.instanceId);
world._portalForCamera.setIsNoRndWalk(true);
L2Npc portal3 = addSpawn(PORTAL, -252027, 206325, -11966, 0, false,0,false,world.instanceId);
portal3.setIsNoRndWalk(true);


for (int i=0;i<12;i++)
{

L2Npc npc1 = addSpawn(22543,ONETR[i][0],ONETR[i][1],ONETR[i][2],16285,false,0,false,world.instanceId);
npc1.setIsNoRndWalk(true);
world._mags.add(npc1);

L2Npc npc2 = addSpawn(22541,TWOTR[i][0],TWOTR[i][1],TWOTR[i][2],16285,false,0,false,world.instanceId);
npc2.setIsNoRndWalk(true);
}
for (int i=0;i<6;i++)
{

L2Npc npc3 = addSpawn(FRETR[i][0],FRETR[i][1],FRETR[i][2],FRETR[i][3],16285,false,0,false,world.instanceId);
npc3.setIsNoRndWalk(true);

L2Npc npc4 = addSpawn(22536,FORTR[i][0],FORTR[i][1],FORTR[i][2],16285,false,0,false,world.instanceId);
npc4.setIsNoRndWalk(true);

L2Npc npc5 = addSpawn(22537,FIVETR[i][0],FIVETR[i][1],FIVETR[i][2],16285,false,0,false,world.instanceId);
npc5.setIsNoRndWalk(true);
}

for (int i=0;i<4;i++)
{
L2Npc npc = addSpawn(NAEZD,NAEZDSPAWNS[i][0],NAEZDSPAWNS[i][1],NAEZDSPAWNS[i][2],NAEZDSPAWNS[i][3],false,0,false,world.instanceId);
npc.setIsNoRndWalk(true);
world.naezds.add(npc);
}

world._MovePeltast = addSpawn(PELTAST,-250403, 207556, -11957, 16383,false,0,false,world.instanceId);
world._MovePeltast.setIsNoRndWalk(true);

world._priest = addSpawn(PRIEST,-250408, 205862, -11727, 16383,false,0,false,world.instanceId);
world._priest.setIsNoRndWalk(true);

}
public String onSkillSee (L2Npc npc, L2PcInstance caster, L2Skill skill, L2Object[] targets, boolean isPet)
{
return super.onSkillSee(npc, caster, skill, targets, isPet);
}

public String onSpawn (L2Npc npc)
{
npc.disableCoreAI(true);
return super.onSpawn(npc);
}
//author by d0S
public String onAttack (L2Npc npc, L2PcInstance attacker, int damage, boolean isPet, L2Skill skill)
{
InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
if (tmpworld instanceof SODWorld)
{
SODWorld world = (SODWorld) tmpworld;
if (world.status == 2 && npc.getNpcId() == OBELISK)
{
world.status = 4;
spawn(world, SQUARE_SPAWNS_MAIN, false, false);
}
else if (world.status == 3 && npc.getNpcId() == OBELISK)
{
world.status = 4;
spawn(world, SQUARE_SPAWNS_HALF, false, false);
}
else if (world.status <= 8 && npc.getNpcId() == TIADA)
{
if (npc.getCurrentHp() < (npc.getMaxHp() / 2))
{
ExShowScreenMessage message3 = new ExShowScreenMessage(1,0,5,0,1,0,0,false,10000,1,"Come out, warriors. Protect Seed of Destruction");
sendScreenMessage(world, message3);
world.deviceSpawnedMobCount = 0;
mob.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, MOVE_TO_TIADA);
world._tiada.doCast(SkillTable.getInstance().getInfo(5818, 1));
world._tiada.doCast(SkillTable.getInstance().getInfo(181, 1));
}

}
}
return null;
}
//author by d0S
public String onAdvEvent (String event, L2Npc npc, L2PcInstance player)
{
InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
if (tmpworld instanceof SODWorld)
{
SODWorld world = (SODWorld) tmpworld;
teleCoord teleto = new teleCoord();
teleto.instanceId = world.instanceId;
if (event.equalsIgnoreCase("Part1"))
{
world.ZoneWaitForTP = false;

broadcastPacket((new SpecialCamera(player.getObjectId(),3500,90,15,100,5000,0,0,1,0)),world);
startQuestTimer("Part2", 500, world._MovePeltast,player);
}
else if (event.equalsIgnoreCase("Part2"))
{
MoveTo(world._MovePeltast,-250401,207130, -11957);
broadcastPacket((new SpecialCamera(player.getObjectId(),300,90,5,6000,7000,0,0,1,0)),world);
startQuestTimer("Part3",6000,world._MovePeltast,null);
}
else if (event.equalsIgnoreCase("Part3"))
{

broadcastPacket((new SocialAction(world._priest.getObjectId(),1)),world);
broadcastPacket((new SpecialCamera(world._priest.getObjectId(),200,90,10,0,5000,0,0,1,0)),world);
startQuestTimer("Part4",300, npc, null);
}
else if (event.equalsIgnoreCase("Part4"))
{
broadcastPacket((new SpecialCamera(world._priest.getObjectId(),200,90,5,2500,5000,0,0,1,0)),world);
startQuestTimer("Part5",3100,world._MovePeltast,null);
}
else if (event.equalsIgnoreCase("Part5"))
{
broadcastPacket((new SpecialCamera(world._MovePeltast.getObjectId(),150,90,5,0,5000,0,0,1,0)),world);
startQuestTimer("Part6",300,world._MovePeltast,null);
}
else if (event.equalsIgnoreCase("Part6"))
{
broadcastPacket((new SpecialCamera(world._MovePeltast.getObjectId(),150,15,10,3000,5000,0,0,1,0)),world);
MoveTo(world._priest,-250402,206519,-11905);
broadcastPacket((new SocialAction(world._MovePeltast.getObjectId(),1)),world);
startQuestTimer("Part7",3500, world._MovePeltast, null);
}
else if (event.equalsIgnoreCase("Part7"))
{

broadcastPacket((new SpecialCamera(world._priest.getObjectId(),1400,40,20,0,5000,0,0,1,0)),world);
Delete(world._MovePeltast);
startQuestTimer("Part8",300,world._priest,null);
}
else if (event.equalsIgnoreCase("Part8"))
{
broadcastPacket((new SpecialCamera(world._priest.getObjectId(),350,90,5,7000,8000,0,0,1,0)),world);
startQuestTimer("Part9",6000,world._priest,null);
}
else if (event.equalsIgnoreCase("Part9"))
{
broadcastPacket((new SpecialCamera(world._priest.getObjectId(),350,90,0,2500,15000,0,0,1,0)),world);
startQuestTimer("Part10",2000,world._priest,null);
}
else if (event.equalsIgnoreCase("Part10"))
{

world._ChangePortal = addSpawn(ChangePortal, -250402, 206519, -11905, 0, false, 0, false, world.instanceId);
world._ChangePortal.setIsNoRndWalk(true);
world._priest.doCast(SkillTable.getInstance().getInfo(5816, 1));
startQuestTimer("Part11",6000,world._priest,null);
startQuestTimer("PartUnnamed",50,world._priest,null);
}
else if (event.equalsIgnoreCase("PartUnnamed"))
{
L2Skill _skill = SkillTable.getInstance().getInfo(5815, 1);
for (L2Npc naezd : world.naezds)
naezd.doCast(_skill);
startQuestTimer("PartUnnamed",2300,world._priest,null);
}
else if (event.equalsIgnoreCase("Part11"))
{

cancelQuestTimers("PartUnnamed");
// Тут по идее надо показать белую вспышку длиной в 0.5 секунды

world._tiada = addSpawn(TIADA, -250403, 207040, -11957, 16285, false, 0, false, world.instanceId);
world._tiada.setIsNoRndWalk(true);
world._tiada.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
world._naezdTR1 = addSpawn(NAEZD, -250154, 207203, -11970, 33818, false, 0, false, world.instanceId);
world._naezdTR1.setIsNoRndWalk(true);
world._naezdTR2 = addSpawn(NAEZD, -250209, 206941, -11966, 27379, false, 0, false, world.instanceId);
world._naezdTR2.setIsNoRndWalk(true);
world._naezdTL1 = addSpawn(NAEZD, -250652, 207203, -11970, 0, false, 0, false, world.instanceId);
world._naezdTL1.setIsNoRndWalk(true);
world._naezdTL2 = addSpawn(NAEZD, -250597, 206941, -11966, 6867, false, 0, false, world.instanceId);
world._naezdTL2.setIsNoRndWalk(true);
broadcastPacket((new SpecialCamera(world._tiada.getObjectId(),400,90,5,1500,13000,0,0,1,0)),world);
startQuestTimer("Part12",250, world._tiada, null);
}
else if (event.equalsIgnoreCase("Part12"))
{

...
Ответ
#13
тиаду били в самом конце у нее осталось там 1\4 хп и начались задержки
Ответ


Возможно похожие темы ...
Тема Автор Ответы Просмотры Последний пост
  Жалуются на лаги в ОВХ iMouse 7 2,583 11-04-2014, 03:12 PM
Последний пост: iMouse
  Лаги на сервере LUCKFORME 13 2,836 08-09-2013, 02:01 PM
Последний пост: Ro_0TT
  LG и лаги dorocki 5 1,835 01-03-2013, 12:48 AM
Последний пост: Happybot
  Невыносимые лаги MindHunter 40 8,546 12-27-2012, 06:05 PM
Последний пост: masterla2
  лаги кулич 9 2,320 12-10-2012, 12:17 PM
Последний пост: Place
  Лаги на осадах SunnyX 33 7,855 11-28-2010, 10:18 AM
Последний пост: lastrev
  Лаги langes 3 2,068 06-08-2010, 01:12 PM
Последний пост: langes
  Лаги от баффера vokforever 1 2,440 01-24-2009, 02:45 PM
Последний пост: Aquanox
  Лаги Квося 3 2,581 10-12-2008, 09:02 AM
Последний пост: Ljucifer

Перейти к форуму:


Пользователи, просматривающие эту тему: 1 Гость(ей)