Addition of Dream Dungeon.

Contributed by Index.
This commit is contained in:
MobiusDevelopment 2022-12-30 22:45:20 +00:00
parent 958738a439
commit 68286feaff
54 changed files with 6494 additions and 8 deletions

View File

@ -0,0 +1,149 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="222" name="Benedicts Monastery" maxWorlds="80" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/instance.xsd">
<time duration="60" empty="60" eject="60" />
<locations>
<enter type="FIXED">
<location x="115903" y="-80918" z="-43" />
</enter>
<exit type="ORIGIN" />
</locations>
<conditions>
<condition type="GroupMin">
<param name="limit" value="2" />
</condition>
<condition type="GroupMax">
<param name="limit" value="10" />
</condition>
<condition type="Level">
<param name="min" value="76" />
<param name="max" value="99" />
</condition>
<condition type="Reenter" />
</conditions>
<reenter apply="ON_FINISH">
<reset day="WEDNESDAY" hour="6" minute="30" />
</reenter>
<doorlist>
<door id="23150003">
<openStatus default="close" />
</door>
<door id="23150004">
<openStatus default="close" />
</door>
</doorlist>
<spawnlist>
<group name="BenedictNPC_1"> <!-- instance start -->
<npc id="34313" x="117370" y="-80573" z="-43" heading="49895" respawnTime="0sec" /> <!-- Holy Grail's Raider -->
</group>
<group name="BenedictNPC_2" spawnByDefault="false"> <!-- close to break bridge -->
<npc id="34313" x="112783" y="-79020" z="59" heading="49511" respawnTime="0sec" /> <!-- Holy Grail's Raider -->
</group>
<group name="BenedictNPC_3" spawnByDefault="false"> <!-- in gabriell room -->
<npc id="18674" x="112799" y="-76509" z="94" heading="15229" respawnTime="0sec" /> <!-- Holy Grail -->
</group>
<group name="CatLair_TeleporterCat" spawnByDefault="false">
<npc id="34316" x="112800" y="-75950" z="0" heading="49511" respawnTime="0sec" /> <!-- Teleporter Cat -->
</group>
<group name="BenedictMonsters" spawnByDefault="false">
<npc id="22395" x="117409" y="-77929" z="-69" heading="12067" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="117310" y="-77858" z="-75" heading="41810" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="117187" y="-77954" z="-75" heading="38709" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="117108" y="-78059" z="-75" heading="49419" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="117275" y="-78140" z="-75" heading="57117" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="117356" y="-77567" z="-75" heading="7276" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="117307" y="-77364" z="-75" heading="19388" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="117189" y="-77552" z="-75" heading="44910" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="117062" y="-77663" z="-73" heading="44086" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="117247" y="-77645" z="-75" heading="7408" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="117522" y="-77617" z="-61" heading="3491" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="117401" y="-77688" z="-75" heading="38498" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="117387" y="-76635" z="-75" heading="12333" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="117308" y="-76522" z="-75" heading="37282" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="117056" y="-76543" z="-75" heading="31943" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="117195" y="-76445" z="-75" heading="53202" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="117450" y="-76208" z="-75" heading="5208" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="117310" y="-76107" z="-75" heading="34692" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="117119" y="-76261" z="-75" heading="42461" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="117050" y="-76364" z="-75" heading="45055" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="117458" y="-76398" z="-75" heading="48069" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="117298" y="-76287" z="-75" heading="40159" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="117212" y="-76159" z="-75" heading="25546" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="117097" y="-75975" z="-75" heading="24216" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="117122" y="-75749" z="-75" heading="18470" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="117208" y="-75807" z="-75" heading="59327" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="117360" y="-75989" z="-75" heading="54822" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="117395" y="-75778" z="-75" heading="15538" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="117344" y="-75581" z="-71" heading="21299" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="117173" y="-75636" z="-75" heading="36268" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="117355" y="-74094" z="-43" heading="13048" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="117378" y="-74501" z="-43" heading="49069" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="116903" y="-74645" z="-43" heading="33998" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="116695" y="-74121" z="-43" heading="20372" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="116230" y="-74059" z="-43" heading="31496" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="116033" y="-74422" z="-43" heading="40176" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="115765" y="-74660" z="-43" heading="39354" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="115776" y="-74067" z="-43" heading="16357" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="116517" y="-74422" z="-43" heading="58702" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="115729" y="-75755" z="-67" heading="43224" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="115864" y="-75766" z="-75" heading="65163" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="115891" y="-75612" z="-75" heading="14162" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="115989" y="-75668" z="-75" heading="59277" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="116224" y="-75912" z="-64" heading="55671" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="115932" y="-76021" z="-72" heading="23561" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="115742" y="-76004" z="-64" heading="33501" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="116011" y="-75879" z="-75" heading="4944" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="116161" y="-76214" z="-75" heading="57737" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="115955" y="-76179" z="-75" heading="31110" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="115647" y="-76160" z="-52" heading="32450" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="115838" y="-76340" z="-74" heading="58124" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="116052" y="-76352" z="-75" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="116112" y="-76019" z="-75" heading="11273" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="115992" y="-76058" z="-75" heading="46093" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="115822" y="-76043" z="-75" heading="31569" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="115861" y="-76228" z="-75" heading="54476" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="116036" y="-76125" z="-75" heading="18939" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="116131" y="-75719" z="-75" heading="14402" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="115777" y="-77305" z="-75" heading="14744" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="116025" y="-77365" z="-75" heading="56039" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="116106" y="-77430" z="-75" heading="59402" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="116142" y="-77716" z="-73" heading="48478" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="116137" y="-78059" z="-75" heading="48978" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="116072" y="-78313" z="-75" heading="48188" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="115857" y="-78311" z="-75" heading="32670" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="115780" y="-78018" z="-75" heading="17717" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="115790" y="-77827" z="-75" heading="13991" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="115789" y="-77475" z="-75" heading="19705" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="115918" y="-77451" z="-75" heading="64866" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="116002" y="-77562" z="-75" heading="55908" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="116050" y="-77761" z="-75" heading="51620" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="115889" y="-77848" z="-75" heading="37250" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="116034" y="-78025" z="-75" heading="61754" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="115877" y="-78220" z="-75" heading="37776" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="115984" y="-78266" z="-75" heading="11483" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="116176" y="-77869" z="-75" heading="7751" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="115720" y="-78249" z="-66" heading="40770" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="115929" y="-78067" z="-75" heading="65362" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="115801" y="-77679" z="-75" heading="28583" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="115847" y="-77531" z="-75" heading="16194" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="116205" y="-77677" z="-67" heading="60569" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="114953" y="-79347" z="-43" heading="15194" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="114694" y="-79322" z="-43" heading="32127" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="114321" y="-79447" z="-43" heading="37231" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="114519" y="-79929" z="-43" heading="53217" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="114429" y="-80330" z="-43" heading="48392" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="114551" y="-80667" z="-43" heading="57617" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="114938" y="-80838" z="-43" heading="61379" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="114883" y="-80495" z="-43" heading="23251" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="114637" y="-80229" z="-43" heading="25411" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="114771" y="-79938" z="-43" heading="10535" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="114746" y="-79581" z="-43" heading="20813" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="114986" y="-80115" z="-43" heading="49923" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
</group>
<group name="BenedictMonsters_Boss_Gabriel" spawnByDefault="false">
<npc id="18680" x="112800" y="-75950" z="0" heading="49511" respawnTime="0sec" /> <!-- Gabriel -->
</group>
<group name="BenedictMonsters_Boss_GabrielMinion" spawnByDefault="false">
<npc id="18681" x="112800" y="-75950" z="0" heading="49511" respawnTime="0sec" /> <!-- Gabriel Minion -->
</group>
</spawnlist>
</instance>

View File

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="999999" name="Cat Guild's Lair" maxWorlds="80" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/instance.xsd">
<locations>
<enter type="FIXED">
<location x="105464" y="55000" z="-4417" />
</enter>
</locations>
<spawnlist>
<group name="CatLair_Npc_01" spawnByDefault="true">
</group>
<group name="CatLair_Npc_02" spawnByDefault="false">
<npc id="18677" x="102712" y="59832" z="-3744" heading="52819" /> <!-- Elven Elder Cat -->
</group>
<group name="CatLair_Npc_03" spawnByDefault="true">
<npc id="34316" x="102704" y="59883" z="-3728" heading="49871" /> <!-- Teleporter Cat -->
</group>
<group name="CatLair_Monsters_01" spawnByDefault="false">
<territories>
<territory minZ="-3850" maxZ="-4000">
<node x="105000" y="57224" />
<node x="104984" y="57672" />
<node x="104996" y="58568" />
<node x="104264" y="59176" />
<node x="103816" y="58952" />
<node x="104000" y="58000" />
<node x="104600" y="56936" />
</territory>
</territories>
<npc id="22407" count="6" /> <!-- Cat Fighter -->
<npc id="22408" count="6" /> <!-- Cat Mage -->
<npc id="22409" count="6" /> <!-- Cat Warrior -->
<npc id="22410" count="6" /> <!-- Cat Warlock -->
</group>
<group name="CatLair_Monsters_02" spawnByDefault="false">
<territories>
<territory minZ="-3850" maxZ="-4200">
<node x="103704" y="57096" />
<node x="102408" y="56552" />
<node x="102936" y="55736" />
<node x="103960" y="56184" />
<node x="104200" y="56940" />
</territory>
</territories>
<npc id="22407" count="6" /> <!-- Cat Fighter -->
<npc id="22408" count="6" /> <!-- Cat Mage -->
<npc id="22409" count="6" /> <!-- Cat Warrior -->
<npc id="22410" count="6" /> <!-- Cat Warlock -->
</group>
<group name="CatLair_Monsters_03" spawnByDefault="false">
<npc id="22407" x="104232" y="58280" z="-3760" heading="0" /> <!-- Cat Fighter -->
<npc id="22408" x="104408" y="57592" z="-3760" heading="0" /> <!-- Cat Mage -->
<npc id="22409" x="104776" y="57656" z="-3760" heading="0" /> <!-- Cat Warrior -->
<npc id="22410" x="104728" y="58296" z="-3760" heading="0" /> <!-- Cat Warlock -->
</group>
<group name="CatLair_Monsters_04" spawnByDefault="false">
<territories>
<territory minZ="-3650" maxZ="-3850">
<node x="103413" y="59814" />
<node x="102248" y="59688" />
<node x="102200" y="59064" />
<node x="102712" y="58936" />
<node x="103272" y="59336" />
</territory>
</territories>
<npc id="22407" count="6" /> <!-- Cat Fighter -->
<npc id="22408" count="6" /> <!-- Cat Mage -->
<npc id="22409" count="6" /> <!-- Cat Warrior -->
<npc id="22410" count="6" /> <!-- Cat Warlock -->
</group>
<group name="catLair_Boss_FelineKing" spawnByDefault="false">
<npc id="18686" x="102704" y="59883" z="-3728" heading="49871" /> <!-- Feline King -->
</group>
<group name="catLair_Boss_FelineQueen" spawnByDefault="false">
<npc id="18687" x="102704" y="59883" z="-3728" heading="49871" /> <!-- Feline Queen -->
</group>
</spawnlist>
</instance>

View File

@ -0,0 +1,168 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="224" name="DraconidFortress" maxWorlds="80" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/instance.xsd">
<time duration="60" empty="60" eject="60" />
<locations>
<enter type="FIXED">
<location x="-250260" y="220057" z="-12451" />
</enter>
<exit type="ORIGIN" />
</locations>
<conditions>
<condition type="GroupMin">
<param name="limit" value="2" />
</condition>
<condition type="GroupMax">
<param name="limit" value="10" />
</condition>
<condition type="Level">
<param name="min" value="76" />
<param name="max" value="99" />
</condition>
<condition type="Reenter" />
</conditions>
<reenter apply="ON_FINISH">
<reset day="WEDNESDAY" hour="6" minute="30" />
</reenter>
<doorlist>
<door id="12240028">
<openStatus default="close" />
</door>
<door id="12240029">
<openStatus default="close" />
</door>
<door id="12240030">
<openStatus default="close" />
</door>
<door id="12240031">
<openStatus default="close" />
</door>
</doorlist>
<spawnlist>
<group name="DraconidNPC_1">
<npc id="34315" x="-250639" y="219976" z="-12436" heading="64496" respawnTime="3700sec" /> <!-- Red Draconid Traitor -->
</group>
<group name="DraconidNPC_2" spawnByDefault="false">
<npc id="34315" x="-251445" y="214792" z="-11987" heading="15086" respawnTime="3700sec" /> <!-- Red Draconid Traitor -->
</group>
<group name="DraconidNPC_3" spawnByDefault="false">
<npc id="34315" x="-251445" y="212316" z="-11987" heading="15086" respawnTime="3700sec" /> <!-- Red Draconid Traitor -->
</group>
<group name="DraconidNPC_4" spawnByDefault="false">
<npc id="34315" x="-250410" y="209272" z="-11952" heading="49625" respawnTime="0sec" /> <!-- Red Draconid Traitor -->
</group>
<group name="CatLair_TeleporterCat" spawnByDefault="false">
<npc id="34316" x="-250410" y="209272" z="-11952" heading="49625" respawnTime="0sec" /> <!-- Teleporter Cat -->
</group>
<group name="DraconidMonsters" spawnByDefault="false">
<npc id="22403" x="-250861" y="217564" z="-12292" heading="62119" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-250632" y="217607" z="-12291" heading="64067" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-250503" y="217438" z="-12292" heading="37535" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-250662" y="217399" z="-12292" heading="31662" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-250782" y="217401" z="-12292" heading="42312" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-250952" y="217568" z="-12292" heading="18965" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-250396" y="217630" z="-12286" heading="5283" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-250394" y="217392" z="-12292" heading="39805" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-252073" y="217599" z="-12293" heading="29203" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-252330" y="217596" z="-12293" heading="32912" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-252390" y="217457" z="-12292" heading="50329" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-252201" y="217378" z="-12292" heading="55345" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-251953" y="217411" z="-12292" heading="64106" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-251790" y="217527" z="-12293" heading="10323" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-251949" y="217691" z="-12277" heading="26547" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-252204" y="217495" z="-12292" heading="34961" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-252632" y="216540" z="-12250" heading="61500" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-252780" y="216586" z="-12250" heading="29674" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-253048" y="216466" z="-12250" heading="30164" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-253000" y="216320" z="-12251" heading="52144" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-252741" y="216250" z="-12250" heading="62495" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-252971" y="216495" z="-12250" heading="28799" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-252836" y="216414" z="-12250" heading="59814" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-252554" y="216421" z="-12250" heading="61958" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-250321" y="216518" z="-12250" heading="39237" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-250275" y="216656" z="-12251" heading="22295" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-249969" y="216717" z="-12251" heading="2058" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-249741" y="216615" z="-12251" heading="59803" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-249875" y="216361" z="-12251" heading="45796" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-250060" y="216436" z="-12250" heading="25681" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-250059" y="216600" z="-12250" heading="10933" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-249905" y="216492" z="-12250" heading="33600" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-251294" y="216684" z="-12251" heading="19254" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-251491" y="216732" z="-12250" heading="31096" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-251685" y="216705" z="-12251" heading="34555" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-251657" y="216572" z="-12250" heading="54536" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22404" x="-251496" y="216532" z="-12251" heading="62633" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22406" x="-251486" y="216385" z="-12251" heading="48596" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-251323" y="216505" z="-12251" heading="6684" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-251410" y="216632" z="-12251" heading="15536" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
</group>
<group name="DraconidMonsters_02" spawnByDefault="false">
<npc id="22403" x="-251751" y="212892" z="-12085" heading="1770" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-251583" y="212900" z="-12081" heading="65233" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-251554" y="213110" z="-12069" heading="14000" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-251351" y="213051" z="-12069" heading="61111" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-251120" y="212812" z="-12085" heading="61543" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-250998" y="212996" z="-12085" heading="12678" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-251043" y="213127" z="-12085" heading="21342" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-251248" y="212901" z="-12082" heading="38956" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
</group>
<group name="DraconidMonsters_03" spawnByDefault="false">
<npc id="22403" x="-251160" y="209701" z="-11957" heading="36535" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-251231" y="209450" z="-11958" heading="46903" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-251019" y="209386" z="-11958" heading="63714" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-250832" y="209579" z="-11958" heading="9482" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-250947" y="209714" z="-11957" heading="17308" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-250964" y="209563" z="-11957" heading="50422" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-251215" y="209568" z="-11957" heading="35000" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-251035" y="209815" z="-11959" heading="2665" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-251239" y="208477" z="-11959" heading="47759" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-251102" y="208230" z="-11960" heading="8718" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-250915" y="208464" z="-11957" heading="9556" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-250961" y="208641" z="-11957" heading="18642" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-251128" y="208725" z="-11959" heading="33494" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-251088" y="208467" z="-11961" heading="50864" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-251020" y="208352" z="-11957" heading="52861" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-251212" y="208343" z="-11958" heading="15815" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-251216" y="207452" z="-11957" heading="49027" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-251097" y="207242" z="-11957" heading="54841" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-250933" y="207357" z="-11957" heading="6356" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-250997" y="207607" z="-11958" heading="26977" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-251115" y="207609" z="-11957" heading="32367" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-251109" y="207411" z="-11963" heading="49467" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-250971" y="207483" z="-11957" heading="5015" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-251202" y="207337" z="-11957" heading="36027" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-249730" y="207247" z="-11957" heading="39738" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-249554" y="207445" z="-11957" heading="16383" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-249812" y="207561" z="-11957" heading="31659" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-249909" y="207401" z="-11957" heading="45766" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-249748" y="207368" z="-11963" heading="12691" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-249681" y="207531" z="-11957" heading="8291" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-249792" y="207501" z="-11958" heading="36279" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-249555" y="207276" z="-11958" heading="52104" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-249583" y="208522" z="-11957" heading="17023" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-249745" y="208648" z="-11957" heading="36736" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-249921" y="208481" z="-11957" heading="47924" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-249824" y="208332" z="-11957" heading="56617" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-249693" y="208354" z="-11957" heading="10630" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-249708" y="208507" z="-11963" heading="18442" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-249820" y="208439" z="-11957" heading="38038" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-249622" y="208622" z="-11957" heading="6880" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-249581" y="209575" z="-11957" heading="15704" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-249781" y="209740" z="-11957" heading="25896" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-249898" y="209529" z="-11957" heading="50512" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-249750" y="209406" z="-11957" heading="61086" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-249667" y="209516" z="-11961" heading="3146" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-249822" y="209647" z="-11957" heading="26201" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-249778" y="209546" z="-11962" heading="1297" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-249641" y="209700" z="-11957" heading="8479" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
</group>
<group name="DraconidMonsters_04" spawnByDefault="false">
<npc id="18676" x="-250402" y="207166" z="-11954" heading="16383" respawnTime="3700sec" /> <!-- Red Draconid Follower -->
</group>
<group name="DraconidMonsters_BossTiad" spawnByDefault="false">
<npc id="18684" x="-250410" y="209272" z="-11952" heading="49625" respawnTime="0sec" /> <!-- Tiad -->
</group>
<group name="DraconidMonsters_BossBaint" spawnByDefault="false">
<npc id="18685" x="-250410" y="209272" z="-11952" heading="49625" respawnTime="0sec" /> <!-- Baint -->
</group>
</spawnlist>
</instance>

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="221" name="Gustavs Manor" maxWorlds="80" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/instance.xsd">
<time duration="60" empty="60" eject="60" />
<locations>
<enter type="FIXED">
<location x="57987" y="-32295" z="295" />
</enter>
<exit type="ORIGIN" />
</locations>
<conditions>
<condition type="GroupMin">
<param name="limit" value="2" />
</condition>
<condition type="GroupMax">
<param name="limit" value="10" />
</condition>
<condition type="Level">
<param name="min" value="76" />
<param name="max" value="99" />
</condition>
<condition type="Reenter" />
</conditions>
<reenter apply="ON_FINISH">
<reset day="WEDNESDAY" hour="6" minute="30" />
</reenter>
<doorlist>
<door id="21170001" />
<door id="21170002" />
<door id="21170005" />
<door id="21170006" />
<door id="21170003" />
<door id="21170004" />
</doorlist>
<spawnlist>
<group name="GustavNPC_1"> <!-- on spawn -->
<npc id="34312" x="58106" y="-32039" z="303" heading="47518" respawnTime="0sec" /> <!-- Rascal -->
</group>
<group name="GustavNPC_2" spawnByDefault="false"> <!-- near gates -->
<npc id="34312" x="57820" y="-29562" z="571" heading="49913" respawnTime="0sec" /> <!-- Rascal -->
</group>
<group name="GustavNPC_3" spawnByDefault="false">
</group>
<group name="GustavNPC_4" spawnByDefault="false">
<npc id="34312" x="58520" y="-27499" z="580" heading="32420" respawnTime="0sec" /> <!-- Rascal -->
</group>
<group name="CatLair_TeleporterCat" spawnByDefault="false">
<npc id="34316" x="58520" y="-27499" z="580" heading="32420" respawnTime="0sec" /> <!-- Teleporter Cat -->
</group>
<group name="GustavMonsters_1" spawnByDefault="false"> <!-- near gates -->
<npc id="22391" x="57951" y="-30279" z="499" heading="49524" respawnTime="0sec" /> <!-- Mansion Manager -->
<npc id="22393" x="58321" y="-30138" z="499" heading="49577" respawnTime="0sec" /> <!-- Housekeeper -->
<npc id="22392" x="58244" y="-29957" z="506" heading="49151" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22392" x="58123" y="-29715" z="570" heading="48603" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22394" x="57756" y="-30171" z="499" heading="48351" respawnTime="0sec" /> <!-- Cursed Girl -->
<npc id="22391" x="57541" y="-30302" z="453" heading="47093" respawnTime="0sec" /> <!-- Mansion Manager -->
<npc id="22392" x="57792" y="-29821" z="570" heading="48688" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22393" x="57963" y="-29759" z="570" heading="48688" respawnTime="0sec" /> <!-- Housekeeper -->
</group>
<group name="GustavMonsters_2" spawnByDefault="false"> <!-- inside manor -->
<npc id="22391" x="57538" y="-28430" z="568" heading="58032" respawnTime="0sec" /> <!-- Mansion Manager -->
<npc id="22392" x="57400" y="-28650" z="568" heading="44348" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22393" x="57438" y="-28910" z="568" heading="3213" respawnTime="0sec" /> <!-- Housekeeper -->
<npc id="22391" x="57100" y="-29280" z="568" heading="41472" respawnTime="0sec" /> <!-- Mansion Manager -->
<npc id="22392" x="57202" y="-29566" z="568" heading="51966" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22391" x="56966" y="-28961" z="568" heading="13670" respawnTime="0sec" /> <!-- Mansion Manager -->
<npc id="22391" x="56774" y="-28333" z="568" heading="24012" respawnTime="0sec" /> <!-- Mansion Manager -->
<npc id="22393" x="56795" y="-28137" z="568" heading="52507" respawnTime="0sec" /> <!-- Housekeeper -->
<npc id="22394" x="57101" y="-28587" z="568" heading="45595" respawnTime="0sec" /> <!-- Cursed Girl -->
<npc id="22394" x="57240" y="-28997" z="568" heading="56700" respawnTime="0sec" /> <!-- Cursed Girl -->
<npc id="22392" x="57425" y="-28234" z="568" heading="31162" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22392" x="58548" y="-28938" z="568" heading="1154" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22393" x="58734" y="-29185" z="568" heading="54811" respawnTime="0sec" /> <!-- Housekeeper -->
<npc id="22394" x="58994" y="-29222" z="568" heading="2422" respawnTime="0sec" /> <!-- Cursed Girl -->
<npc id="22391" x="59069" y="-28918" z="568" heading="16751" respawnTime="0sec" /> <!-- Mansion Manager -->
<npc id="22392" x="59240" y="-28587" z="568" heading="8314" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22391" x="58961" y="-28411" z="568" heading="27607" respawnTime="0sec" /> <!-- Mansion Manager -->
<npc id="22394" x="58507" y="-28565" z="568" heading="38196" respawnTime="0sec" /> <!-- Cursed Girl -->
<npc id="22394" x="58321" y="-28872" z="568" heading="43838" respawnTime="0sec" /> <!-- Cursed Girl -->
<npc id="22393" x="58362" y="-28410" z="568" heading="14281" respawnTime="0sec" /> <!-- Housekeeper -->
<npc id="22392" x="58635" y="-28437" z="568" heading="64805" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22392" x="58819" y="-28888" z="568" heading="52565" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22391" x="59231" y="-26650" z="568" heading="14114" respawnTime="0sec" /> <!-- Mansion Manager -->
<npc id="22392" x="59030" y="-26629" z="568" heading="31682" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22393" x="58809" y="-26816" z="568" heading="36779" respawnTime="0sec" /> <!-- Housekeeper -->
<npc id="22394" x="58832" y="-26552" z="568" heading="16190" respawnTime="0sec" /> <!-- Cursed Girl -->
<npc id="22392" x="59034" y="-26428" z="568" heading="65034" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22392" x="59126" y="-26805" z="568" heading="39337" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22391" x="57130" y="-26536" z="575" heading="26265" respawnTime="0sec" /> <!-- Mansion Manager -->
<npc id="22392" x="56868" y="-26549" z="568" heading="35866" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22393" x="56687" y="-26737" z="568" heading="49151" respawnTime="0sec" /> <!-- Housekeeper -->
<npc id="22394" x="56893" y="-26771" z="568" heading="1265" respawnTime="0sec" /> <!-- Cursed Girl -->
<npc id="22391" x="57095" y="-26782" z="568" heading="14880" respawnTime="0sec" /> <!-- Mansion Manager -->
<npc id="22393" x="57107" y="-26454" z="568" heading="22853" respawnTime="0sec" /> <!-- Housekeeper -->
<npc id="22392" x="57210" y="-26608" z="568" heading="55111" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22391" x="58084" y="-26169" z="594" heading="65220" respawnTime="0sec" /> <!-- Mansion Manager -->
<npc id="22392" x="58247" y="-25960" z="594" heading="11646" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22394" x="58025" y="-25878" z="594" heading="30473" respawnTime="0sec" /> <!-- Cursed Girl -->
<npc id="22391" x="57806" y="-26018" z="594" heading="38847" respawnTime="0sec" /> <!-- Mansion Manager -->
<npc id="22392" x="57720" y="-26216" z="594" heading="36903" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22391" x="57550" y="-25939" z="594" heading="21599" respawnTime="0sec" /> <!-- Mansion Manager -->
<npc id="22391" x="57198" y="-27259" z="580" heading="55991" respawnTime="0sec" /> <!-- Mansion Manager -->
<npc id="22393" x="57195" y="-27569" z="580" heading="48826" respawnTime="0sec" /> <!-- Housekeeper -->
<npc id="22394" x="57207" y="-27775" z="580" heading="49813" respawnTime="0sec" /> <!-- Cursed Girl -->
<npc id="22392" x="57228" y="-27528" z="580" heading="15583" respawnTime="0sec" /> <!-- Touchy Servant -->
</group>
<group name="GustavMonsters_3" spawnByDefault="false">
<npc id="22394" x="58223" y="-25997" z="597" heading="36645" /> <!-- Cursed Girl -->
<npc id="22393" x="58951" y="-26742" z="571" heading="51106" /> <!-- Housekeeper -->
<npc id="22392" x="56993" y="-26440" z="571" heading="42979" /> <!-- Touchy Servant -->
<npc id="22391" x="56752" y="-26936" z="571" heading="5911" /> <!-- Mansion Manager -->
</group>
<group name="GustavMonsters_Boss_Gustav" spawnByDefault="false">
<npc id="18678" x="58032" y="-27507" z="583" heading="0" /> <!-- Gustav -->
</group>
<group name="GustavMonsters_Boss_GustavSteward" spawnByDefault="false">
<npc id="18679" x="58032" y="-27507" z="583" heading="0" /> <!-- Gustav Steward -->
</group>
</spawnlist>
</instance>

View File

