Лаги при убийстве Тиад - Страница 2 - Форум администраторов игровых серверов
Форум администраторов игровых серверов StormWall - Защита от DDos атак
Регистрация Мнения Справка Сообщество Календарь
Вернуться   Форум администраторов игровых серверов > MMO > Lineage II

Lineage II
Дискуссии на тему создания, настройки и обслуживания серверов Lineage 2. При поддержке: Премиум услуги по рекламе

Описание темы:убийство тиады

Ответ
Опции темы
Непрочитано 05.03.2011, 18:12   #11
Пользователь

Автор темы (Топик Стартер) Re: Лаги при убийстве Тиад

Цитата:
Сообщение от LineOFWar Посмотреть сообщение
какая рева сборки? свн вроде жив глянь там последний скрипт не помню заливал или нет about корзину почистил а там была большая тема про сод да и про что то там брали из фени из этой ушербной сборки брать нечего а вот так вот пиз.деть нечего
rev1294.....
angel911 вне форума Ответить с цитированием
Непрочитано 05.03.2011, 18:39   #12
Аватар для LineOFWar
Герой

По умолчанию Re: Лаги при убийстве Тиад

тиаду то совсем не били?
Код 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"))
                        {
                            
                                broadcastPacket((new SocialAction(world._tiada.getObjectId(),1)),world);
                          
                                Delete(world._priest);
                                Delete(world._ChangePortal);
                                startQuestTimer("Part13",6000, world._tiada, null);
                        }
                        else if (event.equalsIgnoreCase("Part13"))
                        {
                          
                                world._naezdTR2.doCast(SkillTable.getInstance().getInfo(5815, 1));
                                world._naezdTL2.doCast(SkillTable.getInstance().getInfo(5815, 1));
                                startQuestTimer("Part14",2000, world._tiada, null);
                        }
                        else if (event.equalsIgnoreCase("Part14"))
                        {

                                world._naezdTR1.doCast(SkillTable.getInstance().getInfo(5815, 1));
                                world._naezdTL1.doCast(SkillTable.getInstance().getInfo(5815, 1));
                                broadcastPacket((new SpecialCamera(world._tiada.getObjectId(),600,90,5,4000,8000,0,0,1,0)),world);
                                startQuestTimer("Part15",2000, world._tiada, null);
                        }
                        else if (event.equalsIgnoreCase("Part15"))
                        {
                            
                                MoveTo(world._naezdTR1,-249576,207155, -11969);
                                MoveTo(world._naezdTR2,-249576,207155, -11969);
                                MoveTo(world._naezdTL1,-251465,206601, -11970);
                                MoveTo(world._naezdTL2,-251465,206601, -11970);
                                startQuestTimer("Part16",1600, world._tiada, null);
                        }
                        else if (event.equalsIgnoreCase("Part16"))
                        {
                                broadcastPacket((new SpecialCamera(world._tiada.getObjectId(),1400,90,40,3000,3000,0,0,1,0)),world);
                                startQuestTimer("Part17",2200, world._tiada, null);
                        }
                        else if (event.equalsIgnoreCase("Part17"))
                        {
                                broadcastPacket((new SpecialCamera(world._portalForCamera.getObjectId(),3500,37,1,0,2000,0,0,1,0)),world);
                                startQuestTimer("Part18",1200, world._tiada, null);
                        }
                        else if (event.equalsIgnoreCase("Part18"))
                        {
                                L2Skill _skill = SkillTable.getInstance().getInfo(5833, 1);
                                for (L2Npc mag : world._mags)
                                {
                                        mag.setTarget(mag);
                                        mag.doCast(_skill);
                                }
                                broadcastPacket((new SpecialCamera(world._portalForCamera.getObjectId(),2400,60,1,5000,6000,0,0,1,0)),world);
                                startQuestTimer("Part19",5000, world._tiada, null);
                        }
                        else if (event.equalsIgnoreCase("Part19"))
                        {
                                broadcastPacket((new SpecialCamera(world._portalForCamera.getObjectId(),2000,75,4,2000,3000,0,0,1,0)),world);
                                startQuestTimer("Part20",2000, world._tiada, null);
                        }
                        else if (event.equalsIgnoreCase("Part20"))
                        {
                                broadcastPacket((new SpecialCamera(world._tiada.getObjectId(),250,90,0,100,3000,0,0,1,0)),world);
                                startQuestTimer("Part21",300, world._tiada, null);
                        }
                        else if (event.equalsIgnoreCase("Part21"))
                        {
                                broadcastPacket((new SpecialCamera(world._tiada.getObjectId(),1500,90,5,5000,6500,0,0,1,0)),world);
                                startQuestTimer("Part22",1000, world._tiada, null);
                        }
                        else if (event.equalsIgnoreCase("Part22"))
                        {
                                world._tiada.doCast(SkillTable.getInstance().getInfo(5818, 1));
                                startQuestTimer("End!",4000, world._tiada, null);
                        }
                        else if (event.equalsIgnoreCase("End!"))
                        {
                                for (L2PcInstance plr : world.PlayersInInstance)
                                {
                                        if (plr==null || checkworld(plr) != 1) continue;
                                        plr.teleToLocation(-250402, 210408, -11957);
                                        if (plr.getPet() != null)
                                                plr.getPet().teleToLocation(-250402, 210408, -11957);
                                        SetMovieMode(plr,false);
                                }
                                for (L2Npc naezd : world.naezds)
                                        Delete(naezd);
                        }
                        else if (event.equalsIgnoreCase("KillTiadaPart1"))
                        {
                                for (L2PcInstance plr : world.PlayersInInstance)
                {
                                        if (plr==null || checkworld(plr) != 1) continue;
                    SetMovieMode(plr,true);
                }
                                broadcastPacket((new SpecialCamera(world._tiada.getObjectId(),100,90,2,0,2000,0,0,1,0)),world);
                                // Убиваем тиаду еще раз, чтобы показать анимацию на камеру)
                                world._tiada.reduceCurrentHp(world._tiada.getMaxHp() + 1, null, null);
                                startQuestTimer("KillTiadaPart2",250, world._tiada, null);
                        }
                        else if (event.equalsIgnoreCase("KillTiadaPart2"))
                        {
                                broadcastPacket((new SpecialCamera(world._tiada.getObjectId(),100,180,90,8000,8000,0,0,1,0)),world);
                                startQuestTimer("KillTiadaPart3",3500, world._tiada, null);
                        }
                        else if (event.equalsIgnoreCase("KillTiadaPart3"))
                        {
                                world._ChangePortal = addSpawn(29171, -250402,206519,-11905,16068, false, 0, false, world.instanceId);
                                world._ChangePortal.setIsNoRndWalk(true);
                                broadcastPacket((new SpecialCamera(world._ChangePortal.getObjectId(),350,120,15,100,8000,0,5,1,0)),world);
                                startQuestTimer("KillTiadaPart4",200, world._ChangePortal, null);
                        }
                        else if (event.equalsIgnoreCase("KillTiadaPart4"))
                        {
                                broadcastPacket((new SpecialCamera(world._ChangePortal.getObjectId(),350,180,20,5000,8000,0,0,1,0)),world);
                                startQuestTimer("KillTiadaPart5",2000, world._ChangePortal, null);
                        }
                        else if (event.equalsIgnoreCase("KillTiadaPart5"))
                        {
                                broadcastPacket((new SpecialCamera(world._ChangePortal.getObjectId(),400,90,10,0,8000,0,0,1,0)),world);
                                startQuestTimer("KillTiadaPart6",500, world._ChangePortal, null);
                        }
                        else if (event.equalsIgnoreCase("KillTiadaPart6"))
                        {
                                broadcastPacket((new SpecialCamera(world._ChangePortal.getObjectId(),10,90,10,1000,8000,0,5,1,0)),world);
                                world._priest = addSpawn(PRIEST, -250402,206519,-11905,16068, false, 0, false, world.instanceId);
                                startQuestTimer("KillTiadaPart7",1600, world._ChangePortal, null);
                        }
                        else if (event.equalsIgnoreCase("KillTiadaPart7"))
                        {
                                broadcastPacket((new SpecialCamera(world._ChangePortal.getObjectId(),150,90,10,0,8000,0,0,1,0)),world);
                                Delete(world._tiada);
                                startQuestTimer("KillTiadaPart8",250,world._ChangePortal, null);
                        }
                        else if (event.equalsIgnoreCase("KillTiadaPart8"))
                        {
                                broadcastPacket((new SpecialCamera(world._ChangePortal.getObjectId(),100,90,10,4500,8000,0,0,1,0)),world);
                                world._priest.doCast(SkillTable.getInstance().getInfo(5821, 1));
                                startQuestTimer("KillTiadaPart9",5000, world._ChangePortal, null);
                        }
                        else if (event.equalsIgnoreCase("KillTiadaPart9"))
                        {
                                broadcastPacket((new SpecialCamera(world._ChangePortal.getObjectId(),120,90,1,1000,5000,0,45,1,0)),world);
                                startQuestTimer("KillTiadaPart10",1500, world._ChangePortal, null);
                        }
                        else if (event.equalsIgnoreCase("KillTiadaPart10"))
                        {
                                Delete(world._priest);
                                broadcastPacket((new SpecialCamera(world._ChangePortal.getObjectId(),1000,60,20,7000,10000,0,20,1,0)),world);
                                startQuestTimer("KillTiadaPart11",7000,world._ChangePortal, null);
                        }
                        else if (event.equalsIgnoreCase("KillTiadaPart11"))
                        {
                                Delete(world._priest);
                                broadcastPacket((new SpecialCamera(world._ChangePortal.getObjectId(),1500,45,20,5000,6000,0,0,1,0)),world);
                                startQuestTimer("KillTiadaEnd!",5100,world._ChangePortal, null);
                        }
                        else if (event.equalsIgnoreCase("KillTiadaEnd!"))
                        {	Delete(npc);
				for(L2Npc mob:InstanceManager.getInstance().getInstance(world.instanceId).getNpcs())
				mob.deleteMe();
                                Delete(world._ChangePortal);
                                for (L2PcInstance plr : world.PlayersInInstance)
              		 	 {
                                        if (plr==null || checkworld(plr) != 1) continue;
                  			  SetMovieMode(plr,false);
              			  }
                        }
   
                }
                return "";
        }