@ -0,0 +1,167 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="223" name="Ventus Temple" maxWorlds="80" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/instance.xsd">
<time duration="60" empty="60" eject="60" />
<locations>
<enter type="FIXED">
<location x="217511" y="47841" z="-8547" />
</enter>
<exit type="ORIGIN" />
</locations>
<conditions>
<condition type="GroupMin">
<param name="limit" value="2" />
</condition>
<condition type="GroupMax">
<param name="limit" value="10" />
</condition>
<condition type="Level">
<param name="min" value="76" />
<param name="max" value="99" />
</condition>
<condition type="Reenter" />
</conditions>
<reenter apply="ON_FINISH">
<reset day="WEDNESDAY" hour="6" minute="30" />
</reenter>
<spawnlist>
<group name="VentusNPC_1">
<npc id="34314" x="217507" y="48249" z="-8515" heading="49329" respawnTime="3700sec" /> <!-- Ventus' Maid -->
</group>
<group name="VentusNPC_2" spawnByDefault="false">
<npc id="34314" x="213022" y="51933" z="-8419" heading="49660" respawnTime="60sec" /> <!-- Ventus' Maid -->
</group>
<group name="VentusNPC_3" spawnByDefault="false">
<npc id="18675" x="213024" y="51048" z="-8410" heading="49258" respawnTime="60sec" /> <!-- Broken Ballista -->
</group>
<group name="VentusNPC_4" spawnByDefault="false">
<npc id="34314" x="213022" y="50456" z="-8400" heading="16383" respawnTime="60sec" /> <!-- Ventus' Maid -->
</group>
<group name="CatLair_TeleporterCat" spawnByDefault="false">
<npc id="34316" x="213022" y="50456" z="-8400" heading="16383" respawnTime="0sec" /> <!-- Teleporter Cat -->
</group>
<group name="VentusMonsters" spawnByDefault="false">
<npc id="22401" x="217793" y="49345" z="-8515" heading="49541" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22401" x="217655" y="49343" z="-8515" heading="49936" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22401" x="217503" y="49346" z="-8515" heading="49276" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22401" x="217350" y="49335" z="-8515" heading="50343" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22401" x="217216" y="49346" z="-8515" heading="49528" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22399" x="217231" y="49490" z="-8516" heading="46249" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="217356" y="49460" z="-8515" heading="49764" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="217507" y="49427" z="-8515" heading="45116" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="217766" y="49485" z="-8515" heading="43240" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="217651" y="49439" z="-8515" heading="50126" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22400" x="217309" y="49542" z="-8515" heading="47997" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22400" x="217449" y="49545" z="-8515" heading="52192" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22400" x="217566" y="49545" z="-8515" heading="47854" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22400" x="217684" y="49517" z="-8515" heading="50632" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22401" x="217828" y="52283" z="-8583" heading="49556" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22401" x="217701" y="52272" z="-8580" heading="50237" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22401" x="217504" y="52274" z="-8580" heading="48647" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22401" x="217601" y="52278" z="-8580" heading="49741" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22401" x="217412" y="52284" z="-8580" heading="48177" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22401" x="217299" y="52269" z="-8580" heading="47769" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22401" x="217182" y="52276" z="-8583" heading="49151" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22399" x="217188" y="52393" z="-8583" heading="47831" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="217293" y="52372" z="-8580" heading="50201" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="217461" y="52349" z="-8580" heading="49031" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="217600" y="52354" z="-8580" heading="49088" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="217720" y="52344" z="-8579" heading="49151" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="217832" y="52347" z="-8583" heading="47041" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22400" x="217189" y="52490" z="-8583" heading="49458" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22400" x="217335" y="52491" z="-8580" heading="48058" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22400" x="217475" y="52484" z="-8580" heading="47188" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22400" x="217603" y="52468" z="-8580" heading="48815" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22400" x="217749" y="52478" z="-8581" heading="51384" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22401" x="214786" y="54881" z="-8675" heading="64238" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22401" x="214787" y="54675" z="-8675" heading="121" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22401" x="214802" y="54510" z="-8675" heading="64735" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22399" x="214673" y="54509" z="-8675" heading="1369" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="214700" y="54676" z="-8675" heading="826" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="214698" y="54879" z="-8675" heading="1722" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22400" x="214621" y="54892" z="-8675" heading="63660" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22400" x="214627" y="54671" z="-8675" heading="63255" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22400" x="214604" y="54500" z="-8675" heading="1645" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22399" x="212897" y="54514" z="-8675" heading="64792" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="212904" y="54609" z="-8675" heading="61025" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="212909" y="54710" z="-8675" heading="61355" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="212830" y="54616" z="-8675" heading="60607" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="212833" y="54704" z="-8675" heading="65131" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="212831" y="54812" z="-8675" heading="65006" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="212834" y="54511" z="-8675" heading="1046" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="212923" y="54808" z="-8675" heading="1057" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22400" x="211068" y="54688" z="-8675" heading="2555" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22400" x="211068" y="54546" z="-8675" heading="65048" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22400" x="211067" y="54833" z="-8675" heading="64545" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22401" x="211002" y="54831" z="-8675" heading="60" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22401" x="211002" y="54690" z="-8675" heading="65305" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22401" x="211005" y="54550" z="-8675" heading="546" respawnTime="3700sec" /> <!-- Ancient Guard -->
<!--
</group>
<group name="VentusDreamMonsters" spawnByDefault="false" >
-->
<npc id="22402" x="210909" y="54547" z="-8675" heading="267" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="210903" y="54687" z="-8675" heading="64600" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="210903" y="54830" z="-8675" heading="89" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="210601" y="54424" z="-8672" heading="49092" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="210585" y="54891" z="-8671" heading="15949" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="211924" y="54457" z="-8675" heading="12620" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="211923" y="54839" z="-8675" heading="49862" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
</group>
<group name="VentusDreamMonsters_01" spawnByDefault="false">
<npc id="22402" x="216990" y="49410" z="-8528" heading="48647" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="216990" y="50300" z="-8528" heading="48647" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="218010" y="49410" z="-8528" heading="48647" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="218010" y="50300" z="-8528" heading="48647" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<!--
</group>
<group name="VentusDreamMonsters_02" spawnByDefault="false" >
-->
<npc id="22402" x="216990" y="52120" z="-8593" heading="48647" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="216990" y="52350" z="-8593" heading="48647" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="218010" y="52120" z="-8593" heading="48647" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="218010" y="52350" z="-8593" heading="48647" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<!--
</group>
<group name="VentusDreamMonsters_03" spawnByDefault="false" >
-->
<npc id="22402" x="214700" y="54230" z="-8672" heading="267" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="214700" y="55070" z="-8672" heading="267" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="214300" y="54230" z="-8672" heading="267" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="214300" y="55070" z="-8672" heading="267" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="215080" y="55070" z="-8672" heading="267" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="215080" y="54280" z="-8672" heading="267" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<!--
</group>
<group name="VentusDreamMonsters_04" spawnByDefault="false" >
-->
<npc id="22402" x="212480" y="54655" z="-8685" heading="267" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="213216" y="54655" z="-8685" heading="267" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<!--
</group>
<group name="VentusDreamMonsters_05" spawnByDefault="false" >
-->
<npc id="22402" x="214700" y="54230" z="-8672" heading="267" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="214700" y="55070" z="-8672" heading="267" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="214300" y="54230" z="-8672" heading="267" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="214300" y="55070" z="-8672" heading="267" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="215080" y="55070" z="-8672" heading="267" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="215080" y="54280" z="-8672" heading="267" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
</group>
<group name="VentusMonsters_2" spawnByDefault="false">
<npc id="22402" x="213028" y="51631" z="-8407" heading="15805" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="213025" y="52135" z="-8407" heading="49331" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22401" x="213207" y="51862" z="-8419" heading="31175" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22401" x="212858" y="51862" z="-8419" heading="64590" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22400" x="213198" y="51689" z="-8419" heading="24878" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22399" x="213204" y="52035" z="-8419" heading="36991" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="212854" y="51711" z="-8419" heading="7497" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22400" x="212871" y="52024" z="-8419" heading="54503" respawnTime="3700sec" /> <!-- Ancient Thrower -->
</group>
<group name="VentusBoss_Ventus" spawnByDefault="false">
<npc id="18682" x="213023" y="50365" z="-8412" heading="16383" respawnTime="0sec" />
</group>
<group name="VentusBoss_Rekario" spawnByDefault="false">
<npc id="18683" x="213023" y="50365" z="-8412" heading="16383" respawnTime="0sec" />
</group>
</spawnlist>
</instance>

View File

@ -0,0 +1,284 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package instances.DreamDungeon.BenedictsMonastery;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.ScheduledFuture;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceStatusChange;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import instances.AbstractInstance;
import instances.DreamDungeon.CatGuildsLair.CatGuildsLair;
/**
* @author Index
*/
public class BenedictsMonastery extends AbstractInstance
{
/** Instance World IDS */
public static final int CREATED = 0;
public static final int TALK_WITH_HOLY_GRAILS_RAIDER_NPC_ON_START = 1;
public static final int KILL_FOUR_DREAM_WATCHERS_INSIDE = 2;
public static final int TALK_WITH_HOLY_GRAILS_RAIDER_NPC_TO_OPEN_DOORS = 3;
public static final int TALK_WITH_HOLY_GRAIL_BEFORE_BOSS = 4;
public static final int BOSS_FIGHT = 5;
public static final int FINISH_INSTANCE = 6;
public static final int INSTANCE_ID = 222;
private static final int[] MONSTERS =
{
22395, // Guardian Angel of the Holy Grail - Bow
22396, // Guardian Angel of the Holy Grail - Blunt
22397, // Guardian Angel of the Holy Grail - Spire
22398, // Guardian Angel of the Holy Grail - Dagger
};
private static final int[] MAIN_DOOR_IDS =
{
23150003,
23150004,
};
private static final int GABRIELLE = 18680;
private static final int GABRIELLE_MINION = 18681;
private static final String FIRST_STRING_TIMER = "FIRST_STRING_TIMER";
private static final String DREAM_WATCHER_COUNTER = "DREAM_WATCHER_COUNTER";
private static final NpcStringId DREAM_WATCHER = NpcStringId.DREAM_WATCHER;
private static final NpcStringId STRING_ID_01 = NpcStringId.HUMAN_FIND_THE_HOLY_GRAIL_IT_HAS_ANSWERS_TO_YOUR_QUESTIONS;
private static final NpcStringId STRING_ID_02 = NpcStringId.GO_TO_THE_LAST_ROOM_THE_HOLY_GRAIL_IS_INSIDE;
private static final NpcStringId STRING_ID_03 = NpcStringId.ARE_YOU_BRAVE_ENOUGH_TO_CROSS_THIS_BROKEN_BRIDGE;
private static final NpcStringId STRING_ID_04 = NpcStringId.HOW_DARE_YOU_HUMAN_GABRIELLE_WILL_KILL_YOU_FOR_THAT;
private static final NpcStringId STRING_ID_05 = NpcStringId.GABRIELLE_IS_NOT_NEEDED_I_LL_DEAL_WITH_IT_MYSELF;
private static final NpcStringId STRING_ID_06 = NpcStringId.HEHEHE_GABRIELLE_ISN_T_THIS_STUPID_BUT_WHERE_IS_THE_HOLY_GRAIL;
private BenedictsMonastery()
{
super(INSTANCE_ID);
addKillId(MONSTERS);
addKillId(GABRIELLE, GABRIELLE_MINION);
setInstanceStatusChangeId(this::onInstanceStatusChange, INSTANCE_ID);
}
public void onInstanceStatusChange(OnInstanceStatusChange event)
{
final Instance instance = event.getWorld();
final int status = event.getStatus();
switch (status)
{
case CREATED:
{
instance.setStatus(TALK_WITH_HOLY_GRAILS_RAIDER_NPC_ON_START);
// send screen message if player will not talk with Holy Grail's Raider
// human, found a holy grail, it has answers to your questions
ScheduledFuture<?> showFirstStringOnScreen = ThreadPool.schedule(() -> instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_01, ExShowScreenMessage.TOP_CENTER, 10000, true)), 30000);
instance.getParameters().set(FIRST_STRING_TIMER, showFirstStringOnScreen);
break;
}
// case TALK_WITH_HOLY_GRAILS_RAIDER_NPC_ON_START:
case KILL_FOUR_DREAM_WATCHERS_INSIDE:
{
getScheduleMessageAndMakeAction(instance);
instance.setReenterTime();
instance.despawnGroup("BenedictNPC_1");
instance.spawnGroup("BenedictMonsters").forEach(npc -> npc.getSpawn().stopRespawn());
setRandomTitles(instance);
break;
}
case TALK_WITH_HOLY_GRAILS_RAIDER_NPC_TO_OPEN_DOORS:
{
// Go to last room for holy grail
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_02, ExShowScreenMessage.TOP_CENTER, 10000, true));
instance.spawnGroup("BenedictNPC_2").forEach(npc -> npc.getSpawn().stopRespawn());
break;
}
case TALK_WITH_HOLY_GRAIL_BEFORE_BOSS:
{
// Are you brave enough to cross this broken bridge?
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_03, ExShowScreenMessage.TOP_CENTER, 10000, true));
instance.spawnGroup("BenedictNPC_3").forEach(npc -> npc.getSpawn().stopRespawn());
for (int doorId : MAIN_DOOR_IDS)
{
instance.openCloseDoor(doorId, true);
}
break;
}
case BOSS_FIGHT:
{
instance.despawnGroup("BenedictNPC_3");
spawnBoss(instance);
break;
}
case FINISH_INSTANCE:
{
instance.setDuration(5);
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_06, ExShowScreenMessage.TOP_CENTER, 10000, true));
break;
}
}
}
private void spawnBoss(Instance instance)
{
final boolean random = Rnd.nextBoolean();
// show text
final NpcStringId bossText = random ? STRING_ID_04 : STRING_ID_05;
instance.broadcastPacket(new ExShowScreenMessage(bossText, ExShowScreenMessage.TOP_CENTER, 10000, true));
// spawn boss
final String bossTemplate = random ? "BenedictMonsters_Boss_Gabriel" : "BenedictMonsters_Boss_GabrielMinion";
instance.spawnGroup(bossTemplate).forEach(n -> n.getSpawn().stopRespawn());
}
private void setRandomTitles(Instance instance)
{
final List<Npc> monsters = instance.getNpcsOfGroup("BenedictMonsters");
if (monsters.isEmpty())
{
for (Player player : instance.getPlayers())
{
InstanceManager.getInstance().deleteInstanceTime(player, INSTANCE_ID);
}
instance.destroy();
return;
}
final Set<Npc> randomNpcs = new HashSet<>();
while (randomNpcs.size() < 7)
{
final Npc monster = monsters.get(Rnd.get(1, monsters.size()) - 1);
randomNpcs.add(monster);
monsters.remove(monster);
}
for (Npc monster : randomNpcs)
{
monster.setTitleString(DREAM_WATCHER);
monster.broadcastInfo();
}
monsters.clear();
randomNpcs.clear();
}
private static void getScheduleMessageAndMakeAction(Instance instance)
{
// make sure message is shown (if will not - send) and trying remove it from memory
ScheduledFuture<?> showFirstStringOnScreen = instance.getParameters().getObject(FIRST_STRING_TIMER, ScheduledFuture.class, null);
if ((showFirstStringOnScreen == null) || !showFirstStringOnScreen.isDone())
{
if (showFirstStringOnScreen != null)
{
showFirstStringOnScreen.cancel(true);
showFirstStringOnScreen = null;
}
// I hate that cursed arrogant Ventus! You go ahead and get to the Temple of Ventus.
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_01, ExShowScreenMessage.TOP_CENTER, 10000, true));
}
if ((showFirstStringOnScreen != null) && showFirstStringOnScreen.isDone())
{
showFirstStringOnScreen.cancel(true);
showFirstStringOnScreen = null;
}
instance.getParameters().remove(FIRST_STRING_TIMER);
}
@Override
public String onKill(Npc npc, Player killer, boolean isSummon)
{
if (killer == null)
{
return super.onKill(npc, killer, isSummon);
}
final Instance instance = killer.getInstanceWorld();
if ((instance == null) || (instance.getTemplateId() != INSTANCE_ID))
{
return super.onKill(npc, killer, isSummon);
}
switch (instance.getStatus())
{
case KILL_FOUR_DREAM_WATCHERS_INSIDE:
{
if (instance.getAliveNpcs(MONSTERS).isEmpty())
{
instance.setStatus(TALK_WITH_HOLY_GRAILS_RAIDER_NPC_TO_OPEN_DOORS);
break;
}
if ((npc.getTitleString() == null) || !npc.getTitleString().equals(DREAM_WATCHER))
{
return super.onKill(npc, killer, isSummon);
}
final int dreamWatcherCount = instance.getParameters().increaseInt(DREAM_WATCHER_COUNTER, 0, 1);
switch (dreamWatcherCount)
{
case 1:
{
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.DREAM_WATCHER_S_DEATH_1_4_2, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
break;
}
case 2:
{
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.DREAM_WATCHER_S_DEATH_2_4_2, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
break;
}
case 3:
{
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.DREAM_WATCHER_S_DEATH_3_4_2, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
break;
}
case 4:
{
instance.setStatus(TALK_WITH_HOLY_GRAILS_RAIDER_NPC_TO_OPEN_DOORS);
break;
}
}
break;
}
case BOSS_FIGHT:
{
if ((npc.getTemplate().getId() == GABRIELLE) || (npc.getTemplate().getId() == GABRIELLE_MINION))
{
if (!CatGuildsLair.calculateChanceForCatLair(instance))
{
instance.setStatus(FINISH_INSTANCE);
}
}
break;
}
}
return super.onKill(npc, killer, isSummon);
}
public static void main(String[] args)
{
new BenedictsMonastery();
}
}

View File

@ -0,0 +1,58 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package instances.DreamDungeon.BenedictsMonastery;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import ai.AbstractNpcAI;
/**
* @author Index
*/
public class HolyGrail extends AbstractNpcAI
{
private static final int HOLY_GRAIL = 18674;
private HolyGrail()
{
addFirstTalkId(HOLY_GRAIL);
}
@Override
public String onFirstTalk(Npc npc, Player player)
{
final Instance instance = ((player == null) || (npc == null)) ? null : player.getInstanceWorld();
if ((instance == null) || (instance.getTemplateId() != BenedictsMonastery.INSTANCE_ID))
{
return super.onFirstTalk(npc, player);
}
if (instance.getStatus() == BenedictsMonastery.TALK_WITH_HOLY_GRAIL_BEFORE_BOSS)
{
instance.setStatus(BenedictsMonastery.BOSS_FIGHT);
}
return super.onFirstTalk(npc, player);
}
public static void main(String[] args)
{
new HolyGrail();
}
}

View File

@ -0,0 +1,72 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package instances.DreamDungeon.BenedictsMonastery;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import ai.AbstractNpcAI;
/**
* @author Index
*/
public class HolyGrailsRaider extends AbstractNpcAI
{
private static final int HOLY_GRAILS_RIDER = 34313;
private HolyGrailsRaider()
{
addFirstTalkId(HOLY_GRAILS_RIDER);
}
@Override
public String onFirstTalk(Npc npc, Player player)
{
final Instance instance = ((player == null) || (npc == null)) ? null : player.getInstanceWorld();
if ((instance == null) || (instance.getTemplateId() != BenedictsMonastery.INSTANCE_ID))
{
return super.onFirstTalk(npc, player);
}
switch (instance.getStatus())
{
case BenedictsMonastery.TALK_WITH_HOLY_GRAILS_RAIDER_NPC_ON_START:
{
instance.setStatus(BenedictsMonastery.KILL_FOUR_DREAM_WATCHERS_INSIDE);
break;
}
case BenedictsMonastery.TALK_WITH_HOLY_GRAILS_RAIDER_NPC_TO_OPEN_DOORS:
{
instance.setStatus(BenedictsMonastery.TALK_WITH_HOLY_GRAIL_BEFORE_BOSS);
break;
}
case BenedictsMonastery.FINISH_INSTANCE:
{
instance.destroy();
break;
}
}
return super.onFirstTalk(npc, player);
}
public static void main(String[] args)
{
new HolyGrailsRaider();
}
}

View File

@ -0,0 +1,379 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package instances.DreamDungeon.CatGuildsLair;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CopyOnWriteArrayList;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceStatusChange;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.instancezone.InstanceTemplate;
import org.l2jmobius.gameserver.model.spawns.SpawnGroup;
import org.l2jmobius.gameserver.model.spawns.SpawnTemplate;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import instances.AbstractInstance;
import instances.DreamDungeon.BenedictsMonastery.BenedictsMonastery;
import instances.DreamDungeon.DraconidFortress.DraconidFortress;
import instances.DreamDungeon.GustavsManor.GustavsManor;
import instances.DreamDungeon.VentusTemple.VentusTemple;
/**
* @author Index
*/
public class CatGuildsLair extends AbstractInstance
{
public static final int CREATED = 1000;
public static final int TALK_WITH_TELEPORTER_CAT = 1001;
public static final int KILL_FOUR_DREAM_WATCHERS_INSIDE = 1002;
public static final int TALK_WITH_ELVEN_ELDER_CAT = 1003;
public static final int BOSS_FIGHT = 1004;
public static final int FINISH_INSTANCE = 1005;
private static final int[] INSTANCE_IDs =
{
GustavsManor.INSTANCE_ID,
BenedictsMonastery.INSTANCE_ID,
VentusTemple.INSTANCE_ID,
DraconidFortress.INSTANCE_ID,
};
private static final int[] MONSTERS =
{
22407, // Cat Fighter
22408, // Cat Mage
22409, // Cat Warrior
22410, // Cat Warlock
};
private static final int FELINE_KING = 18686;
private static final int FELINE_QUEEN = 18687;
private static final String DREAM_WATCHER_COUNTER = "DREAM_WATCHER_COUNTER";
private static final NpcStringId DREAM_WATCHER = NpcStringId.DREAM_WATCHER;
private static final NpcStringId STRING_ID_01 = NpcStringId.THE_CAT_GUILD_S_KING_IS_IN_TROUBLE_PLEASE_HELP_HIM;
private static final NpcStringId STRING_ID_02 = NpcStringId.HELP_OUR_GUILD_PLEASE_I_WILL_TELL_YOU_WHAT_S_GOING_ON;
private static final NpcStringId STRING_ID_03 = NpcStringId.WHAT_S_THE_FUSS_THOSE_WILLING_TO_ADDRESS_THE_KING_COME_TO_ME;
private static final NpcStringId STRING_ID_04 = NpcStringId.WHAT_YOU_ARE_GOING_TO_GIVE_ADVICES_TO_OUR_KING_HE_LL_BE_SO_MAD;
private static final NpcStringId STRING_ID_05 = NpcStringId.IS_SOMETHING_WRONG_WITH_ME_THEN_ADVISE_ME;
private static final NpcStringId STRING_ID_06 = NpcStringId.WHEW_AS_I_THOUGHT_THE_FALL_HAS_STOPPED;
private static final Map<String, List<SpawnGroup>> CAT_LAIR_SPAWN_GROUPS = new HashMap<>();
private static InstanceTemplate CAT_LAIR_INSTANCE;
private static Location START_LOCATION;
public CatGuildsLair()
{
super(INSTANCE_IDs);
addKillId(MONSTERS);
addKillId(FELINE_KING, FELINE_QUEEN);
addInstanceEnterId(INSTANCE_IDs);
setInstanceStatusChangeId(this::onInstanceStatusChange, INSTANCE_IDs);
init();
}
public void onInstanceStatusChange(OnInstanceStatusChange event)
{
final Instance instance = event.getWorld();
final int status = event.getStatus();
if ((instance == null) || (status < CREATED))
{
return;
}
switch (status)
{
case CREATED:
{
instance.setDuration(60); // update time for destroy instance
sendScreenMessage(instance, STRING_ID_01);
break;
}
case TALK_WITH_TELEPORTER_CAT:
{
instance.getPlayers().forEach(player -> player.teleToLocation(START_LOCATION, false));
instance.getParameters().set(DREAM_WATCHER_COUNTER, 0);
spawnNpcFromGroup(instance, "CatLair_Npc_01");
break;
}
case KILL_FOUR_DREAM_WATCHERS_INSIDE:
{
spawnNpcFromGroup(instance, "CatLair_Monsters_01");
spawnNpcFromGroup(instance, "CatLair_Monsters_02");
spawnNpcFromGroup(instance, "CatLair_Monsters_04");
setRandomTitles(instance, false);
break;
}
case TALK_WITH_ELVEN_ELDER_CAT:
{
spawnNpcFromGroup(instance, "CatLair_Npc_02");
sendScreenMessage(instance, STRING_ID_03);
final Npc teleporterCat = instance.getNpc(instances.DreamDungeon.CatGuildsLair.TeleporterCat.TELEPORTER_CAT_NPC_ID);
startQuestTimer("ADDITIONAL_WAVE", 10_000, teleporterCat, null, false);
break;
}
case BOSS_FIGHT:
{
instance.despawnGroup("CatLair_Npc_02");
spawnBoss(instance);
break;
}
case FINISH_INSTANCE:
{
instance.setDuration(5);
sendScreenMessage(instance, STRING_ID_06);
spawnNpcFromGroup(instance, "CatLair_Npc_03");
break;
}
}
}
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
final Instance instance = npc.getInstanceWorld();
if ((instance == null) || (instance.getStatus() < CREATED))
{
return null;
}
if (event.equalsIgnoreCase("ADDITIONAL_WAVE"))
{
spawnNpcFromGroup(instance, "CatLair_Monsters_03");
setRandomTitles(instance, true);
}
return super.onAdvEvent(event, npc, player);
}
private void spawnBoss(Instance instance)
{
final boolean random = Rnd.nextBoolean();
// show text
final NpcStringId bossText = random ? STRING_ID_04 : STRING_ID_05;
sendScreenMessage(instance, bossText);
// spawn boss
final String bossTemplate = random ? "catLair_Boss_FelineKing" : "catLair_Boss_FelineQueen";
spawnNpcFromGroup(instance, bossTemplate);
}
private void setRandomTitles(Instance instance, boolean isAdditionalWave)
{
final List<Npc> selectedMonsters = new CopyOnWriteArrayList<>();
final List<Npc> instanceNpc = new CopyOnWriteArrayList<>(instance.getNpcs(MONSTERS));
if (isAdditionalWave)
{
final String npc3 = "CatLair_Monsters_03";
selectedMonsters.addAll(getNpcListByGroupName(new CopyOnWriteArrayList<>(instanceNpc), npc3));
}
else
{
Collections.shuffle(instanceNpc);
final String npc1 = "CatLair_Monsters_01";
final String npc2 = "CatLair_Monsters_02";
final String npc4 = "CatLair_Monsters_04";
final List<Npc> monsterNpc1 = new CopyOnWriteArrayList<>(getNpcListByGroupName(new CopyOnWriteArrayList<>(instanceNpc), npc1));
final List<Npc> monsterNpc2 = new CopyOnWriteArrayList<>(getNpcListByGroupName(new CopyOnWriteArrayList<>(instanceNpc), npc2));
final List<Npc> monsterNpc4 = new CopyOnWriteArrayList<>(getNpcListByGroupName(new CopyOnWriteArrayList<>(instanceNpc), npc4));
for (int index = 0; index < 2; index++)
{
final Npc monster = monsterNpc1.stream().findAny().orElse(null);
selectedMonsters.add(monster);
monsterNpc1.remove(monster);
}
for (int index = 0; index < 2; index++)
{
final Npc monster = monsterNpc2.stream().findAny().orElse(null);
selectedMonsters.add(monster);
monsterNpc2.remove(monster);
}
for (int index = 0; index < 2; index++)
{
final Npc monster = monsterNpc4.stream().findAny().orElse(null);
selectedMonsters.add(monster);
monsterNpc4.remove(monster);
}
}
for (Npc monster : selectedMonsters)
{
monster.setTitleString(DREAM_WATCHER);
monster.broadcastInfo();
}
}
private List<Npc> getNpcListByGroupName(CopyOnWriteArrayList<Npc> npcList, String groupName)
{
final List<Npc> newList = new ArrayList<>();
for (Npc monster : npcList)
{
if (isMonsterIsOneOfSpawnGroup(monster, groupName))
{
newList.add(monster);
}
}
return newList;
}
private static boolean isMonsterIsOneOfSpawnGroup(Npc npc, String group)
{
return (npc != null) && (npc.getSpawn() != null) && (npc.getSpawn().getNpcSpawnTemplate() != null) && (npc.getSpawn().getNpcSpawnTemplate().getGroup() != null) && (npc.getSpawn().getNpcSpawnTemplate().getGroup().getName() != null) && npc.getSpawn().getNpcSpawnTemplate().getGroup().getName().equalsIgnoreCase(group);
}
private void spawnNpcFromGroup(Instance instance, String group)
{
for (SpawnGroup spawnGroup : CAT_LAIR_SPAWN_GROUPS.get(group))
{
spawnGroup.spawnAll(instance);
}
}
@Override
public String onKill(Npc npc, Player killer, boolean isSummon)
{
if (killer == null)
{
return super.onKill(npc, killer, isSummon);
}
final Instance instance = killer.getInstanceWorld();
if ((instance == null) || (instance.getStatus() < CREATED))
{
return super.onKill(npc, killer, isSummon);
}
switch (instance.getStatus())
{
case KILL_FOUR_DREAM_WATCHERS_INSIDE:
{
if (instance.getAliveNpcs(MONSTERS).isEmpty())
{
instance.setStatus(TALK_WITH_ELVEN_ELDER_CAT);
break;
}
if ((npc.getTitleString() == null) || !npc.getTitleString().equals(DREAM_WATCHER))
{
return super.onKill(npc, killer, isSummon);
}
final int dreamWatcherCount = instance.getParameters().increaseInt(DREAM_WATCHER_COUNTER, 0, 1);
switch (dreamWatcherCount)
{
case 1:
{
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.DREAM_WATCHER_S_DEATH_1_4, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
break;
}
case 2:
{
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.DREAM_WATCHER_S_DEATH_2_4, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
break;
}
case 3:
{
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.DREAM_WATCHER_S_DEATH_3_4, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
break;
}
case 4:
{
instance.setStatus(TALK_WITH_ELVEN_ELDER_CAT);
break;
}
}
break;
}
case BOSS_FIGHT:
{
if ((npc.getTemplate().getId() == FELINE_KING) || (npc.getTemplate().getId() == FELINE_QUEEN))
{
instance.setStatus(FINISH_INSTANCE);
}
break;
}
}
return super.onKill(npc, killer, isSummon);
}
@Override
public void onInstanceEnter(Player player, Instance instance)
{
final int status = instance.getStatus();
if (status < CREATED)
{
return;
}
player.teleToLocation(START_LOCATION, false);
super.onInstanceEnter(player, instance);
}
public static void sendScreenMessage(Instance instance, NpcStringId stringId)
{
instance.broadcastPacket(new ExShowScreenMessage(stringId, ExShowScreenMessage.TOP_CENTER, 10000, true));
}
public static boolean calculateChanceForCatLair(Instance instance)
{
if (Rnd.get(100) < 25)
{
instance.setStatus(CREATED);
instance.spawnGroup("CatLair_TeleporterCat");
sendScreenMessage(instance, Rnd.nextBoolean() ? STRING_ID_01 : STRING_ID_02);
return true;
}
return false;
}
public static void startCatLairInstance(Player player)
{
final Instance instance = player.getInstanceWorld();
instance.setStatus(TALK_WITH_TELEPORTER_CAT);
player.teleToLocation(START_LOCATION, false);
}
private void init()
{
CAT_LAIR_INSTANCE = InstanceManager.getInstance().getInstanceTemplate(999999);
START_LOCATION = CAT_LAIR_INSTANCE.getEnterLocation();
for (SpawnTemplate grp : CAT_LAIR_INSTANCE.getSpawns())
{
for (SpawnGroup spawnGroup : grp.getGroups())
{
CAT_LAIR_SPAWN_GROUPS.computeIfAbsent(spawnGroup.getName(), v -> new ArrayList<>()).add(spawnGroup);
}
}
}
public static void main(String[] args)
{
new CatGuildsLair();
}
}

View File

@ -0,0 +1,62 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package instances.DreamDungeon.CatGuildsLair;
import java.util.ArrayList;
import java.util.List;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import ai.AbstractNpcAI;
/**
* @author Index
*/
public class ElvenElderCat extends AbstractNpcAI
{
private static final List<Integer> INSTANCE_IDS = new ArrayList<>(List.of(221, 222, 223, 224));
public static final int ELVEN_ELDER_CAT = 18677;
private ElvenElderCat()
{
addFirstTalkId(ELVEN_ELDER_CAT);
}
@Override
public String onFirstTalk(Npc npc, Player player)
{
final Instance instance = ((player == null) || (npc == null)) ? null : player.getInstanceWorld();
if ((instance == null) || !INSTANCE_IDS.contains(instance.getTemplateId()))
{
return super.onFirstTalk(npc, player);
}
if (instance.getStatus() == CatGuildsLair.TALK_WITH_ELVEN_ELDER_CAT)
{
instance.setStatus(CatGuildsLair.BOSS_FIGHT);
}
return super.onFirstTalk(npc, player);
}
public static void main(String[] args)
{
new ElvenElderCat();
}
}

View File

@ -0,0 +1,76 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package instances.DreamDungeon.CatGuildsLair;
import java.util.ArrayList;
import java.util.List;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import ai.AbstractNpcAI;
/**
* @author Index
*/
public class TeleporterCat extends AbstractNpcAI
{
private static final List<Integer> INSTANCE_IDS = new ArrayList<>(List.of(221, 222, 223, 224));
public static final int TELEPORTER_CAT_NPC_ID = 34316;
private TeleporterCat()
{
addFirstTalkId(TELEPORTER_CAT_NPC_ID);
}
@Override
public String onFirstTalk(Npc npc, Player player)
{
final Instance instance = ((player == null) || (npc == null)) ? null : player.getInstanceWorld();
if ((instance == null) || !INSTANCE_IDS.contains(instance.getTemplateId()))
{
return super.onFirstTalk(npc, player);
}
switch (instance.getStatus())
{
case CatGuildsLair.CREATED:
{
instance.setStatus(CatGuildsLair.TALK_WITH_TELEPORTER_CAT);
break;
}
case CatGuildsLair.TALK_WITH_TELEPORTER_CAT:
{
instance.setStatus(CatGuildsLair.KILL_FOUR_DREAM_WATCHERS_INSIDE);
break;
}
case CatGuildsLair.FINISH_INSTANCE:
{
instance.destroy();
break;
}
}
return super.onFirstTalk(npc, player);
}
public static void main(String[] args)
{
new TeleporterCat();
}
}

View File

@ -0,0 +1,317 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package instances.DreamDungeon.DraconidFortress;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArrayList;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceStatusChange;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import instances.AbstractInstance;
import instances.DreamDungeon.CatGuildsLair.CatGuildsLair;
/**
* @author Index
*/
public class DraconidFortress extends AbstractInstance
{
/** Instance World IDS */
public static final int CREATED = 0;
public static final int KILL_FOUR_DREAM_WATCHERS_INSIDE_FIRST_TIME = 1;
public static final int TALK_WITH_TRAITOR_FIRST_TIME = 2;
public static final int TALK_WITH_TRAITOR_SECOND_TIME = 3;
public static final int KILL_FOUR_DREAM_WATCHERS_INSIDE_SECOND_TIME = 4;
public static final int KILL_FOLLOWER = 5;
public static final int BOSS_FIGHT = 6;
public static final int FINISH_INSTANCE = 7;
public static final int INSTANCE_ID = 224;
private static final int[] MONSTERS =
{
22403, // Red Draconid Mage
22404, // Red Draconid Warrior
22405, // Red Draconid Hero
22406, // Red Draconid Lieutenant
};
private static final int RED_DRACONID_FOLLOWER_MONSTER_ID = 18676;
private static final int TIAD = 18684;
private static final int BAINT = 18685;
private static final String DREAM_WATCHER_COUNTER = "DREAM_WATCHER_COUNTER";
private static final NpcStringId DREAM_WATCHER = NpcStringId.DREAM_WATCHER;
private static final NpcStringId STRING_ID_01 = NpcStringId.HE_HE_YOU_WOULDN_T_BE_SCARED_BY_A_DEVIL_IT_SEEMS_SINCE_YOU_DARE_TO_SET_YOUR_FOOT_IN_HERE_HE_HE; // guess
private static final NpcStringId STRING_ID_02 = NpcStringId.WILL_YOU_TURN_BACK_OR_MOVE_FURTHER_HE_HE;
private static final NpcStringId STRING_ID_03 = NpcStringId.WELL_I_WAS_BORED_BEFORE_BUT_NOW_THE_THINGS_HAVE_TAKEN_A_COMPLETELY_DIFFERENT_TURN_PLEASE_COME_IN_DON_T_BE_SHY;
private static final NpcStringId STRING_ID_04 = NpcStringId.OH_MIGHTY_TIAT_OUR_ENEMIES_ARE_WEAKENED_IT_S_TIME_TO_DEFEAT_THEM_ONCE_AND_FOR_ALL;
private static final NpcStringId STRING_ID_05 = NpcStringId.OH_THOSE_POWERLESS_ADEN_WARRIORS_LET_S_FINISH_THEM_NOW_AND_MOVE_ON_THE_ADEN_CASTLE;
private static final NpcStringId STRING_ID_06 = NpcStringId.I_M_GOING_TO_ADEN_COMMANDER_ASSISTANT_FOLLOW_ME;
private static final NpcStringId STRING_ID_07 = NpcStringId.HE_HE_EXCELLENT_BUT_ARE_YOU_SURE_YOU_VE_WON_MAYBE_ALL_OF_THIS_IS_NOTHING_BUT_A_DREAM;
private static final int FIRST_DOOR = 12240030;
private static final int SECOND_DOOR = 12240031;
private static final int[] CLOSED_DOOR =
{
12240028,
12240029,
};
private DraconidFortress()
{
super(INSTANCE_ID);
addKillId(MONSTERS);
addKillId(RED_DRACONID_FOLLOWER_MONSTER_ID);
addKillId(TIAD, BAINT);
setInstanceStatusChangeId(this::onInstanceStatusChange, INSTANCE_ID);
}
public void onInstanceStatusChange(OnInstanceStatusChange event)
{
final Instance instance = event.getWorld();
switch (event.getStatus())
{
case KILL_FOUR_DREAM_WATCHERS_INSIDE_FIRST_TIME:
{
instance.setReenterTime();
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_01, ExShowScreenMessage.TOP_CENTER, 10_000, true));
instance.spawnGroup("DraconidMonsters");
instance.despawnGroup("DraconidNPC_1");
setRandomTitles(instance, true);
break;
}
case TALK_WITH_TRAITOR_FIRST_TIME:
{
instance.spawnGroup("DraconidNPC_2");
removeRandomTag(instance);
break;
}
case TALK_WITH_TRAITOR_SECOND_TIME:
{
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_02, ExShowScreenMessage.TOP_CENTER, 10_000, true));
instance.openCloseDoor(FIRST_DOOR, true);
instance.spawnGroup("DraconidMonsters_02");
instance.spawnGroup("DraconidNPC_3");
instance.despawnGroup("DraconidNPC_2");
break;
}
case KILL_FOUR_DREAM_WATCHERS_INSIDE_SECOND_TIME:
{
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_03, ExShowScreenMessage.TOP_CENTER, 10_000, true));
// use the same counter
instance.getParameters().set(DREAM_WATCHER_COUNTER, 0);
instance.openCloseDoor(SECOND_DOOR, true);
instance.spawnGroup("DraconidMonsters_03");
instance.despawnGroup("DraconidNPC_3");
setRandomTitles(instance, false);
break;
}
case KILL_FOLLOWER:
{
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_04, ExShowScreenMessage.TOP_CENTER, 10_000, true));
instance.spawnGroup("DraconidMonsters_04");
break;
}
case BOSS_FIGHT:
{
spawnBoss(instance);
break;
}
case FINISH_INSTANCE:
{
instance.setDuration(5);
instance.spawnGroup("DraconidNPC_4");
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_07, ExShowScreenMessage.TOP_CENTER, 10_000, true));
break;
}
}
}
private void spawnBoss(Instance instance)
{
final boolean random = Rnd.nextBoolean();
// show text
final NpcStringId bossText = random ? STRING_ID_05 : STRING_ID_06;
instance.broadcastPacket(new ExShowScreenMessage(bossText, ExShowScreenMessage.TOP_CENTER, 10000, true));
// spawn boss
final String bossTemplate = random ? "DraconidMonsters_BossTiad" : "DraconidMonsters_BossBaint";
instance.spawnGroup(bossTemplate).forEach(n -> n.getSpawn().stopRespawn());
}
private void removeRandomTag(Instance instance)
{
final List<Npc> monsterList = new CopyOnWriteArrayList<>(instance.getNpcsOfGroup("DraconidMonsters"));
for (Npc monster : monsterList)
{
if ((monster.getTitleString() != null) && monster.getTitleString().equals(DREAM_WATCHER))
{
(monster).doDie(null);
}
}
}
private void setRandomTitles(Instance instance, boolean isFirst)
{
final Set<Npc> randomNpcs = new HashSet<>();
final List<Npc> monsterList = new CopyOnWriteArrayList<>(isFirst ? instance.getNpcsOfGroup("DraconidMonsters") : instance.getNpcsOfGroup("DraconidMonsters_03"));
if (monsterList.isEmpty())
{
for (Player player : instance.getPlayers())
{
InstanceManager.getInstance().deleteInstanceTime(player, INSTANCE_ID);
}
instance.destroy();
return;
}
Collections.shuffle(monsterList);
for (Npc monster : monsterList)
{
if (randomNpcs.size() >= 4)
{
break;
}
randomNpcs.add(monster);
monsterList.remove(monster);
}
for (Npc monster : randomNpcs)
{
monster.setTitleString(DREAM_WATCHER);
monster.broadcastInfo();
}
monsterList.clear();
randomNpcs.clear();
}
@Override
public String onKill(Npc npc, Player killer, boolean isSummon)
{
if (killer == null)
{
return super.onKill(npc, killer, isSummon);
}
Instance instance = killer.getInstanceWorld();
if ((instance == null) || (instance.getTemplateId() != INSTANCE_ID))
{
return super.onKill(npc, killer, isSummon);
}
switch (instance.getStatus())
{
case KILL_FOUR_DREAM_WATCHERS_INSIDE_FIRST_TIME:
case KILL_FOUR_DREAM_WATCHERS_INSIDE_SECOND_TIME:
{
final int setStatus = instance.getStatus() == KILL_FOUR_DREAM_WATCHERS_INSIDE_FIRST_TIME ? TALK_WITH_TRAITOR_FIRST_TIME : KILL_FOLLOWER;
if (instance.getAliveNpcs(MONSTERS).isEmpty())
{
instance.setStatus(setStatus);
break;
}
if ((npc.getTitleString() == null) || !npc.getTitleString().equals(DREAM_WATCHER))
{
return super.onKill(npc, killer, isSummon);
}
final int dreamWatcherCount = instance.getParameters().increaseInt(DREAM_WATCHER_COUNTER, 0, 1);
switch (dreamWatcherCount)
{
case 1:
{
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.DREAM_WATCHER_S_DEATH_1_4_4, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
break;
}
case 2:
{
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.DREAM_WATCHER_S_DEATH_2_4_4, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
break;
}
case 3:
{
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.DREAM_WATCHER_S_DEATH_3_4_4, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
break;
}
case 4:
{
instance.setStatus(setStatus);
break;
}
}
break;
}
case KILL_FOLLOWER:
{
if (npc.getTemplate().getId() == RED_DRACONID_FOLLOWER_MONSTER_ID)
{
instance.setStatus(BOSS_FIGHT);
}
break;
}
case BOSS_FIGHT:
{
if ((npc.getTemplate().getId() == TIAD) || (npc.getTemplate().getId() == BAINT))
{
if (!CatGuildsLair.calculateChanceForCatLair(instance))
{
instance.setStatus(FINISH_INSTANCE);
}
}
break;
}
}
return super.onKill(npc, killer, isSummon);
}
@Override
public void onInstanceCreated(Instance instance, Player player)
{
// make sure all doors will be closed
final int instanceId = instance.getId();
closeDoor(FIRST_DOOR, instanceId);
closeDoor(SECOND_DOOR, instanceId);
closeDoor(CLOSED_DOOR[0], instanceId);
closeDoor(CLOSED_DOOR[1], instanceId);
getDoor(FIRST_DOOR, instanceId).broadcastInfo();
getDoor(SECOND_DOOR, instanceId).broadcastInfo();
getDoor(CLOSED_DOOR[0], instanceId).broadcastInfo();
getDoor(CLOSED_DOOR[1], instanceId).broadcastInfo();
/*
* instance.broadcastPacket(new StaticObject(getDoor(FIRST_DOOR, instanceId), false)); instance.broadcastPacket(new StaticObject(getDoor(SECOND_DOOR, instanceId), false));
*/
super.onInstanceCreated(instance, player);
}
public static void main(String[] args)
{
new DraconidFortress();
}
}

View File

@ -0,0 +1,77 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package instances.DreamDungeon.DraconidFortress;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import ai.AbstractNpcAI;
/**
* @author Index
*/
public class RedDraconidTraitor extends AbstractNpcAI
{
public static final int RED_DRACONIT_TRAITOR_NPC_ID = 34315;
private RedDraconidTraitor()
{
addFirstTalkId(RED_DRACONIT_TRAITOR_NPC_ID);
}
@Override
public String onFirstTalk(Npc npc, Player player)
{
final Instance instance = ((player == null) || (npc == null)) ? null : player.getInstanceWorld();
if ((instance == null) || (instance.getTemplateId() != DraconidFortress.INSTANCE_ID))
{
return super.onFirstTalk(npc, player);
}
switch (instance.getStatus())
{
case DraconidFortress.CREATED:
{
instance.setStatus(DraconidFortress.KILL_FOUR_DREAM_WATCHERS_INSIDE_FIRST_TIME);
break;
}
case DraconidFortress.TALK_WITH_TRAITOR_FIRST_TIME:
{
instance.setStatus(DraconidFortress.TALK_WITH_TRAITOR_SECOND_TIME);
break;
}
case DraconidFortress.TALK_WITH_TRAITOR_SECOND_TIME:
{
instance.setStatus(DraconidFortress.KILL_FOUR_DREAM_WATCHERS_INSIDE_SECOND_TIME);
break;
}
case DraconidFortress.FINISH_INSTANCE:
{
instance.destroy();
break;
}
}
return super.onFirstTalk(npc, player);
}
public static void main(String[] args)
{
new RedDraconidTraitor();
}
}

View File

@ -0,0 +1,7 @@
<html><title>Chat</title><body>Dream Priestess:<br>
<font color="LEVEL">You are going to enter as part of a group, not a command channel.</font><br>
In this case, there should be no more than 5 warriors in the group...<br>
It will be a difficult journey. Do you want to test your strength?<br>
<Button ALIGN="LEFT" ICON="NORMAL" action="bypass -h Quest DreamPriestess enter_dream_dungeon party_confirm">Enter the dream</button>
<Button ALIGN="LEFT" ICON="RETURN" action="bypass -h Quest DreamPriestess back">Back</button>
</body></html>

View File

@ -0,0 +1,10 @@
<html><title>Chat</title><body>Dream Priestess:<br>
Choose from the next options:<br>
<Button ALIGN="LEFT" ICON="NORMAL" action="bypass -h Quest DreamPriestess gm_dream_dungeon_reset">Reset cool down</button>
<Button ALIGN="LEFT" ICON="TELEPORT" action="bypass -h Quest DreamPriestess enter_dream_dungeon 221">Enter to Gustav's Manor</button>
<Button ALIGN="LEFT" ICON="TELEPORT" action="bypass -h Quest DreamPriestess enter_dream_dungeon 222">Enter to Benedict's Monastery</button>
<Button ALIGN="LEFT" ICON="TELEPORT" action="bypass -h Quest DreamPriestess enter_dream_dungeon 223">Enter to Ventus' Temple</button>
<Button ALIGN="LEFT" ICON="TELEPORT" action="bypass -h Quest DreamPriestess enter_dream_dungeon 224">Enter to Draconid Fortress</button>
<Button ALIGN="LEFT" ICON="TELEPORT" action="bypass -h Quest DreamPriestess enter_dream_dungeon -1000">Enter to Cat Guild's Lair</button>
<Button ALIGN="LEFT" ICON="RETURN" action="bypass -h Quest DreamPriestess back">Back</button>
</body></html>

View File

@ -0,0 +1,6 @@
<html><title>Chat</title><body>Dream Priestess:<br>
You're so confident. Are you really sure you can beat Dreamland monsters?<br>
Dreamland is not for loners.<br>
Gather a party or a command channel of <font color="LEVEL">2-10 people whose level is 76 or higher</font> and then come back.<br>
<Button ALIGN="LEFT" ICON="RETURN" action="bypass -h Quest DreamPriestess back">Back</button>
</body></html>

View File

@ -0,0 +1,9 @@
<html><title>Chat</title><body>Dream Priestess:<br>
Greetings! I am the Dream Priestess, and I'll be your guide in the Dreamland.<br>
I help those who are willing to enter the Dream Dungeon.<br>
But the journey there is dangerous. You have to gather <font color="LEVEL">a party</font> or <font color="LEVEL">a command channel</font> of 2-10 people whose level is <font color="LEVEL">76 or higher</font>. I won't let you in, otherwise.<br>
To prevent a potential invasion in the Dreamland, the Dream Dungeon gates are opened only once a week.<br>
Are you ready to go inside?<br>
<Button ALIGN="LEFT" ICON="NORMAL" action="bypass -h Quest DreamPriestess enter_dream_dungeon">Enter the dream</button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@ -0,0 +1,234 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package instances.DreamDungeon.DreamPriestess;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
import org.l2jmobius.gameserver.model.AbstractPlayerGroup;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
import instances.AbstractInstance;
import instances.DreamDungeon.CatGuildsLair.CatGuildsLair;
import instances.DreamDungeon.DraconidFortress.DraconidFortress;
/**
* @author Index
*/
public class DreamPriestess extends AbstractInstance
{
private static final Map<Integer, Set<Player>> PLAYER_LIST_TO_ENTER = new HashMap<>();
private static final List<Integer> INSTANCE_IDS = new ArrayList<>(List.of(221, 222, 223, 224));
private static final int DREAM_PRIESTESS = 34304;
private DreamPriestess()
{
super(0);
addCondMinLevel(76, DREAM_PRIESTESS + "-noreq.htm");
addFirstTalkId(DREAM_PRIESTESS);
addStartNpc(DREAM_PRIESTESS);
addTalkId(DREAM_PRIESTESS);
}
@Override
public String onFirstTalk(Npc npc, Player player)
{
return DREAM_PRIESTESS + ".htm";
}
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
if (player == null)
{
return super.onAdvEvent(event, npc, null);
}
if (event.startsWith("enter_dream_dungeon"))
{
final Instance currentInstance = InstanceManager.getInstance().getPlayerInstance(player, false);
if ((currentInstance != null) && INSTANCE_IDS.contains(currentInstance.getTemplateId()))
{
enterInstance(player, npc, currentInstance.getTemplateId());
return null;
}
// for don't call many methods
PLAYER_LIST_TO_ENTER.put(player.getObjectId(), new HashSet<>());
PLAYER_LIST_TO_ENTER.get(player.getObjectId()).add(player);
final int dungeonId;
if (player.isGM())
{
final String[] split = event.split(" ");
if (split.length <= 1)
{
PLAYER_LIST_TO_ENTER.remove(player.getObjectId());
return DREAM_PRIESTESS + "-gm.htm";
}
dungeonId = Integer.parseInt(split[1]);
if (dungeonId == 999999)
{
enterInstance(player, npc, DraconidFortress.INSTANCE_ID);
ThreadPool.schedule(() -> CatGuildsLair.startCatLairInstance(player), 5000);
return super.onAdvEvent(event, npc, player);
}
if (!INSTANCE_IDS.contains(dungeonId))
{
PLAYER_LIST_TO_ENTER.remove(player.getObjectId());
player.sendMessage("Wrong instance ID");
return DREAM_PRIESTESS + "-gm.htm";
}
}
else
{
dungeonId = INSTANCE_IDS.get(Rnd.get(1, INSTANCE_IDS.size()) - 1);
}
// zone not available in solo, but GM can enter
// zone will be work if comment this check
if (!player.isInParty() && !player.isGM())
{
PLAYER_LIST_TO_ENTER.remove(player.getObjectId());
return DREAM_PRIESTESS + "-noreq.htm";
}
if (!player.isInCommandChannel() && (event.split(" ").length == 1))
{
PLAYER_LIST_TO_ENTER.remove(player.getObjectId());
return DREAM_PRIESTESS + "-02.htm";
}
if (checkRequirementsForEnter(player))
{
PLAYER_LIST_TO_ENTER.remove(player.getObjectId());
return DREAM_PRIESTESS + "-noreq.htm";
}
if (InstanceManager.getInstance().getWorldCount(dungeonId) > InstanceManager.getInstance().getInstanceTemplate(dungeonId).getMaxWorlds())
{
PLAYER_LIST_TO_ENTER.remove(player.getObjectId());
player.sendPacket(SystemMessageId.THE_MAXIMUM_NUMBER_OF_INSTANCE_ZONES_HAS_BEEN_EXCEEDED_YOU_CANNOT_ENTER);
return DREAM_PRIESTESS + "-noreq.htm";
}
PLAYER_LIST_TO_ENTER.get(player.getObjectId()).forEach(p -> enterInstance(p, npc, dungeonId));
PLAYER_LIST_TO_ENTER.remove(player.getObjectId());
}
else if (event.equalsIgnoreCase("back"))
{
return DREAM_PRIESTESS + ".htm";
}
else if (event.equalsIgnoreCase("gm_dream_dungeon_reset") && player.isGM())
{
for (int instanceId : INSTANCE_IDS)
{
InstanceManager.getInstance().deleteInstanceTime(player, instanceId);
}
return DREAM_PRIESTESS + "-gm.htm";
}
return super.onAdvEvent(event, npc, player);
}
private static boolean checkRequirementsForEnter(Player requestor)
{
final AbstractPlayerGroup group = requestor.isInParty() ? requestor.getParty() : requestor.isInCommandChannel() ? requestor.getCommandChannel() : null;
if (group == null)
{
return checkInstanceStatus(requestor);
}
if (!group.isLeader(requestor))
{
return true;
}
if (requestor.isInParty() && (group.getMemberCount() < 2))
{
requestor.sendPacket(SystemMessageId.YOU_ARE_NOT_CURRENTLY_IN_A_PARTY_SO_YOU_CANNOT_ENTER);
return true;
}
if (requestor.isInCommandChannel() && (group.getMemberCount() > 10))
{
requestor.sendPacket(SystemMessageId.YOU_CANNOT_ENTER_DUE_TO_THE_PARTY_HAVING_EXCEEDED_THE_LIMIT);
return true;
}
for (Player player : group.getMembers())
{
if (player.getLevel() < 76)
{
requestor.sendPacket(new SystemMessage(SystemMessageId.C1_S_LEVEL_DOES_NOT_CORRESPOND_TO_THE_REQUIREMENTS_FOR_ENTRY).addPcName(player));
player.sendPacket(new SystemMessage(SystemMessageId.C1_S_LEVEL_DOES_NOT_CORRESPOND_TO_THE_REQUIREMENTS_FOR_ENTRY).addPcName(player));
return true;
}
if (checkInstanceStatus(player))
{
return true;
}
}
PLAYER_LIST_TO_ENTER.get(requestor.getObjectId()).addAll(group.getMembers());
return false;
}
private static boolean checkInstanceStatus(Player player)
{
final long currentTime = System.currentTimeMillis();
for (Integer instanceId : INSTANCE_IDS)
{
if (currentTime < InstanceManager.getInstance().getInstanceTime(player, instanceId))
{
player.sendPacket(new SystemMessage(SystemMessageId.C1_CANNOT_ENTER_YET).addString(player.getName()));
return true;
}
if (InstanceManager.getInstance().getPlayerInstance(player, true) != null)
{
player.sendPacket(new SystemMessage(SystemMessageId.SINCE_C1_ENTERED_ANOTHER_INSTANCE_ZONE_THEREFORE_YOU_CANNOT_ENTER_THIS_DUNGEON).addString(player.getName()));
return true;
}
if (InstanceManager.getInstance().getPlayerInstance(player, false) != null)
{
player.sendPacket(new SystemMessage(SystemMessageId.SINCE_C1_ENTERED_ANOTHER_INSTANCE_ZONE_THEREFORE_YOU_CANNOT_ENTER_THIS_DUNGEON).addString(player.getName()));
return true;
}
}
return false;
}
public static void main(String[] args)
{
new DreamPriestess();
}
}

View File