//author by d0S
        public String onKill( L2Npc npc, L2PcInstance player, boolean isPet)
        {	

                InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
                if (tmpworld instanceof SODWorld)
                {
                        SODWorld world = (SODWorld) tmpworld;
                        if (world.status == 1)
                        {
                                if (checkKillProgress(npc, world))
                                        spawnState(world);
                        }
                        else if (world.status == 2)
                        {
                                if (checkKillProgress(npc, world))
                                        world.status++;
                        }
                        else if (world.status == 4 && npc.getNpcId() == OBELISK)
                        {
                        spawnState(world);
                        }
                        else if (world.status == 5 && npc.getNpcId() == POWERFUL_DEVICE)
                        {
                                world.killedDevice++;
                                if (world.killedDevice >= 3)
                                        spawnState(world);
                        }
                        else if (world.status == 6 && npc.getNpcId() == THRONE_POWERFUL_DEVICE)
                        {
                                world.killedDevice++;
                                if (world.killedDevice >= 2)
                                        spawnState(world);
                        }
                        else if (world.status >= 7)
                        {
                                if (npc.getNpcId() == TIADA)
                                {
                                        world.status++;
                                        GraciaSeedManager.getInstance().increaseSoDTiatKilled();
					Delete(npc);
					for(L2Npc mob:InstanceManager.getInstance().getInstance(world.instanceId).getNpcs())
					   mob.deleteMe();   
					Instance inst = InstanceManager.getInstance().getInstance(world.instanceId);
					inst.setDuration(EXIT_TIME * 60000);
					inst.setEmptyDestroyTime(0);				
                                        world._tiada = addSpawn(TIADA, -250402,206519,-11905,16068, false, 0, false, world.instanceId);
                                        startQuestTimer("KillTiadaPart1",250, world._tiada, null);
                                }
                                else if (npc.getNpcId() == 29162)
                                {
                                        L2Attackable mob = (L2Attackable) addSpawn(npc.getNpcId(), npc.getSpawn().getLocx(), npc.getSpawn().getLocy(), npc.getSpawn().getLocz(), npc.getSpawn().getHeading(), false,0,false,world.instanceId);
                                        mob.setIsNoRndWalk(true);
                                        mob.setSeeThroughSilentMove(true);
                                        mob.setIsRaidMinion(true);
                                }
				 else if (npc.getNpcId() == PORTAL)
				{
					_log.info("portal  kill");
					final L2Skill skilla = SkillTable.getInstance().getInfo(5699, 7);
					skilla.getEffects(world._tiada, world._tiada);
					final L2Skill skillb = SkillTable.getInstance().getInfo(5700, 7);
					skillb.getEffects(world._tiada, world._tiada);
					
				}
                        }
                }
                return "";
        }
        //author by d0S
        public String onTalk (L2Npc npc, L2PcInstance player)
        {	
                int npcId = npc.getNpcId();
                QuestState st = player.getQuestState(qn);
                if (st == null)
                        st = newQuestState(player);
                if (npcId == ALENOS)
                {   
                        if (GraciaSeedManager.getInstance().getSoDState() == 1)
                        {
                                teleCoord tele = new teleCoord();
                                tele.x = -242759;
                                tele.y = 219981;
                                tele.z = -9986;
                                enterInstance(player, "SeedOfDestruction.xml", tele);
                        }
                        else if (GraciaSeedManager.getInstance().getSoDState() == 2)
                        { 
            		
                        
                                
                                teleCoord tele = new teleCoord();
                                tele.x = -245800;
                                tele.y = 220488;
                                tele.z = -12112;
                                tele.instanceId = 0;
                                teleportplayerEnergy(player,tele);
                             
			}
                }    
                else if (npcId == TELEPORT)
                {
			InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
                        if (tmpworld instanceof SODWorld)
                        {
                                SODWorld world = (SODWorld) tmpworld;
                       		teleCoord tele = new teleCoord();
                       		tele.x = -245802;
                        	tele.y = 220528;
                        	tele.z = -12104;
                        	tele.instanceId = player.getInstanceId();
                        	teleportplayer(player,tele,world);
			}	
		}
                return "";
        }
        public String onFirstTalk(L2Npc npc, L2PcInstance player)
        {
                _log.info("FirstTalkEvent: NPC " + npc.getNpcId() + ".");
                if (npc.getNpcId() == TELEPORT)
                {
                        InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
                        if (tmpworld instanceof SODWorld)
                        {
                                SODWorld world = (SODWorld) tmpworld;
                                //if (world.status == 1 && world.seed.contains(npc))
                                if (world.status == 2 )
                                        return "32601-1.htm";
                                if (world.status > 2  && world.status < 9)
                                        return "32601-2.htm";
                                if (world.status == 9)
                                        return "32601-3.htm";
                        }
                        npc.showChatWindow(player);
                        return null;
                }
        return "";
        }
        public String onEnterZone(L2Character character, L2ZoneType zone)
        {
        if (character instanceof L2PcInstance)
                {
            InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(character.getInstanceId());
                        if (tmpworld instanceof SODWorld)
                        {
                SODWorld world = (SODWorld) tmpworld;
                                if (zone.getId() == 25253 && world.ZoneWaitForTP)
                                {
                                        startQuestTimer("Part1",2000, world._priest, (L2PcInstance)character);
                                        for (L2PcInstance player : world.PlayersInInstance)
                                        {
                                                if (player==null || checkworld(player) != 1) continue;
                                                player.teleToLocation(-250403, 207040, -11957);
                                                if (player.getPet() != null)
                                                        player.getPet().teleToLocation(-250403, 207040, -11957);
                                                SetMovieMode(player,true);
                                        }
                                }
                        }
                }
                return super.onEnterZone(character,zone);
        }

        private void broadcastPacket(L2GameServerPacket mov, SODWorld world)
        {
                for (L2PcInstance player : world.PlayersInInstance)
        {
                        if (player==null || checkworld(player) != 1) continue;
            player.sendPacket(mov);
        }
        }
        private void Delete(L2Npc npc)
        {
                      
                npc.decayMe();
                npc.deleteMe();
				
        }
        private void SetMovieMode(L2PcInstance player,boolean mode)
        {
                if (mode)
                {
                        player.abortAttack();
                        player.abortCast();
                        player.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
                        player.setTarget(null);
                        player.setIsImmobilized(true);
                        player.sendPacket(new CameraMode(1));
                        player.getAppearance().setInvisible();
                }
                else
                {
                        player.setIsImmobilized(false);
                        player.sendPacket(new CameraMode(0));
                        player.sendPacket(new NormalCamera());
                        player.getAppearance().setVisible();
                }
        }