@ -0,0 +1,262 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package instances.DreamDungeon.GustavsManor;
import java.util.List;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceStatusChange;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import instances.AbstractInstance;
import instances.DreamDungeon.CatGuildsLair.CatGuildsLair;
/**
* @author Index
*/
public class GustavsManor extends AbstractInstance
{
/** Instance World IDS */
public static final int CREATED = 0;
public static final int GO_TO_GATES_AND_KILL_GIRL = 1;
public static final int TALK_WITH_RASCAL = 2;
public static final int KILL_FOUR_DREAM_WATCHERS_INSIDE = 3;
public static final int TALK_WITH_HORSIE_IN_MANOR = 4;
public static final int BOSS_FIGHT = 5;
public static final int FINISH_INSTANCE = 6;
public static final int INSTANCE_ID = 221;
private static final String DREAM_WATCHER_COUNTER = "DREAM_WATCHER_COUNTER";
private static final NpcStringId DREAM_WATCHER = NpcStringId.DREAM_WATCHER;
private static final NpcStringId STRING_ID_01 = NpcStringId.WHO_ARE_YOU_AND_HOW_DARE_YOU_ENTER_MY_MANOR;
private static final NpcStringId STRING_ID_02 = NpcStringId.I_WON_T_FORGIVE_YOU_FOR_INTRUDING_IN_GUSTAV_S_MANOR;
private static final NpcStringId STRING_ID_03 = NpcStringId.LEAVING_ALREADY_LET_S_PLAY_A_BIT_MORE;
private static final int[] MONSTERS =
{
22391, // Mansion Manager
22392, // Touchy Servant
22393, // Housekeeper
22394, // Cursed Girl
};
private static final int GUSTAV = 18678;
private static final int GUSTAV_STEWARD = 18679;
private static final int[] MAIN_DOOR_IDS =
{
21170001,
21170002,
21170005,
21170006,
21170003,
21170004,
};
private GustavsManor()
{
super(INSTANCE_ID);
addKillId(MONSTERS);
addKillId(GUSTAV, GUSTAV_STEWARD);
setInstanceStatusChangeId(this::onInstanceStatusChange, INSTANCE_ID);
}
public void onInstanceStatusChange(OnInstanceStatusChange event)
{
final Instance instance = event.getWorld();
final int status = event.getStatus();
switch (status)
{
case GO_TO_GATES_AND_KILL_GIRL:
{
instance.setReenterTime();
instance.despawnGroup("GustavNPC_1");
instance.spawnGroup("GustavNPC_2").forEach(n -> n.getSpawn().stopRespawn());
instance.spawnGroup("GustavMonsters_1").forEach(n -> n.getSpawn().stopRespawn());
break;
}
// case 2 - to talk with Rascal
case KILL_FOUR_DREAM_WATCHERS_INSIDE:
{
for (int doorId : MAIN_DOOR_IDS)
{
instance.openCloseDoor(doorId, true);
}
instance.despawnGroup("GustavNPC_2");
instance.spawnGroup("GustavMonsters_2").forEach(n -> n.getSpawn().stopRespawn());
setRandomTitles(instance, true);
break;
}
case TALK_WITH_HORSIE_IN_MANOR:
{
instance.getParameters().remove(DREAM_WATCHER_COUNTER);
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.HERE_IS_MY_HORSIE_LET_S_TAKE_A_BREAK, ExShowScreenMessage.TOP_CENTER, 10000, true));
ThreadPool.schedule(() ->
{
for (Npc npc : instance.getNpcs(MONSTERS))
{
npc.getSpawn().stopRespawn();
npc.doDie(null);
}
instance.spawnGroup("GustavNPC_3").forEach(n -> n.getSpawn().stopRespawn());
}, 10000);
break;
}
case BOSS_FIGHT:
{
instance.despawnGroup("GustavNPC_3");
spawnBoss(instance);
break;
}
case FINISH_INSTANCE:
{
instance.setDuration(5);
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_03, ExShowScreenMessage.TOP_CENTER, 10000, true));
instance.spawnGroup("GustavNPC_4").forEach(n -> n.getSpawn().stopRespawn());
break;
}
}
}
private void spawnBoss(Instance instance)
{
final boolean random = Rnd.nextBoolean();
// show text
final NpcStringId bossText = random ? STRING_ID_01 : STRING_ID_02;
instance.broadcastPacket(new ExShowScreenMessage(bossText, ExShowScreenMessage.TOP_CENTER, 10000, true));
// spawn boss
final String bossTemplate = random ? "GustavMonsters_Boss_Gustav" : "GustavMonsters_Boss_GustavSteward";
instance.spawnGroup(bossTemplate).forEach(n -> n.getSpawn().stopRespawn());
}
private void setRandomTitles(Instance instance, boolean randomMonsters)
{
if (randomMonsters)
{
for (int monsterId : MONSTERS)
{
// final Npc monster = instance.getNpcsOfGroup("GustavMonsters_2").stream().filter(npc -> npc.getTemplate().getId() == monsterId).findAny().orElse(instance.getNpc(monsterId));
final List<Npc> monsters = instance.getNpcsOfGroup("GustavMonsters_2").stream().filter(npc -> npc.getTemplate().getId() == monsterId).toList();
final Npc monster = monsters.isEmpty() ? instance.getNpc(monsterId) : monsters.get(Rnd.get(1, monsters.size()) - 1);
monster.setTitleString(DREAM_WATCHER);
monster.broadcastInfo();
}
}
else
{
final List<Npc> dreamWatcherNpcs = instance.spawnGroup("GustavMonsters_3");
dreamWatcherNpcs.forEach(n -> n.getSpawn().stopRespawn());
for (Npc npc : dreamWatcherNpcs)
{
npc.setTitleString(DREAM_WATCHER);
npc.broadcastInfo();
}
}
}
@Override
public String onKill(Npc npc, Player killer, boolean isSummon)
{
if (killer == null)
{
return super.onKill(npc, killer, isSummon);
}
final Instance instance = killer.getInstanceWorld();
if ((instance == null) || (instance.getTemplateId() != INSTANCE_ID))
{
return super.onKill(npc, killer, isSummon);
}
switch (instance.getStatus())
{
case GO_TO_GATES_AND_KILL_GIRL:
{
if (instance.getAliveNpcs(MONSTERS).isEmpty())
{
instance.setStatus(TALK_WITH_RASCAL);
}
// just guess
else if (npc.getTemplate().getId() == 22394)
{
instance.setStatus(TALK_WITH_RASCAL);
}
break;
}
case KILL_FOUR_DREAM_WATCHERS_INSIDE:
{
if (instance.getAliveNpcs(MONSTERS).isEmpty())
{
instance.setStatus(TALK_WITH_HORSIE_IN_MANOR);
break;
}
if ((npc.getTitleString() == null) || !npc.getTitleString().equals(DREAM_WATCHER))
{
return super.onKill(npc, killer, isSummon);
}
final int dreamWatcherCount = instance.getParameters().increaseInt(DREAM_WATCHER_COUNTER, 0, 1);
switch (dreamWatcherCount)
{
case 1:
{
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.DREAM_WATCHER_S_DEATH_1_4, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
break;
}
case 2:
{
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.DREAM_WATCHER_S_DEATH_2_4, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
break;
}
case 3:
{
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.DREAM_WATCHER_S_DEATH_3_4, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
break;
}
case 4:
{
instance.setStatus(TALK_WITH_HORSIE_IN_MANOR);
break;
}
}
break;
}
case BOSS_FIGHT:
{
if ((npc.getTemplate().getId() == GUSTAV) || (npc.getTemplate().getId() == GUSTAV_STEWARD))
{
if (!CatGuildsLair.calculateChanceForCatLair(instance))
{
instance.setStatus(FINISH_INSTANCE);
}
}
break;
}
}
return super.onKill(npc, killer, isSummon);
}
public static void main(String[] args)
{
new GustavsManor();
}
}

View File

@ -0,0 +1,87 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package instances.DreamDungeon.GustavsManor;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import ai.AbstractNpcAI;
/**
* @author Index
*/
public class Rascal extends AbstractNpcAI
{
private static final int RASCAL_NPC_ID = 34312;
// NPC STRINGS
private static final NpcStringId STRING_ID_01 = NpcStringId.MASTER_GUSTAV_TOOK_MY_HORSIE;
private static final NpcStringId STRING_ID_02 = NpcStringId.THE_HORSIE_IS_IN_THE_MANOR_I_WILL_OPEN_THE_DOORS_AND_WE_LL_GO_IN_AND_PLAY;
private Rascal()
{
addFirstTalkId(RASCAL_NPC_ID);
}
@Override
public String onFirstTalk(Npc npc, Player player)
{
final Instance instance = ((player == null) || (npc == null)) ? null : player.getInstanceWorld();
if ((instance == null) || (instance.getTemplateId() != GustavsManor.INSTANCE_ID))
{
return super.onFirstTalk(npc, player);
}
switch (instance.getStatus())
{
case GustavsManor.CREATED:
{
instance.setStatus(GustavsManor.GO_TO_GATES_AND_KILL_GIRL);
// Master Gustav took my horsie.
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_01, ExShowScreenMessage.TOP_CENTER, 10000, true));
break;
}
case GustavsManor.GO_TO_GATES_AND_KILL_GIRL:
{
return super.onFirstTalk(npc, player);
}
case GustavsManor.TALK_WITH_RASCAL:
{
instance.setStatus(GustavsManor.KILL_FOUR_DREAM_WATCHERS_INSIDE);
// The horsie is in the manor. I will open the doors and we'll go in and play.
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_02, ExShowScreenMessage.TOP_CENTER, 10000, true));
break;
}
case GustavsManor.FINISH_INSTANCE:
{
// instance.getPlayers().forEach(p -> p.sendPacket(new TimedHuntingZoneExit(0)));
instance.destroy();
break;
}
}
return super.onFirstTalk(npc, player);
}
public static void main(String[] args)
{
new Rascal();
}
}

View File

@ -0,0 +1,58 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package instances.DreamDungeon.GustavsManor;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import ai.AbstractNpcAI;
/**
* @author Index
*/
public class WoodHorse extends AbstractNpcAI
{
private static final int WOOD_HORSE_NPC_ID = 18673;
private WoodHorse()
{
addFirstTalkId(WOOD_HORSE_NPC_ID);
}
@Override
public String onFirstTalk(Npc npc, Player player)
{
final Instance instance = ((player == null) || (npc == null)) ? null : player.getInstanceWorld();
if ((instance == null) || (instance.getTemplateId() != GustavsManor.INSTANCE_ID))
{
return super.onFirstTalk(npc, player);
}
if (instance.getStatus() == GustavsManor.TALK_WITH_HORSIE_IN_MANOR)
{
instance.setStatus(GustavsManor.BOSS_FIGHT);
}
return super.onFirstTalk(npc, player);
}
public static void main(String[] args)
{
new WoodHorse();
}
}

View File

@ -0,0 +1,83 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package instances.DreamDungeon.VentusTemple;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import ai.AbstractNpcAI;
/**
* @author Index
*/
public class BrokenBallista extends AbstractNpcAI
{
private static final int BROKEN_BALLISTA_NPC_ID = 18675;
private BrokenBallista()
{
addSpawnId(BROKEN_BALLISTA_NPC_ID);
addFirstTalkId(BROKEN_BALLISTA_NPC_ID);
}
@Override
public String onSpawn(Npc npc)
{
final Instance instance = npc == null ? null : npc.getInstanceWorld();
if ((instance == null) || (instance.getTemplateId() != VentusTemple.INSTANCE_ID))
{
return super.onSpawn(npc);
}
if ((instance.getStatus() == VentusTemple.SHOOT_FROM_BALLISTA) && (npc != null))
{
npc.setRandomAnimation(true);
}
return super.onSpawn(npc);
}
@Override
public String onFirstTalk(Npc npc, Player player)
{
if ((player == null) || (npc == null))
{
return super.onFirstTalk(npc, player);
}
final Instance instance = player.getInstanceWorld();
if ((instance == null) || (instance.getTemplateId() != VentusTemple.INSTANCE_ID))
{
return super.onFirstTalk(npc, player);
}
if (instance.getStatus() == VentusTemple.SHOOT_FROM_BALLISTA)
{
instance.setStatus(VentusTemple.BOSS_FIGHT);
npc.setTargetable(false);
player.setTarget(null);
}
return super.onFirstTalk(npc, player);
}
public static void main(String[] args)
{
new BrokenBallista();
}
}

View File

@ -0,0 +1,97 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package instances.DreamDungeon.VentusTemple;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import ai.AbstractNpcAI;
/**
* @author Index
*/
public class VentusMaid extends AbstractNpcAI
{
public static final int VENTUS_MAID_NPC_ID = 34314;
private VentusMaid()
{
addFirstTalkId(VENTUS_MAID_NPC_ID);
addCreatureSeeId(VENTUS_MAID_NPC_ID);
}
@Override
public String onFirstTalk(Npc npc, Player player)
{
final Instance instance = ((player == null) || (npc == null)) ? null : player.getInstanceWorld();
if ((instance == null) || (instance.getTemplateId() != VentusTemple.INSTANCE_ID))
{
return super.onFirstTalk(npc, player);
}
switch (instance.getStatus())
{
case VentusTemple.TALK_WITH_VANTUS_MAID_ON_CREATE:
{
instance.setStatus(VentusTemple.KILL_FOUR_DREAM_WATCHERS_INSIDE);
break;
}
case VentusTemple.TALK_WITH_VENTUS_MAID_FOR_RESPAWN_BALLISTA:
{
instance.setStatus(VentusTemple.SHOOT_FROM_BALLISTA);
break;
}
case VentusTemple.FINISH_INSTANCE:
{
instance.destroy();
break;
}
}
return super.onFirstTalk(npc, player);
}
@Override
public String onCreatureSee(Npc npc, Creature creature)
{
if (((creature == null) || !creature.isPlayer() || (npc == null)))
{
return super.onCreatureSee(npc, creature);
}
final Instance instance = creature.getInstanceWorld();
if ((instance == null) || (instance.getTemplateId() != VentusTemple.INSTANCE_ID))
{
return super.onCreatureSee(npc, creature);
}
if (instance.getStatus() == VentusTemple.GO_TO_VENTUS_ROOM)
{
npc.setUndying(true);
instance.setStatus(VentusTemple.SAVE_VENTUS_MAID_IN_VENTUS_ROOM);
}
return super.onCreatureSee(npc, creature);
}
public static void main(String[] args)
{
new VentusMaid();
}
}

View File

@ -0,0 +1,382 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package instances.DreamDungeon.VentusTemple;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.ScheduledFuture;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.instance.Monster;
import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceStatusChange;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import instances.AbstractInstance;
import instances.DreamDungeon.CatGuildsLair.CatGuildsLair;
/**
* @author Index
*/
public class VentusTemple extends AbstractInstance
{
/** Instance World IDS */
public static final int CREATED = 0;
public static final int TALK_WITH_VANTUS_MAID_ON_CREATE = 1;
public static final int KILL_FOUR_DREAM_WATCHERS_INSIDE = 2;
public static final int GO_TO_VENTUS_ROOM = 3;
public static final int SAVE_VENTUS_MAID_IN_VENTUS_ROOM = 4;
public static final int TALK_WITH_VENTUS_MAID_FOR_RESPAWN_BALLISTA = 5;
public static final int SHOOT_FROM_BALLISTA = 6;
public static final int BOSS_FIGHT = 7;
public static final int FINISH_INSTANCE = 8;
public static final int INSTANCE_ID = 223;
private static final int[] MONSTERS =
{
22399, // Ancient Swordsman
22400, // Ancient Thrower
22401, // Ancient Guard
22402, // Ancient Guard Captain
};
private static final int VENTUS = 18682;
private static final int REKARIO = 18683;
private static final String FIRST_STRING_TIMER = "FIRST_STRING_TIMER";
private static final String DREAM_WATCHER_COUNTER = "DREAM_WATCHER_COUNTER";
private static final String MONSTERS_ATTACK_MAID_COUNTER = "MONSTERS_ATTACK_MAID_COUNTER";
private static final NpcStringId DREAM_WATCHER = NpcStringId.DREAM_WATCHER;
private static final NpcStringId STRING_ID_01 = NpcStringId.I_HATE_THAT_CURSED_ARROGANT_VENTUS_YOU_GO_AHEAD_AND_GET_TO_THE_TEMPLE_OF_VENTUS;
private static final NpcStringId STRING_ID_02 = NpcStringId.FIRST_DEAL_WITH_THOSE_ENSLAVED_BY_VENTUS;
private static final NpcStringId STRING_ID_03 = NpcStringId.THIS_SCOUNDREL_IS_GOING_TO_SUBJUGATE_THE_OTHERS_WILL_USING_DARK_MAGIC_TRICKS;
private static final NpcStringId STRING_ID_04 = NpcStringId.USE_THE_BALLISTA_TO_DESTROY_VENTUS_STATUE;
private static final NpcStringId STRING_ID_05 = NpcStringId.I_VE_BEEN_HAVING_SUCH_A_NICE_DREAM_BUT_SOMEONE_HAS_INTERRUPTED_IT_DO_YOU_KNOW_WHAT_PRICE_YOU_LL_HAVE_TO_PAY_FOR_WAKING_ME_UP;
private static final NpcStringId STRING_ID_06 = NpcStringId.MASTER_VENTUS_DON_T_YOU_WORRY_I_LL_DEAL_WITH_IT_MYSELF;
private static final NpcStringId STRING_ID_07 = NpcStringId.OH_VENTUS_HAUGHTY_VENTUS_I_WISH_IT_WERE_NOT_A_DREAM;
private VentusTemple()
{
super(INSTANCE_ID);
addKillId(MONSTERS);
addKillId(VENTUS, REKARIO);
addAttackId(MONSTERS);
setInstanceStatusChangeId(this::onInstanceStatusChange, INSTANCE_ID);
}
public void onInstanceStatusChange(OnInstanceStatusChange event)
{
final Instance instance = event.getWorld();
final int status = event.getStatus();
switch (status)
{
case CREATED:
{
instance.setStatus(TALK_WITH_VANTUS_MAID_ON_CREATE);
// send screen message if player will not talk with Holy Grail's Raider
// I hate that cursed arrogant Ventus! You go ahead and get to the Temple of Ventus.
final ScheduledFuture<?> showFirstStringOnScreen = ThreadPool.schedule(() -> instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_01, ExShowScreenMessage.TOP_CENTER, 10000, true)), 10000);
instance.getParameters().set(FIRST_STRING_TIMER, showFirstStringOnScreen);
break;
}
// case TALK_WITH_VANTUS_MAID_ON_CREATE:
case KILL_FOUR_DREAM_WATCHERS_INSIDE:
{
getScheduleMessageAndMakeAction(instance);
instance.setReenterTime();
instance.despawnGroup("VentusNPC_1");
instance.spawnGroup("VentusMonsters").forEach(npc -> npc.getSpawn().stopRespawn());
instance.spawnGroup("VentusDreamMonsters_01").forEach(npc -> npc.getSpawn().stopRespawn());
ThreadPool.schedule(() -> setRandomTitles(instance), 500);
break;
}
case GO_TO_VENTUS_ROOM:
{
instance.spawnGroup("VentusNPC_2").forEach(npc -> npc.getSpawn().stopRespawn());
instance.spawnGroup("VentusMonsters_2").forEach(npc -> npc.getSpawn().stopRespawn()); // for avoid spawn by CreatureSee event
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_03, ExShowScreenMessage.TOP_CENTER, 10000, true));
break;
}
case SAVE_VENTUS_MAID_IN_VENTUS_ROOM:
{
// spawn monsters who will be attack maid
final List<Npc> maidAttackers = instance.getNpcsOfGroup("VentusMonsters_2");
maidAttackers.forEach(npc -> npc.getSpawn().stopRespawn());
// start attack maid
addDesireToAttack(instance, instance.getNpc(VentusMaid.VENTUS_MAID_NPC_ID));
// add count of monsters who attack maid
instance.getParameters().set(MONSTERS_ATTACK_MAID_COUNTER, -(maidAttackers.size()));
break;
}
case SHOOT_FROM_BALLISTA:
{
instance.despawnGroup("VentusNPC_2");
instance.spawnGroup("VentusNPC_3").forEach(npc -> npc.getSpawn().stopRespawn());
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_04, ExShowScreenMessage.TOP_CENTER, 10000, true));
break;
}
case BOSS_FIGHT:
{
ThreadPool.schedule(() ->
{
instance.despawnGroup("VentusNPC_3");
spawnBoss(instance);
}, 2500);
break;
}
case FINISH_INSTANCE:
{
instance.setDuration(5);
instance.spawnGroup("VentusNPC_4");
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_07, ExShowScreenMessage.TOP_CENTER, 10000, true));
break;
}
}
}
private void spawnBoss(Instance instance)
{
final boolean random = Rnd.nextBoolean();
// show text
final NpcStringId bossText = random ? STRING_ID_05 : STRING_ID_06;
instance.broadcastPacket(new ExShowScreenMessage(bossText, ExShowScreenMessage.TOP_CENTER, 10000, true));
// spawn boss
final String bossTemplate = random ? "VentusBoss_Ventus" : "VentusBoss_Rekario";
instance.spawnGroup(bossTemplate).forEach(n -> n.getSpawn().stopRespawn());
}
private void setRandomTitles(Instance instance)
{
final int maxDreamerMonsters = 6;
final Set<Npc> randomNpcs = new HashSet<>();
final List<Npc> monsters = new CopyOnWriteArrayList<>(instance.getNpcs(22402)); // get all captains
if (monsters.isEmpty())
{
for (Player player : instance.getPlayers())
{
InstanceManager.getInstance().deleteInstanceTime(player, INSTANCE_ID);
}
instance.destroy();
return;
}
Collections.shuffle(monsters);
for (Npc monster : monsters)
{
if (randomNpcs.size() >= maxDreamerMonsters)
{
break;
}
if (monsters.size() <= maxDreamerMonsters)
{
if (randomNpcs.isEmpty())
{
randomNpcs.addAll(monsters);
}
if (randomNpcs.size() < 4) // min instance count
{
while (randomNpcs.size() <= maxDreamerMonsters)
{
final Npc finalMonster = monsters.get(Rnd.get(1, monsters.size()) - 1);
randomNpcs.add(finalMonster);
monsters.remove(finalMonster);
}
}
break;
}
if (Rnd.get(100) < 35)
{
randomNpcs.add(monster);
}
else if (isMonsterIsOneOfSpawnGroup(monster, true))
{
monster.deleteMe();
}
monsters.remove(monster);
}
for (Npc monster : randomNpcs)
{
monster.setTitleString(DREAM_WATCHER);
monster.broadcastInfo();
}
monsters.clear();
randomNpcs.clear();
}
@Override
public String onAttack(Npc npc, Player attacker, int damage, boolean isSummon)
{
if (attacker == null)
{
return super.onAttack(npc, attacker, damage, isSummon);
}
final Instance instance = attacker.getInstanceWorld();
if ((instance == null) || (instance.getTemplateId() == 0))
{
return super.onAttack(npc, attacker, damage, isSummon);
}
if (isMonsterIsOneOfSpawnGroup(npc, false))
{
if ((npc.getTarget() != null) && npc.getTarget().isPlayer())
{
return super.onAttack(npc, attacker, damage, isSummon);
}
addDesireToAttack(instance, attacker);
}
return super.onAttack(npc, attacker, damage, isSummon);
}
@Override
public String onKill(Npc npc, Player killer, boolean isSummon)
{
if (killer == null)
{
return super.onKill(npc, killer, isSummon);
}
final Instance instance = killer.getInstanceWorld();
if ((instance == null) || (instance.getTemplateId() == 0))
{
return super.onKill(npc, killer, isSummon);
}
switch (instance.getStatus())
{
case KILL_FOUR_DREAM_WATCHERS_INSIDE:
{
if (instance.getAliveNpcs(MONSTERS).isEmpty())
{
instance.setStatus(GO_TO_VENTUS_ROOM);
break;
}
if ((npc.getTitleString() == null) || !npc.getTitleString().equals(DREAM_WATCHER))
{
return super.onKill(npc, killer, isSummon);
}
final int dreamWatcherCount = instance.getParameters().increaseInt(DREAM_WATCHER_COUNTER, 0, 1);
switch (dreamWatcherCount)
{
case 1:
{
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.DREAM_WATCHER_S_DEATH_1_4_2, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
break;
}
case 2:
{
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.DREAM_WATCHER_S_DEATH_2_4_2, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
break;
}
case 3:
{
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.DREAM_WATCHER_S_DEATH_3_4_2, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
break;
}
case 4:
{
instance.setStatus(GO_TO_VENTUS_ROOM);
break;
}
}
break;
}
case SAVE_VENTUS_MAID_IN_VENTUS_ROOM:
{
if (isMonsterIsOneOfSpawnGroup(npc, false) && (instance.getParameters().increaseInt(MONSTERS_ATTACK_MAID_COUNTER, 0, 1) >= 0))
{
instance.setStatus(TALK_WITH_VENTUS_MAID_FOR_RESPAWN_BALLISTA);
break;
}
break;
}
case BOSS_FIGHT:
{
if ((npc.getTemplate().getId() == VENTUS) || (npc.getTemplate().getId() == REKARIO))
{
if (!CatGuildsLair.calculateChanceForCatLair(instance))
{
instance.setStatus(FINISH_INSTANCE);
}
}
break;
}
}
return super.onKill(npc, killer, isSummon);
}
private static boolean isMonsterIsOneOfSpawnGroup(Npc npc, boolean isDream)
{
final String group = isDream ? "VentusDreamMonsters_01" : "VentusMonsters_2";
return (npc != null) && (npc.getSpawn() != null) && (npc.getSpawn().getNpcSpawnTemplate() != null) && (npc.getSpawn().getNpcSpawnTemplate().getGroup() != null) && (npc.getSpawn().getNpcSpawnTemplate().getGroup().getName() != null) && npc.getSpawn().getNpcSpawnTemplate().getGroup().getName().equalsIgnoreCase(group);
}
private void addDesireToAttack(Instance instance, Creature target)
{
final List<Npc> monsterAttackers = instance.getNpcsOfGroup("VentusMonsters_2");
for (Npc monster : monsterAttackers)
{
((Monster) monster).addDamageHate(target, 0, target.isNpc() ? 1 : 2);
addAttackDesire(monster, target);
}
}
private static void getScheduleMessageAndMakeAction(Instance instance)
{
// make sure message is shown (if will not - send) and trying remove it from memory
ScheduledFuture<?> showFirstStringOnScreen = instance.getParameters().getObject(FIRST_STRING_TIMER, ScheduledFuture.class, null);
if ((showFirstStringOnScreen == null) || !showFirstStringOnScreen.isDone())
{
if (showFirstStringOnScreen != null)
{
showFirstStringOnScreen.cancel(true);
showFirstStringOnScreen = null;
}
// First deal with those enslaved by Ventus. // guess
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_02, ExShowScreenMessage.TOP_CENTER, 10000, true));
}
if ((showFirstStringOnScreen != null) && showFirstStringOnScreen.isDone())
{
showFirstStringOnScreen.cancel(true);
showFirstStringOnScreen = null;
}
instance.getParameters().remove(FIRST_STRING_TIMER);
}
public static void main(String[] args)
{
new VentusTemple();
}
}

View File

@ -135,6 +135,7 @@
<npc id="31658" x="181264" y="36640" z="-4789" heading="25000" respawnTime="60sec" /> <!-- Tablet Of Vision -->
<npc id="31688" x="147688" y="28527" z="-2264" heading="38406" respawnTime="60sec" /> <!-- Saige - Olympiad Manager -->
<npc id="31690" x="147648" y="28599" z="-2264" heading="40508" respawnTime="60sec" /> <!-- Monument of Heroes -->
<npc id="34304" x="147354" y="27813" z="-2270" heading="14903" respawnTime="60sec" /> <!-- Dream Priestess -->
<npc id="30767" x="148009" y="28603" z="-2264" heading="52880" respawnTime="60sec"> <!-- Auctioneer -->
<parameters>
<param name="fnAgitMap" value="aden" />

View File

@ -1802,7 +1802,7 @@
<height normal="0.1" />
</collision>
</npc>
<npc id="18673" level="83" type="Monster" name="Wood Horse">
<npc id="18673" level="83" type="Folk" name="Wood Horse">
<!-- AUTO GENERATED NPC TODO: FIX IT -->
<race>ETC</race>
<sex>MALE</sex>
@ -1825,7 +1825,7 @@
<skill id="4416" level="19" /> <!-- Others -->
</skillList>
</npc>
<npc id="18674" level="83" type="Monster" name="Holy Grail">
<npc id="18674" level="83" type="Folk" name="Holy Grail">
<!-- AUTO GENERATED NPC TODO: FIX IT -->
<race>ETC</race>
<sex>MALE</sex>
@ -1848,7 +1848,7 @@
<skill id="4416" level="19" /> <!-- Others -->
</skillList>
</npc>
<npc id="18675" level="83" type="Monster" name="Broken Ballista">
<npc id="18675" level="83" type="Folk" name="Broken Ballista">
<!-- AUTO GENERATED NPC TODO: FIX IT -->
<race>ETC</race>
<sex>MALE</sex>
@ -1891,7 +1891,7 @@
<skill id="4416" level="10" /> <!-- Dragons -->
</skillList>
</npc>
<npc id="18677" level="83" type="Monster" name="Elven Elder Cat">
<npc id="18677" level="83" type="Folk" name="Elven Elder Cat">
<!-- AUTO GENERATED NPC TODO: FIX IT -->
<race>ANIMAL</race>
<sex>MALE</sex>

View File

@ -149,6 +149,7 @@ Vanguard: https://eu.4game.com/patchnotes/lineage2essence/387/
-New enchant system
-World exchange system
-Chest and box auto-use
-Dream Dungeon
Customs:
-Newbie Helper NPC location info

View File

@ -0,0 +1,149 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="222" name="Benedicts Monastery" maxWorlds="80" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/instance.xsd">
<time duration="60" empty="60" eject="60" />
<locations>
<enter type="FIXED">
<location x="115903" y="-80918" z="-43" />
</enter>
<exit type="ORIGIN" />
</locations>
<conditions>
<condition type="GroupMin">
<param name="limit" value="2" />
</condition>
<condition type="GroupMax">
<param name="limit" value="10" />
</condition>
<condition type="Level">
<param name="min" value="76" />
<param name="max" value="99" />
</condition>
<condition type="Reenter" />
</conditions>
<reenter apply="ON_FINISH">
<reset day="WEDNESDAY" hour="6" minute="30" />
</reenter>
<doorlist>
<door id="23150003">
<openStatus default="close" />
</door>
<door id="23150004">
<openStatus default="close" />
</door>
</doorlist>
<spawnlist>
<group name="BenedictNPC_1"> <!-- instance start -->
<npc id="34313" x="117370" y="-80573" z="-43" heading="49895" respawnTime="0sec" /> <!-- Holy Grail's Raider -->
</group>
<group name="BenedictNPC_2" spawnByDefault="false"> <!-- close to break bridge -->
<npc id="34313" x="112783" y="-79020" z="59" heading="49511" respawnTime="0sec" /> <!-- Holy Grail's Raider -->
</group>
<group name="BenedictNPC_3" spawnByDefault="false"> <!-- in gabriell room -->
<npc id="18674" x="112799" y="-76509" z="94" heading="15229" respawnTime="0sec" /> <!-- Holy Grail -->
</group>
<group name="CatLair_TeleporterCat" spawnByDefault="false">
<npc id="34316" x="112800" y="-75950" z="0" heading="49511" respawnTime="0sec" /> <!-- Teleporter Cat -->
</group>
<group name="BenedictMonsters" spawnByDefault="false">
<npc id="22395" x="117409" y="-77929" z="-69" heading="12067" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="117310" y="-77858" z="-75" heading="41810" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="117187" y="-77954" z="-75" heading="38709" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="117108" y="-78059" z="-75" heading="49419" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="117275" y="-78140" z="-75" heading="57117" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="117356" y="-77567" z="-75" heading="7276" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="117307" y="-77364" z="-75" heading="19388" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="117189" y="-77552" z="-75" heading="44910" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="117062" y="-77663" z="-73" heading="44086" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="117247" y="-77645" z="-75" heading="7408" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="117522" y="-77617" z="-61" heading="3491" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="117401" y="-77688" z="-75" heading="38498" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="117387" y="-76635" z="-75" heading="12333" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="117308" y="-76522" z="-75" heading="37282" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="117056" y="-76543" z="-75" heading="31943" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="117195" y="-76445" z="-75" heading="53202" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="117450" y="-76208" z="-75" heading="5208" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="117310" y="-76107" z="-75" heading="34692" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="117119" y="-76261" z="-75" heading="42461" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="117050" y="-76364" z="-75" heading="45055" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="117458" y="-76398" z="-75" heading="48069" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="117298" y="-76287" z="-75" heading="40159" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="117212" y="-76159" z="-75" heading="25546" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="117097" y="-75975" z="-75" heading="24216" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="117122" y="-75749" z="-75" heading="18470" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="117208" y="-75807" z="-75" heading="59327" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="117360" y="-75989" z="-75" heading="54822" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="117395" y="-75778" z="-75" heading="15538" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="117344" y="-75581" z="-71" heading="21299" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="117173" y="-75636" z="-75" heading="36268" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="117355" y="-74094" z="-43" heading="13048" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="117378" y="-74501" z="-43" heading="49069" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="116903" y="-74645" z="-43" heading="33998" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="116695" y="-74121" z="-43" heading="20372" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="116230" y="-74059" z="-43" heading="31496" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="116033" y="-74422" z="-43" heading="40176" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="115765" y="-74660" z="-43" heading="39354" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="115776" y="-74067" z="-43" heading="16357" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="116517" y="-74422" z="-43" heading="58702" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="115729" y="-75755" z="-67" heading="43224" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="115864" y="-75766" z="-75" heading="65163" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="115891" y="-75612" z="-75" heading="14162" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="115989" y="-75668" z="-75" heading="59277" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="116224" y="-75912" z="-64" heading="55671" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="115932" y="-76021" z="-72" heading="23561" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="115742" y="-76004" z="-64" heading="33501" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="116011" y="-75879" z="-75" heading="4944" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="116161" y="-76214" z="-75" heading="57737" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="115955" y="-76179" z="-75" heading="31110" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="115647" y="-76160" z="-52" heading="32450" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="115838" y="-76340" z="-74" heading="58124" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="116052" y="-76352" z="-75" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="116112" y="-76019" z="-75" heading="11273" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="115992" y="-76058" z="-75" heading="46093" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="115822" y="-76043" z="-75" heading="31569" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="115861" y="-76228" z="-75" heading="54476" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="116036" y="-76125" z="-75" heading="18939" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="116131" y="-75719" z="-75" heading="14402" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="115777" y="-77305" z="-75" heading="14744" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="116025" y="-77365" z="-75" heading="56039" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="116106" y="-77430" z="-75" heading="59402" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="116142" y="-77716" z="-73" heading="48478" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="116137" y="-78059" z="-75" heading="48978" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="116072" y="-78313" z="-75" heading="48188" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="115857" y="-78311" z="-75" heading="32670" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="115780" y="-78018" z="-75" heading="17717" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="115790" y="-77827" z="-75" heading="13991" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="115789" y="-77475" z="-75" heading="19705" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="115918" y="-77451" z="-75" heading="64866" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="116002" y="-77562" z="-75" heading="55908" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="116050" y="-77761" z="-75" heading="51620" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="115889" y="-77848" z="-75" heading="37250" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="116034" y="-78025" z="-75" heading="61754" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="115877" y="-78220" z="-75" heading="37776" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="115984" y="-78266" z="-75" heading="11483" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="116176" y="-77869" z="-75" heading="7751" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="115720" y="-78249" z="-66" heading="40770" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="115929" y="-78067" z="-75" heading="65362" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="115801" y="-77679" z="-75" heading="28583" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="115847" y="-77531" z="-75" heading="16194" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="116205" y="-77677" z="-67" heading="60569" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="114953" y="-79347" z="-43" heading="15194" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="114694" y="-79322" z="-43" heading="32127" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="114321" y="-79447" z="-43" heading="37231" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="114519" y="-79929" z="-43" heading="53217" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="114429" y="-80330" z="-43" heading="48392" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="114551" y="-80667" z="-43" heading="57617" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="114938" y="-80838" z="-43" heading="61379" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22397" x="114883" y="-80495" z="-43" heading="23251" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="114637" y="-80229" z="-43" heading="25411" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22395" x="114771" y="-79938" z="-43" heading="10535" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22396" x="114746" y="-79581" z="-43" heading="20813" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
<npc id="22398" x="114986" y="-80115" z="-43" heading="49923" respawnTime="0sec" /> <!-- Guardian Angel of the Holy Grail -->
</group>
<group name="BenedictMonsters_Boss_Gabriel" spawnByDefault="false">
<npc id="18680" x="112800" y="-75950" z="0" heading="49511" respawnTime="0sec" /> <!-- Gabriel -->
</group>
<group name="BenedictMonsters_Boss_GabrielMinion" spawnByDefault="false">
<npc id="18681" x="112800" y="-75950" z="0" heading="49511" respawnTime="0sec" /> <!-- Gabriel Minion -->
</group>
</spawnlist>
</instance>

View File

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="999999" name="Cat Guild's Lair" maxWorlds="80" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/instance.xsd">
<locations>
<enter type="FIXED">
<location x="105464" y="55000" z="-4417" />
</enter>
</locations>
<spawnlist>
<group name="CatLair_Npc_01" spawnByDefault="true">
</group>
<group name="CatLair_Npc_02" spawnByDefault="false">
<npc id="18677" x="102712" y="59832" z="-3744" heading="52819" /> <!-- Elven Elder Cat -->
</group>
<group name="CatLair_Npc_03" spawnByDefault="true">
<npc id="34316" x="102704" y="59883" z="-3728" heading="49871" /> <!-- Teleporter Cat -->
</group>
<group name="CatLair_Monsters_01" spawnByDefault="false">
<territories>
<territory minZ="-3850" maxZ="-4000">
<node x="105000" y="57224" />
<node x="104984" y="57672" />
<node x="104996" y="58568" />
<node x="104264" y="59176" />
<node x="103816" y="58952" />
<node x="104000" y="58000" />
<node x="104600" y="56936" />
</territory>
</territories>
<npc id="22407" count="6" /> <!-- Cat Fighter -->
<npc id="22408" count="6" /> <!-- Cat Mage -->
<npc id="22409" count="6" /> <!-- Cat Warrior -->
<npc id="22410" count="6" /> <!-- Cat Warlock -->
</group>
<group name="CatLair_Monsters_02" spawnByDefault="false">
<territories>
<territory minZ="-3850" maxZ="-4200">
<node x="103704" y="57096" />
<node x="102408" y="56552" />
<node x="102936" y="55736" />
<node x="103960" y="56184" />
<node x="104200" y="56940" />
</territory>
</territories>
<npc id="22407" count="6" /> <!-- Cat Fighter -->
<npc id="22408" count="6" /> <!-- Cat Mage -->
<npc id="22409" count="6" /> <!-- Cat Warrior -->
<npc id="22410" count="6" /> <!-- Cat Warlock -->
</group>
<group name="CatLair_Monsters_03" spawnByDefault="false">
<npc id="22407" x="104232" y="58280" z="-3760" heading="0" /> <!-- Cat Fighter -->
<npc id="22408" x="104408" y="57592" z="-3760" heading="0" /> <!-- Cat Mage -->
<npc id="22409" x="104776" y="57656" z="-3760" heading="0" /> <!-- Cat Warrior -->
<npc id="22410" x="104728" y="58296" z="-3760" heading="0" /> <!-- Cat Warlock -->
</group>
<group name="CatLair_Monsters_04" spawnByDefault="false">
<territories>
<territory minZ="-3650" maxZ="-3850">
<node x="103413" y="59814" />
<node x="102248" y="59688" />
<node x="102200" y="59064" />
<node x="102712" y="58936" />
<node x="103272" y="59336" />
</territory>
</territories>
<npc id="22407" count="6" /> <!-- Cat Fighter -->
<npc id="22408" count="6" /> <!-- Cat Mage -->
<npc id="22409" count="6" /> <!-- Cat Warrior -->
<npc id="22410" count="6" /> <!-- Cat Warlock -->
</group>
<group name="catLair_Boss_FelineKing" spawnByDefault="false">
<npc id="18686" x="102704" y="59883" z="-3728" heading="49871" /> <!-- Feline King -->
</group>
<group name="catLair_Boss_FelineQueen" spawnByDefault="false">
<npc id="18687" x="102704" y="59883" z="-3728" heading="49871" /> <!-- Feline Queen -->
</group>
</spawnlist>
</instance>

View File

@ -0,0 +1,168 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="224" name="DraconidFortress" maxWorlds="80" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/instance.xsd">
<time duration="60" empty="60" eject="60" />
<locations>
<enter type="FIXED">
<location x="-250260" y="220057" z="-12451" />
</enter>
<exit type="ORIGIN" />
</locations>
<conditions>
<condition type="GroupMin">
<param name="limit" value="2" />
</condition>
<condition type="GroupMax">
<param name="limit" value="10" />
</condition>
<condition type="Level">
<param name="min" value="76" />
<param name="max" value="99" />
</condition>
<condition type="Reenter" />
</conditions>
<reenter apply="ON_FINISH">
<reset day="WEDNESDAY" hour="6" minute="30" />
</reenter>
<doorlist>
<door id="12240028">
<openStatus default="close" />
</door>
<door id="12240029">
<openStatus default="close" />
</door>
<door id="12240030">
<openStatus default="close" />
</door>
<door id="12240031">
<openStatus default="close" />
</door>
</doorlist>
<spawnlist>
<group name="DraconidNPC_1">
<npc id="34315" x="-250639" y="219976" z="-12436" heading="64496" respawnTime="3700sec" /> <!-- Red Draconid Traitor -->
</group>
<group name="DraconidNPC_2" spawnByDefault="false">
<npc id="34315" x="-251445" y="214792" z="-11987" heading="15086" respawnTime="3700sec" /> <!-- Red Draconid Traitor -->
</group>
<group name="DraconidNPC_3" spawnByDefault="false">
<npc id="34315" x="-251445" y="212316" z="-11987" heading="15086" respawnTime="3700sec" /> <!-- Red Draconid Traitor -->
</group>
<group name="DraconidNPC_4" spawnByDefault="false">
<npc id="34315" x="-250410" y="209272" z="-11952" heading="49625" respawnTime="0sec" /> <!-- Red Draconid Traitor -->
</group>
<group name="CatLair_TeleporterCat" spawnByDefault="false">
<npc id="34316" x="-250410" y="209272" z="-11952" heading="49625" respawnTime="0sec" /> <!-- Teleporter Cat -->
</group>
<group name="DraconidMonsters" spawnByDefault="false">
<npc id="22403" x="-250861" y="217564" z="-12292" heading="62119" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-250632" y="217607" z="-12291" heading="64067" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-250503" y="217438" z="-12292" heading="37535" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-250662" y="217399" z="-12292" heading="31662" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-250782" y="217401" z="-12292" heading="42312" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-250952" y="217568" z="-12292" heading="18965" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-250396" y="217630" z="-12286" heading="5283" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-250394" y="217392" z="-12292" heading="39805" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-252073" y="217599" z="-12293" heading="29203" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-252330" y="217596" z="-12293" heading="32912" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-252390" y="217457" z="-12292" heading="50329" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-252201" y="217378" z="-12292" heading="55345" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-251953" y="217411" z="-12292" heading="64106" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-251790" y="217527" z="-12293" heading="10323" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-251949" y="217691" z="-12277" heading="26547" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-252204" y="217495" z="-12292" heading="34961" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-252632" y="216540" z="-12250" heading="61500" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-252780" y="216586" z="-12250" heading="29674" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-253048" y="216466" z="-12250" heading="30164" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-253000" y="216320" z="-12251" heading="52144" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-252741" y="216250" z="-12250" heading="62495" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-252971" y="216495" z="-12250" heading="28799" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-252836" y="216414" z="-12250" heading="59814" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-252554" y="216421" z="-12250" heading="61958" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-250321" y="216518" z="-12250" heading="39237" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-250275" y="216656" z="-12251" heading="22295" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-249969" y="216717" z="-12251" heading="2058" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-249741" y="216615" z="-12251" heading="59803" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-249875" y="216361" z="-12251" heading="45796" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-250060" y="216436" z="-12250" heading="25681" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-250059" y="216600" z="-12250" heading="10933" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-249905" y="216492" z="-12250" heading="33600" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-251294" y="216684" z="-12251" heading="19254" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-251491" y="216732" z="-12250" heading="31096" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-251685" y="216705" z="-12251" heading="34555" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-251657" y="216572" z="-12250" heading="54536" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22404" x="-251496" y="216532" z="-12251" heading="62633" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22406" x="-251486" y="216385" z="-12251" heading="48596" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-251323" y="216505" z="-12251" heading="6684" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-251410" y="216632" z="-12251" heading="15536" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
</group>
<group name="DraconidMonsters_02" spawnByDefault="false">
<npc id="22403" x="-251751" y="212892" z="-12085" heading="1770" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-251583" y="212900" z="-12081" heading="65233" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-251554" y="213110" z="-12069" heading="14000" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-251351" y="213051" z="-12069" heading="61111" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-251120" y="212812" z="-12085" heading="61543" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-250998" y="212996" z="-12085" heading="12678" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-251043" y="213127" z="-12085" heading="21342" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-251248" y="212901" z="-12082" heading="38956" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
</group>
<group name="DraconidMonsters_03" spawnByDefault="false">
<npc id="22403" x="-251160" y="209701" z="-11957" heading="36535" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-251231" y="209450" z="-11958" heading="46903" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-251019" y="209386" z="-11958" heading="63714" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-250832" y="209579" z="-11958" heading="9482" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-250947" y="209714" z="-11957" heading="17308" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-250964" y="209563" z="-11957" heading="50422" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-251215" y="209568" z="-11957" heading="35000" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-251035" y="209815" z="-11959" heading="2665" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-251239" y="208477" z="-11959" heading="47759" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-251102" y="208230" z="-11960" heading="8718" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-250915" y="208464" z="-11957" heading="9556" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-250961" y="208641" z="-11957" heading="18642" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-251128" y="208725" z="-11959" heading="33494" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-251088" y="208467" z="-11961" heading="50864" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-251020" y="208352" z="-11957" heading="52861" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-251212" y="208343" z="-11958" heading="15815" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-251216" y="207452" z="-11957" heading="49027" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-251097" y="207242" z="-11957" heading="54841" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-250933" y="207357" z="-11957" heading="6356" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-250997" y="207607" z="-11958" heading="26977" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-251115" y="207609" z="-11957" heading="32367" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-251109" y="207411" z="-11963" heading="49467" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-250971" y="207483" z="-11957" heading="5015" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-251202" y="207337" z="-11957" heading="36027" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-249730" y="207247" z="-11957" heading="39738" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-249554" y="207445" z="-11957" heading="16383" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-249812" y="207561" z="-11957" heading="31659" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-249909" y="207401" z="-11957" heading="45766" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-249748" y="207368" z="-11963" heading="12691" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-249681" y="207531" z="-11957" heading="8291" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-249792" y="207501" z="-11958" heading="36279" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-249555" y="207276" z="-11958" heading="52104" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-249583" y="208522" z="-11957" heading="17023" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-249745" y="208648" z="-11957" heading="36736" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-249921" y="208481" z="-11957" heading="47924" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-249824" y="208332" z="-11957" heading="56617" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-249693" y="208354" z="-11957" heading="10630" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-249708" y="208507" z="-11963" heading="18442" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-249820" y="208439" z="-11957" heading="38038" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-249622" y="208622" z="-11957" heading="6880" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-249581" y="209575" z="-11957" heading="15704" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-249781" y="209740" z="-11957" heading="25896" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-249898" y="209529" z="-11957" heading="50512" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-249750" y="209406" z="-11957" heading="61086" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
<npc id="22403" x="-249667" y="209516" z="-11961" heading="3146" respawnTime="3700sec" /> <!-- Red Draconid Mage -->
<npc id="22404" x="-249822" y="209647" z="-11957" heading="26201" respawnTime="3700sec" /> <!-- Red Draconid Warrior -->
<npc id="22405" x="-249778" y="209546" z="-11962" heading="1297" respawnTime="3700sec" /> <!-- Red Draconid Hero -->
<npc id="22406" x="-249641" y="209700" z="-11957" heading="8479" respawnTime="3700sec" /> <!-- Red Draconid Lieutenant -->
</group>
<group name="DraconidMonsters_04" spawnByDefault="false">
<npc id="18676" x="-250402" y="207166" z="-11954" heading="16383" respawnTime="3700sec" /> <!-- Red Draconid Follower -->
</group>
<group name="DraconidMonsters_BossTiad" spawnByDefault="false">
<npc id="18684" x="-250410" y="209272" z="-11952" heading="49625" respawnTime="0sec" /> <!-- Tiad -->
</group>
<group name="DraconidMonsters_BossBaint" spawnByDefault="false">
<npc id="18685" x="-250410" y="209272" z="-11952" heading="49625" respawnTime="0sec" /> <!-- Baint -->
</group>
</spawnlist>
</instance>

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="221" name="Gustavs Manor" maxWorlds="80" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/instance.xsd">
<time duration="60" empty="60" eject="60" />
<locations>
<enter type="FIXED">
<location x="57987" y="-32295" z="295" />
</enter>
<exit type="ORIGIN" />
</locations>
<conditions>
<condition type="GroupMin">
<param name="limit" value="2" />
</condition>
<condition type="GroupMax">
<param name="limit" value="10" />
</condition>
<condition type="Level">
<param name="min" value="76" />
<param name="max" value="99" />
</condition>
<condition type="Reenter" />
</conditions>
<reenter apply="ON_FINISH">
<reset day="WEDNESDAY" hour="6" minute="30" />
</reenter>
<doorlist>
<door id="21170001" />
<door id="21170002" />
<door id="21170005" />
<door id="21170006" />
<door id="21170003" />
<door id="21170004" />
</doorlist>
<spawnlist>
<group name="GustavNPC_1"> <!-- on spawn -->
<npc id="34312" x="58106" y="-32039" z="303" heading="47518" respawnTime="0sec" /> <!-- Rascal -->
</group>
<group name="GustavNPC_2" spawnByDefault="false"> <!-- near gates -->
<npc id="34312" x="57820" y="-29562" z="571" heading="49913" respawnTime="0sec" /> <!-- Rascal -->
</group>
<group name="GustavNPC_3" spawnByDefault="false">
</group>
<group name="GustavNPC_4" spawnByDefault="false">
<npc id="34312" x="58520" y="-27499" z="580" heading="32420" respawnTime="0sec" /> <!-- Rascal -->
</group>
<group name="CatLair_TeleporterCat" spawnByDefault="false">
<npc id="34316" x="58520" y="-27499" z="580" heading="32420" respawnTime="0sec" /> <!-- Teleporter Cat -->
</group>
<group name="GustavMonsters_1" spawnByDefault="false"> <!-- near gates -->
<npc id="22391" x="57951" y="-30279" z="499" heading="49524" respawnTime="0sec" /> <!-- Mansion Manager -->
<npc id="22393" x="58321" y="-30138" z="499" heading="49577" respawnTime="0sec" /> <!-- Housekeeper -->
<npc id="22392" x="58244" y="-29957" z="506" heading="49151" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22392" x="58123" y="-29715" z="570" heading="48603" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22394" x="57756" y="-30171" z="499" heading="48351" respawnTime="0sec" /> <!-- Cursed Girl -->
<npc id="22391" x="57541" y="-30302" z="453" heading="47093" respawnTime="0sec" /> <!-- Mansion Manager -->
<npc id="22392" x="57792" y="-29821" z="570" heading="48688" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22393" x="57963" y="-29759" z="570" heading="48688" respawnTime="0sec" /> <!-- Housekeeper -->
</group>
<group name="GustavMonsters_2" spawnByDefault="false"> <!-- inside manor -->
<npc id="22391" x="57538" y="-28430" z="568" heading="58032" respawnTime="0sec" /> <!-- Mansion Manager -->
<npc id="22392" x="57400" y="-28650" z="568" heading="44348" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22393" x="57438" y="-28910" z="568" heading="3213" respawnTime="0sec" /> <!-- Housekeeper -->
<npc id="22391" x="57100" y="-29280" z="568" heading="41472" respawnTime="0sec" /> <!-- Mansion Manager -->
<npc id="22392" x="57202" y="-29566" z="568" heading="51966" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22391" x="56966" y="-28961" z="568" heading="13670" respawnTime="0sec" /> <!-- Mansion Manager -->
<npc id="22391" x="56774" y="-28333" z="568" heading="24012" respawnTime="0sec" /> <!-- Mansion Manager -->
<npc id="22393" x="56795" y="-28137" z="568" heading="52507" respawnTime="0sec" /> <!-- Housekeeper -->
<npc id="22394" x="57101" y="-28587" z="568" heading="45595" respawnTime="0sec" /> <!-- Cursed Girl -->
<npc id="22394" x="57240" y="-28997" z="568" heading="56700" respawnTime="0sec" /> <!-- Cursed Girl -->
<npc id="22392" x="57425" y="-28234" z="568" heading="31162" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22392" x="58548" y="-28938" z="568" heading="1154" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22393" x="58734" y="-29185" z="568" heading="54811" respawnTime="0sec" /> <!-- Housekeeper -->
<npc id="22394" x="58994" y="-29222" z="568" heading="2422" respawnTime="0sec" /> <!-- Cursed Girl -->
<npc id="22391" x="59069" y="-28918" z="568" heading="16751" respawnTime="0sec" /> <!-- Mansion Manager -->
<npc id="22392" x="59240" y="-28587" z="568" heading="8314" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22391" x="58961" y="-28411" z="568" heading="27607" respawnTime="0sec" /> <!-- Mansion Manager -->
<npc id="22394" x="58507" y="-28565" z="568" heading="38196" respawnTime="0sec" /> <!-- Cursed Girl -->
<npc id="22394" x="58321" y="-28872" z="568" heading="43838" respawnTime="0sec" /> <!-- Cursed Girl -->
<npc id="22393" x="58362" y="-28410" z="568" heading="14281" respawnTime="0sec" /> <!-- Housekeeper -->
<npc id="22392" x="58635" y="-28437" z="568" heading="64805" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22392" x="58819" y="-28888" z="568" heading="52565" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22391" x="59231" y="-26650" z="568" heading="14114" respawnTime="0sec" /> <!-- Mansion Manager -->
<npc id="22392" x="59030" y="-26629" z="568" heading="31682" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22393" x="58809" y="-26816" z="568" heading="36779" respawnTime="0sec" /> <!-- Housekeeper -->
<npc id="22394" x="58832" y="-26552" z="568" heading="16190" respawnTime="0sec" /> <!-- Cursed Girl -->
<npc id="22392" x="59034" y="-26428" z="568" heading="65034" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22392" x="59126" y="-26805" z="568" heading="39337" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22391" x="57130" y="-26536" z="575" heading="26265" respawnTime="0sec" /> <!-- Mansion Manager -->
<npc id="22392" x="56868" y="-26549" z="568" heading="35866" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22393" x="56687" y="-26737" z="568" heading="49151" respawnTime="0sec" /> <!-- Housekeeper -->
<npc id="22394" x="56893" y="-26771" z="568" heading="1265" respawnTime="0sec" /> <!-- Cursed Girl -->
<npc id="22391" x="57095" y="-26782" z="568" heading="14880" respawnTime="0sec" /> <!-- Mansion Manager -->
<npc id="22393" x="57107" y="-26454" z="568" heading="22853" respawnTime="0sec" /> <!-- Housekeeper -->
<npc id="22392" x="57210" y="-26608" z="568" heading="55111" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22391" x="58084" y="-26169" z="594" heading="65220" respawnTime="0sec" /> <!-- Mansion Manager -->
<npc id="22392" x="58247" y="-25960" z="594" heading="11646" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22394" x="58025" y="-25878" z="594" heading="30473" respawnTime="0sec" /> <!-- Cursed Girl -->
<npc id="22391" x="57806" y="-26018" z="594" heading="38847" respawnTime="0sec" /> <!-- Mansion Manager -->
<npc id="22392" x="57720" y="-26216" z="594" heading="36903" respawnTime="0sec" /> <!-- Touchy Servant -->
<npc id="22391" x="57550" y="-25939" z="594" heading="21599" respawnTime="0sec" /> <!-- Mansion Manager -->
<npc id="22391" x="57198" y="-27259" z="580" heading="55991" respawnTime="0sec" /> <!-- Mansion Manager -->
<npc id="22393" x="57195" y="-27569" z="580" heading="48826" respawnTime="0sec" /> <!-- Housekeeper -->
<npc id="22394" x="57207" y="-27775" z="580" heading="49813" respawnTime="0sec" /> <!-- Cursed Girl -->
<npc id="22392" x="57228" y="-27528" z="580" heading="15583" respawnTime="0sec" /> <!-- Touchy Servant -->
</group>
<group name="GustavMonsters_3" spawnByDefault="false">
<npc id="22394" x="58223" y="-25997" z="597" heading="36645" /> <!-- Cursed Girl -->
<npc id="22393" x="58951" y="-26742" z="571" heading="51106" /> <!-- Housekeeper -->
<npc id="22392" x="56993" y="-26440" z="571" heading="42979" /> <!-- Touchy Servant -->
<npc id="22391" x="56752" y="-26936" z="571" heading="5911" /> <!-- Mansion Manager -->
</group>
<group name="GustavMonsters_Boss_Gustav" spawnByDefault="false">
<npc id="18678" x="58032" y="-27507" z="583" heading="0" /> <!-- Gustav -->
</group>
<group name="GustavMonsters_Boss_GustavSteward" spawnByDefault="false">
<npc id="18679" x="58032" y="-27507" z="583" heading="0" /> <!-- Gustav Steward -->
</group>
</spawnlist>
</instance>

View File