//author by d0S
        private void MoveTo(L2Npc npc, int x, int y, int z)
        {
                npc.abortCast();
                npc.abortAttack();
                npc.setRunning();
                npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, (new L2CharPosition(x,y,z,0)));
        }
        public SeedOfDestruction(int questId, String name, String descr)
        {
                super(questId, name, descr);
                
                addStartNpc(ALENOS);
                addTalkId(ALENOS);
                addStartNpc(TELEPORT);
                addTalkId(TELEPORT);
		addFirstTalkId(TELEPORT);
                addAttackId(OBELISK);
                addSpawnId(OBELISK);
                addKillId(OBELISK);
                addSpawnId(POWERFUL_DEVICE);
                addKillId(POWERFUL_DEVICE);
                addSpawnId(THRONE_POWERFUL_DEVICE);
                addKillId(THRONE_POWERFUL_DEVICE);
                addAttackId(TIADA);
                addKillId(TIADA);
                addKillId(SPAWN_DEVICE);
                addKillId(NAEZD);   
		addKillId(PORTAL);  
                addEnterZoneId(25253);
                for(int mobId : MOB_IDS)
                        addKillId(mobId);
        }
//author by d0S
        public static void main(String[] args)
        {
                // now call the constructor (starts up the)
                new SeedOfDestruction(-1,qn,"instances");
        }
}
так то косяк был когда тиаду бьют с входом не было но там тоже убрал
LineOFWar вне форума Ответить с цитированием
Непрочитано 05.03.2011, 20:22   #13
Пользователь

Автор темы (Топик Стартер) Re: Лаги при убийстве Тиад

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


Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
 

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.

Быстрый переход

Похожие темы
Тема Автор Раздел Ответов Последнее сообщение
Лаги blackjack Серверная часть 10 03.02.2011 19:54
Лаги langes Lineage II 3 08.06.2010 13:12
Лаги от баффера vokforever Lineage II 1 24.01.2009 14:45
Лаги Квося Lineage II 3 12.10.2008 09:02


© 2007–2024 «Форум администраторов игровых серверов»
Защита сайта от DDoS атак — StormWall
Работает на Булке неизвестной версии с переводом от zCarot
Текущее время: 13:48. Часовой пояс GMT +3.

Вверх