@ -0,0 +1,167 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="223" name="Ventus Temple" maxWorlds="80" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/instance.xsd">
<time duration="60" empty="60" eject="60" />
<locations>
<enter type="FIXED">
<location x="217511" y="47841" z="-8547" />
</enter>
<exit type="ORIGIN" />
</locations>
<conditions>
<condition type="GroupMin">
<param name="limit" value="2" />
</condition>
<condition type="GroupMax">
<param name="limit" value="10" />
</condition>
<condition type="Level">
<param name="min" value="76" />
<param name="max" value="99" />
</condition>
<condition type="Reenter" />
</conditions>
<reenter apply="ON_FINISH">
<reset day="WEDNESDAY" hour="6" minute="30" />
</reenter>
<spawnlist>
<group name="VentusNPC_1">
<npc id="34314" x="217507" y="48249" z="-8515" heading="49329" respawnTime="3700sec" /> <!-- Ventus' Maid -->
</group>
<group name="VentusNPC_2" spawnByDefault="false">
<npc id="34314" x="213022" y="51933" z="-8419" heading="49660" respawnTime="60sec" /> <!-- Ventus' Maid -->
</group>
<group name="VentusNPC_3" spawnByDefault="false">
<npc id="18675" x="213024" y="51048" z="-8410" heading="49258" respawnTime="60sec" /> <!-- Broken Ballista -->
</group>
<group name="VentusNPC_4" spawnByDefault="false">
<npc id="34314" x="213022" y="50456" z="-8400" heading="16383" respawnTime="60sec" /> <!-- Ventus' Maid -->
</group>
<group name="CatLair_TeleporterCat" spawnByDefault="false">
<npc id="34316" x="213022" y="50456" z="-8400" heading="16383" respawnTime="0sec" /> <!-- Teleporter Cat -->
</group>
<group name="VentusMonsters" spawnByDefault="false">
<npc id="22401" x="217793" y="49345" z="-8515" heading="49541" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22401" x="217655" y="49343" z="-8515" heading="49936" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22401" x="217503" y="49346" z="-8515" heading="49276" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22401" x="217350" y="49335" z="-8515" heading="50343" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22401" x="217216" y="49346" z="-8515" heading="49528" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22399" x="217231" y="49490" z="-8516" heading="46249" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="217356" y="49460" z="-8515" heading="49764" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="217507" y="49427" z="-8515" heading="45116" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="217766" y="49485" z="-8515" heading="43240" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="217651" y="49439" z="-8515" heading="50126" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22400" x="217309" y="49542" z="-8515" heading="47997" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22400" x="217449" y="49545" z="-8515" heading="52192" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22400" x="217566" y="49545" z="-8515" heading="47854" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22400" x="217684" y="49517" z="-8515" heading="50632" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22401" x="217828" y="52283" z="-8583" heading="49556" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22401" x="217701" y="52272" z="-8580" heading="50237" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22401" x="217504" y="52274" z="-8580" heading="48647" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22401" x="217601" y="52278" z="-8580" heading="49741" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22401" x="217412" y="52284" z="-8580" heading="48177" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22401" x="217299" y="52269" z="-8580" heading="47769" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22401" x="217182" y="52276" z="-8583" heading="49151" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22399" x="217188" y="52393" z="-8583" heading="47831" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="217293" y="52372" z="-8580" heading="50201" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="217461" y="52349" z="-8580" heading="49031" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="217600" y="52354" z="-8580" heading="49088" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="217720" y="52344" z="-8579" heading="49151" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="217832" y="52347" z="-8583" heading="47041" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22400" x="217189" y="52490" z="-8583" heading="49458" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22400" x="217335" y="52491" z="-8580" heading="48058" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22400" x="217475" y="52484" z="-8580" heading="47188" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22400" x="217603" y="52468" z="-8580" heading="48815" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22400" x="217749" y="52478" z="-8581" heading="51384" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22401" x="214786" y="54881" z="-8675" heading="64238" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22401" x="214787" y="54675" z="-8675" heading="121" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22401" x="214802" y="54510" z="-8675" heading="64735" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22399" x="214673" y="54509" z="-8675" heading="1369" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="214700" y="54676" z="-8675" heading="826" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="214698" y="54879" z="-8675" heading="1722" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22400" x="214621" y="54892" z="-8675" heading="63660" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22400" x="214627" y="54671" z="-8675" heading="63255" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22400" x="214604" y="54500" z="-8675" heading="1645" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22399" x="212897" y="54514" z="-8675" heading="64792" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="212904" y="54609" z="-8675" heading="61025" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="212909" y="54710" z="-8675" heading="61355" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="212830" y="54616" z="-8675" heading="60607" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="212833" y="54704" z="-8675" heading="65131" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="212831" y="54812" z="-8675" heading="65006" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="212834" y="54511" z="-8675" heading="1046" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="212923" y="54808" z="-8675" heading="1057" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22400" x="211068" y="54688" z="-8675" heading="2555" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22400" x="211068" y="54546" z="-8675" heading="65048" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22400" x="211067" y="54833" z="-8675" heading="64545" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22401" x="211002" y="54831" z="-8675" heading="60" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22401" x="211002" y="54690" z="-8675" heading="65305" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22401" x="211005" y="54550" z="-8675" heading="546" respawnTime="3700sec" /> <!-- Ancient Guard -->
<!--
</group>
<group name="VentusDreamMonsters" spawnByDefault="false" >
-->
<npc id="22402" x="210909" y="54547" z="-8675" heading="267" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="210903" y="54687" z="-8675" heading="64600" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="210903" y="54830" z="-8675" heading="89" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="210601" y="54424" z="-8672" heading="49092" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="210585" y="54891" z="-8671" heading="15949" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="211924" y="54457" z="-8675" heading="12620" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="211923" y="54839" z="-8675" heading="49862" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
</group>
<group name="VentusDreamMonsters_01" spawnByDefault="false">
<npc id="22402" x="216990" y="49410" z="-8528" heading="48647" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="216990" y="50300" z="-8528" heading="48647" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="218010" y="49410" z="-8528" heading="48647" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="218010" y="50300" z="-8528" heading="48647" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<!--
</group>
<group name="VentusDreamMonsters_02" spawnByDefault="false" >
-->
<npc id="22402" x="216990" y="52120" z="-8593" heading="48647" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="216990" y="52350" z="-8593" heading="48647" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="218010" y="52120" z="-8593" heading="48647" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="218010" y="52350" z="-8593" heading="48647" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<!--
</group>
<group name="VentusDreamMonsters_03" spawnByDefault="false" >
-->
<npc id="22402" x="214700" y="54230" z="-8672" heading="267" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="214700" y="55070" z="-8672" heading="267" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="214300" y="54230" z="-8672" heading="267" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="214300" y="55070" z="-8672" heading="267" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="215080" y="55070" z="-8672" heading="267" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="215080" y="54280" z="-8672" heading="267" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<!--
</group>
<group name="VentusDreamMonsters_04" spawnByDefault="false" >
-->
<npc id="22402" x="212480" y="54655" z="-8685" heading="267" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="213216" y="54655" z="-8685" heading="267" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<!--
</group>
<group name="VentusDreamMonsters_05" spawnByDefault="false" >
-->
<npc id="22402" x="214700" y="54230" z="-8672" heading="267" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="214700" y="55070" z="-8672" heading="267" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="214300" y="54230" z="-8672" heading="267" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="214300" y="55070" z="-8672" heading="267" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="215080" y="55070" z="-8672" heading="267" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="215080" y="54280" z="-8672" heading="267" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
</group>
<group name="VentusMonsters_2" spawnByDefault="false">
<npc id="22402" x="213028" y="51631" z="-8407" heading="15805" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22402" x="213025" y="52135" z="-8407" heading="49331" respawnTime="3700sec" /> <!-- Ancient Guard Captain -->
<npc id="22401" x="213207" y="51862" z="-8419" heading="31175" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22401" x="212858" y="51862" z="-8419" heading="64590" respawnTime="3700sec" /> <!-- Ancient Guard -->
<npc id="22400" x="213198" y="51689" z="-8419" heading="24878" respawnTime="3700sec" /> <!-- Ancient Thrower -->
<npc id="22399" x="213204" y="52035" z="-8419" heading="36991" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22399" x="212854" y="51711" z="-8419" heading="7497" respawnTime="3700sec" /> <!-- Ancient Swordsman -->
<npc id="22400" x="212871" y="52024" z="-8419" heading="54503" respawnTime="3700sec" /> <!-- Ancient Thrower -->
</group>
<group name="VentusBoss_Ventus" spawnByDefault="false">
<npc id="18682" x="213023" y="50365" z="-8412" heading="16383" respawnTime="0sec" />
</group>
<group name="VentusBoss_Rekario" spawnByDefault="false">
<npc id="18683" x="213023" y="50365" z="-8412" heading="16383" respawnTime="0sec" />
</group>
</spawnlist>
</instance>

View File

@ -0,0 +1,284 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package instances.DreamDungeon.BenedictsMonastery;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.ScheduledFuture;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceStatusChange;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import instances.AbstractInstance;
import instances.DreamDungeon.CatGuildsLair.CatGuildsLair;
/**
* @author Index
*/
public class BenedictsMonastery extends AbstractInstance
{
/** Instance World IDS */
public static final int CREATED = 0;
public static final int TALK_WITH_HOLY_GRAILS_RAIDER_NPC_ON_START = 1;
public static final int KILL_FOUR_DREAM_WATCHERS_INSIDE = 2;
public static final int TALK_WITH_HOLY_GRAILS_RAIDER_NPC_TO_OPEN_DOORS = 3;
public static final int TALK_WITH_HOLY_GRAIL_BEFORE_BOSS = 4;
public static final int BOSS_FIGHT = 5;
public static final int FINISH_INSTANCE = 6;
public static final int INSTANCE_ID = 222;
private static final int[] MONSTERS =
{
22395, // Guardian Angel of the Holy Grail - Bow
22396, // Guardian Angel of the Holy Grail - Blunt
22397, // Guardian Angel of the Holy Grail - Spire
22398, // Guardian Angel of the Holy Grail - Dagger
};
private static final int[] MAIN_DOOR_IDS =
{
23150003,
23150004,
};
private static final int GABRIELLE = 18680;
private static final int GABRIELLE_MINION = 18681;
private static final String FIRST_STRING_TIMER = "FIRST_STRING_TIMER";
private static final String DREAM_WATCHER_COUNTER = "DREAM_WATCHER_COUNTER";
private static final NpcStringId DREAM_WATCHER = NpcStringId.DREAM_WATCHER;
private static final NpcStringId STRING_ID_01 = NpcStringId.HUMAN_FIND_THE_HOLY_GRAIL_IT_HAS_ANSWERS_TO_YOUR_QUESTIONS;
private static final NpcStringId STRING_ID_02 = NpcStringId.GO_TO_THE_LAST_ROOM_THE_HOLY_GRAIL_IS_INSIDE;
private static final NpcStringId STRING_ID_03 = NpcStringId.ARE_YOU_BRAVE_ENOUGH_TO_CROSS_THIS_BROKEN_BRIDGE;
private static final NpcStringId STRING_ID_04 = NpcStringId.HOW_DARE_YOU_HUMAN_GABRIELLE_WILL_KILL_YOU_FOR_THAT;
private static final NpcStringId STRING_ID_05 = NpcStringId.GABRIELLE_IS_NOT_NEEDED_I_LL_DEAL_WITH_IT_MYSELF;
private static final NpcStringId STRING_ID_06 = NpcStringId.HEHEHE_GABRIELLE_ISN_T_THIS_STUPID_BUT_WHERE_IS_THE_HOLY_GRAIL;
private BenedictsMonastery()
{
super(INSTANCE_ID);
addKillId(MONSTERS);
addKillId(GABRIELLE, GABRIELLE_MINION);
setInstanceStatusChangeId(this::onInstanceStatusChange, INSTANCE_ID);
}
public void onInstanceStatusChange(OnInstanceStatusChange event)
{
final Instance instance = event.getWorld();
final int status = event.getStatus();
switch (status)
{
case CREATED:
{
instance.setStatus(TALK_WITH_HOLY_GRAILS_RAIDER_NPC_ON_START);
// send screen message if player will not talk with Holy Grail's Raider
// human, found a holy grail, it has answers to your questions
ScheduledFuture<?> showFirstStringOnScreen = ThreadPool.schedule(() -> instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_01, ExShowScreenMessage.TOP_CENTER, 10000, true)), 30000);
instance.getParameters().set(FIRST_STRING_TIMER, showFirstStringOnScreen);
break;
}
// case TALK_WITH_HOLY_GRAILS_RAIDER_NPC_ON_START:
case KILL_FOUR_DREAM_WATCHERS_INSIDE:
{
getScheduleMessageAndMakeAction(instance);
instance.setReenterTime();
instance.despawnGroup("BenedictNPC_1");
instance.spawnGroup("BenedictMonsters").forEach(npc -> npc.getSpawn().stopRespawn());
setRandomTitles(instance);
break;
}
case TALK_WITH_HOLY_GRAILS_RAIDER_NPC_TO_OPEN_DOORS:
{
// Go to last room for holy grail
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_02, ExShowScreenMessage.TOP_CENTER, 10000, true));
instance.spawnGroup("BenedictNPC_2").forEach(npc -> npc.getSpawn().stopRespawn());
break;
}
case TALK_WITH_HOLY_GRAIL_BEFORE_BOSS:
{
// Are you brave enough to cross this broken bridge?
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_03, ExShowScreenMessage.TOP_CENTER, 10000, true));
instance.spawnGroup("BenedictNPC_3").forEach(npc -> npc.getSpawn().stopRespawn());
for (int doorId : MAIN_DOOR_IDS)
{
instance.openCloseDoor(doorId, true);
}
break;
}
case BOSS_FIGHT:
{
instance.despawnGroup("BenedictNPC_3");
spawnBoss(instance);
break;
}
case FINISH_INSTANCE:
{
instance.setDuration(5);
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_06, ExShowScreenMessage.TOP_CENTER, 10000, true));
break;
}
}
}
private void spawnBoss(Instance instance)
{
final boolean random = Rnd.nextBoolean();
// show text
final NpcStringId bossText = random ? STRING_ID_04 : STRING_ID_05;
instance.broadcastPacket(new ExShowScreenMessage(bossText, ExShowScreenMessage.TOP_CENTER, 10000, true));
// spawn boss
final String bossTemplate = random ? "BenedictMonsters_Boss_Gabriel" : "BenedictMonsters_Boss_GabrielMinion";
instance.spawnGroup(bossTemplate).forEach(n -> n.getSpawn().stopRespawn());
}
private void setRandomTitles(Instance instance)
{
final List<Npc> monsters = instance.getNpcsOfGroup("BenedictMonsters");
if (monsters.isEmpty())
{
for (Player player : instance.getPlayers())
{
InstanceManager.getInstance().deleteInstanceTime(player, INSTANCE_ID);
}
instance.destroy();
return;
}
final Set<Npc> randomNpcs = new HashSet<>();
while (randomNpcs.size() < 7)
{
final Npc monster = monsters.get(Rnd.get(1, monsters.size()) - 1);
randomNpcs.add(monster);
monsters.remove(monster);
}
for (Npc monster : randomNpcs)
{
monster.setTitleString(DREAM_WATCHER);
monster.broadcastInfo();
}
monsters.clear();
randomNpcs.clear();
}
private static void getScheduleMessageAndMakeAction(Instance instance)
{
// make sure message is shown (if will not - send) and trying remove it from memory
ScheduledFuture<?> showFirstStringOnScreen = instance.getParameters().getObject(FIRST_STRING_TIMER, ScheduledFuture.class, null);
if ((showFirstStringOnScreen == null) || !showFirstStringOnScreen.isDone())
{
if (showFirstStringOnScreen != null)
{
showFirstStringOnScreen.cancel(true);
showFirstStringOnScreen = null;
}
// I hate that cursed arrogant Ventus! You go ahead and get to the Temple of Ventus.
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_01, ExShowScreenMessage.TOP_CENTER, 10000, true));
}
if ((showFirstStringOnScreen != null) && showFirstStringOnScreen.isDone())
{
showFirstStringOnScreen.cancel(true);
showFirstStringOnScreen = null;
}
instance.getParameters().remove(FIRST_STRING_TIMER);
}
@Override
public String onKill(Npc npc, Player killer, boolean isSummon)
{
if (killer == null)
{
return super.onKill(npc, killer, isSummon);
}
final Instance instance = killer.getInstanceWorld();
if ((instance == null) || (instance.getTemplateId() != INSTANCE_ID))
{
return super.onKill(npc, killer, isSummon);
}
switch (instance.getStatus())
{
case KILL_FOUR_DREAM_WATCHERS_INSIDE:
{
if (instance.getAliveNpcs(MONSTERS).isEmpty())
{
instance.setStatus(TALK_WITH_HOLY_GRAILS_RAIDER_NPC_TO_OPEN_DOORS);
break;
}
if ((npc.getTitleString() == null) || !npc.getTitleString().equals(DREAM_WATCHER))
{
return super.onKill(npc, killer, isSummon);
}
final int dreamWatcherCount = instance.getParameters().increaseInt(DREAM_WATCHER_COUNTER, 0, 1);
switch (dreamWatcherCount)
{
case 1:
{
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.DREAM_WATCHER_S_DEATH_1_4_2, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
break;
}
case 2:
{
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.DREAM_WATCHER_S_DEATH_2_4_2, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
break;
}
case 3:
{
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.DREAM_WATCHER_S_DEATH_3_4_2, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
break;
}
case 4:
{
instance.setStatus(TALK_WITH_HOLY_GRAILS_RAIDER_NPC_TO_OPEN_DOORS);
break;
}
}
break;
}
case BOSS_FIGHT:
{
if ((npc.getTemplate().getId() == GABRIELLE) || (npc.getTemplate().getId() == GABRIELLE_MINION))
{
if (!CatGuildsLair.calculateChanceForCatLair(instance))
{
instance.setStatus(FINISH_INSTANCE);
}
}
break;
}
}
return super.onKill(npc, killer, isSummon);
}
public static void main(String[] args)
{
new BenedictsMonastery();
}
}

View File

@ -0,0 +1,58 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package instances.DreamDungeon.BenedictsMonastery;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import ai.AbstractNpcAI;
/**
* @author Index
*/
public class HolyGrail extends AbstractNpcAI
{
private static final int HOLY_GRAIL = 18674;
private HolyGrail()
{
addFirstTalkId(HOLY_GRAIL);
}
@Override
public String onFirstTalk(Npc npc, Player player)
{
final Instance instance = ((player == null) || (npc == null)) ? null : player.getInstanceWorld();
if ((instance == null) || (instance.getTemplateId() != BenedictsMonastery.INSTANCE_ID))
{
return super.onFirstTalk(npc, player);
}
if (instance.getStatus() == BenedictsMonastery.TALK_WITH_HOLY_GRAIL_BEFORE_BOSS)
{
instance.setStatus(BenedictsMonastery.BOSS_FIGHT);
}
return super.onFirstTalk(npc, player);
}
public static void main(String[] args)
{
new HolyGrail();
}
}

View File

@ -0,0 +1,72 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package instances.DreamDungeon.BenedictsMonastery;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import ai.AbstractNpcAI;
/**
* @author Index
*/
public class HolyGrailsRaider extends AbstractNpcAI
{
private static final int HOLY_GRAILS_RIDER = 34313;
private HolyGrailsRaider()
{
addFirstTalkId(HOLY_GRAILS_RIDER);
}
@Override
public String onFirstTalk(Npc npc, Player player)
{
final Instance instance = ((player == null) || (npc == null)) ? null : player.getInstanceWorld();
if ((instance == null) || (instance.getTemplateId() != BenedictsMonastery.INSTANCE_ID))
{
return super.onFirstTalk(npc, player);
}
switch (instance.getStatus())
{
case BenedictsMonastery.TALK_WITH_HOLY_GRAILS_RAIDER_NPC_ON_START:
{
instance.setStatus(BenedictsMonastery.KILL_FOUR_DREAM_WATCHERS_INSIDE);
break;
}
case BenedictsMonastery.TALK_WITH_HOLY_GRAILS_RAIDER_NPC_TO_OPEN_DOORS:
{
instance.setStatus(BenedictsMonastery.TALK_WITH_HOLY_GRAIL_BEFORE_BOSS);
break;
}
case BenedictsMonastery.FINISH_INSTANCE:
{
instance.destroy();
break;
}
}
return super.onFirstTalk(npc, player);
}
public static void main(String[] args)
{
new HolyGrailsRaider();
}
}

View File

@ -0,0 +1,379 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package instances.DreamDungeon.CatGuildsLair;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CopyOnWriteArrayList;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceStatusChange;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.instancezone.InstanceTemplate;
import org.l2jmobius.gameserver.model.spawns.SpawnGroup;
import org.l2jmobius.gameserver.model.spawns.SpawnTemplate;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import instances.AbstractInstance;
import instances.DreamDungeon.BenedictsMonastery.BenedictsMonastery;
import instances.DreamDungeon.DraconidFortress.DraconidFortress;
import instances.DreamDungeon.GustavsManor.GustavsManor;
import instances.DreamDungeon.VentusTemple.VentusTemple;
/**
* @author Index
*/
public class CatGuildsLair extends AbstractInstance
{
public static final int CREATED = 1000;
public static final int TALK_WITH_TELEPORTER_CAT = 1001;
public static final int KILL_FOUR_DREAM_WATCHERS_INSIDE = 1002;
public static final int TALK_WITH_ELVEN_ELDER_CAT = 1003;
public static final int BOSS_FIGHT = 1004;
public static final int FINISH_INSTANCE = 1005;
private static final int[] INSTANCE_IDs =
{
GustavsManor.INSTANCE_ID,
BenedictsMonastery.INSTANCE_ID,
VentusTemple.INSTANCE_ID,
DraconidFortress.INSTANCE_ID,
};
private static final int[] MONSTERS =
{
22407, // Cat Fighter
22408, // Cat Mage
22409, // Cat Warrior
22410, // Cat Warlock
};
private static final int FELINE_KING = 18686;
private static final int FELINE_QUEEN = 18687;
private static final String DREAM_WATCHER_COUNTER = "DREAM_WATCHER_COUNTER";
private static final NpcStringId DREAM_WATCHER = NpcStringId.DREAM_WATCHER;
private static final NpcStringId STRING_ID_01 = NpcStringId.THE_CAT_GUILD_S_KING_IS_IN_TROUBLE_PLEASE_HELP_HIM;
private static final NpcStringId STRING_ID_02 = NpcStringId.HELP_OUR_GUILD_PLEASE_I_WILL_TELL_YOU_WHAT_S_GOING_ON;
private static final NpcStringId STRING_ID_03 = NpcStringId.WHAT_S_THE_FUSS_THOSE_WILLING_TO_ADDRESS_THE_KING_COME_TO_ME;
private static final NpcStringId STRING_ID_04 = NpcStringId.WHAT_YOU_ARE_GOING_TO_GIVE_ADVICES_TO_OUR_KING_HE_LL_BE_SO_MAD;
private static final NpcStringId STRING_ID_05 = NpcStringId.IS_SOMETHING_WRONG_WITH_ME_THEN_ADVISE_ME;
private static final NpcStringId STRING_ID_06 = NpcStringId.WHEW_AS_I_THOUGHT_THE_FALL_HAS_STOPPED;
private static final Map<String, List<SpawnGroup>> CAT_LAIR_SPAWN_GROUPS = new HashMap<>();
private static InstanceTemplate CAT_LAIR_INSTANCE;
private static Location START_LOCATION;
public CatGuildsLair()
{
super(INSTANCE_IDs);
addKillId(MONSTERS);
addKillId(FELINE_KING, FELINE_QUEEN);
addInstanceEnterId(INSTANCE_IDs);
setInstanceStatusChangeId(this::onInstanceStatusChange, INSTANCE_IDs);
init();
}
public void onInstanceStatusChange(OnInstanceStatusChange event)
{
final Instance instance = event.getWorld();
final int status = event.getStatus();
if ((instance == null) || (status < CREATED))
{
return;
}
switch (status)
{
case CREATED:
{
instance.setDuration(60); // update time for destroy instance
sendScreenMessage(instance, STRING_ID_01);
break;
}
case TALK_WITH_TELEPORTER_CAT:
{
instance.getPlayers().forEach(player -> player.teleToLocation(START_LOCATION, false));
instance.getParameters().set(DREAM_WATCHER_COUNTER, 0);
spawnNpcFromGroup(instance, "CatLair_Npc_01");
break;
}
case KILL_FOUR_DREAM_WATCHERS_INSIDE:
{
spawnNpcFromGroup(instance, "CatLair_Monsters_01");
spawnNpcFromGroup(instance, "CatLair_Monsters_02");
spawnNpcFromGroup(instance, "CatLair_Monsters_04");
setRandomTitles(instance, false);
break;
}
case TALK_WITH_ELVEN_ELDER_CAT:
{
spawnNpcFromGroup(instance, "CatLair_Npc_02");
sendScreenMessage(instance, STRING_ID_03);
final Npc teleporterCat = instance.getNpc(instances.DreamDungeon.CatGuildsLair.TeleporterCat.TELEPORTER_CAT_NPC_ID);
startQuestTimer("ADDITIONAL_WAVE", 10_000, teleporterCat, null, false);
break;
}
case BOSS_FIGHT:
{
instance.despawnGroup("CatLair_Npc_02");
spawnBoss(instance);
break;
}
case FINISH_INSTANCE:
{
instance.setDuration(5);
sendScreenMessage(instance, STRING_ID_06);
spawnNpcFromGroup(instance, "CatLair_Npc_03");
break;
}
}
}
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
final Instance instance = npc.getInstanceWorld();
if ((instance == null) || (instance.getStatus() < CREATED))
{
return null;
}
if (event.equalsIgnoreCase("ADDITIONAL_WAVE"))
{
spawnNpcFromGroup(instance, "CatLair_Monsters_03");
setRandomTitles(instance, true);
}
return super.onAdvEvent(event, npc, player);
}
private void spawnBoss(Instance instance)
{
final boolean random = Rnd.nextBoolean();
// show text
final NpcStringId bossText = random ? STRING_ID_04 : STRING_ID_05;
sendScreenMessage(instance, bossText);
// spawn boss
final String bossTemplate = random ? "catLair_Boss_FelineKing" : "catLair_Boss_FelineQueen";
spawnNpcFromGroup(instance, bossTemplate);
}
private void setRandomTitles(Instance instance, boolean isAdditionalWave)
{
final List<Npc> selectedMonsters = new CopyOnWriteArrayList<>();
final List<Npc> instanceNpc = new CopyOnWriteArrayList<>(instance.getNpcs(MONSTERS));
if (isAdditionalWave)
{
final String npc3 = "CatLair_Monsters_03";
selectedMonsters.addAll(getNpcListByGroupName(new CopyOnWriteArrayList<>(instanceNpc), npc3));
}
else
{
Collections.shuffle(instanceNpc);
final String npc1 = "CatLair_Monsters_01";
final String npc2 = "CatLair_Monsters_02";
final String npc4 = "CatLair_Monsters_04";
final List<Npc> monsterNpc1 = new CopyOnWriteArrayList<>(getNpcListByGroupName(new CopyOnWriteArrayList<>(instanceNpc), npc1));
final List<Npc> monsterNpc2 = new CopyOnWriteArrayList<>(getNpcListByGroupName(new CopyOnWriteArrayList<>(instanceNpc), npc2));
final List<Npc> monsterNpc4 = new CopyOnWriteArrayList<>(getNpcListByGroupName(new CopyOnWriteArrayList<>(instanceNpc), npc4));
for (int index = 0; index < 2; index++)
{
final Npc monster = monsterNpc1.stream().findAny().orElse(null);
selectedMonsters.add(monster);
monsterNpc1.remove(monster);
}
for (int index = 0; index < 2; index++)
{
final Npc monster = monsterNpc2.stream().findAny().orElse(null);
selectedMonsters.add(monster);
monsterNpc2.remove(monster);
}
for (int index = 0; index < 2; index++)
{
final Npc monster = monsterNpc4.stream().findAny().orElse(null);
selectedMonsters.add(monster);
monsterNpc4.remove(monster);
}
}
for (Npc monster : selectedMonsters)
{
monster.setTitleString(DREAM_WATCHER);
monster.broadcastInfo();
}
}
private List<Npc> getNpcListByGroupName(CopyOnWriteArrayList<Npc> npcList, String groupName)
{
final List<Npc> newList = new ArrayList<>();
for (Npc monster : npcList)
{
if (isMonsterIsOneOfSpawnGroup(monster, groupName))
{
newList.add(monster);
}
}
return newList;
}
private static boolean isMonsterIsOneOfSpawnGroup(Npc npc, String group)
{
return (npc != null) && (npc.getSpawn() != null) && (npc.getSpawn().getNpcSpawnTemplate() != null) && (npc.getSpawn().getNpcSpawnTemplate().getGroup() != null) && (npc.getSpawn().getNpcSpawnTemplate().getGroup().getName() != null) && npc.getSpawn().getNpcSpawnTemplate().getGroup().getName().equalsIgnoreCase(group);
}
private void spawnNpcFromGroup(Instance instance, String group)
{
for (SpawnGroup spawnGroup : CAT_LAIR_SPAWN_GROUPS.get(group))
{
spawnGroup.spawnAll(instance);
}
}
@Override
public String onKill(Npc npc, Player killer, boolean isSummon)
{
if (killer == null)
{
return super.onKill(npc, killer, isSummon);
}
final Instance instance = killer.getInstanceWorld();
if ((instance == null) || (instance.getStatus() < CREATED))
{
return super.onKill(npc, killer, isSummon);
}
switch (instance.getStatus())
{
case KILL_FOUR_DREAM_WATCHERS_INSIDE:
{
if (instance.getAliveNpcs(MONSTERS).isEmpty())
{
instance.setStatus(TALK_WITH_ELVEN_ELDER_CAT);
break;
}
if ((npc.getTitleString() == null) || !npc.getTitleString().equals(DREAM_WATCHER))
{
return super.onKill(npc, killer, isSummon);
}
final int dreamWatcherCount = instance.getParameters().increaseInt(DREAM_WATCHER_COUNTER, 0, 1);
switch (dreamWatcherCount)
{
case 1:
{
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.DREAM_WATCHER_S_DEATH_1_4, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
break;
}
case 2:
{
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.DREAM_WATCHER_S_DEATH_2_4, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
break;
}
case 3:
{
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.DREAM_WATCHER_S_DEATH_3_4, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
break;
}
case 4:
{
instance.setStatus(TALK_WITH_ELVEN_ELDER_CAT);
break;
}
}
break;
}
case BOSS_FIGHT:
{
if ((npc.getTemplate().getId() == FELINE_KING) || (npc.getTemplate().getId() == FELINE_QUEEN))
{
instance.setStatus(FINISH_INSTANCE);
}
break;
}
}
return super.onKill(npc, killer, isSummon);
}
@Override
public void onInstanceEnter(Player player, Instance instance)
{
final int status = instance.getStatus();
if (status < CREATED)
{
return;
}
player.teleToLocation(START_LOCATION, false);
super.onInstanceEnter(player, instance);
}
public static void sendScreenMessage(Instance instance, NpcStringId stringId)
{
instance.broadcastPacket(new ExShowScreenMessage(stringId, ExShowScreenMessage.TOP_CENTER, 10000, true));
}
public static boolean calculateChanceForCatLair(Instance instance)
{
if (Rnd.get(100) < 25)
{
instance.setStatus(CREATED);
instance.spawnGroup("CatLair_TeleporterCat");
sendScreenMessage(instance, Rnd.nextBoolean() ? STRING_ID_01 : STRING_ID_02);
return true;
}
return false;
}
public static void startCatLairInstance(Player player)
{
final Instance instance = player.getInstanceWorld();
instance.setStatus(TALK_WITH_TELEPORTER_CAT);
player.teleToLocation(START_LOCATION, false);
}
private void init()
{
CAT_LAIR_INSTANCE = InstanceManager.getInstance().getInstanceTemplate(999999);
START_LOCATION = CAT_LAIR_INSTANCE.getEnterLocation();
for (SpawnTemplate grp : CAT_LAIR_INSTANCE.getSpawns())
{
for (SpawnGroup spawnGroup : grp.getGroups())
{
CAT_LAIR_SPAWN_GROUPS.computeIfAbsent(spawnGroup.getName(), v -> new ArrayList<>()).add(spawnGroup);
}
}
}
public static void main(String[] args)
{
new CatGuildsLair();
}
}

View File

@ -0,0 +1,62 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package instances.DreamDungeon.CatGuildsLair;
import java.util.ArrayList;
import java.util.List;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import ai.AbstractNpcAI;
/**
* @author Index
*/
public class ElvenElderCat extends AbstractNpcAI
{
private static final List<Integer> INSTANCE_IDS = new ArrayList<>(List.of(221, 222, 223, 224));
public static final int ELVEN_ELDER_CAT = 18677;
private ElvenElderCat()
{
addFirstTalkId(ELVEN_ELDER_CAT);
}
@Override
public String onFirstTalk(Npc npc, Player player)
{
final Instance instance = ((player == null) || (npc == null)) ? null : player.getInstanceWorld();
if ((instance == null) || !INSTANCE_IDS.contains(instance.getTemplateId()))
{
return super.onFirstTalk(npc, player);
}
if (instance.getStatus() == CatGuildsLair.TALK_WITH_ELVEN_ELDER_CAT)
{
instance.setStatus(CatGuildsLair.BOSS_FIGHT);
}
return super.onFirstTalk(npc, player);
}
public static void main(String[] args)
{
new ElvenElderCat();
}
}

View File

@ -0,0 +1,76 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package instances.DreamDungeon.CatGuildsLair;
import java.util.ArrayList;
import java.util.List;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import ai.AbstractNpcAI;
/**
* @author Index
*/
public class TeleporterCat extends AbstractNpcAI
{
private static final List<Integer> INSTANCE_IDS = new ArrayList<>(List.of(221, 222, 223, 224));
public static final int TELEPORTER_CAT_NPC_ID = 34316;
private TeleporterCat()
{
addFirstTalkId(TELEPORTER_CAT_NPC_ID);
}
@Override
public String onFirstTalk(Npc npc, Player player)
{
final Instance instance = ((player == null) || (npc == null)) ? null : player.getInstanceWorld();
if ((instance == null) || !INSTANCE_IDS.contains(instance.getTemplateId()))
{
return super.onFirstTalk(npc, player);
}
switch (instance.getStatus())
{
case CatGuildsLair.CREATED:
{
instance.setStatus(CatGuildsLair.TALK_WITH_TELEPORTER_CAT);
break;
}
case CatGuildsLair.TALK_WITH_TELEPORTER_CAT:
{
instance.setStatus(CatGuildsLair.KILL_FOUR_DREAM_WATCHERS_INSIDE);
break;
}
case CatGuildsLair.FINISH_INSTANCE:
{
instance.destroy();
break;
}
}
return super.onFirstTalk(npc, player);
}
public static void main(String[] args)
{
new TeleporterCat();
}
}

View File

@ -0,0 +1,317 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package instances.DreamDungeon.DraconidFortress;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArrayList;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceStatusChange;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import instances.AbstractInstance;
import instances.DreamDungeon.CatGuildsLair.CatGuildsLair;
/**
* @author Index
*/
public class DraconidFortress extends AbstractInstance
{
/** Instance World IDS */
public static final int CREATED = 0;
public static final int KILL_FOUR_DREAM_WATCHERS_INSIDE_FIRST_TIME = 1;
public static final int TALK_WITH_TRAITOR_FIRST_TIME = 2;
public static final int TALK_WITH_TRAITOR_SECOND_TIME = 3;
public static final int KILL_FOUR_DREAM_WATCHERS_INSIDE_SECOND_TIME = 4;
public static final int KILL_FOLLOWER = 5;
public static final int BOSS_FIGHT = 6;
public static final int FINISH_INSTANCE = 7;
public static final int INSTANCE_ID = 224;
private static final int[] MONSTERS =
{
22403, // Red Draconid Mage
22404, // Red Draconid Warrior
22405, // Red Draconid Hero
22406, // Red Draconid Lieutenant
};
private static final int RED_DRACONID_FOLLOWER_MONSTER_ID = 18676;
private static final int TIAD = 18684;
private static final int BAINT = 18685;
private static final String DREAM_WATCHER_COUNTER = "DREAM_WATCHER_COUNTER";
private static final NpcStringId DREAM_WATCHER = NpcStringId.DREAM_WATCHER;
private static final NpcStringId STRING_ID_01 = NpcStringId.HE_HE_YOU_WOULDN_T_BE_SCARED_BY_A_DEVIL_IT_SEEMS_SINCE_YOU_DARE_TO_SET_YOUR_FOOT_IN_HERE_HE_HE; // guess
private static final NpcStringId STRING_ID_02 = NpcStringId.WILL_YOU_TURN_BACK_OR_MOVE_FURTHER_HE_HE;
private static final NpcStringId STRING_ID_03 = NpcStringId.WELL_I_WAS_BORED_BEFORE_BUT_NOW_THE_THINGS_HAVE_TAKEN_A_COMPLETELY_DIFFERENT_TURN_PLEASE_COME_IN_DON_T_BE_SHY;
private static final NpcStringId STRING_ID_04 = NpcStringId.OH_MIGHTY_TIAT_OUR_ENEMIES_ARE_WEAKENED_IT_S_TIME_TO_DEFEAT_THEM_ONCE_AND_FOR_ALL;
private static final NpcStringId STRING_ID_05 = NpcStringId.OH_THOSE_POWERLESS_ADEN_WARRIORS_LET_S_FINISH_THEM_NOW_AND_MOVE_ON_THE_ADEN_CASTLE;
private static final NpcStringId STRING_ID_06 = NpcStringId.I_M_GOING_TO_ADEN_COMMANDER_ASSISTANT_FOLLOW_ME;
private static final NpcStringId STRING_ID_07 = NpcStringId.HE_HE_EXCELLENT_BUT_ARE_YOU_SURE_YOU_VE_WON_MAYBE_ALL_OF_THIS_IS_NOTHING_BUT_A_DREAM;
private static final int FIRST_DOOR = 12240030;
private static final int SECOND_DOOR = 12240031;
private static final int[] CLOSED_DOOR =
{
12240028,
12240029,
};
private DraconidFortress()
{
super(INSTANCE_ID);
addKillId(MONSTERS);
addKillId(RED_DRACONID_FOLLOWER_MONSTER_ID);
addKillId(TIAD, BAINT);
setInstanceStatusChangeId(this::onInstanceStatusChange, INSTANCE_ID);
}
public void onInstanceStatusChange(OnInstanceStatusChange event)
{
final Instance instance = event.getWorld();
switch (event.getStatus())
{
case KILL_FOUR_DREAM_WATCHERS_INSIDE_FIRST_TIME:
{
instance.setReenterTime();
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_01, ExShowScreenMessage.TOP_CENTER, 10_000, true));
instance.spawnGroup("DraconidMonsters");
instance.despawnGroup("DraconidNPC_1");
setRandomTitles(instance, true);
break;
}
case TALK_WITH_TRAITOR_FIRST_TIME:
{
instance.spawnGroup("DraconidNPC_2");
removeRandomTag(instance);
break;
}
case TALK_WITH_TRAITOR_SECOND_TIME:
{
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_02, ExShowScreenMessage.TOP_CENTER, 10_000, true));
instance.openCloseDoor(FIRST_DOOR, true);
instance.spawnGroup("DraconidMonsters_02");
instance.spawnGroup("DraconidNPC_3");
instance.despawnGroup("DraconidNPC_2");
break;
}
case KILL_FOUR_DREAM_WATCHERS_INSIDE_SECOND_TIME:
{
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_03, ExShowScreenMessage.TOP_CENTER, 10_000, true));
// use the same counter
instance.getParameters().set(DREAM_WATCHER_COUNTER, 0);
instance.openCloseDoor(SECOND_DOOR, true);
instance.spawnGroup("DraconidMonsters_03");
instance.despawnGroup("DraconidNPC_3");
setRandomTitles(instance, false);
break;
}
case KILL_FOLLOWER:
{
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_04, ExShowScreenMessage.TOP_CENTER, 10_000, true));
instance.spawnGroup("DraconidMonsters_04");
break;
}
case BOSS_FIGHT:
{
spawnBoss(instance);
break;
}
case FINISH_INSTANCE:
{
instance.setDuration(5);
instance.spawnGroup("DraconidNPC_4");
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_07, ExShowScreenMessage.TOP_CENTER, 10_000, true));
break;
}
}
}
private void spawnBoss(Instance instance)
{
final boolean random = Rnd.nextBoolean();
// show text
final NpcStringId bossText = random ? STRING_ID_05 : STRING_ID_06;
instance.broadcastPacket(new ExShowScreenMessage(bossText, ExShowScreenMessage.TOP_CENTER, 10000, true));
// spawn boss
final String bossTemplate = random ? "DraconidMonsters_BossTiad" : "DraconidMonsters_BossBaint";
instance.spawnGroup(bossTemplate).forEach(n -> n.getSpawn().stopRespawn());
}
private void removeRandomTag(Instance instance)
{
final List<Npc> monsterList = new CopyOnWriteArrayList<>(instance.getNpcsOfGroup("DraconidMonsters"));
for (Npc monster : monsterList)
{
if ((monster.getTitleString() != null) && monster.getTitleString().equals(DREAM_WATCHER))
{
(monster).doDie(null);
}
}
}
private void setRandomTitles(Instance instance, boolean isFirst)
{
final Set<Npc> randomNpcs = new HashSet<>();
final List<Npc> monsterList = new CopyOnWriteArrayList<>(isFirst ? instance.getNpcsOfGroup("DraconidMonsters") : instance.getNpcsOfGroup("DraconidMonsters_03"));
if (monsterList.isEmpty())
{
for (Player player : instance.getPlayers())
{
InstanceManager.getInstance().deleteInstanceTime(player, INSTANCE_ID);
}
instance.destroy();
return;
}
Collections.shuffle(monsterList);
for (Npc monster : monsterList)
{
if (randomNpcs.size() >= 4)
{
break;
}
randomNpcs.add(monster);
monsterList.remove(monster);
}
for (Npc monster : randomNpcs)
{
monster.setTitleString(DREAM_WATCHER);
monster.broadcastInfo();
}
monsterList.clear();
randomNpcs.clear();
}
@Override
public String onKill(Npc npc, Player killer, boolean isSummon)
{
if (killer == null)
{
return super.onKill(npc, killer, isSummon);
}
Instance instance = killer.getInstanceWorld();
if ((instance == null) || (instance.getTemplateId() != INSTANCE_ID))
{
return super.onKill(npc, killer, isSummon);
}
switch (instance.getStatus())
{
case KILL_FOUR_DREAM_WATCHERS_INSIDE_FIRST_TIME:
case KILL_FOUR_DREAM_WATCHERS_INSIDE_SECOND_TIME:
{
final int setStatus = instance.getStatus() == KILL_FOUR_DREAM_WATCHERS_INSIDE_FIRST_TIME ? TALK_WITH_TRAITOR_FIRST_TIME : KILL_FOLLOWER;
if (instance.getAliveNpcs(MONSTERS).isEmpty())
{
instance.setStatus(setStatus);
break;
}
if ((npc.getTitleString() == null) || !npc.getTitleString().equals(DREAM_WATCHER))
{
return super.onKill(npc, killer, isSummon);
}
final int dreamWatcherCount = instance.getParameters().increaseInt(DREAM_WATCHER_COUNTER, 0, 1);
switch (dreamWatcherCount)
{
case 1:
{
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.DREAM_WATCHER_S_DEATH_1_4_4, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
break;
}
case 2:
{
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.DREAM_WATCHER_S_DEATH_2_4_4, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
break;
}
case 3:
{
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.DREAM_WATCHER_S_DEATH_3_4_4, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
break;
}
case 4:
{
instance.setStatus(setStatus);
break;
}
}
break;
}
case KILL_FOLLOWER:
{
if (npc.getTemplate().getId() == RED_DRACONID_FOLLOWER_MONSTER_ID)
{
instance.setStatus(BOSS_FIGHT);
}
break;
}
case BOSS_FIGHT:
{
if ((npc.getTemplate().getId() == TIAD) || (npc.getTemplate().getId() == BAINT))
{
if (!CatGuildsLair.calculateChanceForCatLair(instance))
{
instance.setStatus(FINISH_INSTANCE);
}
}
break;
}
}
return super.onKill(npc, killer, isSummon);
}
@Override
public void onInstanceCreated(Instance instance, Player player)
{
// make sure all doors will be closed
final int instanceId = instance.getId();
closeDoor(FIRST_DOOR, instanceId);
closeDoor(SECOND_DOOR, instanceId);
closeDoor(CLOSED_DOOR[0], instanceId);
closeDoor(CLOSED_DOOR[1], instanceId);
getDoor(FIRST_DOOR, instanceId).broadcastInfo();
getDoor(SECOND_DOOR, instanceId).broadcastInfo();
getDoor(CLOSED_DOOR[0], instanceId).broadcastInfo();
getDoor(CLOSED_DOOR[1], instanceId).broadcastInfo();
/*
* instance.broadcastPacket(new StaticObject(getDoor(FIRST_DOOR, instanceId), false)); instance.broadcastPacket(new StaticObject(getDoor(SECOND_DOOR, instanceId), false));
*/
super.onInstanceCreated(instance, player);
}
public static void main(String[] args)
{
new DraconidFortress();
}
}

View File

@ -0,0 +1,77 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package instances.DreamDungeon.DraconidFortress;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import ai.AbstractNpcAI;
/**
* @author Index
*/
public class RedDraconidTraitor extends AbstractNpcAI
{
public static final int RED_DRACONIT_TRAITOR_NPC_ID = 34315;
private RedDraconidTraitor()
{
addFirstTalkId(RED_DRACONIT_TRAITOR_NPC_ID);
}
@Override
public String onFirstTalk(Npc npc, Player player)
{
final Instance instance = ((player == null) || (npc == null)) ? null : player.getInstanceWorld();
if ((instance == null) || (instance.getTemplateId() != DraconidFortress.INSTANCE_ID))
{
return super.onFirstTalk(npc, player);
}
switch (instance.getStatus())
{
case DraconidFortress.CREATED:
{
instance.setStatus(DraconidFortress.KILL_FOUR_DREAM_WATCHERS_INSIDE_FIRST_TIME);
break;
}
case DraconidFortress.TALK_WITH_TRAITOR_FIRST_TIME:
{
instance.setStatus(DraconidFortress.TALK_WITH_TRAITOR_SECOND_TIME);
break;
}
case DraconidFortress.TALK_WITH_TRAITOR_SECOND_TIME:
{
instance.setStatus(DraconidFortress.KILL_FOUR_DREAM_WATCHERS_INSIDE_SECOND_TIME);
break;
}
case DraconidFortress.FINISH_INSTANCE:
{
instance.destroy();
break;
}
}
return super.onFirstTalk(npc, player);
}
public static void main(String[] args)
{
new RedDraconidTraitor();
}
}

View File

@ -0,0 +1,7 @@
<html><title>Chat</title><body>Dream Priestess:<br>
<font color="LEVEL">You are going to enter as part of a group, not a command channel.</font><br>
In this case, there should be no more than 5 warriors in the group...<br>
It will be a difficult journey. Do you want to test your strength?<br>
<Button ALIGN="LEFT" ICON="NORMAL" action="bypass -h Quest DreamPriestess enter_dream_dungeon party_confirm">Enter the dream</button>
<Button ALIGN="LEFT" ICON="RETURN" action="bypass -h Quest DreamPriestess back">Back</button>
</body></html>

View File

@ -0,0 +1,10 @@
<html><title>Chat</title><body>Dream Priestess:<br>
Choose from the next options:<br>
<Button ALIGN="LEFT" ICON="NORMAL" action="bypass -h Quest DreamPriestess gm_dream_dungeon_reset">Reset cool down</button>
<Button ALIGN="LEFT" ICON="TELEPORT" action="bypass -h Quest DreamPriestess enter_dream_dungeon 221">Enter to Gustav's Manor</button>
<Button ALIGN="LEFT" ICON="TELEPORT" action="bypass -h Quest DreamPriestess enter_dream_dungeon 222">Enter to Benedict's Monastery</button>
<Button ALIGN="LEFT" ICON="TELEPORT" action="bypass -h Quest DreamPriestess enter_dream_dungeon 223">Enter to Ventus' Temple</button>
<Button ALIGN="LEFT" ICON="TELEPORT" action="bypass -h Quest DreamPriestess enter_dream_dungeon 224">Enter to Draconid Fortress</button>
<Button ALIGN="LEFT" ICON="TELEPORT" action="bypass -h Quest DreamPriestess enter_dream_dungeon -1000">Enter to Cat Guild's Lair</button>
<Button ALIGN="LEFT" ICON="RETURN" action="bypass -h Quest DreamPriestess back">Back</button>
</body></html>

View File

@ -0,0 +1,6 @@
<html><title>Chat</title><body>Dream Priestess:<br>
You're so confident. Are you really sure you can beat Dreamland monsters?<br>
Dreamland is not for loners.<br>
Gather a party or a command channel of <font color="LEVEL">2-10 people whose level is 76 or higher</font> and then come back.<br>
<Button ALIGN="LEFT" ICON="RETURN" action="bypass -h Quest DreamPriestess back">Back</button>
</body></html>

View File

@ -0,0 +1,9 @@
<html><title>Chat</title><body>Dream Priestess:<br>
Greetings! I am the Dream Priestess, and I'll be your guide in the Dreamland.<br>
I help those who are willing to enter the Dream Dungeon.<br>
But the journey there is dangerous. You have to gather <font color="LEVEL">a party</font> or <font color="LEVEL">a command channel</font> of 2-10 people whose level is <font color="LEVEL">76 or higher</font>. I won't let you in, otherwise.<br>
To prevent a potential invasion in the Dreamland, the Dream Dungeon gates are opened only once a week.<br>
Are you ready to go inside?<br>
<Button ALIGN="LEFT" ICON="NORMAL" action="bypass -h Quest DreamPriestess enter_dream_dungeon">Enter the dream</button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@ -0,0 +1,234 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package instances.DreamDungeon.DreamPriestess;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
import org.l2jmobius.gameserver.model.AbstractPlayerGroup;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
import instances.AbstractInstance;
import instances.DreamDungeon.CatGuildsLair.CatGuildsLair;
import instances.DreamDungeon.DraconidFortress.DraconidFortress;
/**
* @author Index
*/
public class DreamPriestess extends AbstractInstance
{
private static final Map<Integer, Set<Player>> PLAYER_LIST_TO_ENTER = new HashMap<>();
private static final List<Integer> INSTANCE_IDS = new ArrayList<>(List.of(221, 222, 223, 224));
private static final int DREAM_PRIESTESS = 34304;
private DreamPriestess()
{
super(0);
addCondMinLevel(76, DREAM_PRIESTESS + "-noreq.htm");
addFirstTalkId(DREAM_PRIESTESS);
addStartNpc(DREAM_PRIESTESS);
addTalkId(DREAM_PRIESTESS);
}
@Override
public String onFirstTalk(Npc npc, Player player)
{
return DREAM_PRIESTESS + ".htm";
}
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
if (player == null)
{
return super.onAdvEvent(event, npc, null);
}
if (event.startsWith("enter_dream_dungeon"))
{
final Instance currentInstance = InstanceManager.getInstance().getPlayerInstance(player, false);
if ((currentInstance != null) && INSTANCE_IDS.contains(currentInstance.getTemplateId()))
{
enterInstance(player, npc, currentInstance.getTemplateId());
return null;
}
// for don't call many methods
PLAYER_LIST_TO_ENTER.put(player.getObjectId(), new HashSet<>());
PLAYER_LIST_TO_ENTER.get(player.getObjectId()).add(player);
final int dungeonId;
if (player.isGM())
{
final String[] split = event.split(" ");
if (split.length <= 1)
{
PLAYER_LIST_TO_ENTER.remove(player.getObjectId());
return DREAM_PRIESTESS + "-gm.htm";
}
dungeonId = Integer.parseInt(split[1]);
if (dungeonId == 999999)
{
enterInstance(player, npc, DraconidFortress.INSTANCE_ID);
ThreadPool.schedule(() -> CatGuildsLair.startCatLairInstance(player), 5000);
return super.onAdvEvent(event, npc, player);
}
if (!INSTANCE_IDS.contains(dungeonId))
{
PLAYER_LIST_TO_ENTER.remove(player.getObjectId());
player.sendMessage("Wrong instance ID");
return DREAM_PRIESTESS + "-gm.htm";
}
}
else
{
dungeonId = INSTANCE_IDS.get(Rnd.get(1, INSTANCE_IDS.size()) - 1);
}
// zone not available in solo, but GM can enter
// zone will be work if comment this check
if (!player.isInParty() && !player.isGM())
{
PLAYER_LIST_TO_ENTER.remove(player.getObjectId());
return DREAM_PRIESTESS + "-noreq.htm";
}
if (!player.isInCommandChannel() && (event.split(" ").length == 1))
{
PLAYER_LIST_TO_ENTER.remove(player.getObjectId());
return DREAM_PRIESTESS + "-02.htm";
}
if (checkRequirementsForEnter(player))
{
PLAYER_LIST_TO_ENTER.remove(player.getObjectId());
return DREAM_PRIESTESS + "-noreq.htm";
}
if (InstanceManager.getInstance().getWorldCount(dungeonId) > InstanceManager.getInstance().getInstanceTemplate(dungeonId).getMaxWorlds())
{
PLAYER_LIST_TO_ENTER.remove(player.getObjectId());
player.sendPacket(SystemMessageId.THE_MAXIMUM_NUMBER_OF_INSTANCE_ZONES_HAS_BEEN_EXCEEDED_YOU_CANNOT_ENTER);
return DREAM_PRIESTESS + "-noreq.htm";
}
PLAYER_LIST_TO_ENTER.get(player.getObjectId()).forEach(p -> enterInstance(p, npc, dungeonId));
PLAYER_LIST_TO_ENTER.remove(player.getObjectId());
}
else if (event.equalsIgnoreCase("back"))
{
return DREAM_PRIESTESS + ".htm";
}
else if (event.equalsIgnoreCase("gm_dream_dungeon_reset") && player.isGM())
{
for (int instanceId : INSTANCE_IDS)
{
InstanceManager.getInstance().deleteInstanceTime(player, instanceId);
}
return DREAM_PRIESTESS + "-gm.htm";
}
return super.onAdvEvent(event, npc, player);
}
private static boolean checkRequirementsForEnter(Player requestor)
{
final AbstractPlayerGroup group = requestor.isInParty() ? requestor.getParty() : requestor.isInCommandChannel() ? requestor.getCommandChannel() : null;
if (group == null)
{
return checkInstanceStatus(requestor);
}
if (!group.isLeader(requestor))
{
return true;
}
if (requestor.isInParty() && (group.getMemberCount() < 2))
{
requestor.sendPacket(SystemMessageId.YOU_ARE_NOT_IN_A_PARTY_SO_YOU_CANNOT_ENTER);
return true;
}
if (requestor.isInCommandChannel() && (group.getMemberCount() > 10))
{
requestor.sendPacket(SystemMessageId.YOU_CANNOT_ENTER_DUE_TO_THE_PARTY_HAVING_EXCEEDED_THE_LIMIT);
return true;
}
for (Player player : group.getMembers())
{
if (player.getLevel() < 76)
{
requestor.sendPacket(new SystemMessage(SystemMessageId.C1_S_LEVEL_DOES_NOT_CORRESPOND_TO_THE_REQUIREMENTS_FOR_ENTRY).addPcName(player));
player.sendPacket(new SystemMessage(SystemMessageId.C1_S_LEVEL_DOES_NOT_CORRESPOND_TO_THE_REQUIREMENTS_FOR_ENTRY).addPcName(player));
return true;
}
if (checkInstanceStatus(player))
{
return true;
}
}
PLAYER_LIST_TO_ENTER.get(requestor.getObjectId()).addAll(group.getMembers());
return false;
}
private static boolean checkInstanceStatus(Player player)
{
final long currentTime = System.currentTimeMillis();
for (Integer instanceId : INSTANCE_IDS)
{
if (currentTime < InstanceManager.getInstance().getInstanceTime(player, instanceId))
{
player.sendPacket(new SystemMessage(SystemMessageId.C1_CANNOT_ENTER_YET).addString(player.getName()));
return true;
}
if (InstanceManager.getInstance().getPlayerInstance(player, true) != null)
{
player.sendPacket(new SystemMessage(SystemMessageId.SINCE_C1_ENTERED_ANOTHER_INSTANCE_ZONE_THEREFORE_YOU_CANNOT_ENTER_THIS_DUNGEON).addString(player.getName()));
return true;
}
if (InstanceManager.getInstance().getPlayerInstance(player, false) != null)
{
player.sendPacket(new SystemMessage(SystemMessageId.SINCE_C1_ENTERED_ANOTHER_INSTANCE_ZONE_THEREFORE_YOU_CANNOT_ENTER_THIS_DUNGEON).addString(player.getName()));
return true;
}
}
return false;
}
public static void main(String[] args)
{
new DreamPriestess();
}
}

View File

@ -0,0 +1,262 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package instances.DreamDungeon.GustavsManor;
import java.util.List;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceStatusChange;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import instances.AbstractInstance;
import instances.DreamDungeon.CatGuildsLair.CatGuildsLair;
/**
* @author Index
*/
public class GustavsManor extends AbstractInstance
{
/** Instance World IDS */
public static final int CREATED = 0;
public static final int GO_TO_GATES_AND_KILL_GIRL = 1;
public static final int TALK_WITH_RASCAL = 2;
public static final int KILL_FOUR_DREAM_WATCHERS_INSIDE = 3;
public static final int TALK_WITH_HORSIE_IN_MANOR = 4;
public static final int BOSS_FIGHT = 5;
public static final int FINISH_INSTANCE = 6;
public static final int INSTANCE_ID = 221;
private static final String DREAM_WATCHER_COUNTER = "DREAM_WATCHER_COUNTER";
private static final NpcStringId DREAM_WATCHER = NpcStringId.DREAM_WATCHER;
private static final NpcStringId STRING_ID_01 = NpcStringId.WHO_ARE_YOU_AND_HOW_DARE_YOU_ENTER_MY_MANOR;
private static final NpcStringId STRING_ID_02 = NpcStringId.I_WON_T_FORGIVE_YOU_FOR_INTRUDING_IN_GUSTAV_S_MANOR;
private static final NpcStringId STRING_ID_03 = NpcStringId.LEAVING_ALREADY_LET_S_PLAY_A_BIT_MORE;
private static final int[] MONSTERS =
{
22391, // Mansion Manager
22392, // Touchy Servant
22393, // Housekeeper
22394, // Cursed Girl
};
private static final int GUSTAV = 18678;
private static final int GUSTAV_STEWARD = 18679;
private static final int[] MAIN_DOOR_IDS =
{
21170001,
21170002,
21170005,
21170006,
21170003,
21170004,
};
private GustavsManor()
{
super(INSTANCE_ID);
addKillId(MONSTERS);
addKillId(GUSTAV, GUSTAV_STEWARD);
setInstanceStatusChangeId(this::onInstanceStatusChange, INSTANCE_ID);
}
public void onInstanceStatusChange(OnInstanceStatusChange event)
{
final Instance instance = event.getWorld();
final int status = event.getStatus();
switch (status)
{
case GO_TO_GATES_AND_KILL_GIRL:
{
instance.setReenterTime();
instance.despawnGroup("GustavNPC_1");
instance.spawnGroup("GustavNPC_2").forEach(n -> n.getSpawn().stopRespawn());
instance.spawnGroup("GustavMonsters_1").forEach(n -> n.getSpawn().stopRespawn());
break;
}
// case 2 - to talk with Rascal
case KILL_FOUR_DREAM_WATCHERS_INSIDE:
{
for (int doorId : MAIN_DOOR_IDS)
{
instance.openCloseDoor(doorId, true);
}
instance.despawnGroup("GustavNPC_2");
instance.spawnGroup("GustavMonsters_2").forEach(n -> n.getSpawn().stopRespawn());
setRandomTitles(instance, true);
break;
}
case TALK_WITH_HORSIE_IN_MANOR:
{
instance.getParameters().remove(DREAM_WATCHER_COUNTER);
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.HERE_IS_MY_HORSIE_LET_S_TAKE_A_BREAK, ExShowScreenMessage.TOP_CENTER, 10000, true));
ThreadPool.schedule(() ->
{
for (Npc npc : instance.getNpcs(MONSTERS))
{
npc.getSpawn().stopRespawn();
npc.doDie(null);
}
instance.spawnGroup("GustavNPC_3").forEach(n -> n.getSpawn().stopRespawn());
}, 10000);
break;
}
case BOSS_FIGHT:
{
instance.despawnGroup("GustavNPC_3");
spawnBoss(instance);
break;
}
case FINISH_INSTANCE:
{
instance.setDuration(5);
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_03, ExShowScreenMessage.TOP_CENTER, 10000, true));
instance.spawnGroup("GustavNPC_4").forEach(n -> n.getSpawn().stopRespawn());
break;
}
}
}
private void spawnBoss(Instance instance)
{
final boolean random = Rnd.nextBoolean();
// show text
final NpcStringId bossText = random ? STRING_ID_01 : STRING_ID_02;
instance.broadcastPacket(new ExShowScreenMessage(bossText, ExShowScreenMessage.TOP_CENTER, 10000, true));
// spawn boss
final String bossTemplate = random ? "GustavMonsters_Boss_Gustav" : "GustavMonsters_Boss_GustavSteward";
instance.spawnGroup(bossTemplate).forEach(n -> n.getSpawn().stopRespawn());
}
private void setRandomTitles(Instance instance, boolean randomMonsters)
{
if (randomMonsters)
{
for (int monsterId : MONSTERS)
{
// final Npc monster = instance.getNpcsOfGroup("GustavMonsters_2").stream().filter(npc -> npc.getTemplate().getId() == monsterId).findAny().orElse(instance.getNpc(monsterId));
final List<Npc> monsters = instance.getNpcsOfGroup("GustavMonsters_2").stream().filter(npc -> npc.getTemplate().getId() == monsterId).toList();
final Npc monster = monsters.isEmpty() ? instance.getNpc(monsterId) : monsters.get(Rnd.get(1, monsters.size()) - 1);
monster.setTitleString(DREAM_WATCHER);
monster.broadcastInfo();
}
}
else
{
final List<Npc> dreamWatcherNpcs = instance.spawnGroup("GustavMonsters_3");
dreamWatcherNpcs.forEach(n -> n.getSpawn().stopRespawn());
for (Npc npc : dreamWatcherNpcs)
{
npc.setTitleString(DREAM_WATCHER);
npc.broadcastInfo();
}
}
}
@Override
public String onKill(Npc npc, Player killer, boolean isSummon)
{
if (killer == null)
{
return super.onKill(npc, killer, isSummon);
}
final Instance instance = killer.getInstanceWorld();
if ((instance == null) || (instance.getTemplateId() != INSTANCE_ID))
{
return super.onKill(npc, killer, isSummon);
}
switch (instance.getStatus())
{
case GO_TO_GATES_AND_KILL_GIRL:
{
if (instance.getAliveNpcs(MONSTERS).isEmpty())
{
instance.setStatus(TALK_WITH_RASCAL);
}
// just guess
else if (npc.getTemplate().getId() == 22394)
{
instance.setStatus(TALK_WITH_RASCAL);
}
break;
}
case KILL_FOUR_DREAM_WATCHERS_INSIDE:
{
if (instance.getAliveNpcs(MONSTERS).isEmpty())
{
instance.setStatus(TALK_WITH_HORSIE_IN_MANOR);
break;
}
if ((npc.getTitleString() == null) || !npc.getTitleString().equals(DREAM_WATCHER))
{
return super.onKill(npc, killer, isSummon);
}
final int dreamWatcherCount = instance.getParameters().increaseInt(DREAM_WATCHER_COUNTER, 0, 1);
switch (dreamWatcherCount)
{
case 1:
{
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.DREAM_WATCHER_S_DEATH_1_4, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
break;
}
case 2:
{
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.DREAM_WATCHER_S_DEATH_2_4, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
break;
}
case 3:
{
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.DREAM_WATCHER_S_DEATH_3_4, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
break;
}
case 4:
{
instance.setStatus(TALK_WITH_HORSIE_IN_MANOR);
break;
}
}
break;
}
case BOSS_FIGHT:
{
if ((npc.getTemplate().getId() == GUSTAV) || (npc.getTemplate().getId() == GUSTAV_STEWARD))
{
if (!CatGuildsLair.calculateChanceForCatLair(instance))
{
instance.setStatus(FINISH_INSTANCE);
}
}
break;
}
}
return super.onKill(npc, killer, isSummon);
}
public static void main(String[] args)
{
new GustavsManor();
}
}

View File

@ -0,0 +1,87 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package instances.DreamDungeon.GustavsManor;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import ai.AbstractNpcAI;
/**
* @author Index
*/
public class Rascal extends AbstractNpcAI
{
private static final int RASCAL_NPC_ID = 34312;
// NPC STRINGS
private static final NpcStringId STRING_ID_01 = NpcStringId.MASTER_GUSTAV_TOOK_MY_HORSIE;
private static final NpcStringId STRING_ID_02 = NpcStringId.THE_HORSIE_IS_IN_THE_MANOR_I_WILL_OPEN_THE_DOORS_AND_WE_LL_GO_IN_AND_PLAY;
private Rascal()
{
addFirstTalkId(RASCAL_NPC_ID);
}
@Override
public String onFirstTalk(Npc npc, Player player)
{
final Instance instance = ((player == null) || (npc == null)) ? null : player.getInstanceWorld();
if ((instance == null) || (instance.getTemplateId() != GustavsManor.INSTANCE_ID))
{
return super.onFirstTalk(npc, player);
}
switch (instance.getStatus())
{
case GustavsManor.CREATED:
{
instance.setStatus(GustavsManor.GO_TO_GATES_AND_KILL_GIRL);
// Master Gustav took my horsie.
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_01, ExShowScreenMessage.TOP_CENTER, 10000, true));
break;
}
case GustavsManor.GO_TO_GATES_AND_KILL_GIRL:
{
return super.onFirstTalk(npc, player);
}
case GustavsManor.TALK_WITH_RASCAL:
{
instance.setStatus(GustavsManor.KILL_FOUR_DREAM_WATCHERS_INSIDE);
// The horsie is in the manor. I will open the doors and we'll go in and play.
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_02, ExShowScreenMessage.TOP_CENTER, 10000, true));
break;
}
case GustavsManor.FINISH_INSTANCE:
{
// instance.getPlayers().forEach(p -> p.sendPacket(new TimedHuntingZoneExit(0)));
instance.destroy();
break;
}
}
return super.onFirstTalk(npc, player);
}
public static void main(String[] args)
{
new Rascal();
}
}

View File

@ -0,0 +1,58 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package instances.DreamDungeon.GustavsManor;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import ai.AbstractNpcAI;
/**
* @author Index
*/
public class WoodHorse extends AbstractNpcAI
{
private static final int WOOD_HORSE_NPC_ID = 18673;
private WoodHorse()
{
addFirstTalkId(WOOD_HORSE_NPC_ID);
}
@Override
public String onFirstTalk(Npc npc, Player player)
{
final Instance instance = ((player == null) || (npc == null)) ? null : player.getInstanceWorld();
if ((instance == null) || (instance.getTemplateId() != GustavsManor.INSTANCE_ID))
{
return super.onFirstTalk(npc, player);
}
if (instance.getStatus() == GustavsManor.TALK_WITH_HORSIE_IN_MANOR)
{
instance.setStatus(GustavsManor.BOSS_FIGHT);
}
return super.onFirstTalk(npc, player);
}
public static void main(String[] args)
{
new WoodHorse();
}
}

View File

@ -0,0 +1,83 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package instances.DreamDungeon.VentusTemple;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import ai.AbstractNpcAI;
/**
* @author Index
*/
public class BrokenBallista extends AbstractNpcAI
{
private static final int BROKEN_BALLISTA_NPC_ID = 18675;
private BrokenBallista()
{
addSpawnId(BROKEN_BALLISTA_NPC_ID);
addFirstTalkId(BROKEN_BALLISTA_NPC_ID);
}
@Override
public String onSpawn(Npc npc)
{
final Instance instance = npc == null ? null : npc.getInstanceWorld();
if ((instance == null) || (instance.getTemplateId() != VentusTemple.INSTANCE_ID))
{
return super.onSpawn(npc);
}
if ((instance.getStatus() == VentusTemple.SHOOT_FROM_BALLISTA) && (npc != null))
{
npc.setRandomAnimation(true);
}
return super.onSpawn(npc);
}
@Override
public String onFirstTalk(Npc npc, Player player)
{
if ((player == null) || (npc == null))
{
return super.onFirstTalk(npc, player);
}
final Instance instance = player.getInstanceWorld();
if ((instance == null) || (instance.getTemplateId() != VentusTemple.INSTANCE_ID))
{
return super.onFirstTalk(npc, player);
}
if (instance.getStatus() == VentusTemple.SHOOT_FROM_BALLISTA)
{
instance.setStatus(VentusTemple.BOSS_FIGHT);
npc.setTargetable(false);
player.setTarget(null);
}
return super.onFirstTalk(npc, player);
}
public static void main(String[] args)
{
new BrokenBallista();
}
}

View File

@ -0,0 +1,97 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package instances.DreamDungeon.VentusTemple;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import ai.AbstractNpcAI;
/**
* @author Index
*/
public class VentusMaid extends AbstractNpcAI
{
public static final int VENTUS_MAID_NPC_ID = 34314;
private VentusMaid()
{
addFirstTalkId(VENTUS_MAID_NPC_ID);
addCreatureSeeId(VENTUS_MAID_NPC_ID);
}
@Override
public String onFirstTalk(Npc npc, Player player)
{
final Instance instance = ((player == null) || (npc == null)) ? null : player.getInstanceWorld();
if ((instance == null) || (instance.getTemplateId() != VentusTemple.INSTANCE_ID))
{
return super.onFirstTalk(npc, player);
}
switch (instance.getStatus())
{
case VentusTemple.TALK_WITH_VANTUS_MAID_ON_CREATE:
{
instance.setStatus(VentusTemple.KILL_FOUR_DREAM_WATCHERS_INSIDE);
break;
}
case VentusTemple.TALK_WITH_VENTUS_MAID_FOR_RESPAWN_BALLISTA:
{
instance.setStatus(VentusTemple.SHOOT_FROM_BALLISTA);
break;
}
case VentusTemple.FINISH_INSTANCE:
{
instance.destroy();
break;
}
}
return super.onFirstTalk(npc, player);
}
@Override
public String onCreatureSee(Npc npc, Creature creature)
{
if (((creature == null) || !creature.isPlayer() || (npc == null)))
{
return super.onCreatureSee(npc, creature);
}
final Instance instance = creature.getInstanceWorld();
if ((instance == null) || (instance.getTemplateId() != VentusTemple.INSTANCE_ID))
{
return super.onCreatureSee(npc, creature);
}
if (instance.getStatus() == VentusTemple.GO_TO_VENTUS_ROOM)
{
npc.setUndying(true);
instance.setStatus(VentusTemple.SAVE_VENTUS_MAID_IN_VENTUS_ROOM);
}
return super.onCreatureSee(npc, creature);
}
public static void main(String[] args)
{
new VentusMaid();
}
}

View File

@ -0,0 +1,382 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package instances.DreamDungeon.VentusTemple;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.ScheduledFuture;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.actor.instance.Monster;
import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceStatusChange;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import instances.AbstractInstance;
import instances.DreamDungeon.CatGuildsLair.CatGuildsLair;
/**
* @author Index
*/
public class VentusTemple extends AbstractInstance
{
/** Instance World IDS */
public static final int CREATED = 0;
public static final int TALK_WITH_VANTUS_MAID_ON_CREATE = 1;
public static final int KILL_FOUR_DREAM_WATCHERS_INSIDE = 2;
public static final int GO_TO_VENTUS_ROOM = 3;
public static final int SAVE_VENTUS_MAID_IN_VENTUS_ROOM = 4;
public static final int TALK_WITH_VENTUS_MAID_FOR_RESPAWN_BALLISTA = 5;
public static final int SHOOT_FROM_BALLISTA = 6;
public static final int BOSS_FIGHT = 7;
public static final int FINISH_INSTANCE = 8;
public static final int INSTANCE_ID = 223;
private static final int[] MONSTERS =
{
22399, // Ancient Swordsman
22400, // Ancient Thrower
22401, // Ancient Guard
22402, // Ancient Guard Captain
};
private static final int VENTUS = 18682;
private static final int REKARIO = 18683;
private static final String FIRST_STRING_TIMER = "FIRST_STRING_TIMER";
private static final String DREAM_WATCHER_COUNTER = "DREAM_WATCHER_COUNTER";
private static final String MONSTERS_ATTACK_MAID_COUNTER = "MONSTERS_ATTACK_MAID_COUNTER";
private static final NpcStringId DREAM_WATCHER = NpcStringId.DREAM_WATCHER;
private static final NpcStringId STRING_ID_01 = NpcStringId.I_HATE_THAT_CURSED_ARROGANT_VENTUS_YOU_GO_AHEAD_AND_GET_TO_THE_TEMPLE_OF_VENTUS;
private static final NpcStringId STRING_ID_02 = NpcStringId.FIRST_DEAL_WITH_THOSE_ENSLAVED_BY_VENTUS;
private static final NpcStringId STRING_ID_03 = NpcStringId.THIS_SCOUNDREL_IS_GOING_TO_SUBJUGATE_THE_OTHERS_WILL_USING_DARK_MAGIC_TRICKS;
private static final NpcStringId STRING_ID_04 = NpcStringId.USE_THE_BALLISTA_TO_DESTROY_VENTUS_STATUE;
private static final NpcStringId STRING_ID_05 = NpcStringId.I_VE_BEEN_HAVING_SUCH_A_NICE_DREAM_BUT_SOMEONE_HAS_INTERRUPTED_IT_DO_YOU_KNOW_WHAT_PRICE_YOU_LL_HAVE_TO_PAY_FOR_WAKING_ME_UP;
private static final NpcStringId STRING_ID_06 = NpcStringId.MASTER_VENTUS_DON_T_YOU_WORRY_I_LL_DEAL_WITH_IT_MYSELF;
private static final NpcStringId STRING_ID_07 = NpcStringId.OH_VENTUS_HAUGHTY_VENTUS_I_WISH_IT_WERE_NOT_A_DREAM;
private VentusTemple()
{
super(INSTANCE_ID);
addKillId(MONSTERS);
addKillId(VENTUS, REKARIO);
addAttackId(MONSTERS);
setInstanceStatusChangeId(this::onInstanceStatusChange, INSTANCE_ID);
}
public void onInstanceStatusChange(OnInstanceStatusChange event)
{
final Instance instance = event.getWorld();
final int status = event.getStatus();
switch (status)
{
case CREATED:
{
instance.setStatus(TALK_WITH_VANTUS_MAID_ON_CREATE);
// send screen message if player will not talk with Holy Grail's Raider
// I hate that cursed arrogant Ventus! You go ahead and get to the Temple of Ventus.
final ScheduledFuture<?> showFirstStringOnScreen = ThreadPool.schedule(() -> instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_01, ExShowScreenMessage.TOP_CENTER, 10000, true)), 10000);
instance.getParameters().set(FIRST_STRING_TIMER, showFirstStringOnScreen);
break;
}
// case TALK_WITH_VANTUS_MAID_ON_CREATE:
case KILL_FOUR_DREAM_WATCHERS_INSIDE:
{
getScheduleMessageAndMakeAction(instance);
instance.setReenterTime();
instance.despawnGroup("VentusNPC_1");
instance.spawnGroup("VentusMonsters").forEach(npc -> npc.getSpawn().stopRespawn());
instance.spawnGroup("VentusDreamMonsters_01").forEach(npc -> npc.getSpawn().stopRespawn());
ThreadPool.schedule(() -> setRandomTitles(instance), 500);
break;
}
case GO_TO_VENTUS_ROOM:
{
instance.spawnGroup("VentusNPC_2").forEach(npc -> npc.getSpawn().stopRespawn());
instance.spawnGroup("VentusMonsters_2").forEach(npc -> npc.getSpawn().stopRespawn()); // for avoid spawn by CreatureSee event
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_03, ExShowScreenMessage.TOP_CENTER, 10000, true));
break;
}
case SAVE_VENTUS_MAID_IN_VENTUS_ROOM:
{
// spawn monsters who will be attack maid
final List<Npc> maidAttackers = instance.getNpcsOfGroup("VentusMonsters_2");
maidAttackers.forEach(npc -> npc.getSpawn().stopRespawn());
// start attack maid
addDesireToAttack(instance, instance.getNpc(VentusMaid.VENTUS_MAID_NPC_ID));
// add count of monsters who attack maid
instance.getParameters().set(MONSTERS_ATTACK_MAID_COUNTER, -(maidAttackers.size()));
break;
}
case SHOOT_FROM_BALLISTA:
{
instance.despawnGroup("VentusNPC_2");
instance.spawnGroup("VentusNPC_3").forEach(npc -> npc.getSpawn().stopRespawn());
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_04, ExShowScreenMessage.TOP_CENTER, 10000, true));
break;
}
case BOSS_FIGHT:
{
ThreadPool.schedule(() ->
{
instance.despawnGroup("VentusNPC_3");
spawnBoss(instance);
}, 2500);
break;
}
case FINISH_INSTANCE:
{
instance.setDuration(5);
instance.spawnGroup("VentusNPC_4");
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_07, ExShowScreenMessage.TOP_CENTER, 10000, true));
break;
}
}
}
private void spawnBoss(Instance instance)
{
final boolean random = Rnd.nextBoolean();
// show text
final NpcStringId bossText = random ? STRING_ID_05 : STRING_ID_06;
instance.broadcastPacket(new ExShowScreenMessage(bossText, ExShowScreenMessage.TOP_CENTER, 10000, true));
// spawn boss
final String bossTemplate = random ? "VentusBoss_Ventus" : "VentusBoss_Rekario";
instance.spawnGroup(bossTemplate).forEach(n -> n.getSpawn().stopRespawn());
}
private void setRandomTitles(Instance instance)
{
final int maxDreamerMonsters = 6;
final Set<Npc> randomNpcs = new HashSet<>();
final List<Npc> monsters = new CopyOnWriteArrayList<>(instance.getNpcs(22402)); // get all captains
if (monsters.isEmpty())
{
for (Player player : instance.getPlayers())
{
InstanceManager.getInstance().deleteInstanceTime(player, INSTANCE_ID);
}
instance.destroy();
return;
}
Collections.shuffle(monsters);
for (Npc monster : monsters)
{
if (randomNpcs.size() >= maxDreamerMonsters)
{
break;
}
if (monsters.size() <= maxDreamerMonsters)
{
if (randomNpcs.isEmpty())
{
randomNpcs.addAll(monsters);
}
if (randomNpcs.size() < 4) // min instance count
{
while (randomNpcs.size() <= maxDreamerMonsters)
{
final Npc finalMonster = monsters.get(Rnd.get(1, monsters.size()) - 1);
randomNpcs.add(finalMonster);
monsters.remove(finalMonster);
}
}
break;
}
if (Rnd.get(100) < 35)
{
randomNpcs.add(monster);
}
else if (isMonsterIsOneOfSpawnGroup(monster, true))
{
monster.deleteMe();
}
monsters.remove(monster);
}
for (Npc monster : randomNpcs)
{
monster.setTitleString(DREAM_WATCHER);
monster.broadcastInfo();
}
monsters.clear();
randomNpcs.clear();
}
@Override
public String onAttack(Npc npc, Player attacker, int damage, boolean isSummon)
{
if (attacker == null)
{
return super.onAttack(npc, attacker, damage, isSummon);
}
final Instance instance = attacker.getInstanceWorld();
if ((instance == null) || (instance.getTemplateId() == 0))
{
return super.onAttack(npc, attacker, damage, isSummon);
}
if (isMonsterIsOneOfSpawnGroup(npc, false))
{
if ((npc.getTarget() != null) && npc.getTarget().isPlayer())
{
return super.onAttack(npc, attacker, damage, isSummon);
}
addDesireToAttack(instance, attacker);
}
return super.onAttack(npc, attacker, damage, isSummon);
}
@Override
public String onKill(Npc npc, Player killer, boolean isSummon)
{
if (killer == null)
{
return super.onKill(npc, killer, isSummon);
}
final Instance instance = killer.getInstanceWorld();
if ((instance == null) || (instance.getTemplateId() == 0))
{
return super.onKill(npc, killer, isSummon);
}
switch (instance.getStatus())
{
case KILL_FOUR_DREAM_WATCHERS_INSIDE:
{
if (instance.getAliveNpcs(MONSTERS).isEmpty())
{
instance.setStatus(GO_TO_VENTUS_ROOM);
break;
}
if ((npc.getTitleString() == null) || !npc.getTitleString().equals(DREAM_WATCHER))
{
return super.onKill(npc, killer, isSummon);
}
final int dreamWatcherCount = instance.getParameters().increaseInt(DREAM_WATCHER_COUNTER, 0, 1);
switch (dreamWatcherCount)
{
case 1:
{
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.DREAM_WATCHER_S_DEATH_1_4_2, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
break;
}
case 2:
{
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.DREAM_WATCHER_S_DEATH_2_4_2, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
break;
}
case 3:
{
instance.broadcastPacket(new ExShowScreenMessage(NpcStringId.DREAM_WATCHER_S_DEATH_3_4_2, ExShowScreenMessage.BOTTOM_RIGHT, 10000, false));
break;
}
case 4:
{
instance.setStatus(GO_TO_VENTUS_ROOM);
break;
}
}
break;
}
case SAVE_VENTUS_MAID_IN_VENTUS_ROOM:
{
if (isMonsterIsOneOfSpawnGroup(npc, false) && (instance.getParameters().increaseInt(MONSTERS_ATTACK_MAID_COUNTER, 0, 1) >= 0))
{
instance.setStatus(TALK_WITH_VENTUS_MAID_FOR_RESPAWN_BALLISTA);
break;
}
break;
}
case BOSS_FIGHT:
{
if ((npc.getTemplate().getId() == VENTUS) || (npc.getTemplate().getId() == REKARIO))
{
if (!CatGuildsLair.calculateChanceForCatLair(instance))
{
instance.setStatus(FINISH_INSTANCE);
}
}
break;
}
}
return super.onKill(npc, killer, isSummon);
}
private static boolean isMonsterIsOneOfSpawnGroup(Npc npc, boolean isDream)
{
final String group = isDream ? "VentusDreamMonsters_01" : "VentusMonsters_2";
return (npc != null) && (npc.getSpawn() != null) && (npc.getSpawn().getNpcSpawnTemplate() != null) && (npc.getSpawn().getNpcSpawnTemplate().getGroup() != null) && (npc.getSpawn().getNpcSpawnTemplate().getGroup().getName() != null) && npc.getSpawn().getNpcSpawnTemplate().getGroup().getName().equalsIgnoreCase(group);
}
private void addDesireToAttack(Instance instance, Creature target)
{
final List<Npc> monsterAttackers = instance.getNpcsOfGroup("VentusMonsters_2");
for (Npc monster : monsterAttackers)
{
((Monster) monster).addDamageHate(target, 0, target.isNpc() ? 1 : 2);
addAttackDesire(monster, target);
}
}
private static void getScheduleMessageAndMakeAction(Instance instance)
{
// make sure message is shown (if will not - send) and trying remove it from memory
ScheduledFuture<?> showFirstStringOnScreen = instance.getParameters().getObject(FIRST_STRING_TIMER, ScheduledFuture.class, null);
if ((showFirstStringOnScreen == null) || !showFirstStringOnScreen.isDone())
{
if (showFirstStringOnScreen != null)
{
showFirstStringOnScreen.cancel(true);
showFirstStringOnScreen = null;
}
// First deal with those enslaved by Ventus. // guess
instance.broadcastPacket(new ExShowScreenMessage(STRING_ID_02, ExShowScreenMessage.TOP_CENTER, 10000, true));
}
if ((showFirstStringOnScreen != null) && showFirstStringOnScreen.isDone())
{
showFirstStringOnScreen.cancel(true);
showFirstStringOnScreen = null;
}
instance.getParameters().remove(FIRST_STRING_TIMER);
}
public static void main(String[] args)
{
new VentusTemple();
}
}

View File

@ -135,6 +135,7 @@
<npc id="31658" x="181264" y="36640" z="-4789" heading="25000" respawnTime="60sec" /> <!-- Tablet Of Vision -->
<npc id="31688" x="147688" y="28527" z="-2264" heading="38406" respawnTime="60sec" /> <!-- Saige - Olympiad Manager -->
<npc id="31690" x="147648" y="28599" z="-2264" heading="40508" respawnTime="60sec" /> <!-- Monument of Heroes -->
<npc id="34304" x="147354" y="27813" z="-2270" heading="14903" respawnTime="60sec" /> <!-- Dream Priestess -->
<npc id="30767" x="148009" y="28603" z="-2264" heading="52880" respawnTime="60sec"> <!-- Auctioneer -->
<parameters>
<param name="fnAgitMap" value="aden" />

View File

@ -1802,7 +1802,7 @@
<height normal="0.1" />
</collision>
</npc>
<npc id="18673" level="83" type="Monster" name="Wood Horse">
<npc id="18673" level="83" type="Folk" name="Wood Horse">
<!-- AUTO GENERATED NPC TODO: FIX IT -->
<race>ETC</race>
<sex>MALE</sex>
@ -1825,7 +1825,7 @@
<skill id="4416" level="19" /> <!-- Others -->
</skillList>
</npc>
<npc id="18674" level="83" type="Monster" name="Holy Grail">
<npc id="18674" level="83" type="Folk" name="Holy Grail">
<!-- AUTO GENERATED NPC TODO: FIX IT -->
<race>ETC</race>
<sex>MALE</sex>
@ -1848,7 +1848,7 @@
<skill id="4416" level="19" /> <!-- Others -->
</skillList>
</npc>
<npc id="18675" level="83" type="Monster" name="Broken Ballista">
<npc id="18675" level="83" type="Folk" name="Broken Ballista">
<!-- AUTO GENERATED NPC TODO: FIX IT -->
<race>ETC</race>
<sex>MALE</sex>
@ -1891,7 +1891,7 @@
<skill id="4416" level="10" /> <!-- Dragons -->
</skillList>
</npc>
<npc id="18677" level="83" type="Monster" name="Elven Elder Cat">
<npc id="18677" level="83" type="Folk" name="Elven Elder Cat">
<!-- AUTO GENERATED NPC TODO: FIX IT -->
<race>ANIMAL</race>
<sex>MALE</sex>

View File

@ -149,6 +149,7 @@ Vanguard: https://eu.4game.com/patchnotes/lineage2essence/387/
-New enchant system
-World exchange system
-Chest and box auto-use
-Dream Dungeon
Crusader: https://eu.4game.com/patchnotes/lineage2essence/416/
-New character creation templates