Pailaka Injured Dragon and other quest related changes.

Adapted from: L2jUnity free files.
This commit is contained in:
MobiusDev 2017-11-18 15:25:22 +00:00
parent 52218333fb
commit 3b2c0bd8dc
288 changed files with 8082 additions and 3071 deletions

View File

@ -1,129 +1,524 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="45" name="Pailaka (Injured dragon)" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/instance.xsd">
<!-- Pailaka Injured Dragon -->
<instance id="45" name="Pailaka (Injured dragon)" maxWorlds="100" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/instance.xsd">
<time duration="90" empty="3" />
<locations>
<enter type="FIXED">
<location x="125757" y="-40928" z="-3736" />
<location x="125738" y="-40933" z="-3770" />
</enter>
<exit type="ORIGIN" />
</locations>
<conditions>
<condition type="Level">
<param name="min" value="73" />
<param name="max" value="77" />
</condition>
<condition type="Quest">
<param name="id" value="144" />
</condition>
</conditions>
<spawnlist>
<group name="general">
<npc id="32502" x="125524" y="-40946" z="-3718" heading="8279" />
<npc id="32509" x="110074" y="-41324" z="-2285" heading="33580" />
<npc id="32509" x="113745" y="-47565" z="-2593" heading="55710" />
<npc id="18660" x="105618" y="-41801" z="-1782" heading="34701" /> <!-- Latana -->
<group name="pailaka_2316_1m1">
<territories>
<territory name="pailaka_2316_1" minZ="-3000" maxZ="-2700">
<node x="121312" y="-46106" />
<node x="122368" y="-46174" />
<node x="122368" y="-45526" />
<node x="121296" y="-45474" />
</territory>
</territories>
<npc id="18635" x="122122" y="-45658" z="-2884" count="1" /> <!-- Varka Silenos Recruit -->
<npc id="18636" x="122130" y="-45754" z="-2884" count="1" /> <!-- Varka Silenos Footman -->
<npc id="18642" x="122134" y="-45862" z="-2884" count="1" /> <!-- Varka Silenos Warrior -->
<npc id="18636" x="122130" y="-45958" z="-2880" count="1" /> <!-- Varka Silenos Footman -->
<npc id="18635" x="122122" y="-46042" z="-2880" count="1" /> <!-- Varka Silenos Recruit -->
</group>
<group name="wall_200001" spawnByDefault="false">
<npc id="18635" x="122077" y="-46098" z="-2914" heading="5028" />
<npc id="18636" x="122023" y="-45769" z="-2910" heading="63593" />
<npc id="18642" x="122038" y="-45904" z="-2914" heading="771" />
<npc id="18636" x="122050" y="-45999" z="-2910" heading="1701" />
<npc id="18635" x="122019" y="-45634" z="-2908" heading="64841" />
<group name="pailaka_2316_1m2">
<territories>
<territory name="pailaka_2316_1" minZ="-3000" maxZ="-2700">
<node x="121312" y="-46106" />
<node x="122368" y="-46174" />
<node x="122368" y="-45526" />
<node x="121296" y="-45474" />
</territory>
</territories>
<npc id="18640" x="121900" y="-45774" z="-2876" count="1" /> <!-- Varka Silenos Shaman -->
<npc id="18641" x="121898" y="-45904" z="-2875" count="1" /> <!-- Varka Silenos Priest -->
<npc id="18663" x="121898" y="-45904" z="-2875" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_01" />
<param name="GM_ID" value="2316001" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_1m1" />
</parameters>
</npc>
</group>
<group name="wall_200001_add" spawnByDefault="false">
<npc id="18640" x="121931" y="-45844" z="-2902" heading="664" /> <!-- Varka Silenos Shaman -->
<group name="pailaka_2316_2m1">
<territories>
<territory name="pailaka_2316_2" minZ="-2648" maxZ="-2148">
<node x="116604" y="-51752" />
<node x="117320" y="-52676" />
<node x="117944" y="-51812" />
<node x="117056" y="-51204" />
</territory>
</territories>
<npc id="18635" x="117460" y="-51832" z="-2528" heading="57343" count="1" /> <!-- Varka Silenos Recruit -->
<npc id="18636" x="117396" y="-51928" z="-2520" heading="57343" count="1" /> <!-- Varka Silenos Footman -->
<npc id="18642" x="117328" y="-52020" z="-2528" heading="57343" count="1" /> <!-- Varka Silenos Warrior -->
<npc id="18636" x="117252" y="-52104" z="-2528" heading="57343" count="1" /> <!-- Varka Silenos Footman -->
<npc id="18635" x="117180" y="-52180" z="-2528" heading="57343" count="1" /> <!-- Varka Silenos Recruit -->
</group>
<group name="wall_200002" spawnByDefault="false">
<npc id="18653" x="115997" y="-46271" z="-2637" heading="63732" />
<npc id="18654" x="116056" y="-46341" z="-2630" heading="63791" />
<npc id="18646" x="116054" y="-46439" z="-2637" heading="63477" />
<npc id="18646" x="116057" y="-46521" z="-2644" heading="65025" />
<npc id="18654" x="116084" y="-46587" z="-2651" heading="1141" />
<npc id="18653" x="116063" y="-46680" z="-2658" heading="4323" />
<group name="pailaka_2316_2m2">
<territories>
<territory name="pailaka_2316_2" minZ="-2648" maxZ="-2148">
<node x="116604" y="-51752" />
<node x="117320" y="-52676" />
<node x="117944" y="-51812" />
<node x="117056" y="-51204" />
</territory>
</territories>
<npc id="18640" x="117196" y="-51832" z="-2560" heading="57344" count="1" /> <!-- Varka Silenos Shaman -->
<npc id="18641" x="117088" y="-51948" z="-2544" heading="57344" count="1" /> <!-- Varka Silenos Priest -->
<npc id="18663" x="117088" y="-51948" z="-2544" heading="57344" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_02" />
<param name="GM_ID" value="2316002" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_2m1" />
</parameters>
</npc>
</group>
<group name="wall_200002_add" spawnByDefault="false">
<npc id="18648" x="115989" y="-46537" z="-2641" heading="1087" />
<npc id="18652" x="115984" y="-46471" z="-2635" heading="0" />
<group name="pailaka_2316_3m1">
<territories>
<territory name="pailaka_2316_3" minZ="-2680" maxZ="-2180">
<node x="115340" y="-56344" />
<node x="116404" y="-56356" />
<node x="116516" y="-55524" />
<node x="115460" y="-55488" />
</territory>
</territories>
<npc id="18635" x="116024" y="-55796" z="-2512" count="1" /> <!-- Varka Silenos Recruit -->
<npc id="18636" x="116016" y="-55888" z="-2527" count="1" /> <!-- Varka Silenos Footman -->
<npc id="18642" x="116000" y="-55992" z="-2528" count="1" /> <!-- Varka Silenos Warrior -->
<npc id="18636" x="115984" y="-56092" z="-2512" count="1" /> <!-- Varka Silenos Footman -->
<npc id="18635" x="115968" y="-56176" z="-2493" count="1" /> <!-- Varka Silenos Recruit -->
</group>
<group name="wall_200003" spawnByDefault="false">
<npc id="18653" x="116213" y="-50301" z="-2622" heading="50611" />
<npc id="18654" x="116155" y="-50420" z="-2635" heading="53262" />
<npc id="18646" x="116075" y="-50463" z="-2642" heading="53954" />
<npc id="18646" x="116020" y="-50497" z="-2643" heading="55751" />
<npc id="18654" x="115952" y="-50528" z="-2646" heading="52507" />
<npc id="18653" x="115780" y="-50465" z="-2620" heading="52135" />
<group name="pailaka_2316_3m2">
<territories>
<territory name="pailaka_2316_3" minZ="-2680" maxZ="-2180">
<node x="115340" y="-56344" />
<node x="116404" y="-56356" />
<node x="116516" y="-55524" />
<node x="115460" y="-55488" />
</territory>
</territories>
<npc id="18640" x="115755" y="-55866" z="-2579" count="1" /> <!-- Varka Silenos Shaman -->
<npc id="18641" x="115760" y="-56025" z="-2569" count="1" /> <!-- Varka Silenos Priest -->
<npc id="18663" x="115760" y="-56025" z="-2569" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_03" />
<param name="GM_ID" value="2316003" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_3m1" />
</parameters>
</npc>
</group>
<group name="wall_200003_add" spawnByDefault="false">
<npc id="18648" x="116065" y="-50355" z="-2639" heading="53280" />
<npc id="18652" x="115988" y="-50389" z="-2641" heading="52342" />
<npc id="18648" x="115906" y="-50447" z="-2643" heading="54768" />
<group name="pailaka_2316_4m1">
<territories>
<territory name="pailaka_2316_4" minZ="-2704" maxZ="-2104">
<node x="114708" y="-46884" />
<node x="116404" y="-46820" />
<node x="116404" y="-46032" />
<node x="114708" y="-46096" />
</territory>
</territories>
<npc id="18653" x="116150" y="-46307" z="-2614" count="1" /> <!-- Varka's Elite Escort -->
<npc id="18654" x="116151" y="-46369" z="-2622" count="1" /> <!-- Varka's Commander -->
<npc id="18646" x="116153" y="-46431" z="-2623" count="1" /> <!-- Varka Silenos Sergeant -->
<npc id="18646" x="116152" y="-46491" z="-2631" count="1" /> <!-- Varka Silenos Sergeant -->
<npc id="18654" x="116147" y="-46552" z="-2635" count="1" /> <!-- Varka's Commander -->
<npc id="18653" x="116144" y="-46608" z="-2640" count="1" /> <!-- Varka's Elite Escort -->
</group>
<group name="wall_200004">
<npc id="18635" x="117184" y="-51722" z="-2575" heading="55468" />
<npc id="18636" x="117097" y="-51774" z="-2577" heading="51453" />
<npc id="18642" x="117013" y="-51840" z="-2578" heading="55135" />
<npc id="18636" x="116926" y="-51876" z="-2580" heading="56322" />
<npc id="18635" x="116876" y="-51937" z="-2572" heading="59301" />
<group name="pailaka_2316_4m2">
<territories>
<territory name="pailaka_2316_4" minZ="-2704" maxZ="-2104">
<node x="114708" y="-46884" />
<node x="116404" y="-46820" />
<node x="116404" y="-46032" />
<node x="114708" y="-46096" />
</territory>
</territories>
<npc id="18645" x="115947" y="-46458" z="-2617" count="1" /> <!-- Varka Silenos Magus -->
<npc id="18644" x="115911" y="-46378" z="-2623" count="1" /> <!-- Varka Silenos Medium -->
<npc id="18648" x="115916" y="-46525" z="-2608" count="1" /> <!-- Varka Silenos Chief Priest -->
<npc id="18663" x="115916" y="-46525" z="-2608" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_04" />
<param name="GM_ID" value="2316004" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_4m1" />
</parameters>
</npc>
</group>
<group name="wall_200004_add" spawnByDefault="false">
<npc id="18648" x="117060" y="-51674" z="-2580" heading="57161" />
<npc id="18648" x="116918" y="-51781" z="-2582" heading="57343" />
<group name="pailaka_2316_5m1">
<territories>
<territory name="pailaka_2316_5" minZ="-2684" maxZ="-2184">
<node x="115756" y="-50960" />
<node x="116448" y="-50512" />
<node x="115760" y="-49552" />
<node x="114896" y="-50368" />
</territory>
</territories>
<npc id="18653" x="116163" y="-50317" z="-2612" heading="53247" count="1" /> <!-- Varka's Elite Escort -->
<npc id="18654" x="116104" y="-50357" z="-2620" heading="53247" count="1" /> <!-- Varka's Commander -->
<npc id="18646" x="116048" y="-50397" z="-2622" heading="53247" count="1" /> <!-- Varka Silenos Sergeant -->
<npc id="18646" x="115993" y="-50439" z="-2624" heading="53247" count="1" /> <!-- Varka Silenos Sergeant -->
<npc id="18654" x="115932" y="-50481" z="-2627" heading="53247" count="1" /> <!-- Varka's Commander -->
<npc id="18653" x="115869" y="-50505" z="-2609" heading="53247" count="1" /> <!-- Varka's Elite Escort -->
</group>
<group name="wall_200005" spawnByDefault="false">
<npc id="18649" x="111606" y="-43746" z="-2633" heading="62267" />
<npc id="18650" x="111602" y="-43846" z="-2638" heading="63427" />
<npc id="18649" x="111616" y="-43922" z="-2635" heading="60699" />
<npc id="18650" x="111618" y="-44003" z="-2637" heading="59709" />
<npc id="18649" x="111614" y="-44071" z="-2642" heading="63794" />
<npc id="18650" x="111619" y="-44129" z="-2650" heading="2365" />
<group name="pailaka_2316_5m2">
<territories>
<territory name="pailaka_2316_5" minZ="-2684" maxZ="-2184">
<node x="115756" y="-50960" />
<node x="116448" y="-50512" />
<node x="115760" y="-49552" />
<node x="114896" y="-50368" />
</territory>
</territories>
<npc id="18645" x="116054" y="-50230" z="-2618" heading="53247" count="1" /> <!-- Varka Silenos Magus -->
<npc id="18644" x="115944" y="-50297" z="-2624" heading="53247" count="1" /> <!-- Varka Silenos Medium -->
<npc id="18648" x="115837" y="-50357" z="-2624" heading="53247" count="1" /> <!-- Varka Silenos Chief Priest -->
<npc id="18663" x="115837" y="-50357" z="-2624" heading="53247" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_05" />
<param name="GM_ID" value="2316005" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_5m1" />
</parameters>
</npc>
</group>
<group name="wall_200005_add" spawnByDefault="false">
<npc id="18652" x="111499" y="-43867" z="-2619" heading="1338" />
<npc id="18648" x="111539" y="-43743" z="-2623" heading="62952" />
<npc id="18648" x="111522" y="-43965" z="-2616" heading="63399" />
<npc id="18652" x="111514" y="-44085" z="-2625" heading="379" />
<group name="pailaka_2316_6m1">
<territories>
<territory name="pailaka_2316_6" minZ="-2360" maxZ="-1960">
<node x="108020" y="-50088" />
<node x="108940" y="-50004" />
<node x="108872" y="-49284" />
<node x="107924" y="-49328" />
</territory>
</territories>
<npc id="18653" x="108622" y="-49901" z="-2169" heading="49151" count="1" /> <!-- Varka's Elite Escort -->
<npc id="18654" x="108510" y="-49908" z="-2200" heading="49151" count="1" /> <!-- Varka's Commander -->
<npc id="18646" x="108398" y="-49916" z="-2229" heading="49151" count="1" /> <!-- Varka Silenos Sergeant -->
<npc id="18646" x="108296" y="-49937" z="-2242" heading="49151" count="1" /> <!-- Varka Silenos Sergeant -->
<npc id="18654" x="108185" y="-49947" z="-2261" heading="49151" count="1" /> <!-- Varka's Commander -->
<npc id="18653" x="108078" y="-49950" z="-2268" heading="49151" count="1" /> <!-- Varka's Elite Escort -->
</group>
<group name="wall_200006" spawnByDefault="false">
<npc id="18657" x="109272" y="-45665" z="-2210" heading="4731" />
<npc id="18655" x="109326" y="-45781" z="-2235" heading="5945" />
<npc id="18657" x="109393" y="-45893" z="-2253" heading="5549" />
<npc id="18655" x="109458" y="-45980" z="-2263" heading="6915" />
<npc id="18657" x="109516" y="-46032" z="-2268" heading="4362" />
<npc id="18655" x="109584" y="-46100" z="-2263" heading="9356" />
<group name="pailaka_2316_6m2">
<territories>
<territory name="pailaka_2316_6" minZ="-2360" maxZ="-1960">
<node x="108020" y="-50088" />
<node x="108940" y="-50004" />
<node x="108872" y="-49284" />
<node x="107924" y="-49328" />
</territory>
</territories>
<npc id="18645" x="108514" y="-49748" z="-2175" heading="45055" count="1" /> <!-- Varka Silenos Magus -->
<npc id="18644" x="108322" y="-49726" z="-2214" heading="49151" count="1" /> <!-- Varka Silenos Medium -->
<npc id="18648" x="108149" y="-49766" z="-2243" heading="53247" count="1" /> <!-- Varka Silenos Chief Priest -->
<npc id="18663" x="108149" y="-49766" z="-2243" heading="53247" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_06" />
<param name="GM_ID" value="2316006" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_6m1" />
</parameters>
</npc>
</group>
<group name="wall_200006_add" spawnByDefault="false">
<npc id="18652" x="109442" y="-46077" z="-2256" heading="8191" />
<npc id="18648" x="109298" y="-45890" z="-2232" heading="7391" />
<npc id="18652" x="109373" y="-45985" z="-2250" heading="7882" />
<group name="pailaka_2316_7m1">
<territories>
<territory name="pailaka_2316_7" minZ="-2745" maxZ="-2345">
<node x="110628" y="-44180" />
<node x="111680" y="-44220" />
<node x="111740" y="-43532" />
<node x="110700" y="-43484" />
</territory>
</territories>
<npc id="18649" x="111552" y="-43594" z="-2629" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="111549" y="-43688" z="-2616" count="1" /> <!-- Varka Silenos Officer -->
<npc id="18649" x="111545" y="-43776" z="-2611" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="111540" y="-43868" z="-2610" count="1" /> <!-- Varka Silenos Officer -->
<npc id="18649" x="111536" y="-43952" z="-2606" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="111533" y="-44038" z="-2608" count="1" /> <!-- Varka Silenos Officer -->
</group>
<group name="wall_200007">
<npc id="18653" x="116432" y="-55729" z="-2441" heading="65250" />
<npc id="18654" x="116499" y="-55822" z="-2449" heading="63477" />
<npc id="18646" x="116503" y="-55918" z="-2449" heading="589" />
<npc id="18646" x="116490" y="-56022" z="-2445" heading="61772" />
<npc id="18654" x="116481" y="-56108" z="-2437" heading="62531" />
<npc id="18653" x="116433" y="-56194" z="-2432" heading="927" />
<group name="pailaka_2316_7m2">
<territories>
<territory name="pailaka_2316_7" minZ="-2745" maxZ="-2345">
<node x="110628" y="-44180" />
<node x="111680" y="-44220" />
<node x="111740" y="-43532" />
<node x="110700" y="-43484" />
</territory>
</territories>
<npc id="18652" x="111360" y="-43664" z="-2592" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18648" x="111360" y="-43744" z="-2576" count="1" /> <!-- Varka Silenos Chief Priest -->
<npc id="18652" x="111344" y="-43824" z="-2576" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18648" x="111347" y="-43905" z="-2576" count="1" /> <!-- Varka Silenos Chief Priest -->
<npc id="18652" x="111344" y="-43984" z="-2576" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18663" x="111344" y="-43984" z="-2576" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_07" />
<param name="GM_ID" value="2316007" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_7m1" />
</parameters>
</npc>
</group>
<group name="wall_200007_add" spawnByDefault="false">
<npc id="18648" x="116348" y="-56103" z="-2460" heading="63868" />
<npc id="18652" x="116394" y="-55968" z="-2465" heading="2634" />
<npc id="18648" x="116398" y="-55821" z="-2464" heading="664" />
<group name="pailaka_2316_8m1">
<territories>
<territory name="pailaka_2316_8" minZ="-2376" maxZ="-1976">
<node x="109092" y="-46644" />
<node x="109916" y="-45888" />
<node x="109580" y="-45208" />
<node x="108612" y="-45880" />
</territory>
</territories>
<npc id="18649" x="109081" y="-46337" z="-2176" heading="36864" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="109048" y="-46280" z="-2176" heading="36864" count="1" /> <!-- Varka Silenos Officer -->
<npc id="18649" x="109015" y="-46222" z="-2160" heading="36864" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="108984" y="-46168" z="-2160" heading="36864" count="1" /> <!-- Varka Silenos Officer -->
<npc id="18649" x="108951" y="-46120" z="-2144" heading="36864" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="108916" y="-46068" z="-2144" heading="36864" count="1" /> <!-- Varka Silenos Officer -->
</group>
<group name="wall_200008" spawnByDefault="false">
<npc id="18655" x="108892" y="-41031" z="-2204" heading="64381" />
<npc id="18657" x="108888" y="-41114" z="-2195" heading="64256" />
<npc id="18655" x="108886" y="-41185" z="-2196" heading="64884" />
<npc id="18657" x="108878" y="-41260" z="-2188" heading="64876" />
<npc id="18655" x="108862" y="-41323" z="-2174" heading="62422" />
<npc id="18657" x="108869" y="-41376" z="-2163" heading="2280" />
<npc id="18655" x="108877" y="-41436" z="-2144" heading="64321" />
<group name="pailaka_2316_8m2">
<territories>
<territory name="pailaka_2316_8" minZ="-2376" maxZ="-1976">
<node x="109092" y="-46644" />
<node x="109916" y="-45888" />
<node x="109580" y="-45208" />
<node x="108612" y="-45880" />
</territory>
</territories>
<npc id="18652" x="109203" y="-46244" z="-2190" heading="36863" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18648" x="109169" y="-46186" z="-2190" heading="36863" count="1" /> <!-- Varka Silenos Chief Priest -->
<npc id="18652" x="109134" y="-46127" z="-2174" heading="36863" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18648" x="109094" y="-46071" z="-2174" heading="36863" count="1" /> <!-- Varka Silenos Chief Priest -->
<npc id="18652" x="109058" y="-46013" z="-2158" heading="36863" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18663" x="109058" y="-46013" z="-2158" heading="36863" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_08" />
<param name="GM_ID" value="2316008" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_8m1" />
</parameters>
</npc>
</group>
<group name="wall_200008_add" spawnByDefault="false">
<npc id="18652" x="108797" y="-41101" z="-2176" heading="62980" />
<npc id="18652" x="108819" y="-41198" z="-2183" heading="0" />
<npc id="18652" x="108811" y="-41293" z="-2170" heading="473" />
<group name="pailaka_2316_9m1">
<territories>
<territory name="pailaka_2316_9" minZ="-1924" maxZ="-1424">
<node x="109752" y="-39880" />
<node x="110416" y="-39860" />
<node x="110348" y="-39020" />
<node x="109716" y="-38908" />
</territory>
</territories>
<npc id="18650" x="110224" y="-39828" z="-1808" heading="49152" count="1" /> <!-- Varka Silenos Officer -->
<npc id="18649" x="110144" y="-39840" z="-1840" heading="49152" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="110064" y="-39844" z="-1840" heading="49152" count="1" /> <!-- Varka Silenos Officer -->
<npc id="18649" x="109978" y="-39848" z="-1840" heading="49152" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="109892" y="-39847" z="-1824" heading="49152" count="1" /> <!-- Varka Silenos Officer -->
</group>
<group name="wall_200009">
<npc id="18650" x="110205" y="-39800" z="-1840" heading="46882" />
<npc id="18649" x="110110" y="-39799" z="-1850" heading="46038" />
<npc id="18659" x="110023" y="-39802" z="-1852" heading="48655" />
<npc id="18649" x="109955" y="-39811" z="-1855" heading="48647" />
<npc id="18650" x="109874" y="-39833" z="-1837" heading="48408" />
<group name="pailaka_2316_9m2">
<territories>
<territory name="pailaka_2316_9" minZ="-1924" maxZ="-1424">
<node x="109752" y="-39880" />
<node x="110416" y="-39860" />
<node x="110348" y="-39020" />
<node x="109716" y="-38908" />
</territory>
</territories>
<npc id="18652" x="110143" y="-39645" z="-1776" heading="49152" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18652" x="110048" y="-39648" z="-1776" heading="49152" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18652" x="109950" y="-39646" z="-1776" heading="49152" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18663" x="109950" y="-39646" z="-1776" heading="49152" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_09" />
<param name="GM_ID" value="2316009" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_9m1" />
</parameters>
</npc>
</group>
<group name="wall_200009_add" spawnByDefault="false">
<npc id="18652" x="109965" y="-39685" z="-1815" heading="48384" />
<npc id="18652" x="110087" y="-39710" z="-1827" heading="48270" />
<group name="pailaka_2316_10m1">
<territories>
<territory name="pailaka_2316_10" minZ="-2272" maxZ="-1772">
<node x="108388" y="-41460" />
<node x="108912" y="-41460" />
<node x="109048" y="-41020" />
<node x="108432" y="-40848" />
</territory>
</territories>
<npc id="18655" x="108917" y="-41028" z="-2188" count="1" /> <!-- Varka's Chief Escort -->
<npc id="18657" x="108912" y="-41089" z="-2180" count="1" /> <!-- Prophet's Royal Guard -->
<npc id="18655" x="108901" y="-41147" z="-2181" count="1" /> <!-- Varka's Chief Escort -->
<npc id="18657" x="108894" y="-41207" z="-2182" count="1" /> <!-- Prophet's Royal Guard -->
<npc id="18655" x="108885" y="-41267" z="-2170" count="1" /> <!-- Varka's Chief Escort -->
<npc id="18657" x="108868" y="-41320" z="-2157" count="1" /> <!-- Prophet's Royal Guard -->
<npc id="18655" x="108894" y="-41379" z="-2144" count="1" /> <!-- Varka's Chief Escort -->
</group>
<group name="pailaka_2316_10m2">
<territories>
<territory name="pailaka_2316_10" minZ="-2272" maxZ="-1772">
<node x="108388" y="-41460" />
<node x="108912" y="-41460" />
<node x="109048" y="-41020" />
<node x="108432" y="-40848" />
</territory>
</territories>
<npc id="18656" x="108676" y="-41069" z="-2137" count="1" /> <!-- Varka's Chief Magus -->
<npc id="18658" x="108669" y="-41136" z="-2133" count="1" /> <!-- Prophet's Disciple -->
<npc id="18659" x="108665" y="-41207" z="-2131" count="1" /> <!-- Varka's Prophet -->
<npc id="18658" x="108653" y="-41273" z="-2119" count="1" /> <!-- Prophet's Disciple -->
<npc id="18663" x="108653" y="-41273" z="-2119" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_10" />
<param name="GM_ID" value="2316010" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_10m1" />
</parameters>
</npc>
</group>
<group name="pailaka_2316_bossm1">
<territories>
<territory name="pailaka_2316_boss" minZ="-1960" maxZ="-1360">
<node x="105320" y="-43124" />
<node x="107304" y="-42412" />
<node x="107352" y="-40940" />
<node x="105028" y="-41188" />
</territory>
</territories>
<npc id="18660" x="105785" y="-41785" z="-1810" heading="32768" count="1" /> <!-- Latana -->
<npc id="18603" x="105974" y="-41794" z="-1784" heading="32768" count="1" /> <!-- -->
</group>
<group name="pailaka_2316_animal_1m1">
<territories>
<territory name="pailaka_2316_animal_1" minZ="-3416" maxZ="-2816">
<node x="121076" y="-43420" />
<node x="124120" y="-43760" />
<node x="123704" y="-41368" />
<node x="120276" y="-41568" />
</territory>
</territories>
<npc id="18637" count="5" /> <!-- Grazing Antelope -->
</group>
<group name="pailaka_2316_animal_2m1">
<territories>
<territory name="pailaka_2316_animal_2" minZ="-2680" maxZ="-2080">
<node x="123792" y="-53020" />
<node x="126076" y="-50516" />
<node x="124300" y="-49584" />
<node x="122536" y="-51908" />
</territory>
</territories>
<npc id="18637" count="4" /> <!-- Grazing Antelope -->
</group>
<group name="pailaka_2316_animal_3m1">
<territories>
<territory name="pailaka_2316_animal_3" minZ="-2464" maxZ="-1664">
<node x="119348" y="-56704" />
<node x="122056" y="-56624" />
<node x="122040" y="-53536" />
<node x="118812" y="-54188" />
</territory>
</territories>
<npc id="18643" count="3" /> <!-- Grazing Antelope -->
</group>
<group name="pailaka_2316_animal_4m1">
<territories>
<territory name="pailaka_2316_animal_4" minZ="-3004" maxZ="-2404">
<node x="110524" y="-56436" />
<node x="112908" y="-56756" />
<node x="113144" y="-54140" />
<node x="110428" y="-53384" />
</territory>
</territories>
<npc id="18647" count="5" /> <!-- Grazing Flava -->
</group>
<group name="pailaka_2316_animal_5m1">
<territories>
<territory name="pailaka_2316_animal_5" minZ="-2676" maxZ="-2076">
<node x="107688" y="-55456" />
<node x="109016" y="-55748" />
<node x="108976" y="-51696" />
<node x="107800" y="-51872" />
</territory>
</territories>
<npc id="18647" count="5" /> <!-- Grazing Flava -->
</group>
<group name="pailaka_2316_animal_6m1">
<territories>
<territory name="pailaka_2316_animal_6" minZ="-2620" maxZ="-2020">
<node x="114232" y="-40504" />
<node x="115736" y="-40892" />
<node x="116260" y="-38364" />
<node x="114140" y="-38540" />
</territory>
</territories>
<npc id="18651" count="5" /> <!-- Grazing Elder Antelope -->
</group>
<group name="pailaka_2316_animal_7m1">
<territories>
<territory name="pailaka_2316_animal_7" minZ="-1292" maxZ="-592">
<node x="108865" y="-36896" />
<node x="110601" y="-37196" />
<node x="109833" y="-35720" />
<node x="108521" y="-35800" />
</territory>
</territories>
<npc id="18651" count="5" /> <!-- Grazing Elder Antelope -->
</group>
<group name="pailaka_2316_npc_1m1">
<territories>
<territory name="pailaka_2316_npc_1" minZ="-3780" maxZ="-3580">
<node x="125436" y="-41028" />
<node x="125636" y="-41028" />
<node x="125636" y="-40828" />
<node x="125436" y="-40828" />
</territory>
</territories>
<npc id="32502" x="125536" y="-40928" z="-3780" heading="8192" count="1" /> <!-- Ketra Orc Supporter -->
</group>
<group name="pailaka_2316_npc_2m1">
<territories>
<territory name="pailaka_2316_npc_2" minZ="-2668" maxZ="-2468">
<node x="113720" y="-47688" />
<node x="113920" y="-47688" />
<node x="113920" y="-47488" />
<node x="113720" y="-47488" />
</territory>
</territories>
<npc id="32509" x="113820" y="-47588" z="-2668" count="1" /> <!-- Ketra Orc Intelligence Officer -->
</group>
<group name="pailaka_2316_npc_3m1">
<territories>
<territory name="pailaka_2316_npc_3" minZ="-2448" maxZ="-2248">
<node x="107452" y="-53252" />
<node x="107652" y="-53252" />
<node x="107652" y="-53052" />
<node x="107452" y="-53052" />
</territory>
</territories>
<npc id="32509" x="107552" y="-53152" z="-2448" count="1" /> <!-- Ketra Orc Intelligence Officer -->
</group>
<group name="pailaka_2316_npc_4m1">
<territories>
<territory name="pailaka_2316_npc_4" minZ="-2340" maxZ="-1940">
<node x="110080" y="-41380" />
<node x="110280" y="-41380" />
<node x="110280" y="-41180" />
<node x="110080" y="-41180" />
</territory>
</territories>
<npc id="32509" x="110144" y="-41260" z="-2260" heading="36864" count="1" /> <!-- Ketra Orc Intelligence Officer -->
</group>
</spawnlist>
</instance>

View File

@ -0,0 +1,3 @@
<html><body>Ketra Orc Shaman:<br>
Remember to seek out a Ketra Orc in that world. There must be one there who will aid you in your quest!
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Ketra Orc Shaman:<br>
I have faith that you will remove the dark shadow which hides our Great Flame!
</body></html>

View File

@ -16,221 +16,616 @@
*/
package instances.PailakaInjuredDragon;
import java.util.HashMap;
import java.util.List;
import com.l2jmobius.gameserver.ai.CtrlIntention;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.commons.util.CommonUtil;
import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
import com.l2jmobius.gameserver.model.L2World;
import com.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
import com.l2jmobius.gameserver.model.events.annotations.Id;
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureSee;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnAttackableFactionCall;
import com.l2jmobius.gameserver.model.holders.SkillHolder;
import com.l2jmobius.gameserver.model.instancezone.Instance;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.spawns.SpawnGroup;
import com.l2jmobius.gameserver.model.skills.AbnormalType;
import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.gameserver.model.zone.L2ZoneType;
import com.l2jmobius.gameserver.model.zone.type.L2TeleportZone;
import com.l2jmobius.gameserver.network.serverpackets.SpecialCamera;
import instances.AbstractInstance;
import quests.Q00144_PailakaInjuredDragon.Q00144_PailakaInjuredDragon;
/**
* @author Mathael
* Pailaka (Varka Silenos Barracks) Instance zone.
* @author Sdw
*/
public class PailakaInjuredDragon extends AbstractInstance
public final class PailakaInjuredDragon extends AbstractInstance
{
// NPCs
private static final int KETRA_ORC_SUPPORTER_END = 32512;
// Monsters
private static final int RECRUIT = 18635;
private static final int FOOTMAN = 18636;
private static final int WARRIOR = 18642;
private static final int OFFICER = 18646;
private static final int GREAT_MAGUS = 18649;
private static final int GENERAL = 18650;
private static final int ELITE_GUARD = 18653;
private static final int COMMANDER = 18654;
private static final int HEAD_GUARD = 18655;
private static final int PROPHET_GUARD = 18657;
private static final int PROPHET = 18659;
private static final int SHAMAN = 18640;
private static final int CHIEF_PRIEST = 18648;
private static final int GRAND_PRIEST = 18652;
private static final int KETRA_ORC_SHAMAN = 32499;
private static final int KETRA_ORC_INTELLIGENCE_OFFICIER = 32509;
private static final int KETRA_ORC_SUPPORTER = 32512;
private static final int LATANA = 18660;
private static final int ANTELOPE1 = 18637;
private static final int ANTELOPE2 = 18643;
private static final int ANTELOPE3 = 18651;
// Usable Quest Items
private static final int SHIELD_POTION = 13032;
private static final int HEAL_POTION = 13033;
// Walls
private static final HashMap<Integer, Location> ZONES_TELEPORTS = new HashMap<>();
static
private static final int DRAGON_CAMERA_1 = 18603;
private static final int DRAGON_CAMERA_2 = 18604;
private static final int DRAGON_TARGET = 18605;
private static final int LATANA_SKILL_USE = 18661;
private static final int TELEPORT_TRAP = 18663;
//@formatter:off
private static final int[] WARRIORS =
{
ZONES_TELEPORTS.put(200001, new Location(122452, -45808, -2981));
ZONES_TELEPORTS.put(200002, new Location(116610, -46418, -2641));
ZONES_TELEPORTS.put(200003, new Location(116237, -50961, -2636));
ZONES_TELEPORTS.put(200004, new Location(117384, -52141, -2544));
ZONES_TELEPORTS.put(200005, new Location(112169, -44004, -2707));
ZONES_TELEPORTS.put(200006, new Location(109460, -45869, -2265));
ZONES_TELEPORTS.put(200007, new Location(117111, -55927, -2380));
ZONES_TELEPORTS.put(200008, new Location(109274, -41277, -2271));
ZONES_TELEPORTS.put(200009, new Location(110023, -40263, -2001));
}
// Skill
private static final SkillHolder LATANA_PRESENTATION_SKILL = new SkillHolder(5759, 1);
18635, 18636, 18638,
18642, 18646, 18649,
18650, 18653, 18654,
18655, 18657,
};
private static final int[] WIZARDS =
{
18639, 18640, 18641,
18644, 18645, 18648,
18652, 18656, 18658,
18659,
};
private static final int[] ANIMALS =
{
18637, 18643,
18647, 18651,
};
// Skills
private static final SkillHolder ULTIMATE_DEFENCE = new SkillHolder(5044, 3);
private static final SkillHolder HEAL = new SkillHolder(4065, 7);
private static final SkillHolder ELECTRIC_FLAME = new SkillHolder(5715, 1);
private static final SkillHolder STUN = new SkillHolder(5716, 1);
private static final SkillHolder FIRE_BREATH = new SkillHolder(5717, 1);
private static final SkillHolder ANGER = new SkillHolder(5719, 1);
private static final SkillHolder RISE_OF_LATANA = new SkillHolder(5759, 1);
private static final int[] REJECTED_SKILLS =
{
28, 680, 51,
511, 15, 254,
1069, 1097, 1042,
1072, 1170, 352,
358, 1394, 695,
115, 1083, 1160,
1164, 1201, 1206,
1222, 1223, 1224,
1092, 65, 106,
122, 127, 1049,
1064, 1071, 1074,
1169, 1263, 1269,
352, 353, 1336,
1337, 1338, 1358,
1359, 402, 403,
412, 1386, 1394,
1396, 485, 501,
1445, 1446, 1447,
522, 531, 1481,
1482, 1483, 1484,
1485, 1486, 695,
696, 716, 775,
1511, 792, 1524,
1529,
};
//@formatter:on
// Items
private static final int PAILAKA_INSTANT_SHIELD = 13032;
private static final int QUICK_HEALING_POTION = 13033;
private static final int WEAPON_UPGRADE_STAGE_1 = 13056;
private static final int WEAPON_UPGRADE_STAGE_2 = 13057;
// Misc
private static final int TEMPLATE_ID = 45;
public PailakaInjuredDragon()
{
super(TEMPLATE_ID);
addInstanceEnterId(TEMPLATE_ID);
addKillId(ANTELOPE1, ANTELOPE2, ANTELOPE3, GENERAL, GREAT_MAGUS, PROPHET, ELITE_GUARD, COMMANDER, OFFICER, RECRUIT, FOOTMAN, WARRIOR, PROPHET_GUARD, HEAD_GUARD, SHAMAN, CHIEF_PRIEST, GRAND_PRIEST, LATANA);
addSpawnId(LATANA);
addAggroRangeEnterId(LATANA);
addEnterZoneId(ZONES_TELEPORTS.keySet());
addInstanceCreatedId(TEMPLATE_ID);
addStartNpc(KETRA_ORC_SHAMAN);
addTalkId(KETRA_ORC_SHAMAN, KETRA_ORC_INTELLIGENCE_OFFICIER);
addAttackId(WARRIORS);
addAttackId(WIZARDS);
addAttackId(LATANA);
addSpawnId(TELEPORT_TRAP, LATANA, DRAGON_TARGET, LATANA_SKILL_USE, DRAGON_CAMERA_2);
addSpawnId(WIZARDS);
setCreatureSeeId(this::onCreatureSee, WIZARDS);
setCreatureSeeId(this::onCreatureSee, LATANA);
addKillId(ANIMALS);
addKillId(LATANA);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
switch (event)
String htmltext = null;
final QuestState qs = player.getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName());
if (qs != null)
{
case "enter":
switch (event)
{
enterInstance(player, npc, TEMPLATE_ID);
break;
}
case "camera_start":
{
specialCamera(player, npc, 0, 0, 180, 800, 5000, 800, 0, 1, 0, 0);
break; // TODO: Need retail values
}
case "camera_end":
{
specialCamera(player, npc, 0, 0, 180, 600, 5000, 600, 0, 1, 0, 0);
break; // TODO: Need retail values
}
}
return super.onAdvEvent(event, npc, player);
}
@Override
protected void onEnter(L2PcInstance player, Instance instance, boolean firstEnter)
{
super.onEnter(player, instance, firstEnter);
if (firstEnter)
{
final QuestState qs = player.getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName());
if ((qs != null) && qs.isCond(1))
{
qs.setCond(2, true);
showHtmlFile(player, "32499-09.html");
}
}
}
@Override
public String onAggroRangeEnter(L2Npc npc, L2PcInstance player, boolean isSummon)
{
if (npc.isScriptValue(0))
{
npc.setScriptValue(1);
startQuestTimer("camera_start", 300, npc, player);
npc.doCast(LATANA_PRESENTATION_SKILL.getSkill());
}
return super.onAggroRangeEnter(npc, player, isSummon);
}
@Override
public void onInstanceCreated(Instance instance, L2PcInstance player)
{
for (int i = 0; i < 9; i++)
{
final int zoneId = 200000 + (i + 1);
final List<L2Npc> npcs = instance.spawnGroup("wall_" + zoneId);
npcs.forEach(k -> k.setScriptValue(zoneId));
instance.getParameters().set("wall_" + zoneId, npcs.size());
}
super.onInstanceCreated(instance, player);
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final int npcId = npc.getId();
if (npcId == LATANA)
{
startQuestTimer("camera_end", 1000, npc, killer);
addSpawn(KETRA_ORC_SUPPORTER_END, new Location(105517, -41692, -1781, 65323), false, 0, false, npc.getInstanceWorld().getId());
}
else
{
switch (getRandom(1, 3))
{
case 1:
case "enterInstance":
{
npc.dropItem(killer, SHIELD_POTION, getRandom(1, 8));
enterInstance(player, npc, TEMPLATE_ID);
qs.setCond(2, true);
htmltext = "32499-01.html";
break;
}
case 2:
case "reEnterInstance":
{
npc.dropItem(killer, HEAL_POTION, getRandom(1, 4));
enterInstance(player, npc, TEMPLATE_ID);
htmltext = "32499-02.html";
break;
}
case "exitInstance":
{
finishInstance(player, 0);
break;
}
}
if ((npcId != ANTELOPE1) && (npcId != ANTELOPE2) && (npcId != ANTELOPE3) && (npcId != SHAMAN) && (npcId != CHIEF_PRIEST) && (npcId != GRAND_PRIEST))
}
return htmltext;
}
@Override
public void onTimerEvent(String event, StatsSet params, L2Npc npc, L2PcInstance player)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (event)
{
final Instance world = npc.getInstanceWorld();
final int zoneId = npc.getScriptValue();
int killcount = world.getParameters().getInt("wall_" + zoneId);
killcount--;
world.setParameter("wall_" + zoneId, killcount);
if (killcount <= 0)
case "SET_VISIBLE":
{
world.getSpawnGroup("wall_" + zoneId).forEach(SpawnGroup::despawnAll);
world.getSpawnGroup("wall_" + zoneId + "_add").forEach(SpawnGroup::despawnAll);
}
else if (!world.getParameters().getBoolean("wall_" + zoneId + "_add", false))
{
world.setParameter("wall_" + zoneId + "_add", true);
world.spawnGroup("wall_" + zoneId + "_add").forEach(mage ->
if (!npc.getVariables().getBoolean("visible", false))
{
mage.setTarget(killer);
mage.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, killer);
npc.setInvisible(false);
npc.getVariables().set("visible", true);
getTimers().addTimer("CAST_SKILL", 5000, npc, player);
}
break;
}
case "CAST_SKILL":
{
final SkillHolder holder = npc.getParameters().getSkillHolder(getRandomBoolean() ? "Skill01_ID" : "Skill02_ID");
if (holder != null)
{
addSkillCastDesire(npc, player, holder, 500000);
}
getTimers().addTimer("CAST_SKILL", 10000, npc, player);
break;
}
case "LOOK_NEIGHBOR":
{
L2World.getInstance().forEachVisibleObjectInRange(npc, L2Npc.class, HEAL.getSkill().getCastRange(), npcs ->
{
if ((npcs.getCurrentHpPercent() < 70) && (getRandom(100) < 10))
{
addSkillCastDesire(npc, npcs, HEAL, 1000000);
}
});
getTimers().addTimer("LOOK_NEIGHBOR", 5000, npc, null);
break;
}
case "CHECK_FOR_DROP":
{
if (world.getNpcsOfGroup(npc.getParameters().getString("control_maker"), n -> !n.isDead()).isEmpty())
{
final L2ZoneType zone = ZoneManager.getInstance().getZoneByName(npc.getParameters().getString("AreaName"), L2TeleportZone.class);
if (zone != null)
{
zone.setEnabled(false, world.getId());
}
npc.dropItem(world.getFirstPlayer(), PAILAKA_INSTANT_SHIELD, getRandom(10) + 1);
npc.dropItem(world.getFirstPlayer(), QUICK_HEALING_POTION, getRandom(10) + 1);
switch (npc.getParameters().getInt("GM_ID", 0))
{
case 2316001:
case 2316002:
case 2316003:
{
if ((world.getParameters().getInt("2316001", 0) == 1) && (world.getParameters().getInt("2316002", 0) == 1) && (world.getParameters().getInt("2316003", 0) == 1))
{
giveItems(world.getFirstPlayer(), WEAPON_UPGRADE_STAGE_1, 1, true);
world.getParameters().set(npc.getParameters().getString("GM_ID"), 0);
}
break;
}
case 2316007:
case 2316008:
{
if ((world.getParameters().getInt("2316007", 0) == 1) && (world.getParameters().getInt("2316008", 0) == 1))
{
giveItems(world.getFirstPlayer(), WEAPON_UPGRADE_STAGE_2, 1, true);
world.getParameters().set(npc.getParameters().getString("GM_ID"), 0);
}
break;
}
}
npc.deleteMe();
}
else
{
getTimers().addTimer("CHECK_FOR_DROP", 2000, npc, null);
}
break;
}
case "SCE_RATANA_CAMERA_START_1":
{
npc.broadcastPacket(new SpecialCamera(npc, 600, 200, 5, 0, 15000, 10000, -10, 8, 1, 1, 1));
getTimers().addTimer("SCE_RATANA_CAMERA_START_1_1", 2000, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_1_1":
{
npc.broadcastPacket(new SpecialCamera(npc, 400, 200, 5, 4000, 15000, 10000, -10, 8, 1, 1, 0));
getTimers().addTimer("SCE_RATANA_CAMERA_START_1_2", 4000, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_1_2":
{
npc.broadcastPacket(new SpecialCamera(npc, 300, 195, 4, 1500, 15000, 10000, -5, 10, 1, 1, 0));
getTimers().addTimer("SCE_RATANA_CAMERA_START_1_3", 1700, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_1_3":
{
npc.broadcastPacket(new SpecialCamera(npc, 130, 2, 5, 0, 15000, 10000, 0, 0, 1, 0, 1));
getTimers().addTimer("SCE_RATANA_CAMERA_START_1_4", 2000, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_1_4":
{
npc.broadcastPacket(new SpecialCamera(npc, 220, 0, 4, 800, 15000, 10000, 5, 10, 1, 0, 0));
getTimers().addTimer("SCE_RATANA_CAMERA_START_1_5", 2000, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_1_5":
{
npc.broadcastPacket(new SpecialCamera(npc, 250, 185, 5, 4000, 15000, 10000, -5, 10, 1, 1, 0));
getTimers().addTimer("SCE_RATANA_CAMERA_START_1_6", 4000, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_1_6":
{
npc.broadcastPacket(new SpecialCamera(npc, 200, 0, 5, 2000, 15000, 10000, 0, 25, 1, 0, 0));
getTimers().addTimer("SCE_RATANA_CAMERA_START_1_7", 4530, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_1_7":
{
npc.broadcastPacket(new SpecialCamera(npc, 300, -3, 5, 3500, 15000, 6000, 0, 6, 1, 0, 0));
getTimers().addTimer("SUICIDE_DRAGON", 10000, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_2":
{
npc.broadcastPacket(new SpecialCamera(npc, 250, 0, 6, 0, 15000, 10000, 2, 0, 1, 0, 1));
getTimers().addTimer("SCE_RATANA_CAMERA_START_2_1", 2000, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_2_1":
{
npc.broadcastPacket(new SpecialCamera(npc, 230, 0, 5, 2000, 15000, 10000, 0, 0, 1, 0, 0));
getTimers().addTimer("SCE_RATANA_CAMERA_START_2_2", 2500, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_2_2":
{
npc.broadcastPacket(new SpecialCamera(npc, 180, 175, 2, 1500, 15000, 10000, 0, 10, 1, 1, 0));
getTimers().addTimer("SCE_RATANA_CAMERA_START_2_3", 1500, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_2_3":
{
npc.broadcastPacket(new SpecialCamera(npc, 300, 180, 5, 1500, 15000, 3000, 0, 6, 1, 1, 0));
getTimers().addTimer("SUICIDE_DRAGON", 3000, npc, player);
break;
}
case "SUICIDE_DRAGON":
{
npc.deleteMe();
break;
}
case "LATANA_ANGER_RESET":
{
npc.setScriptValue(0);
break;
}
case "SPAWN_DRAGON_TARGET":
{
addSpawn(npc, DRAGON_TARGET, 105465, -41817, -1768, 0, false, 0, false, world.getId());
getTimers().addTimer("SOCIAL_ACTION", 3000, npc, player);
break;
}
case "SOCIAL_ACTION":
{
npc.broadcastSocialAction(0);
getTimers().addTimer("DISPLAY_SKILL", 3000, npc, player);
break;
}
case "DISPLAY_SKILL":
{
final L2Npc target = world.getNpc(DRAGON_TARGET);
if (target != null)
{
addSkillCastDesire(npc, target, RISE_OF_LATANA, 5000);
}
getTimers().addTimer("LATANA_CAST", 9700, npc, player);
break;
}
case "LATANA_CAST":
{
final L2Npc target = world.getNpc(DRAGON_TARGET);
if (target != null)
{
addSkillCastDesire(npc, target, STUN, 5000);
}
getTimers().addTimer("ATTACK", 11030, npc, player);
break;
}
case "ATTACK":
{
if (npc.calculateDistance(player, false, false) < 100)
{
if (getRandom(100) < 30)
{
addSkillCastDesire(npc, player, ELECTRIC_FLAME, 500000);
}
else
{
addAttackDesire(npc, player);
}
}
else if (getRandomBoolean())
{
addSpawn(npc, LATANA_SKILL_USE, player.getLocation(), false, world.getId());
}
else
{
addSkillCastDesire(npc, player, FIRE_BREATH, 500000);
}
getTimers().addTimer("ATTACK", 6000, npc, player);
break;
}
case "SPAWN_DRAGON_TARGET2":
{
addSpawn(npc, DRAGON_TARGET, 105465, -41817, -1768, 0, false, 0, false, world.getId());
getTimers().addTimer("SOCIAL_ACTION", 3000, npc, player);
break;
}
case "LATANA_ATTACK":
{
addSkillCastDesire(npc, npc, ELECTRIC_FLAME, 50000);
getTimers().addTimer("LATANA_CAST", 3000, npc, player);
break;
}
case "SPAWN_REWARD_NPC":
{
addSpawn(npc, KETRA_ORC_SUPPORTER, npc.getLocation(), false, world.getId());
npc.deleteMe();
break;
}
case "DRAGON_CAMERA_2_1":
{
npc.broadcastPacket(new SpecialCamera(npc, 350, 200, 5, 5600, 15000, 10000, -15, 10, 1, 1, 0));
getTimers().addTimer("DRAGON_CAMERA_2_2", 5600, npc, null);
break;
}
case "DRAGON_CAMERA_2_2":
{
npc.broadcastPacket(new SpecialCamera(npc, 360, 200, 5, 1000, 15000, 2000, -15, 10, 1, 1, 0));
getTimers().addTimer("SUICIDE", 10000, npc, null);
break;
}
}
}
return super.onKill(npc, killer, isSummon);
}
@Override
public String onSpawn(L2Npc npc)
{
npc.setIsImmobilized(true);
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case TELEPORT_TRAP:
{
world.getParameters().set(npc.getParameters().getString("GM_ID"), 1);
getTimers().addTimer("CHECK_FOR_DROP", 2000, npc, null);
break;
}
case DRAGON_TARGET:
{
getTimers().addTimer("SUICIDE", 60000, npc, null);
break;
}
case LATANA_SKILL_USE:
{
final L2Npc latana = world.getNpc(LATANA);
final L2PcInstance player = world.getFirstPlayer();
if ((latana != null) && (player != null) && (latana.calculateDistance(player, false, false) <= 900))
{
addSkillCastDesire(npc, player, STUN, 500000);
}
getTimers().addTimer("SUICIDE", 5000, npc, null);
break;
}
case DRAGON_CAMERA_2:
{
npc.broadcastPacket(new SpecialCamera(npc, 450, 200, 3, 0, 15000, 10000, -15, 20, 1, 1, 1));
getTimers().addTimer("DRAGON_CAMERA_2_1", 100, npc, null);
break;
}
default:
{
if (CommonUtil.contains(WIZARDS, npc.getId()))
{
npc.setInvisible(true);
getTimers().addTimer("LOOK_NEIGHBOR", 1000, npc, null);
}
npc.initSeenCreatures();
}
}
}
return super.onSpawn(npc);
}
@Override
public String onEnterZone(L2Character character, L2ZoneType zone)
private void onCreatureSee(OnCreatureSee event)
{
if (!character.isPlayer() || (character.getInstanceId() == 0))
final L2Character creature = event.getSeen();
final L2Npc npc = (L2Npc) event.getSeer();
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
return super.onEnterZone(character, zone);
if (CommonUtil.contains(WIZARDS, npc.getId()))
{
if (creature.isPlayer() && npc.isScriptValue(0))
{
npc.setScriptValue(1);
getTimers().addTimer("SET_VISIBLE", 1000, npc, creature.getActingPlayer());
}
}
else if ((npc.getId() == LATANA) && !npc.getVariables().getBoolean("creatureSeen", false) && creature.isPlayer())
{
final QuestState qs = creature.getActingPlayer().getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName());
if (qs != null)
{
if (qs.getCond() == 4)
{
getTimers().addTimer("SPAWN_REWARD_NPC", 1000, npc, creature.getActingPlayer());
npc.setScriptValue(1);
}
else
{
playSound(creature.getActingPlayer(), QuestSound.BS08_A);
getTimers().addTimer("SPAWN_DRAGON_TARGET", 1000, npc, creature.getActingPlayer());
getTimers().addTimer("SCE_RATANA_CAMERA_START_1", 10, world.getNpc(DRAGON_CAMERA_1), creature.getActingPlayer());
npc.getVariables().set("creatureSeen", true);
}
}
}
}
final Instance world = character.getInstanceWorld();
if (world.getParameters().getInt("wall_" + zone.getId()) > 0)
}
@Override
public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon, Skill skill)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
character.teleToLocation(ZONES_TELEPORTS.get(zone.getId()));
if (CommonUtil.contains(WARRIORS, npc.getId()) || CommonUtil.contains(WIZARDS, npc.getId()))
{
final int longRangeGuardRate = npc.getParameters().getInt("LongRangeGuardRate", -1);
if ((longRangeGuardRate != -1) && ((skill != null) && !CommonUtil.contains(REJECTED_SKILLS, skill.getId())))
{
if (npc.calculateDistance(attacker, false, false) > 150)
{
if ((npc.getEffectList().getFirstBuffInfoByAbnormalType(AbnormalType.PD_UP_SPECIAL) == null) && (getRandom(100) < longRangeGuardRate))
{
addSkillCastDesire(npc, npc, ULTIMATE_DEFENCE.getSkill(), 1000000000);
}
}
else
{
npc.getEffectList().stopEffects(AbnormalType.PD_UP_SPECIAL);
}
}
if (CommonUtil.contains(WARRIORS, npc.getId()))
{
if (npc.calculateDistance(attacker, false, false) < 40)
{
addAttackPlayerDesire(npc, attacker, 1000);
}
else if (getRandom(100) < 33)
{
final SkillHolder holder = npc.getParameters().getSkillHolder(getRandomBoolean() ? "Skill01_ID" : "Skill02_ID");
if (holder != null)
{
addSkillCastDesire(npc, attacker, holder, 500000);
}
}
}
}
else if ((npc.getId() == LATANA))
{
if (!npc.getVariables().getBoolean("creatureSeen", false))
{
final QuestState qs = attacker.getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName());
if (qs != null)
{
if (qs.getCond() == 4)
{
getTimers().addTimer("SPAWN_REWARD_NPC", 1000, npc, attacker);
npc.setScriptValue(1);
}
else
{
playSound(attacker, QuestSound.BS08_A);
getTimers().addTimer("SPAWN_DRAGON_TARGET2", 1000, npc, attacker);
getTimers().addTimer("SCE_RATANA_CAMERA_START_2", 10, world.getNpc(DRAGON_CAMERA_1), attacker);
npc.getVariables().set("creatureSeen", true);
}
}
}
if ((npc.getCurrentHpPercent() < 30) && npc.isScriptValue(0))
{
addSkillCastDesire(npc, npc, ANGER, 50000000);
npc.setScriptValue(1);
getTimers().addTimer("LATANA_ANGER_RESET", 120000, npc, attacker);
}
}
}
return super.onEnterZone(character, zone);
return super.onAttack(npc, attacker, damage, isSummon, skill);
}
// @formatter:off
@RegisterEvent(EventType.ON_ATTACKABLE_FACTION_CALL)
@RegisterType(ListenerRegisterType.NPC)
@Id({18635,18636,18638,18642,18646,18649,18650,18653,18654,18655,18657})
// @formatter:on
public void onAttackableFactionCall(OnAttackableFactionCall event)
{
final L2Npc npc = event.getNpc();
final L2PcInstance attacker = event.getAttacker();
if (npc.calculateDistance(attacker, false, false) < 40)
{
addAttackPlayerDesire(npc, attacker, 1000);
}
else if (getRandom(100) < 33)
{
final SkillHolder holder = npc.getParameters().getSkillHolder(getRandomBoolean() ? "Skill01_ID" : "Skill02_ID");
if (holder != null)
{
addSkillCastDesire(npc, attacker, holder, 500000);
}
}
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
if (CommonUtil.contains(ANIMALS, npc.getId()))
{
npc.dropItem(killer, getRandomBoolean() ? PAILAKA_INSTANT_SHIELD : QUICK_HEALING_POTION, getRandom(10) + 1);
}
else if (npc.getId() == LATANA)
{
addSpawn(npc, KETRA_ORC_SUPPORTER, 105974, -41794, -1784, 32768, false, 0, false, world.getId());
addSpawn(npc, DRAGON_CAMERA_2, npc.getLocation(), false, world.getId());
}
}
return super.onKill(npc, killer, isSummon);
}
public static void main(String[] args)

View File

@ -0,0 +1,5 @@
<html><body>Ketra Orc Shaman:<br>
I perceive darkness...and chaos... The protector of our race, the great Red Dragon, lies imprisoned and in torment there.<br>
He summons us to return him to his rightful place of glory, but...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32499-05.html">"But what?"</Button>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Ketra Orc Shaman:<br>
You are already a legend to our people! As much as I would crave your help, you have even more important tasks to attend to...<br>
(Only characters level 77 or below may undertake this quest.)</body></html>

View File

@ -0,0 +1,6 @@
<html><body>Ketra Orc Shaman:<br>
The Ketra believe we are children of the Fire Spirit.<br>
We worship the Red Dragon, who wields the strongest fire in all Goddard.<br>
Lately, however, we have felt a darkness flickering within the pure flame. It seem to be growing -- and the fire's power seems to be weakening!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32499-06.html">"Tell me about the darkness."</Button>
</body></html>

View File

@ -0,0 +1,7 @@
<html><body>Ketra Orc Shaman:<br>
It is a darkness without shape or substance.<br>
It came from across the sea, and now spreads its black shadow over our land as well.<br>
The Humans call the source of the darkness "Kamaloka" and shadow it casts "Pailaka." Now even our great protector is helpless before it!<br>
We must summon all our strength to defeat the darkness!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32499-07.html">"Go on."</Button>
</body></html>

View File

@ -0,0 +1,8 @@
<html><body>Ketra Orc Shaman:<br>
Warrior, I ask for your aid!<br>
We are of Ketra descent, so we cannot enter the Shadow of Darkness.<br>
But I believe that an adventurer like you can enter and remove this foul curse from us.<br>
Will you do it?<br>
(This quest takes place in Pailaka. It does not affect the Varka Silenos alliance quest or the Ketra Orc alliance quest.)<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32499-08.html">"Sure."</Button>
</body></html>

View File

@ -0,0 +1,7 @@
<html><body>Ketra Orc Shaman:<br>
Our thanks, warrior! One of the last visions the flames gave me before becoming too weak was that there are others like us in the Shadow World.<br>
They will help you.<br>
When you are prepared, I will send you to the Shadow World, Pailaka!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest PailakaInjuredDragon enterInstance">"No, I can go now."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32499-11.html">"Okay. I will be back soon."</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Ketra Orc Shaman:<br>
Warrior, do you wish to enter the Shadow World, Pailaka?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest PailakaInjuredDragon enterInstance">"Yup!"</Button>
</body></html>

View File

@ -1,4 +1,4 @@
<html><body>Ketra Orc Shaman:<br>
The darkness still exists! Will you enter Pailaka again?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest PailakaInjuredDragon enter">"Yup!"</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest PailakaInjuredDragon reEnterInstance">"Yup!"</Button>
</body></html>

View File

@ -1,3 +1,3 @@
<html><body>Ketra Orc Shaman:<br>
I have faith that you will remove the dark shadow which hides our Great Flame!
Very well, I shall wait here until you are ready.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Ketra Orc Supporter:<br>
Know that, even wounded, the Dragon of Fire is very powerful. To help you slay him and set his spirit free, use this <font color="LEVEL">Spear of Silenos</font>, which we captured from our enemy. Its power has not reached its full potential, but by defeating the Varka Silenos you can obtain items necessary to enhance its power. Use it to destroy our enemy and send Latana's spirit to the World of Fire!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32502-07.html">"Give me some details about the enemy."</Button>
</body></html>

View File

@ -1,9 +1,9 @@
<html><head><body>Ketra Orc Intelligence Officer:<br>
<html><body>Ketra Orc Intelligence Officer:<br>
Dejakar Oroka!<br>
You hold the Spear of Silenos! Your coming was foretold.<br>
But Latana's power is very strong, and the Spear of Silenos is not yet strong enough.<br>
If you have the Scroll of Enchant Weapon made with the blood of Silenos, I will perform a sacred ceremony to enhance the spear!<br>
If you wish, I can also bestow on you some of our tribe's powerful enhancement magic!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon upgrade_weapon">"I want to have my weapon enhanced."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement_page">"Can I get some enhancement magic?"</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon ask_buff">"Can I get some enhancement magic?"</Button>
</body></html>

View File

@ -1,3 +1,3 @@
<html><body>Ketra Orc Intelligence Officer:<br>
You still need an Enchant Scroll. Acquire one by slaying more Silenos!
This spear has already been enhanced to its full potential. It is stronger than any other power in this place!
</body></html>

View File

@ -1,3 +1,3 @@
<html><body>Ketra Orc Intelligence Officer:<br>
This spear has already been enhanced to its full potential. It is stronger than any other power in this place!
You still need an Enchant Scroll. Acquire one by slaying more Silenos!
</body></html>

View File

@ -1,3 +1,16 @@
<html><body>Ketra Orc Intelligence Officer:<br>
The fifth and final enhancement is complete!
We possess several types of enhancement magic. I can grant you <font color="LEVEL">at most 5 spells</font>.<br>
Select them from the list below:<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 0">Haste Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 1">Wind Walk Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 2">Empower Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 3">Acumen Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 4">Concentration Lv6</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 5">Might Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 6">Guidance Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 7">Focus Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 8">Death Whisper Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 9">Berserker Spirit Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 10">Vampiric Rage Lv4</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 11">Blessed Body Lv6</Button>
</body></html>

View File

@ -1,15 +1,3 @@
<html><body>Ketra Orc Intelligence Officer:<br>
Please select the next spell you wish to receive.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 1">Haste Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 2">Wind Walk Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 3">Empower Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 4">Acumen Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 5">Concentration Lv6</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 6">Might Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 7">Guidance Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 8">Focus Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 9">Death Whisper Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 10">Berserker Spirit Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 11">Vampiric Rage Lv4</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 12">Blessed Body Lv6</Button>
The fifth and final enhancement is complete!
</body></html>

View File

@ -1,16 +1,15 @@
<html><body>Ketra Orc Intelligence Officer:<br>
We possess several types of enhancement magic. I can grant you <font color="LEVEL">at most 5 spells</font>.<br>
Select them from the list below:<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 1">Haste Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 2">Wind Walk Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 3">Empower Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 4">Acumen Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 5">Concentration Lv6</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 6">Might Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 7">Guidance Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 8">Focus Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 9">Death Whisper Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 10">Berserker Spirit Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 11">Vampiric Rage Lv4</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 12">Blessed Body Lv6</Button>
Please select the next spell you wish to receive.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 0">Haste Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 1">Wind Walk Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 2">Empower Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 3">Acumen Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 4">Concentration Lv6</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 5">Might Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 6">Guidance Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 7">Focus Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 8">Death Whisper Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 9">Berserker Spirit Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 10">Vampiric Rage Lv4</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 11">Blessed Body Lv6</Button>
</body></html>

View File

@ -1,4 +1,6 @@
<html><body>Ketra Orc Supporter:<br>
Would you return the Spear of Silenos to us, since it is a sacred relic of our people! We will neturally reward you for it.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32512-02.html">"Return the Spear."</Button>
Dejakar Oroka!<br>
Latana used the last flicker of energy to summon me here! My friend, you have earned the gratitude of all the Ketra Orcs.<br>
Would you return the Spear of Silenos to us, since it is a sacred relic of our people! We will naturally reward you for it.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32512-03.html">"Yes, here."</Button>
</body></html>

View File

@ -1,6 +1,5 @@
<html><body>Ketra Orc Supporter:<br>
You have done it!<br>
You have lifted the curse! I no longer feel the taint of darkness upon our Atlar of Fire!<br>
Warrior, I wish you could stay heer with us, but our shaman decrees that you must leave...<br>
Here is a Scroll of Escape that he has prepared for you. Use it to return safely to your world.
</body></html>
What happened here has not affected your world, but it may help you in the future...<br>
Now you must return to where you belong.<br>
Use the Scroll of Escape to leave Pailaka and return to your world!
</body></html>

View File

@ -1,3 +1,6 @@
<html><body>Ketra Orc Supporter:<br>
Use the Scroll of Escape that I gave you to return to your world.
</body></html>
You have done it!<br>
You have lifted the curse! I no longer feel the taint of darkness upon our Altar of Fire!<br>
Warrior, I wish you could stay here with us, but our shaman decrees that you must leave...<br>
Here is a Scroll of Escape that he has prepared for you. Use it to return safely to your world.
</body></html>

View File

@ -16,43 +16,39 @@
*/
package quests.Q00144_PailakaInjuredDragon;
import com.l2jmobius.commons.util.CommonUtil;
import com.l2jmobius.gameserver.instancemanager.InstanceManager;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.holders.ItemHolder;
import com.l2jmobius.gameserver.model.holders.SkillHolder;
import com.l2jmobius.gameserver.model.instancezone.Instance;
import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.quest.State;
import com.l2jmobius.gameserver.model.skills.SkillCaster;
/**
* @author Mathael
* @author Sdw
*/
public class Q00144_PailakaInjuredDragon extends Quest
{
// NPCs
private static final int KETRA_ORC_SHAMAN = 32499;
private static final int KETRA_ORC_SUPPORTER = 32502;
private static final int KETRA_ORC_SUPPORTER_END = 32512;
private static final int KETRA_ORC_INTELLIGENCE_OFFICIER = 32509;
// Monsters
private static final int KETRA_ORC_SUPPORTER_2 = 32512;
private static final int LATANA = 18660;
private static final int[] MONSTERS =
{
18635,
18636,
18642,
18646,
18649,
18650,
18653,
18654,
18655,
18657,
18659
};
// Buffs
// Items
private static final int SPEAR_OF_SILENOS = 13052;
private static final int SPEAR_OF_SILENOS_REINFORCED = 13053;
private static final int SPEAR_OF_SILENOS_COMPLETED = 13054;
private static final int WEAPON_UPGRADE_STAGE_1 = 13056;
private static final int WEAPON_UPGRADE_STAGE_2 = 13057;
private static final int PAILAKA_INSTANT_SHIELD = 13032;
private static final int QUICK_HEALING_POTION = 13033;
private static final int SCROLL_OF_ESCAPE = 736;
private static final ItemHolder PAILAKA_SHIRT = new ItemHolder(13296, 1);
// Skills
private static final SkillHolder[] BUFFS =
{
new SkillHolder(1086, 2),
@ -68,61 +64,56 @@ public class Q00144_PailakaInjuredDragon extends Quest
new SkillHolder(1268, 4),
new SkillHolder(1045, 6),
};
// Quest Items
private static final int SPEAR_OF_SILENOS = 13052;
private static final int SPEAR_OF_SILENOS_REINFORCED = 13053;
private static final int SPEAR_OF_SILENOS_COMPLETED = 13054;
private static final int WEAPON_UPGRADE_STAGE_1 = 13056;
private static final int WEAPON_UPGRADE_STAGE_2 = 13057;
// Usable Quest Items
private static final int SHIELD_POTION = 13032;
private static final int HEAL_POTION = 13033;
// Rewards
private static final long REWARD_EXP = 24570000;
private static final int REWARD_SP = 5896;
private static final int REWARD_PAILAKA_SHIRT = 13296;
private static final int REWARD_ADENA = 798840;
private static final int SCROLL_OF_ESCAPE = 736;
// Misc
private static final int MIN_LEVEL = 73;
private static final int MAX_LEVEL = 77;
private boolean WEAPON_UPGRADE_STAGE_1_DROPED = false;
private boolean WEAPON_UPGRADE_STAGE_2_DROPED = false;
private int BUFF_COUNT = 0;
public Q00144_PailakaInjuredDragon()
{
super(144);
addStartNpc(KETRA_ORC_SHAMAN);
addFirstTalkId(KETRA_ORC_SUPPORTER_END);
addTalkId(KETRA_ORC_SHAMAN, KETRA_ORC_SUPPORTER, KETRA_ORC_INTELLIGENCE_OFFICIER, KETRA_ORC_SUPPORTER_END);
addFirstTalkId(KETRA_ORC_INTELLIGENCE_OFFICIER, KETRA_ORC_SUPPORTER_2);
addTalkId(KETRA_ORC_SHAMAN, KETRA_ORC_SUPPORTER, KETRA_ORC_INTELLIGENCE_OFFICIER);
addKillId(LATANA);
addKillId(MONSTERS);
addCondMinLevel(MIN_LEVEL, "32499-03.html");
addCondMaxLevel(MAX_LEVEL, "32499-04z.html");
registerQuestItems(SPEAR_OF_SILENOS, SPEAR_OF_SILENOS_REINFORCED, SPEAR_OF_SILENOS_COMPLETED, WEAPON_UPGRADE_STAGE_1, WEAPON_UPGRADE_STAGE_2, HEAL_POTION, SHIELD_POTION);
addCondMinLevel(MAX_LEVEL, "32499-04.html");
registerQuestItems(SPEAR_OF_SILENOS, SPEAR_OF_SILENOS_REINFORCED, SPEAR_OF_SILENOS_COMPLETED, WEAPON_UPGRADE_STAGE_1, WEAPON_UPGRADE_STAGE_2, PAILAKA_INSTANT_SHIELD, QUICK_HEALING_POTION);
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
if (npc.getId() == KETRA_ORC_INTELLIGENCE_OFFICIER)
{
return "32509-01.html";
}
else if (npc.getId() == KETRA_ORC_SUPPORTER_2)
{
final QuestState qs = getQuestState(player, false);
if (qs != null)
{
return qs.isCompleted() ? "32512-02.html" : "32512-01.html";
}
}
return null;
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = getNoQuestMsg(player);
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return htmltext;
return null;
}
final String request = event.contains(" ") ? event.substring(0, event.indexOf(" ")) : event;
switch (request)
String htmltext = null;
switch (event)
{
case "32499-04.htm":
case "32499-05.htm":
case "32499-06.htm":
case "32499-08a.html":
case "32499-08.htm":
case "32499-09.htm":
case "32502-01.html":
case "32499-05.html":
case "32499-06.html":
case "32499-07.html":
case "32499-11.html":
case "32502-02.html":
case "32502-03.html":
case "32502-04.html":
@ -131,73 +122,54 @@ public class Q00144_PailakaInjuredDragon extends Quest
htmltext = event;
break;
}
case "32499-07.htm":
{
qs.startQuest();
htmltext = event;
break;
}
case "32502-05.html":
{
if (qs.isCond(2))
{
qs.setCond(3, true);
giveItems(player, SPEAR_OF_SILENOS, 1, true);
giveItems(player, SPEAR_OF_SILENOS, 1);
htmltext = event;
}
break;
}
case "32512-02.html":
case "32499-08.html":
{
final Instance inst = InstanceManager.getInstance().getPlayerInstance(player, true);
if ((inst != null) && qs.isCond(4))
{
takeItems(player, SPEAR_OF_SILENOS_COMPLETED, -1);
rewardItems(player, 57, REWARD_ADENA);
rewardItems(player, REWARD_PAILAKA_SHIRT, 1);
addExpAndSp(player, REWARD_EXP, REWARD_SP);
giveItems(player, SCROLL_OF_ESCAPE, 1); // Not a reward.
qs.exitQuest(false, true);
inst.finishInstance();
htmltext = event;
}
qs.startQuest();
htmltext = event;
break;
}
case "upgrade_weapon":
{
if (qs.isCond(3) || qs.isCond(4))
if (hasQuestItems(player, SPEAR_OF_SILENOS_COMPLETED))
{
if (hasQuestItems(player, SPEAR_OF_SILENOS_COMPLETED))
htmltext = "32509-06.html";
}
else if (hasQuestItems(player, SPEAR_OF_SILENOS))
{
if (hasQuestItems(player, WEAPON_UPGRADE_STAGE_1))
{
htmltext = "32509-06.html";
takeItems(player, SPEAR_OF_SILENOS, -1);
takeItems(player, WEAPON_UPGRADE_STAGE_1, -1);
giveItems(player, SPEAR_OF_SILENOS_REINFORCED, 1, true);
htmltext = "32509-02.html";
}
else if (hasQuestItems(player, SPEAR_OF_SILENOS))
else
{
if (hasQuestItems(player, WEAPON_UPGRADE_STAGE_1))
{
takeItems(player, SPEAR_OF_SILENOS, -1);
takeItems(player, WEAPON_UPGRADE_STAGE_1, -1);
giveItems(player, SPEAR_OF_SILENOS_REINFORCED, 1, true);
htmltext = "32509-02.html";
}
else
{
htmltext = "32509-04.html";
}
htmltext = "32509-05.html";
}
else if (hasQuestItems(player, SPEAR_OF_SILENOS_REINFORCED))
}
else if (hasQuestItems(player, SPEAR_OF_SILENOS_REINFORCED))
{
if (hasQuestItems(player, WEAPON_UPGRADE_STAGE_2))
{
if (hasQuestItems(player, WEAPON_UPGRADE_STAGE_2))
{
takeItems(player, SPEAR_OF_SILENOS_REINFORCED, -1);
takeItems(player, WEAPON_UPGRADE_STAGE_2, -1);
giveItems(player, SPEAR_OF_SILENOS_COMPLETED, 1, true);
htmltext = "32509-08.html";
}
else
{
htmltext = "32509-04.html";
}
takeItems(player, SPEAR_OF_SILENOS_REINFORCED, -1);
takeItems(player, WEAPON_UPGRADE_STAGE_2, -1);
giveItems(player, SPEAR_OF_SILENOS_COMPLETED, 1, true);
htmltext = "32509-08.html";
}
else
{
htmltext = "32509-04.html";
}
}
else
@ -206,141 +178,125 @@ public class Q00144_PailakaInjuredDragon extends Quest
}
break;
}
case "enhancement_page":
case "ask_buff":
{
htmltext = BUFF_COUNT < 5 ? "32509-10.html" : "32509-07.html";
htmltext = npc.isScriptValue(1) ? "32509-07.html" : "32509-08.html";
break;
}
case "enhancement":
case "32512-03.html":
{
if (BUFF_COUNT < 5)
if (qs.isCond(4))
{
final int key = Integer.parseInt(event.substring(request.length() + 1)) - 1;
SkillCaster.triggerCast(npc, player, BUFFS[key].getSkill());
BUFF_COUNT++;
if (BUFF_COUNT < 5)
if (player.getLevel() >= MIN_LEVEL)
{
htmltext = "32509-09.html";
addExpAndSp(player, 24570000, 5896);
giveAdena(player, 798840, true);
giveItems(player, PAILAKA_SHIRT);
giveItems(player, SCROLL_OF_ESCAPE, 1); // Not a reward.
qs.exitQuest(false, true);
htmltext = event;
}
else
{
htmltext = "32509-08.html";
htmltext = getNoQuestLevelRewardMsg(player);
}
final Instance inst = InstanceManager.getInstance().getPlayerInstance(player, true);
if (inst != null)
{
inst.finishInstance();
}
}
break;
}
}
if (event.startsWith("buff"))
{
if (npc.isScriptValue(0))
{
final int currentBuffCount = npc.getVariables().getInt("buff_count");
if (currentBuffCount < 5)
{
final int buffOffset = CommonUtil.constrain(Integer.parseInt(event.substring(event.indexOf(" ") + 1)), 0, BUFFS.length);
npc.setTarget(player);
npc.doCast(BUFFS[buffOffset].getSkill());
npc.getVariables().set("buff_count", currentBuffCount + 1);
htmltext = "32509-10.html";
if ((currentBuffCount + 1) >= 5)
{
htmltext = "32509-09.html";
npc.setScriptValue(1);
}
}
else
{
htmltext = "32509-07.html";
npc.setScriptValue(1);
}
break;
}
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance talker)
public String onTalk(L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(talker, true);
String htmltext = getNoQuestMsg(talker);
final QuestState qs = getQuestState(player, true);
String htmltext = null;
switch (npc.getId())
switch (qs.getState())
{
case KETRA_ORC_SHAMAN:
case State.CREATED:
{
switch (qs.getState())
if (npc.getId() == KETRA_ORC_SHAMAN)
{
case State.CREATED:
htmltext = "32499-01.html";
}
break;
}
case State.STARTED:
{
if (npc.getId() == KETRA_ORC_SHAMAN)
{
if (qs.isCond(1))
{
htmltext = "32499-01.htm";
break;
htmltext = "32499-09.html";
}
case State.COMPLETED:
{
htmltext = "32499-02.html";
break;
}
case State.STARTED:
else
{
htmltext = "32499-10.html";
break;
}
}
break;
}
case KETRA_ORC_SUPPORTER:
{
switch (qs.getCond())
else if (npc.getId() == KETRA_ORC_SUPPORTER)
{
case 3:
{
htmltext = "32502-07.html";
break;
}
case 4:
{
htmltext = "32502-06.html";
break;
}
default:
if (qs.isCond(2))
{
htmltext = "32502-01.html";
break;
}
else
{
htmltext = "32502-06.html";
}
}
break;
}
case KETRA_ORC_INTELLIGENCE_OFFICIER:
case State.COMPLETED:
{
htmltext = !qs.isCond(3) && !qs.isCond(4) ? "32509-01a.html" : "32509-01.html";
htmltext = "32499-02.html";
break;
}
case KETRA_ORC_SUPPORTER_END:
{
htmltext = hasQuestItems(talker, SPEAR_OF_SILENOS_COMPLETED) ? "32512-01.html" : "32512-03.html";
}
}
return htmltext;
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return getNoQuestMsg(player);
}
return qs.getState() == State.COMPLETED ? "32512-03.html" : "32512-01.html";
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final int npcId = npc.getId();
if (npcId != LATANA)
final QuestState qs = getQuestState(killer, false);
if (qs != null)
{
if (!WEAPON_UPGRADE_STAGE_1_DROPED && !hasQuestItems(killer, WEAPON_UPGRADE_STAGE_1) && hasQuestItems(killer, SPEAR_OF_SILENOS))
{
if (getRandom(1, 6) > 2)
{
giveItems(killer, WEAPON_UPGRADE_STAGE_1, 1, true);
WEAPON_UPGRADE_STAGE_1_DROPED = true;
}
}
if (!WEAPON_UPGRADE_STAGE_2_DROPED && !hasQuestItems(killer, WEAPON_UPGRADE_STAGE_2) && hasQuestItems(killer, SPEAR_OF_SILENOS_REINFORCED))
{
if (getRandom(1, 6) > 4)
{
giveItems(killer, WEAPON_UPGRADE_STAGE_2, 1, true);
WEAPON_UPGRADE_STAGE_2_DROPED = true;
}
}
}
else
{
final QuestState qs = getQuestState(killer, false);
if (qs != null)
if (qs.isCond(3) && (npc.calculateDistance(killer, false, false) <= 1500))
{
qs.setCond(4, true);
}

View File

@ -68,6 +68,26 @@
<xs:attribute name="Y" type="xs:integer" use="required" />
</xs:complexType>
</xs:element>
<xs:element name="bannedAreas" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="area" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="node" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute type="xs:int" name="X" use="required" />
<xs:attribute type="xs:int" name="Y" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:int" name="minZ" use="required" />
<xs:attribute type="xs:int" name="maxZ" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="race" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:attribute name="point" type="xs:token" use="required" />
@ -101,7 +121,7 @@
<xs:attribute name="id" type="xs:positiveInteger" />
<xs:attribute name="maxZ" type="xs:integer" use="required" />
<xs:attribute name="minZ" type="xs:integer" use="required" />
<xs:attribute name="name" type="xs:normalizedString" use="required" />
<xs:attribute name="name" type="xs:normalizedString" use="optional" />
<xs:attribute name="rad" type="xs:positiveInteger" />
<xs:attribute name="shape" use="required">
<xs:simpleType>
@ -151,6 +171,7 @@
<xs:enumeration value="WaterZone" />
<xs:enumeration value="SayuneZone" />
<xs:enumeration value="UndyingZone" />
<xs:enumeration value="TeleportZone" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>

View File

@ -0,0 +1,158 @@
<?xml version="1.0" encoding="UTF-8"?>
<list enabled="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/zones.xsd">
<!-- No Restart Zones -->
<zone name="23_16_pailaka_restrict_01" type="TeleportZone" shape="NPoly" minZ="-4048" maxZ="2952"> <!-- 18_23 -->
<stat name="oustX" val="125738" />
<stat name="oustY" val="-40933" />
<stat name="oustZ" val="-3770" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="98811" Y="-34975" />
<node X="130758" Y="-35003" />
<node X="130758" Y="-33299" />
<node X="98811" Y="-33271" />
</zone>
<zone name="23_16_pailaka_restrict_02" type="TeleportZone" shape="NPoly" minZ="-3616" maxZ="3384"> <!-- 21_24 -->
<stat name="oustX" val="125738" />
<stat name="oustY" val="-40933" />
<stat name="oustZ" val="-3770" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="128431" Y="-64174" />
<node X="130329" Y="-64198" />
<node X="130613" Y="-33178" />
<node X="128605" Y="-33061" />
</zone>
<zone name="23_16_pailaka_restrict_03" type="TeleportZone" shape="NPoly" minZ="-3644" maxZ="3356"> <!-- 21_24 -->
<stat name="oustX" val="125738" />
<stat name="oustY" val="-40933" />
<stat name="oustZ" val="-3770" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="99156" Y="-64692" />
<node X="130104" Y="-64748" />
<node X="130064" Y="-63280" />
<node X="99280" Y="-63472" />
</zone>
<zone name="23_16_pailaka_restrict_04" type="TeleportZone" shape="NPoly" minZ="-4048" maxZ="2952"> <!-- 21_24 -->
<stat name="oustX" val="125738" />
<stat name="oustY" val="-40933" />
<stat name="oustZ" val="-3770" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="99036" Y="-64632" />
<node X="100868" Y="-64668" />
<node X="100868" Y="-33268" />
<node X="99036" Y="-33232" />
</zone>
<zone name="23_16_pailaka_telezone_01" type="TeleportZone" shape="NPoly" minZ="-2981" maxZ="-2481"> <!-- 21_24 -->
<stat name="oustX" val="122805" />
<stat name="oustY" val="-45782" />
<stat name="oustZ" val="-3016" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="118216" Y="-46771" />
<node X="122061" Y="-46748" />
<node X="122061" Y="-44615" />
<node X="118216" Y="-44959" />
</zone>
<zone name="23_16_pailaka_telezone_02" type="TeleportZone" shape="NPoly" minZ="-4048" maxZ="2952"> <!-- 21_24 -->
<stat name="oustX" val="118160" />
<stat name="oustY" val="-52645" />
<stat name="oustZ" val="-2508" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="116072" Y="-52080" />
<node X="116660" Y="-52840" />
<node X="118176" Y="-50956" />
<node X="117104" Y="-50792" />
</zone>
<zone name="23_16_pailaka_telezone_03" type="TeleportZone" shape="NPoly" minZ="-2652" maxZ="-1952"> <!-- 21_24 -->
<stat name="oustX" val="117215" />
<stat name="oustY" val="-55906" />
<stat name="oustZ" val="-2399" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="114848" Y="-58218" />
<node X="115692" Y="-58128" />
<node X="116024" Y="-55252" />
<node X="114968" Y="-55216" />
</zone>
<zone name="23_16_pailaka_telezone_04" type="TeleportZone" shape="NPoly" minZ="-2704" maxZ="-2104"> <!-- 21_24 -->
<stat name="oustX" val="118026" />
<stat name="oustY" val="-46424" />
<stat name="oustZ" val="-2544" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="114888" Y="-47128" />
<node X="116052" Y="-47076" />
<node X="116052" Y="-45776" />
<node X="114888" Y="-45828" />
</zone>
<zone name="23_16_pailaka_telezone_05" type="TeleportZone" shape="NPoly" minZ="-2708" maxZ="-2108"> <!-- 21_24 -->
<stat name="oustX" val="116381" />
<stat name="oustY" val="-51189" />
<stat name="oustZ" val="-2624" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="115016" Y="-51012" />
<node X="116764" Y="-49796" />
<node X="115824" Y="-49168" />
<node X="114320" Y="-50436" />
</zone>
<zone name="23_16_pailaka_telezone_06" type="TeleportZone" shape="NPoly" minZ="-2324" maxZ="-1824"> <!-- 21_24 -->
<stat name="oustX" val="108347" />
<stat name="oustY" val="-50558" />
<stat name="oustZ" val="-2360" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="107700" Y="-49920" />
<node X="109616" Y="-49712" />
<node X="109500" Y="-49084" />
<node X="107508" Y="-49184" />
</zone>
<zone name="23_16_pailaka_telezone_07" type="TeleportZone" shape="NPoly" minZ="-2695" maxZ="-2095"> <!-- 21_24 -->
<stat name="oustX" val="112816" />
<stat name="oustY" val="-44040" />
<stat name="oustZ" val="-2755" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="110632" Y="-45140" />
<node X="111476" Y="-44652" />
<node X="111568" Y="-43216" />
<node X="110724" Y="-42856" />
</zone>
<zone name="23_16_pailaka_telezone_08" type="TeleportZone" shape="NPoly" minZ="-2388" maxZ="-1888"> <!-- 21_24 -->
<stat name="oustX" val="108197" />
<stat name="oustY" val="-46679" />
<stat name="oustZ" val="-2092" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="109292" Y="-46528" />
<node X="110180" Y="-45876" />
<node X="109680" Y="-45144" />
<node X="108664" Y="-45496" />
</zone>
<zone name="23_16_pailaka_telezone_09" type="TeleportZone" shape="NPoly" minZ="-1924" maxZ="-1024"> <!-- 21_24 -->
<stat name="oustX" val="110059" />
<stat name="oustY" val="-40650" />
<stat name="oustZ" val="-2141" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="109544" Y="-39720" />
<node X="110708" Y="-39692" />
<node X="110808" Y="-38852" />
<node X="108700" Y="-38796" />
</zone>
<zone name="23_16_pailaka_telezone_10" type="TeleportZone" shape="NPoly" minZ="-2280" maxZ="-1680"> <!-- 21_24 -->
<stat name="oustX" val="109884" />
<stat name="oustY" val="-41358" />
<stat name="oustZ" val="-2327" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="107812" Y="-41728" />
<node X="108616" Y="-41676" />
<node X="108816" Y="-40776" />
<node X="107856" Y="-40652" />
</zone>
</list>

View File

@ -24,6 +24,7 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.OptionalInt;
import java.util.logging.Level;
import java.util.logging.Logger;
@ -487,6 +488,24 @@ public final class ZoneManager implements IGameXmlReader
return null;
}
/**
* Get zone by name.
* @param name the zone name
* @return the zone by name
*/
public L2ZoneType getZoneByName(String name)
{
for (Map<Integer, ? extends L2ZoneType> map : _classZones.values())
{
final Optional<? extends L2ZoneType> zoneType = map.values().stream().filter(z -> (z.getName() != null) && z.getName().equals(name)).findAny();
if (zoneType.isPresent())
{
return zoneType.get();
}
}
return null;
}
/**
* Get zone by ID and zone class.
* @param <T> the generic type
@ -500,6 +519,24 @@ public final class ZoneManager implements IGameXmlReader
return (T) _classZones.get(zoneType).get(id);
}
/**
* Get zone by name.
* @param <T> the generic type
* @param name the zone name
* @param zoneType the zone type
* @return
*/
@SuppressWarnings("unchecked")
public <T extends L2ZoneType> T getZoneByName(String name, Class<T> zoneType)
{
final Optional<? extends L2ZoneType> zone = _classZones.get(zoneType).values().stream().filter(z -> (z.getName() != null) && z.getName().equals(name)).findAny();
if (zone.isPresent())
{
return (T) zone.get();
}
return null;
}
/**
* Returns all zones from where the object is located.
* @param locational the locational

View File

@ -34,6 +34,7 @@ import com.l2jmobius.gameserver.model.events.EventDispatcher;
import com.l2jmobius.gameserver.model.events.ListenersContainer;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureZoneEnter;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureZoneExit;
import com.l2jmobius.gameserver.model.instancezone.Instance;
import com.l2jmobius.gameserver.model.interfaces.ILocational;
import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
@ -47,6 +48,7 @@ public abstract class L2ZoneType extends ListenersContainer
private final int _id;
protected L2ZoneForm _zone;
protected List<L2ZoneForm> _blockedZone;
protected Map<Integer, L2Character> _characterList = new ConcurrentHashMap<>();
/** Parameters to affect specific characters */
@ -61,6 +63,8 @@ public abstract class L2ZoneType extends ListenersContainer
private boolean _allowStore;
protected boolean _enabled;
private AbstractZoneSettings _settings;
private int _instanceTemplateId;
private Map<Integer, Boolean> _enabledInInstance;
protected L2ZoneType(int id)
{
@ -181,6 +185,10 @@ public abstract class L2ZoneType extends ListenersContainer
{
_enabled = Boolean.parseBoolean(value);
}
else if (name.equals("instanceId"))
{
_instanceTemplateId = Integer.parseInt(value);
}
else
{
_log.info(getClass().getSimpleName() + ": Unknown parameter - " + name + " in zone: " + getId());
@ -193,6 +201,24 @@ public abstract class L2ZoneType extends ListenersContainer
*/
private boolean isAffected(L2Character character)
{
// Check instance
final Instance world = character.getInstanceWorld();
if (world != null)
{
if (world.getTemplateId() != getInstanceTemplateId())
{
return false;
}
if (!isEnabled(character.getInstanceId()))
{
return false;
}
}
else if (getInstanceTemplateId() > 0)
{
return false;
}
// Check lvl
if ((character.getLevel() < _minLvl) || (character.getLevel() > _maxLvl))
{
@ -288,6 +314,20 @@ public abstract class L2ZoneType extends ListenersContainer
return _zone;
}
public void setBlockedZones(List<L2ZoneForm> blockedZones)
{
if (_blockedZone != null)
{
throw new IllegalStateException("Blocked zone already set");
}
_blockedZone = blockedZones;
}
public List<L2ZoneForm> getBlockedZones()
{
return _blockedZone;
}
/**
* Set the zone name.
* @param name
@ -306,6 +346,29 @@ public abstract class L2ZoneType extends ListenersContainer
return _name;
}
/**
* Checks if the given coordinates are within the zone, ignores instanceId check
* @param x
* @param y
* @param z
* @return
*/
public boolean isInsideZone(int x, int y, int z)
{
return _zone.isInsideZone(x, y, z) && !isInsideBannedZone(x, y, z);
}
/**
* @param x
* @param y
* @param z
* @return {@code true} if this location is within banned zone boundaries, {@code false} otherwise
*/
public boolean isInsideBannedZone(int x, int y, int z)
{
return (_blockedZone != null) && _blockedZone.stream().allMatch(zone -> !zone.isInsideZone(x, y, z));
}
/**
* Checks if the given coordinates are within zone's plane
* @param x
@ -314,7 +377,7 @@ public abstract class L2ZoneType extends ListenersContainer
*/
public boolean isInsideZone(int x, int y)
{
return _zone.isInsideZone(x, y, _zone.getHighZ());
return isInsideZone(x, y, _zone.getHighZ());
}
/**
@ -324,19 +387,7 @@ public abstract class L2ZoneType extends ListenersContainer
*/
public boolean isInsideZone(ILocational loc)
{
return _zone.isInsideZone(loc.getX(), loc.getY(), loc.getZ());
}
/**
* Checks if the given coordinates are within the zone, ignores instanceId check
* @param x
* @param y
* @param z
* @return
*/
public boolean isInsideZone(int x, int y, int z)
{
return _zone.isInsideZone(x, y, z);
return isInsideZone(loc.getX(), loc.getY(), loc.getZ());
}
/**
@ -361,27 +412,22 @@ public abstract class L2ZoneType extends ListenersContainer
public void revalidateInZone(L2Character character)
{
// If the character can't be affected by this zone return
if (_checkAffected)
{
if (!isAffected(character))
{
return;
}
}
// If the object is inside the zone...
if (isInsideZone(character))
{
// Was the character not yet inside this zone?
if (!_characterList.containsKey(character.getObjectId()))
// If the character can't be affected by this zone return
if (_checkAffected)
{
if (!isAffected(character))
{
return;
}
}
if (_characterList.putIfAbsent(character.getObjectId(), character) == null)
{
// Notify to scripts.
EventDispatcher.getInstance().notifyEventAsync(new OnCreatureZoneEnter(character, this), this);
// Register player.
_characterList.put(character.getObjectId(), character);
// Notify Zone implementation.
onEnter(character);
}
@ -516,6 +562,11 @@ public abstract class L2ZoneType extends ListenersContainer
return _allowStore;
}
public int getInstanceTemplateId()
{
return _instanceTemplateId;
}
@Override
public String toString()
{
@ -537,6 +588,32 @@ public abstract class L2ZoneType extends ListenersContainer
return _enabled;
}
public void setEnabled(boolean state, int instanceId)
{
if (_enabledInInstance == null)
{
synchronized (this)
{
if (_enabledInInstance == null)
{
_enabledInInstance = new ConcurrentHashMap<>();
}
}
}
_enabledInInstance.put(instanceId, state);
}
public boolean isEnabled(int instanceId)
{
if (_enabledInInstance != null)
{
return _enabledInInstance.getOrDefault(instanceId, isEnabled());
}
return isEnabled();
}
public void oustAllPlayers()
{
//@formatter:off

View File

@ -45,7 +45,6 @@ public class L2OlympiadStadiumZone extends L2ZoneRespawn
private final List<L2DoorInstance> _doors = new ArrayList<>(2);
private final List<L2Spawn> _buffers = new ArrayList<>(2);
private final List<Location> _spectatorLocations = new ArrayList<>(1);
private int _instanceTemplate = 0;
public L2OlympiadStadiumZone(int id)
{
@ -102,19 +101,6 @@ public class L2OlympiadStadiumZone extends L2ZoneRespawn
}
}
@Override
public void setParameter(String name, String value)
{
if (name.equals("instanceTemplate"))
{
_instanceTemplate = Integer.parseInt(value);
}
else
{
super.setParameter(name, value);
}
}
public final void registerTask(OlympiadGameTask task)
{
getSettings().setTask(task);
@ -211,13 +197,4 @@ public class L2OlympiadStadiumZone extends L2ZoneRespawn
{
return _spectatorLocations;
}
/**
* Returns zone instanceTemplate
* @return
*/
public int getInstanceTemplateId()
{
return _instanceTemplate;
}
}

View File

@ -0,0 +1,74 @@
/*
* 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 com.l2jmobius.gameserver.model.zone.type;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.zone.L2ZoneType;
/**
* @author Sdw
*/
public class L2TeleportZone extends L2ZoneType
{
private int _x = -1;
private int _y = -1;
private int _z = -1;
public L2TeleportZone(int id)
{
super(id);
}
@Override
public void setParameter(String name, String value)
{
switch (name)
{
case "oustX":
{
_x = Integer.parseInt(value);
break;
}
case "oustY":
{
_y = Integer.parseInt(value);
break;
}
case "oustZ":
{
_z = Integer.parseInt(value);
break;
}
default:
{
super.setParameter(name, value);
}
}
}
@Override
protected void onEnter(L2Character character)
{
character.teleToLocation(new Location(_x, _y, _z));
}
@Override
protected void onExit(L2Character character)
{
}
}

View File

@ -1,129 +1,524 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="45" name="Pailaka (Injured dragon)" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/instance.xsd">
<!-- Pailaka Injured Dragon -->
<instance id="45" name="Pailaka (Injured dragon)" maxWorlds="100" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/instance.xsd">
<time duration="90" empty="3" />
<locations>
<enter type="FIXED">
<location x="125757" y="-40928" z="-3736" />
<location x="125738" y="-40933" z="-3770" />
</enter>
<exit type="ORIGIN" />
</locations>
<conditions>
<condition type="Level">
<param name="min" value="73" />
<param name="max" value="77" />
</condition>
<condition type="Quest">
<param name="id" value="144" />
</condition>
</conditions>
<spawnlist>
<group name="general">
<npc id="32502" x="125524" y="-40946" z="-3718" heading="8279" />
<npc id="32509" x="110074" y="-41324" z="-2285" heading="33580" />
<npc id="32509" x="113745" y="-47565" z="-2593" heading="55710" />
<npc id="18660" x="105618" y="-41801" z="-1782" heading="34701" /> <!-- Latana -->
<group name="pailaka_2316_1m1">
<territories>
<territory name="pailaka_2316_1" minZ="-3000" maxZ="-2700">
<node x="121312" y="-46106" />
<node x="122368" y="-46174" />
<node x="122368" y="-45526" />
<node x="121296" y="-45474" />
</territory>
</territories>
<npc id="18635" x="122122" y="-45658" z="-2884" count="1" /> <!-- Varka Silenos Recruit -->
<npc id="18636" x="122130" y="-45754" z="-2884" count="1" /> <!-- Varka Silenos Footman -->
<npc id="18642" x="122134" y="-45862" z="-2884" count="1" /> <!-- Varka Silenos Warrior -->
<npc id="18636" x="122130" y="-45958" z="-2880" count="1" /> <!-- Varka Silenos Footman -->
<npc id="18635" x="122122" y="-46042" z="-2880" count="1" /> <!-- Varka Silenos Recruit -->
</group>
<group name="wall_200001" spawnByDefault="false">
<npc id="18635" x="122077" y="-46098" z="-2914" heading="5028" />
<npc id="18636" x="122023" y="-45769" z="-2910" heading="63593" />
<npc id="18642" x="122038" y="-45904" z="-2914" heading="771" />
<npc id="18636" x="122050" y="-45999" z="-2910" heading="1701" />
<npc id="18635" x="122019" y="-45634" z="-2908" heading="64841" />
<group name="pailaka_2316_1m2">
<territories>
<territory name="pailaka_2316_1" minZ="-3000" maxZ="-2700">
<node x="121312" y="-46106" />
<node x="122368" y="-46174" />
<node x="122368" y="-45526" />
<node x="121296" y="-45474" />
</territory>
</territories>
<npc id="18640" x="121900" y="-45774" z="-2876" count="1" /> <!-- Varka Silenos Shaman -->
<npc id="18641" x="121898" y="-45904" z="-2875" count="1" /> <!-- Varka Silenos Priest -->
<npc id="18663" x="121898" y="-45904" z="-2875" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_01" />
<param name="GM_ID" value="2316001" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_1m1" />
</parameters>
</npc>
</group>
<group name="wall_200001_add" spawnByDefault="false">
<npc id="18640" x="121931" y="-45844" z="-2902" heading="664" /> <!-- Varka Silenos Shaman -->
<group name="pailaka_2316_2m1">
<territories>
<territory name="pailaka_2316_2" minZ="-2648" maxZ="-2148">
<node x="116604" y="-51752" />
<node x="117320" y="-52676" />
<node x="117944" y="-51812" />
<node x="117056" y="-51204" />
</territory>
</territories>
<npc id="18635" x="117460" y="-51832" z="-2528" heading="57343" count="1" /> <!-- Varka Silenos Recruit -->
<npc id="18636" x="117396" y="-51928" z="-2520" heading="57343" count="1" /> <!-- Varka Silenos Footman -->
<npc id="18642" x="117328" y="-52020" z="-2528" heading="57343" count="1" /> <!-- Varka Silenos Warrior -->
<npc id="18636" x="117252" y="-52104" z="-2528" heading="57343" count="1" /> <!-- Varka Silenos Footman -->
<npc id="18635" x="117180" y="-52180" z="-2528" heading="57343" count="1" /> <!-- Varka Silenos Recruit -->
</group>
<group name="wall_200002" spawnByDefault="false">
<npc id="18653" x="115997" y="-46271" z="-2637" heading="63732" />
<npc id="18654" x="116056" y="-46341" z="-2630" heading="63791" />
<npc id="18646" x="116054" y="-46439" z="-2637" heading="63477" />
<npc id="18646" x="116057" y="-46521" z="-2644" heading="65025" />
<npc id="18654" x="116084" y="-46587" z="-2651" heading="1141" />
<npc id="18653" x="116063" y="-46680" z="-2658" heading="4323" />
<group name="pailaka_2316_2m2">
<territories>
<territory name="pailaka_2316_2" minZ="-2648" maxZ="-2148">
<node x="116604" y="-51752" />
<node x="117320" y="-52676" />
<node x="117944" y="-51812" />
<node x="117056" y="-51204" />
</territory>
</territories>
<npc id="18640" x="117196" y="-51832" z="-2560" heading="57344" count="1" /> <!-- Varka Silenos Shaman -->
<npc id="18641" x="117088" y="-51948" z="-2544" heading="57344" count="1" /> <!-- Varka Silenos Priest -->
<npc id="18663" x="117088" y="-51948" z="-2544" heading="57344" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_02" />
<param name="GM_ID" value="2316002" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_2m1" />
</parameters>
</npc>
</group>
<group name="wall_200002_add" spawnByDefault="false">
<npc id="18648" x="115989" y="-46537" z="-2641" heading="1087" />
<npc id="18652" x="115984" y="-46471" z="-2635" heading="0" />
<group name="pailaka_2316_3m1">
<territories>
<territory name="pailaka_2316_3" minZ="-2680" maxZ="-2180">
<node x="115340" y="-56344" />
<node x="116404" y="-56356" />
<node x="116516" y="-55524" />
<node x="115460" y="-55488" />
</territory>
</territories>
<npc id="18635" x="116024" y="-55796" z="-2512" count="1" /> <!-- Varka Silenos Recruit -->
<npc id="18636" x="116016" y="-55888" z="-2527" count="1" /> <!-- Varka Silenos Footman -->
<npc id="18642" x="116000" y="-55992" z="-2528" count="1" /> <!-- Varka Silenos Warrior -->
<npc id="18636" x="115984" y="-56092" z="-2512" count="1" /> <!-- Varka Silenos Footman -->
<npc id="18635" x="115968" y="-56176" z="-2493" count="1" /> <!-- Varka Silenos Recruit -->
</group>
<group name="wall_200003" spawnByDefault="false">
<npc id="18653" x="116213" y="-50301" z="-2622" heading="50611" />
<npc id="18654" x="116155" y="-50420" z="-2635" heading="53262" />
<npc id="18646" x="116075" y="-50463" z="-2642" heading="53954" />
<npc id="18646" x="116020" y="-50497" z="-2643" heading="55751" />
<npc id="18654" x="115952" y="-50528" z="-2646" heading="52507" />
<npc id="18653" x="115780" y="-50465" z="-2620" heading="52135" />
<group name="pailaka_2316_3m2">
<territories>
<territory name="pailaka_2316_3" minZ="-2680" maxZ="-2180">
<node x="115340" y="-56344" />
<node x="116404" y="-56356" />
<node x="116516" y="-55524" />
<node x="115460" y="-55488" />
</territory>
</territories>
<npc id="18640" x="115755" y="-55866" z="-2579" count="1" /> <!-- Varka Silenos Shaman -->
<npc id="18641" x="115760" y="-56025" z="-2569" count="1" /> <!-- Varka Silenos Priest -->
<npc id="18663" x="115760" y="-56025" z="-2569" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_03" />
<param name="GM_ID" value="2316003" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_3m1" />
</parameters>
</npc>
</group>
<group name="wall_200003_add" spawnByDefault="false">
<npc id="18648" x="116065" y="-50355" z="-2639" heading="53280" />
<npc id="18652" x="115988" y="-50389" z="-2641" heading="52342" />
<npc id="18648" x="115906" y="-50447" z="-2643" heading="54768" />
<group name="pailaka_2316_4m1">
<territories>
<territory name="pailaka_2316_4" minZ="-2704" maxZ="-2104">
<node x="114708" y="-46884" />
<node x="116404" y="-46820" />
<node x="116404" y="-46032" />
<node x="114708" y="-46096" />
</territory>
</territories>
<npc id="18653" x="116150" y="-46307" z="-2614" count="1" /> <!-- Varka's Elite Escort -->
<npc id="18654" x="116151" y="-46369" z="-2622" count="1" /> <!-- Varka's Commander -->
<npc id="18646" x="116153" y="-46431" z="-2623" count="1" /> <!-- Varka Silenos Sergeant -->
<npc id="18646" x="116152" y="-46491" z="-2631" count="1" /> <!-- Varka Silenos Sergeant -->
<npc id="18654" x="116147" y="-46552" z="-2635" count="1" /> <!-- Varka's Commander -->
<npc id="18653" x="116144" y="-46608" z="-2640" count="1" /> <!-- Varka's Elite Escort -->
</group>
<group name="wall_200004">
<npc id="18635" x="117184" y="-51722" z="-2575" heading="55468" />
<npc id="18636" x="117097" y="-51774" z="-2577" heading="51453" />
<npc id="18642" x="117013" y="-51840" z="-2578" heading="55135" />
<npc id="18636" x="116926" y="-51876" z="-2580" heading="56322" />
<npc id="18635" x="116876" y="-51937" z="-2572" heading="59301" />
<group name="pailaka_2316_4m2">
<territories>
<territory name="pailaka_2316_4" minZ="-2704" maxZ="-2104">
<node x="114708" y="-46884" />
<node x="116404" y="-46820" />
<node x="116404" y="-46032" />
<node x="114708" y="-46096" />
</territory>
</territories>
<npc id="18645" x="115947" y="-46458" z="-2617" count="1" /> <!-- Varka Silenos Magus -->
<npc id="18644" x="115911" y="-46378" z="-2623" count="1" /> <!-- Varka Silenos Medium -->
<npc id="18648" x="115916" y="-46525" z="-2608" count="1" /> <!-- Varka Silenos Chief Priest -->
<npc id="18663" x="115916" y="-46525" z="-2608" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_04" />
<param name="GM_ID" value="2316004" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_4m1" />
</parameters>
</npc>
</group>
<group name="wall_200004_add" spawnByDefault="false">
<npc id="18648" x="117060" y="-51674" z="-2580" heading="57161" />
<npc id="18648" x="116918" y="-51781" z="-2582" heading="57343" />
<group name="pailaka_2316_5m1">
<territories>
<territory name="pailaka_2316_5" minZ="-2684" maxZ="-2184">
<node x="115756" y="-50960" />
<node x="116448" y="-50512" />
<node x="115760" y="-49552" />
<node x="114896" y="-50368" />
</territory>
</territories>
<npc id="18653" x="116163" y="-50317" z="-2612" heading="53247" count="1" /> <!-- Varka's Elite Escort -->
<npc id="18654" x="116104" y="-50357" z="-2620" heading="53247" count="1" /> <!-- Varka's Commander -->
<npc id="18646" x="116048" y="-50397" z="-2622" heading="53247" count="1" /> <!-- Varka Silenos Sergeant -->
<npc id="18646" x="115993" y="-50439" z="-2624" heading="53247" count="1" /> <!-- Varka Silenos Sergeant -->
<npc id="18654" x="115932" y="-50481" z="-2627" heading="53247" count="1" /> <!-- Varka's Commander -->
<npc id="18653" x="115869" y="-50505" z="-2609" heading="53247" count="1" /> <!-- Varka's Elite Escort -->
</group>
<group name="wall_200005" spawnByDefault="false">
<npc id="18649" x="111606" y="-43746" z="-2633" heading="62267" />
<npc id="18650" x="111602" y="-43846" z="-2638" heading="63427" />
<npc id="18649" x="111616" y="-43922" z="-2635" heading="60699" />
<npc id="18650" x="111618" y="-44003" z="-2637" heading="59709" />
<npc id="18649" x="111614" y="-44071" z="-2642" heading="63794" />
<npc id="18650" x="111619" y="-44129" z="-2650" heading="2365" />
<group name="pailaka_2316_5m2">
<territories>
<territory name="pailaka_2316_5" minZ="-2684" maxZ="-2184">
<node x="115756" y="-50960" />
<node x="116448" y="-50512" />
<node x="115760" y="-49552" />
<node x="114896" y="-50368" />
</territory>
</territories>
<npc id="18645" x="116054" y="-50230" z="-2618" heading="53247" count="1" /> <!-- Varka Silenos Magus -->
<npc id="18644" x="115944" y="-50297" z="-2624" heading="53247" count="1" /> <!-- Varka Silenos Medium -->
<npc id="18648" x="115837" y="-50357" z="-2624" heading="53247" count="1" /> <!-- Varka Silenos Chief Priest -->
<npc id="18663" x="115837" y="-50357" z="-2624" heading="53247" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_05" />
<param name="GM_ID" value="2316005" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_5m1" />
</parameters>
</npc>
</group>
<group name="wall_200005_add" spawnByDefault="false">
<npc id="18652" x="111499" y="-43867" z="-2619" heading="1338" />
<npc id="18648" x="111539" y="-43743" z="-2623" heading="62952" />
<npc id="18648" x="111522" y="-43965" z="-2616" heading="63399" />
<npc id="18652" x="111514" y="-44085" z="-2625" heading="379" />
<group name="pailaka_2316_6m1">
<territories>
<territory name="pailaka_2316_6" minZ="-2360" maxZ="-1960">
<node x="108020" y="-50088" />
<node x="108940" y="-50004" />
<node x="108872" y="-49284" />
<node x="107924" y="-49328" />
</territory>
</territories>
<npc id="18653" x="108622" y="-49901" z="-2169" heading="49151" count="1" /> <!-- Varka's Elite Escort -->
<npc id="18654" x="108510" y="-49908" z="-2200" heading="49151" count="1" /> <!-- Varka's Commander -->
<npc id="18646" x="108398" y="-49916" z="-2229" heading="49151" count="1" /> <!-- Varka Silenos Sergeant -->
<npc id="18646" x="108296" y="-49937" z="-2242" heading="49151" count="1" /> <!-- Varka Silenos Sergeant -->
<npc id="18654" x="108185" y="-49947" z="-2261" heading="49151" count="1" /> <!-- Varka's Commander -->
<npc id="18653" x="108078" y="-49950" z="-2268" heading="49151" count="1" /> <!-- Varka's Elite Escort -->
</group>
<group name="wall_200006" spawnByDefault="false">
<npc id="18657" x="109272" y="-45665" z="-2210" heading="4731" />
<npc id="18655" x="109326" y="-45781" z="-2235" heading="5945" />
<npc id="18657" x="109393" y="-45893" z="-2253" heading="5549" />
<npc id="18655" x="109458" y="-45980" z="-2263" heading="6915" />
<npc id="18657" x="109516" y="-46032" z="-2268" heading="4362" />
<npc id="18655" x="109584" y="-46100" z="-2263" heading="9356" />
<group name="pailaka_2316_6m2">
<territories>
<territory name="pailaka_2316_6" minZ="-2360" maxZ="-1960">
<node x="108020" y="-50088" />
<node x="108940" y="-50004" />
<node x="108872" y="-49284" />
<node x="107924" y="-49328" />
</territory>
</territories>
<npc id="18645" x="108514" y="-49748" z="-2175" heading="45055" count="1" /> <!-- Varka Silenos Magus -->
<npc id="18644" x="108322" y="-49726" z="-2214" heading="49151" count="1" /> <!-- Varka Silenos Medium -->
<npc id="18648" x="108149" y="-49766" z="-2243" heading="53247" count="1" /> <!-- Varka Silenos Chief Priest -->
<npc id="18663" x="108149" y="-49766" z="-2243" heading="53247" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_06" />
<param name="GM_ID" value="2316006" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_6m1" />
</parameters>
</npc>
</group>
<group name="wall_200006_add" spawnByDefault="false">
<npc id="18652" x="109442" y="-46077" z="-2256" heading="8191" />
<npc id="18648" x="109298" y="-45890" z="-2232" heading="7391" />
<npc id="18652" x="109373" y="-45985" z="-2250" heading="7882" />
<group name="pailaka_2316_7m1">
<territories>
<territory name="pailaka_2316_7" minZ="-2745" maxZ="-2345">
<node x="110628" y="-44180" />
<node x="111680" y="-44220" />
<node x="111740" y="-43532" />
<node x="110700" y="-43484" />
</territory>
</territories>
<npc id="18649" x="111552" y="-43594" z="-2629" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="111549" y="-43688" z="-2616" count="1" /> <!-- Varka Silenos Officer -->
<npc id="18649" x="111545" y="-43776" z="-2611" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="111540" y="-43868" z="-2610" count="1" /> <!-- Varka Silenos Officer -->
<npc id="18649" x="111536" y="-43952" z="-2606" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="111533" y="-44038" z="-2608" count="1" /> <!-- Varka Silenos Officer -->
</group>
<group name="wall_200007">
<npc id="18653" x="116432" y="-55729" z="-2441" heading="65250" />
<npc id="18654" x="116499" y="-55822" z="-2449" heading="63477" />
<npc id="18646" x="116503" y="-55918" z="-2449" heading="589" />
<npc id="18646" x="116490" y="-56022" z="-2445" heading="61772" />
<npc id="18654" x="116481" y="-56108" z="-2437" heading="62531" />
<npc id="18653" x="116433" y="-56194" z="-2432" heading="927" />
<group name="pailaka_2316_7m2">
<territories>
<territory name="pailaka_2316_7" minZ="-2745" maxZ="-2345">
<node x="110628" y="-44180" />
<node x="111680" y="-44220" />
<node x="111740" y="-43532" />
<node x="110700" y="-43484" />
</territory>
</territories>
<npc id="18652" x="111360" y="-43664" z="-2592" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18648" x="111360" y="-43744" z="-2576" count="1" /> <!-- Varka Silenos Chief Priest -->
<npc id="18652" x="111344" y="-43824" z="-2576" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18648" x="111347" y="-43905" z="-2576" count="1" /> <!-- Varka Silenos Chief Priest -->
<npc id="18652" x="111344" y="-43984" z="-2576" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18663" x="111344" y="-43984" z="-2576" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_07" />
<param name="GM_ID" value="2316007" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_7m1" />
</parameters>
</npc>
</group>
<group name="wall_200007_add" spawnByDefault="false">
<npc id="18648" x="116348" y="-56103" z="-2460" heading="63868" />
<npc id="18652" x="116394" y="-55968" z="-2465" heading="2634" />
<npc id="18648" x="116398" y="-55821" z="-2464" heading="664" />
<group name="pailaka_2316_8m1">
<territories>
<territory name="pailaka_2316_8" minZ="-2376" maxZ="-1976">
<node x="109092" y="-46644" />
<node x="109916" y="-45888" />
<node x="109580" y="-45208" />
<node x="108612" y="-45880" />
</territory>
</territories>
<npc id="18649" x="109081" y="-46337" z="-2176" heading="36864" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="109048" y="-46280" z="-2176" heading="36864" count="1" /> <!-- Varka Silenos Officer -->
<npc id="18649" x="109015" y="-46222" z="-2160" heading="36864" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="108984" y="-46168" z="-2160" heading="36864" count="1" /> <!-- Varka Silenos Officer -->
<npc id="18649" x="108951" y="-46120" z="-2144" heading="36864" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="108916" y="-46068" z="-2144" heading="36864" count="1" /> <!-- Varka Silenos Officer -->
</group>
<group name="wall_200008" spawnByDefault="false">
<npc id="18655" x="108892" y="-41031" z="-2204" heading="64381" />
<npc id="18657" x="108888" y="-41114" z="-2195" heading="64256" />
<npc id="18655" x="108886" y="-41185" z="-2196" heading="64884" />
<npc id="18657" x="108878" y="-41260" z="-2188" heading="64876" />
<npc id="18655" x="108862" y="-41323" z="-2174" heading="62422" />
<npc id="18657" x="108869" y="-41376" z="-2163" heading="2280" />
<npc id="18655" x="108877" y="-41436" z="-2144" heading="64321" />
<group name="pailaka_2316_8m2">
<territories>
<territory name="pailaka_2316_8" minZ="-2376" maxZ="-1976">
<node x="109092" y="-46644" />
<node x="109916" y="-45888" />
<node x="109580" y="-45208" />
<node x="108612" y="-45880" />
</territory>
</territories>
<npc id="18652" x="109203" y="-46244" z="-2190" heading="36863" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18648" x="109169" y="-46186" z="-2190" heading="36863" count="1" /> <!-- Varka Silenos Chief Priest -->
<npc id="18652" x="109134" y="-46127" z="-2174" heading="36863" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18648" x="109094" y="-46071" z="-2174" heading="36863" count="1" /> <!-- Varka Silenos Chief Priest -->
<npc id="18652" x="109058" y="-46013" z="-2158" heading="36863" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18663" x="109058" y="-46013" z="-2158" heading="36863" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_08" />
<param name="GM_ID" value="2316008" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_8m1" />
</parameters>
</npc>
</group>
<group name="wall_200008_add" spawnByDefault="false">
<npc id="18652" x="108797" y="-41101" z="-2176" heading="62980" />
<npc id="18652" x="108819" y="-41198" z="-2183" heading="0" />
<npc id="18652" x="108811" y="-41293" z="-2170" heading="473" />
<group name="pailaka_2316_9m1">
<territories>
<territory name="pailaka_2316_9" minZ="-1924" maxZ="-1424">
<node x="109752" y="-39880" />
<node x="110416" y="-39860" />
<node x="110348" y="-39020" />
<node x="109716" y="-38908" />
</territory>
</territories>
<npc id="18650" x="110224" y="-39828" z="-1808" heading="49152" count="1" /> <!-- Varka Silenos Officer -->
<npc id="18649" x="110144" y="-39840" z="-1840" heading="49152" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="110064" y="-39844" z="-1840" heading="49152" count="1" /> <!-- Varka Silenos Officer -->
<npc id="18649" x="109978" y="-39848" z="-1840" heading="49152" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="109892" y="-39847" z="-1824" heading="49152" count="1" /> <!-- Varka Silenos Officer -->
</group>
<group name="wall_200009">
<npc id="18650" x="110205" y="-39800" z="-1840" heading="46882" />
<npc id="18649" x="110110" y="-39799" z="-1850" heading="46038" />
<npc id="18659" x="110023" y="-39802" z="-1852" heading="48655" />
<npc id="18649" x="109955" y="-39811" z="-1855" heading="48647" />
<npc id="18650" x="109874" y="-39833" z="-1837" heading="48408" />
<group name="pailaka_2316_9m2">
<territories>
<territory name="pailaka_2316_9" minZ="-1924" maxZ="-1424">
<node x="109752" y="-39880" />
<node x="110416" y="-39860" />
<node x="110348" y="-39020" />
<node x="109716" y="-38908" />
</territory>
</territories>
<npc id="18652" x="110143" y="-39645" z="-1776" heading="49152" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18652" x="110048" y="-39648" z="-1776" heading="49152" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18652" x="109950" y="-39646" z="-1776" heading="49152" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18663" x="109950" y="-39646" z="-1776" heading="49152" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_09" />
<param name="GM_ID" value="2316009" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_9m1" />
</parameters>
</npc>
</group>
<group name="wall_200009_add" spawnByDefault="false">
<npc id="18652" x="109965" y="-39685" z="-1815" heading="48384" />
<npc id="18652" x="110087" y="-39710" z="-1827" heading="48270" />
<group name="pailaka_2316_10m1">
<territories>
<territory name="pailaka_2316_10" minZ="-2272" maxZ="-1772">
<node x="108388" y="-41460" />
<node x="108912" y="-41460" />
<node x="109048" y="-41020" />
<node x="108432" y="-40848" />
</territory>
</territories>
<npc id="18655" x="108917" y="-41028" z="-2188" count="1" /> <!-- Varka's Chief Escort -->
<npc id="18657" x="108912" y="-41089" z="-2180" count="1" /> <!-- Prophet's Royal Guard -->
<npc id="18655" x="108901" y="-41147" z="-2181" count="1" /> <!-- Varka's Chief Escort -->
<npc id="18657" x="108894" y="-41207" z="-2182" count="1" /> <!-- Prophet's Royal Guard -->
<npc id="18655" x="108885" y="-41267" z="-2170" count="1" /> <!-- Varka's Chief Escort -->
<npc id="18657" x="108868" y="-41320" z="-2157" count="1" /> <!-- Prophet's Royal Guard -->
<npc id="18655" x="108894" y="-41379" z="-2144" count="1" /> <!-- Varka's Chief Escort -->
</group>
<group name="pailaka_2316_10m2">
<territories>
<territory name="pailaka_2316_10" minZ="-2272" maxZ="-1772">
<node x="108388" y="-41460" />
<node x="108912" y="-41460" />
<node x="109048" y="-41020" />
<node x="108432" y="-40848" />
</territory>
</territories>
<npc id="18656" x="108676" y="-41069" z="-2137" count="1" /> <!-- Varka's Chief Magus -->
<npc id="18658" x="108669" y="-41136" z="-2133" count="1" /> <!-- Prophet's Disciple -->
<npc id="18659" x="108665" y="-41207" z="-2131" count="1" /> <!-- Varka's Prophet -->
<npc id="18658" x="108653" y="-41273" z="-2119" count="1" /> <!-- Prophet's Disciple -->
<npc id="18663" x="108653" y="-41273" z="-2119" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_10" />
<param name="GM_ID" value="2316010" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_10m1" />
</parameters>
</npc>
</group>
<group name="pailaka_2316_bossm1">
<territories>
<territory name="pailaka_2316_boss" minZ="-1960" maxZ="-1360">
<node x="105320" y="-43124" />
<node x="107304" y="-42412" />
<node x="107352" y="-40940" />
<node x="105028" y="-41188" />
</territory>
</territories>
<npc id="18660" x="105785" y="-41785" z="-1810" heading="32768" count="1" /> <!-- Latana -->
<npc id="18603" x="105974" y="-41794" z="-1784" heading="32768" count="1" /> <!-- -->
</group>
<group name="pailaka_2316_animal_1m1">
<territories>
<territory name="pailaka_2316_animal_1" minZ="-3416" maxZ="-2816">
<node x="121076" y="-43420" />
<node x="124120" y="-43760" />
<node x="123704" y="-41368" />
<node x="120276" y="-41568" />
</territory>
</territories>
<npc id="18637" count="5" /> <!-- Grazing Antelope -->
</group>
<group name="pailaka_2316_animal_2m1">
<territories>
<territory name="pailaka_2316_animal_2" minZ="-2680" maxZ="-2080">
<node x="123792" y="-53020" />
<node x="126076" y="-50516" />
<node x="124300" y="-49584" />
<node x="122536" y="-51908" />
</territory>
</territories>
<npc id="18637" count="4" /> <!-- Grazing Antelope -->
</group>
<group name="pailaka_2316_animal_3m1">
<territories>
<territory name="pailaka_2316_animal_3" minZ="-2464" maxZ="-1664">
<node x="119348" y="-56704" />
<node x="122056" y="-56624" />
<node x="122040" y="-53536" />
<node x="118812" y="-54188" />
</territory>
</territories>
<npc id="18643" count="3" /> <!-- Grazing Antelope -->
</group>
<group name="pailaka_2316_animal_4m1">
<territories>
<territory name="pailaka_2316_animal_4" minZ="-3004" maxZ="-2404">
<node x="110524" y="-56436" />
<node x="112908" y="-56756" />
<node x="113144" y="-54140" />
<node x="110428" y="-53384" />
</territory>
</territories>
<npc id="18647" count="5" /> <!-- Grazing Flava -->
</group>
<group name="pailaka_2316_animal_5m1">
<territories>
<territory name="pailaka_2316_animal_5" minZ="-2676" maxZ="-2076">
<node x="107688" y="-55456" />
<node x="109016" y="-55748" />
<node x="108976" y="-51696" />
<node x="107800" y="-51872" />
</territory>
</territories>
<npc id="18647" count="5" /> <!-- Grazing Flava -->
</group>
<group name="pailaka_2316_animal_6m1">
<territories>
<territory name="pailaka_2316_animal_6" minZ="-2620" maxZ="-2020">
<node x="114232" y="-40504" />
<node x="115736" y="-40892" />
<node x="116260" y="-38364" />
<node x="114140" y="-38540" />
</territory>
</territories>
<npc id="18651" count="5" /> <!-- Grazing Elder Antelope -->
</group>
<group name="pailaka_2316_animal_7m1">
<territories>
<territory name="pailaka_2316_animal_7" minZ="-1292" maxZ="-592">
<node x="108865" y="-36896" />
<node x="110601" y="-37196" />
<node x="109833" y="-35720" />
<node x="108521" y="-35800" />
</territory>
</territories>
<npc id="18651" count="5" /> <!-- Grazing Elder Antelope -->
</group>
<group name="pailaka_2316_npc_1m1">
<territories>
<territory name="pailaka_2316_npc_1" minZ="-3780" maxZ="-3580">
<node x="125436" y="-41028" />
<node x="125636" y="-41028" />
<node x="125636" y="-40828" />
<node x="125436" y="-40828" />
</territory>
</territories>
<npc id="32502" x="125536" y="-40928" z="-3780" heading="8192" count="1" /> <!-- Ketra Orc Supporter -->
</group>
<group name="pailaka_2316_npc_2m1">
<territories>
<territory name="pailaka_2316_npc_2" minZ="-2668" maxZ="-2468">
<node x="113720" y="-47688" />
<node x="113920" y="-47688" />
<node x="113920" y="-47488" />
<node x="113720" y="-47488" />
</territory>
</territories>
<npc id="32509" x="113820" y="-47588" z="-2668" count="1" /> <!-- Ketra Orc Intelligence Officer -->
</group>
<group name="pailaka_2316_npc_3m1">
<territories>
<territory name="pailaka_2316_npc_3" minZ="-2448" maxZ="-2248">
<node x="107452" y="-53252" />
<node x="107652" y="-53252" />
<node x="107652" y="-53052" />
<node x="107452" y="-53052" />
</territory>
</territories>
<npc id="32509" x="107552" y="-53152" z="-2448" count="1" /> <!-- Ketra Orc Intelligence Officer -->
</group>
<group name="pailaka_2316_npc_4m1">
<territories>
<territory name="pailaka_2316_npc_4" minZ="-2340" maxZ="-1940">
<node x="110080" y="-41380" />
<node x="110280" y="-41380" />
<node x="110280" y="-41180" />
<node x="110080" y="-41180" />
</territory>
</territories>
<npc id="32509" x="110144" y="-41260" z="-2260" heading="36864" count="1" /> <!-- Ketra Orc Intelligence Officer -->
</group>
</spawnlist>
</instance>

View File

@ -0,0 +1,3 @@
<html><body>Ketra Orc Shaman:<br>
Remember to seek out a Ketra Orc in that world. There must be one there who will aid you in your quest!
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Ketra Orc Shaman:<br>
I have faith that you will remove the dark shadow which hides our Great Flame!
</body></html>

View File

@ -16,221 +16,616 @@
*/
package instances.PailakaInjuredDragon;
import java.util.HashMap;
import java.util.List;
import com.l2jmobius.gameserver.ai.CtrlIntention;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.commons.util.CommonUtil;
import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
import com.l2jmobius.gameserver.model.L2World;
import com.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
import com.l2jmobius.gameserver.model.events.annotations.Id;
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureSee;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnAttackableFactionCall;
import com.l2jmobius.gameserver.model.holders.SkillHolder;
import com.l2jmobius.gameserver.model.instancezone.Instance;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.spawns.SpawnGroup;
import com.l2jmobius.gameserver.model.skills.AbnormalType;
import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.gameserver.model.zone.L2ZoneType;
import com.l2jmobius.gameserver.model.zone.type.L2TeleportZone;
import com.l2jmobius.gameserver.network.serverpackets.SpecialCamera;
import instances.AbstractInstance;
import quests.Q00144_PailakaInjuredDragon.Q00144_PailakaInjuredDragon;
/**
* @author Mathael
* Pailaka (Varka Silenos Barracks) Instance zone.
* @author Sdw
*/
public class PailakaInjuredDragon extends AbstractInstance
public final class PailakaInjuredDragon extends AbstractInstance
{
// NPCs
private static final int KETRA_ORC_SUPPORTER_END = 32512;
// Monsters
private static final int RECRUIT = 18635;
private static final int FOOTMAN = 18636;
private static final int WARRIOR = 18642;
private static final int OFFICER = 18646;
private static final int GREAT_MAGUS = 18649;
private static final int GENERAL = 18650;
private static final int ELITE_GUARD = 18653;
private static final int COMMANDER = 18654;
private static final int HEAD_GUARD = 18655;
private static final int PROPHET_GUARD = 18657;
private static final int PROPHET = 18659;
private static final int SHAMAN = 18640;
private static final int CHIEF_PRIEST = 18648;
private static final int GRAND_PRIEST = 18652;
private static final int KETRA_ORC_SHAMAN = 32499;
private static final int KETRA_ORC_INTELLIGENCE_OFFICIER = 32509;
private static final int KETRA_ORC_SUPPORTER = 32512;
private static final int LATANA = 18660;
private static final int ANTELOPE1 = 18637;
private static final int ANTELOPE2 = 18643;
private static final int ANTELOPE3 = 18651;
// Usable Quest Items
private static final int SHIELD_POTION = 13032;
private static final int HEAL_POTION = 13033;
// Walls
private static final HashMap<Integer, Location> ZONES_TELEPORTS = new HashMap<>();
static
private static final int DRAGON_CAMERA_1 = 18603;
private static final int DRAGON_CAMERA_2 = 18604;
private static final int DRAGON_TARGET = 18605;
private static final int LATANA_SKILL_USE = 18661;
private static final int TELEPORT_TRAP = 18663;
//@formatter:off
private static final int[] WARRIORS =
{
ZONES_TELEPORTS.put(200001, new Location(122452, -45808, -2981));
ZONES_TELEPORTS.put(200002, new Location(116610, -46418, -2641));
ZONES_TELEPORTS.put(200003, new Location(116237, -50961, -2636));
ZONES_TELEPORTS.put(200004, new Location(117384, -52141, -2544));
ZONES_TELEPORTS.put(200005, new Location(112169, -44004, -2707));
ZONES_TELEPORTS.put(200006, new Location(109460, -45869, -2265));
ZONES_TELEPORTS.put(200007, new Location(117111, -55927, -2380));
ZONES_TELEPORTS.put(200008, new Location(109274, -41277, -2271));
ZONES_TELEPORTS.put(200009, new Location(110023, -40263, -2001));
}
// Skill
private static final SkillHolder LATANA_PRESENTATION_SKILL = new SkillHolder(5759, 1);
18635, 18636, 18638,
18642, 18646, 18649,
18650, 18653, 18654,
18655, 18657,
};
private static final int[] WIZARDS =
{
18639, 18640, 18641,
18644, 18645, 18648,
18652, 18656, 18658,
18659,
};
private static final int[] ANIMALS =
{
18637, 18643,
18647, 18651,
};
// Skills
private static final SkillHolder ULTIMATE_DEFENCE = new SkillHolder(5044, 3);
private static final SkillHolder HEAL = new SkillHolder(4065, 7);
private static final SkillHolder ELECTRIC_FLAME = new SkillHolder(5715, 1);
private static final SkillHolder STUN = new SkillHolder(5716, 1);
private static final SkillHolder FIRE_BREATH = new SkillHolder(5717, 1);
private static final SkillHolder ANGER = new SkillHolder(5719, 1);
private static final SkillHolder RISE_OF_LATANA = new SkillHolder(5759, 1);
private static final int[] REJECTED_SKILLS =
{
28, 680, 51,
511, 15, 254,
1069, 1097, 1042,
1072, 1170, 352,
358, 1394, 695,
115, 1083, 1160,
1164, 1201, 1206,
1222, 1223, 1224,
1092, 65, 106,
122, 127, 1049,
1064, 1071, 1074,
1169, 1263, 1269,
352, 353, 1336,
1337, 1338, 1358,
1359, 402, 403,
412, 1386, 1394,
1396, 485, 501,
1445, 1446, 1447,
522, 531, 1481,
1482, 1483, 1484,
1485, 1486, 695,
696, 716, 775,
1511, 792, 1524,
1529,
};
//@formatter:on
// Items
private static final int PAILAKA_INSTANT_SHIELD = 13032;
private static final int QUICK_HEALING_POTION = 13033;
private static final int WEAPON_UPGRADE_STAGE_1 = 13056;
private static final int WEAPON_UPGRADE_STAGE_2 = 13057;
// Misc
private static final int TEMPLATE_ID = 45;
public PailakaInjuredDragon()
{
super(TEMPLATE_ID);
addInstanceEnterId(TEMPLATE_ID);
addKillId(ANTELOPE1, ANTELOPE2, ANTELOPE3, GENERAL, GREAT_MAGUS, PROPHET, ELITE_GUARD, COMMANDER, OFFICER, RECRUIT, FOOTMAN, WARRIOR, PROPHET_GUARD, HEAD_GUARD, SHAMAN, CHIEF_PRIEST, GRAND_PRIEST, LATANA);
addSpawnId(LATANA);
addAggroRangeEnterId(LATANA);
addEnterZoneId(ZONES_TELEPORTS.keySet());
addInstanceCreatedId(TEMPLATE_ID);
addStartNpc(KETRA_ORC_SHAMAN);
addTalkId(KETRA_ORC_SHAMAN, KETRA_ORC_INTELLIGENCE_OFFICIER);
addAttackId(WARRIORS);
addAttackId(WIZARDS);
addAttackId(LATANA);
addSpawnId(TELEPORT_TRAP, LATANA, DRAGON_TARGET, LATANA_SKILL_USE, DRAGON_CAMERA_2);
addSpawnId(WIZARDS);
setCreatureSeeId(this::onCreatureSee, WIZARDS);
setCreatureSeeId(this::onCreatureSee, LATANA);
addKillId(ANIMALS);
addKillId(LATANA);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
switch (event)
String htmltext = null;
final QuestState qs = player.getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName());
if (qs != null)
{
case "enter":
switch (event)
{
enterInstance(player, npc, TEMPLATE_ID);
break;
}
case "camera_start":
{
specialCamera(player, npc, 0, 0, 180, 800, 5000, 800, 0, 1, 0, 0);
break; // TODO: Need retail values
}
case "camera_end":
{
specialCamera(player, npc, 0, 0, 180, 600, 5000, 600, 0, 1, 0, 0);
break; // TODO: Need retail values
}
}
return super.onAdvEvent(event, npc, player);
}
@Override
protected void onEnter(L2PcInstance player, Instance instance, boolean firstEnter)
{
super.onEnter(player, instance, firstEnter);
if (firstEnter)
{
final QuestState qs = player.getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName());
if ((qs != null) && qs.isCond(1))
{
qs.setCond(2, true);
showHtmlFile(player, "32499-09.html");
}
}
}
@Override
public String onAggroRangeEnter(L2Npc npc, L2PcInstance player, boolean isSummon)
{
if (npc.isScriptValue(0))
{
npc.setScriptValue(1);
startQuestTimer("camera_start", 300, npc, player);
npc.doCast(LATANA_PRESENTATION_SKILL.getSkill());
}
return super.onAggroRangeEnter(npc, player, isSummon);
}
@Override
public void onInstanceCreated(Instance instance, L2PcInstance player)
{
for (int i = 0; i < 9; i++)
{
final int zoneId = 200000 + (i + 1);
final List<L2Npc> npcs = instance.spawnGroup("wall_" + zoneId);
npcs.forEach(k -> k.setScriptValue(zoneId));
instance.getParameters().set("wall_" + zoneId, npcs.size());
}
super.onInstanceCreated(instance, player);
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final int npcId = npc.getId();
if (npcId == LATANA)
{
startQuestTimer("camera_end", 1000, npc, killer);
addSpawn(KETRA_ORC_SUPPORTER_END, new Location(105517, -41692, -1781, 65323), false, 0, false, npc.getInstanceWorld().getId());
}
else
{
switch (getRandom(1, 3))
{
case 1:
case "enterInstance":
{
npc.dropItem(killer, SHIELD_POTION, getRandom(1, 8));
enterInstance(player, npc, TEMPLATE_ID);
qs.setCond(2, true);
htmltext = "32499-01.html";
break;
}
case 2:
case "reEnterInstance":
{
npc.dropItem(killer, HEAL_POTION, getRandom(1, 4));
enterInstance(player, npc, TEMPLATE_ID);
htmltext = "32499-02.html";
break;
}
case "exitInstance":
{
finishInstance(player, 0);
break;
}
}
if ((npcId != ANTELOPE1) && (npcId != ANTELOPE2) && (npcId != ANTELOPE3) && (npcId != SHAMAN) && (npcId != CHIEF_PRIEST) && (npcId != GRAND_PRIEST))
}
return htmltext;
}
@Override
public void onTimerEvent(String event, StatsSet params, L2Npc npc, L2PcInstance player)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (event)
{
final Instance world = npc.getInstanceWorld();
final int zoneId = npc.getScriptValue();
int killcount = world.getParameters().getInt("wall_" + zoneId);
killcount--;
world.setParameter("wall_" + zoneId, killcount);
if (killcount <= 0)
case "SET_VISIBLE":
{
world.getSpawnGroup("wall_" + zoneId).forEach(SpawnGroup::despawnAll);
world.getSpawnGroup("wall_" + zoneId + "_add").forEach(SpawnGroup::despawnAll);
}
else if (!world.getParameters().getBoolean("wall_" + zoneId + "_add", false))
{
world.setParameter("wall_" + zoneId + "_add", true);
world.spawnGroup("wall_" + zoneId + "_add").forEach(mage ->
if (!npc.getVariables().getBoolean("visible", false))
{
mage.setTarget(killer);
mage.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, killer);
npc.setInvisible(false);
npc.getVariables().set("visible", true);
getTimers().addTimer("CAST_SKILL", 5000, npc, player);
}
break;
}
case "CAST_SKILL":
{
final SkillHolder holder = npc.getParameters().getSkillHolder(getRandomBoolean() ? "Skill01_ID" : "Skill02_ID");
if (holder != null)
{
addSkillCastDesire(npc, player, holder, 500000);
}
getTimers().addTimer("CAST_SKILL", 10000, npc, player);
break;
}
case "LOOK_NEIGHBOR":
{
L2World.getInstance().forEachVisibleObjectInRange(npc, L2Npc.class, HEAL.getSkill().getCastRange(), npcs ->
{
if ((npcs.getCurrentHpPercent() < 70) && (getRandom(100) < 10))
{
addSkillCastDesire(npc, npcs, HEAL, 1000000);
}
});
getTimers().addTimer("LOOK_NEIGHBOR", 5000, npc, null);
break;
}
case "CHECK_FOR_DROP":
{
if (world.getNpcsOfGroup(npc.getParameters().getString("control_maker"), n -> !n.isDead()).isEmpty())
{
final L2ZoneType zone = ZoneManager.getInstance().getZoneByName(npc.getParameters().getString("AreaName"), L2TeleportZone.class);
if (zone != null)
{
zone.setEnabled(false, world.getId());
}
npc.dropItem(world.getFirstPlayer(), PAILAKA_INSTANT_SHIELD, getRandom(10) + 1);
npc.dropItem(world.getFirstPlayer(), QUICK_HEALING_POTION, getRandom(10) + 1);
switch (npc.getParameters().getInt("GM_ID", 0))
{
case 2316001:
case 2316002:
case 2316003:
{
if ((world.getParameters().getInt("2316001", 0) == 1) && (world.getParameters().getInt("2316002", 0) == 1) && (world.getParameters().getInt("2316003", 0) == 1))
{
giveItems(world.getFirstPlayer(), WEAPON_UPGRADE_STAGE_1, 1, true);
world.getParameters().set(npc.getParameters().getString("GM_ID"), 0);
}
break;
}
case 2316007:
case 2316008:
{
if ((world.getParameters().getInt("2316007", 0) == 1) && (world.getParameters().getInt("2316008", 0) == 1))
{
giveItems(world.getFirstPlayer(), WEAPON_UPGRADE_STAGE_2, 1, true);
world.getParameters().set(npc.getParameters().getString("GM_ID"), 0);
}
break;
}
}
npc.deleteMe();
}
else
{
getTimers().addTimer("CHECK_FOR_DROP", 2000, npc, null);
}
break;
}
case "SCE_RATANA_CAMERA_START_1":
{
npc.broadcastPacket(new SpecialCamera(npc, 600, 200, 5, 0, 15000, 10000, -10, 8, 1, 1, 1));
getTimers().addTimer("SCE_RATANA_CAMERA_START_1_1", 2000, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_1_1":
{
npc.broadcastPacket(new SpecialCamera(npc, 400, 200, 5, 4000, 15000, 10000, -10, 8, 1, 1, 0));
getTimers().addTimer("SCE_RATANA_CAMERA_START_1_2", 4000, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_1_2":
{
npc.broadcastPacket(new SpecialCamera(npc, 300, 195, 4, 1500, 15000, 10000, -5, 10, 1, 1, 0));
getTimers().addTimer("SCE_RATANA_CAMERA_START_1_3", 1700, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_1_3":
{
npc.broadcastPacket(new SpecialCamera(npc, 130, 2, 5, 0, 15000, 10000, 0, 0, 1, 0, 1));
getTimers().addTimer("SCE_RATANA_CAMERA_START_1_4", 2000, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_1_4":
{
npc.broadcastPacket(new SpecialCamera(npc, 220, 0, 4, 800, 15000, 10000, 5, 10, 1, 0, 0));
getTimers().addTimer("SCE_RATANA_CAMERA_START_1_5", 2000, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_1_5":
{
npc.broadcastPacket(new SpecialCamera(npc, 250, 185, 5, 4000, 15000, 10000, -5, 10, 1, 1, 0));
getTimers().addTimer("SCE_RATANA_CAMERA_START_1_6", 4000, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_1_6":
{
npc.broadcastPacket(new SpecialCamera(npc, 200, 0, 5, 2000, 15000, 10000, 0, 25, 1, 0, 0));
getTimers().addTimer("SCE_RATANA_CAMERA_START_1_7", 4530, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_1_7":
{
npc.broadcastPacket(new SpecialCamera(npc, 300, -3, 5, 3500, 15000, 6000, 0, 6, 1, 0, 0));
getTimers().addTimer("SUICIDE_DRAGON", 10000, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_2":
{
npc.broadcastPacket(new SpecialCamera(npc, 250, 0, 6, 0, 15000, 10000, 2, 0, 1, 0, 1));
getTimers().addTimer("SCE_RATANA_CAMERA_START_2_1", 2000, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_2_1":
{
npc.broadcastPacket(new SpecialCamera(npc, 230, 0, 5, 2000, 15000, 10000, 0, 0, 1, 0, 0));
getTimers().addTimer("SCE_RATANA_CAMERA_START_2_2", 2500, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_2_2":
{
npc.broadcastPacket(new SpecialCamera(npc, 180, 175, 2, 1500, 15000, 10000, 0, 10, 1, 1, 0));
getTimers().addTimer("SCE_RATANA_CAMERA_START_2_3", 1500, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_2_3":
{
npc.broadcastPacket(new SpecialCamera(npc, 300, 180, 5, 1500, 15000, 3000, 0, 6, 1, 1, 0));
getTimers().addTimer("SUICIDE_DRAGON", 3000, npc, player);
break;
}
case "SUICIDE_DRAGON":
{
npc.deleteMe();
break;
}
case "LATANA_ANGER_RESET":
{
npc.setScriptValue(0);
break;
}
case "SPAWN_DRAGON_TARGET":
{
addSpawn(npc, DRAGON_TARGET, 105465, -41817, -1768, 0, false, 0, false, world.getId());
getTimers().addTimer("SOCIAL_ACTION", 3000, npc, player);
break;
}
case "SOCIAL_ACTION":
{
npc.broadcastSocialAction(0);
getTimers().addTimer("DISPLAY_SKILL", 3000, npc, player);
break;
}
case "DISPLAY_SKILL":
{
final L2Npc target = world.getNpc(DRAGON_TARGET);
if (target != null)
{
addSkillCastDesire(npc, target, RISE_OF_LATANA, 5000);
}
getTimers().addTimer("LATANA_CAST", 9700, npc, player);
break;
}
case "LATANA_CAST":
{
final L2Npc target = world.getNpc(DRAGON_TARGET);
if (target != null)
{
addSkillCastDesire(npc, target, STUN, 5000);
}
getTimers().addTimer("ATTACK", 11030, npc, player);
break;
}
case "ATTACK":
{
if (npc.calculateDistance(player, false, false) < 100)
{
if (getRandom(100) < 30)
{
addSkillCastDesire(npc, player, ELECTRIC_FLAME, 500000);
}
else
{
addAttackDesire(npc, player);
}
}
else if (getRandomBoolean())
{
addSpawn(npc, LATANA_SKILL_USE, player.getLocation(), false, world.getId());
}
else
{
addSkillCastDesire(npc, player, FIRE_BREATH, 500000);
}
getTimers().addTimer("ATTACK", 6000, npc, player);
break;
}
case "SPAWN_DRAGON_TARGET2":
{
addSpawn(npc, DRAGON_TARGET, 105465, -41817, -1768, 0, false, 0, false, world.getId());
getTimers().addTimer("SOCIAL_ACTION", 3000, npc, player);
break;
}
case "LATANA_ATTACK":
{
addSkillCastDesire(npc, npc, ELECTRIC_FLAME, 50000);
getTimers().addTimer("LATANA_CAST", 3000, npc, player);
break;
}
case "SPAWN_REWARD_NPC":
{
addSpawn(npc, KETRA_ORC_SUPPORTER, npc.getLocation(), false, world.getId());
npc.deleteMe();
break;
}
case "DRAGON_CAMERA_2_1":
{
npc.broadcastPacket(new SpecialCamera(npc, 350, 200, 5, 5600, 15000, 10000, -15, 10, 1, 1, 0));
getTimers().addTimer("DRAGON_CAMERA_2_2", 5600, npc, null);
break;
}
case "DRAGON_CAMERA_2_2":
{
npc.broadcastPacket(new SpecialCamera(npc, 360, 200, 5, 1000, 15000, 2000, -15, 10, 1, 1, 0));
getTimers().addTimer("SUICIDE", 10000, npc, null);
break;
}
}
}
return super.onKill(npc, killer, isSummon);
}
@Override
public String onSpawn(L2Npc npc)
{
npc.setIsImmobilized(true);
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case TELEPORT_TRAP:
{
world.getParameters().set(npc.getParameters().getString("GM_ID"), 1);
getTimers().addTimer("CHECK_FOR_DROP", 2000, npc, null);
break;
}
case DRAGON_TARGET:
{
getTimers().addTimer("SUICIDE", 60000, npc, null);
break;
}
case LATANA_SKILL_USE:
{
final L2Npc latana = world.getNpc(LATANA);
final L2PcInstance player = world.getFirstPlayer();
if ((latana != null) && (player != null) && (latana.calculateDistance(player, false, false) <= 900))
{
addSkillCastDesire(npc, player, STUN, 500000);
}
getTimers().addTimer("SUICIDE", 5000, npc, null);
break;
}
case DRAGON_CAMERA_2:
{
npc.broadcastPacket(new SpecialCamera(npc, 450, 200, 3, 0, 15000, 10000, -15, 20, 1, 1, 1));
getTimers().addTimer("DRAGON_CAMERA_2_1", 100, npc, null);
break;
}
default:
{
if (CommonUtil.contains(WIZARDS, npc.getId()))
{
npc.setInvisible(true);
getTimers().addTimer("LOOK_NEIGHBOR", 1000, npc, null);
}
npc.initSeenCreatures();
}
}
}
return super.onSpawn(npc);
}
@Override
public String onEnterZone(L2Character character, L2ZoneType zone)
private void onCreatureSee(OnCreatureSee event)
{
if (!character.isPlayer() || (character.getInstanceId() == 0))
final L2Character creature = event.getSeen();
final L2Npc npc = (L2Npc) event.getSeer();
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
return super.onEnterZone(character, zone);
if (CommonUtil.contains(WIZARDS, npc.getId()))
{
if (creature.isPlayer() && npc.isScriptValue(0))
{
npc.setScriptValue(1);
getTimers().addTimer("SET_VISIBLE", 1000, npc, creature.getActingPlayer());
}
}
else if ((npc.getId() == LATANA) && !npc.getVariables().getBoolean("creatureSeen", false) && creature.isPlayer())
{
final QuestState qs = creature.getActingPlayer().getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName());
if (qs != null)
{
if (qs.getCond() == 4)
{
getTimers().addTimer("SPAWN_REWARD_NPC", 1000, npc, creature.getActingPlayer());
npc.setScriptValue(1);
}
else
{
playSound(creature.getActingPlayer(), QuestSound.BS08_A);
getTimers().addTimer("SPAWN_DRAGON_TARGET", 1000, npc, creature.getActingPlayer());
getTimers().addTimer("SCE_RATANA_CAMERA_START_1", 10, world.getNpc(DRAGON_CAMERA_1), creature.getActingPlayer());
npc.getVariables().set("creatureSeen", true);
}
}
}
}
final Instance world = character.getInstanceWorld();
if (world.getParameters().getInt("wall_" + zone.getId()) > 0)
}
@Override
public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon, Skill skill)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
character.teleToLocation(ZONES_TELEPORTS.get(zone.getId()));
if (CommonUtil.contains(WARRIORS, npc.getId()) || CommonUtil.contains(WIZARDS, npc.getId()))
{
final int longRangeGuardRate = npc.getParameters().getInt("LongRangeGuardRate", -1);
if ((longRangeGuardRate != -1) && ((skill != null) && !CommonUtil.contains(REJECTED_SKILLS, skill.getId())))
{
if (npc.calculateDistance(attacker, false, false) > 150)
{
if ((npc.getEffectList().getFirstBuffInfoByAbnormalType(AbnormalType.PD_UP_SPECIAL) == null) && (getRandom(100) < longRangeGuardRate))
{
addSkillCastDesire(npc, npc, ULTIMATE_DEFENCE.getSkill(), 1000000000);
}
}
else
{
npc.getEffectList().stopEffects(AbnormalType.PD_UP_SPECIAL);
}
}
if (CommonUtil.contains(WARRIORS, npc.getId()))
{
if (npc.calculateDistance(attacker, false, false) < 40)
{
addAttackPlayerDesire(npc, attacker, 1000);
}
else if (getRandom(100) < 33)
{
final SkillHolder holder = npc.getParameters().getSkillHolder(getRandomBoolean() ? "Skill01_ID" : "Skill02_ID");
if (holder != null)
{
addSkillCastDesire(npc, attacker, holder, 500000);
}
}
}
}
else if ((npc.getId() == LATANA))
{
if (!npc.getVariables().getBoolean("creatureSeen", false))
{
final QuestState qs = attacker.getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName());
if (qs != null)
{
if (qs.getCond() == 4)
{
getTimers().addTimer("SPAWN_REWARD_NPC", 1000, npc, attacker);
npc.setScriptValue(1);
}
else
{
playSound(attacker, QuestSound.BS08_A);
getTimers().addTimer("SPAWN_DRAGON_TARGET2", 1000, npc, attacker);
getTimers().addTimer("SCE_RATANA_CAMERA_START_2", 10, world.getNpc(DRAGON_CAMERA_1), attacker);
npc.getVariables().set("creatureSeen", true);
}
}
}
if ((npc.getCurrentHpPercent() < 30) && npc.isScriptValue(0))
{
addSkillCastDesire(npc, npc, ANGER, 50000000);
npc.setScriptValue(1);
getTimers().addTimer("LATANA_ANGER_RESET", 120000, npc, attacker);
}
}
}
return super.onEnterZone(character, zone);
return super.onAttack(npc, attacker, damage, isSummon, skill);
}
// @formatter:off
@RegisterEvent(EventType.ON_ATTACKABLE_FACTION_CALL)
@RegisterType(ListenerRegisterType.NPC)
@Id({18635,18636,18638,18642,18646,18649,18650,18653,18654,18655,18657})
// @formatter:on
public void onAttackableFactionCall(OnAttackableFactionCall event)
{
final L2Npc npc = event.getNpc();
final L2PcInstance attacker = event.getAttacker();
if (npc.calculateDistance(attacker, false, false) < 40)
{
addAttackPlayerDesire(npc, attacker, 1000);
}
else if (getRandom(100) < 33)
{
final SkillHolder holder = npc.getParameters().getSkillHolder(getRandomBoolean() ? "Skill01_ID" : "Skill02_ID");
if (holder != null)
{
addSkillCastDesire(npc, attacker, holder, 500000);
}
}
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
if (CommonUtil.contains(ANIMALS, npc.getId()))
{
npc.dropItem(killer, getRandomBoolean() ? PAILAKA_INSTANT_SHIELD : QUICK_HEALING_POTION, getRandom(10) + 1);
}
else if (npc.getId() == LATANA)
{
addSpawn(npc, KETRA_ORC_SUPPORTER, 105974, -41794, -1784, 32768, false, 0, false, world.getId());
addSpawn(npc, DRAGON_CAMERA_2, npc.getLocation(), false, world.getId());
}
}
return super.onKill(npc, killer, isSummon);
}
public static void main(String[] args)

View File

@ -0,0 +1,5 @@
<html><body>Ketra Orc Shaman:<br>
I perceive darkness...and chaos... The protector of our race, the great Red Dragon, lies imprisoned and in torment there.<br>
He summons us to return him to his rightful place of glory, but...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32499-05.html">"But what?"</Button>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Ketra Orc Shaman:<br>
You are already a legend to our people! As much as I would crave your help, you have even more important tasks to attend to...<br>
(Only characters level 77 or below may undertake this quest.)</body></html>

View File

@ -0,0 +1,6 @@
<html><body>Ketra Orc Shaman:<br>
The Ketra believe we are children of the Fire Spirit.<br>
We worship the Red Dragon, who wields the strongest fire in all Goddard.<br>
Lately, however, we have felt a darkness flickering within the pure flame. It seem to be growing -- and the fire's power seems to be weakening!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32499-06.html">"Tell me about the darkness."</Button>
</body></html>

View File

@ -0,0 +1,7 @@
<html><body>Ketra Orc Shaman:<br>
It is a darkness without shape or substance.<br>
It came from across the sea, and now spreads its black shadow over our land as well.<br>
The Humans call the source of the darkness "Kamaloka" and shadow it casts "Pailaka." Now even our great protector is helpless before it!<br>
We must summon all our strength to defeat the darkness!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32499-07.html">"Go on."</Button>
</body></html>

View File

@ -0,0 +1,8 @@
<html><body>Ketra Orc Shaman:<br>
Warrior, I ask for your aid!<br>
We are of Ketra descent, so we cannot enter the Shadow of Darkness.<br>
But I believe that an adventurer like you can enter and remove this foul curse from us.<br>
Will you do it?<br>
(This quest takes place in Pailaka. It does not affect the Varka Silenos alliance quest or the Ketra Orc alliance quest.)<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32499-08.html">"Sure."</Button>
</body></html>

View File

@ -0,0 +1,7 @@
<html><body>Ketra Orc Shaman:<br>
Our thanks, warrior! One of the last visions the flames gave me before becoming too weak was that there are others like us in the Shadow World.<br>
They will help you.<br>
When you are prepared, I will send you to the Shadow World, Pailaka!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest PailakaInjuredDragon enterInstance">"No, I can go now."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32499-11.html">"Okay. I will be back soon."</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Ketra Orc Shaman:<br>
Warrior, do you wish to enter the Shadow World, Pailaka?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest PailakaInjuredDragon enterInstance">"Yup!"</Button>
</body></html>

View File

@ -1,4 +1,4 @@
<html><body>Ketra Orc Shaman:<br>
The darkness still exists! Will you enter Pailaka again?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest PailakaInjuredDragon enter">"Yup!"</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest PailakaInjuredDragon reEnterInstance">"Yup!"</Button>
</body></html>

View File

@ -1,3 +1,3 @@
<html><body>Ketra Orc Shaman:<br>
I have faith that you will remove the dark shadow which hides our Great Flame!
Very well, I shall wait here until you are ready.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Ketra Orc Supporter:<br>
Know that, even wounded, the Dragon of Fire is very powerful. To help you slay him and set his spirit free, use this <font color="LEVEL">Spear of Silenos</font>, which we captured from our enemy. Its power has not reached its full potential, but by defeating the Varka Silenos you can obtain items necessary to enhance its power. Use it to destroy our enemy and send Latana's spirit to the World of Fire!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32502-07.html">"Give me some details about the enemy."</Button>
</body></html>

View File

@ -1,9 +1,9 @@
<html><head><body>Ketra Orc Intelligence Officer:<br>
<html><body>Ketra Orc Intelligence Officer:<br>
Dejakar Oroka!<br>
You hold the Spear of Silenos! Your coming was foretold.<br>
But Latana's power is very strong, and the Spear of Silenos is not yet strong enough.<br>
If you have the Scroll of Enchant Weapon made with the blood of Silenos, I will perform a sacred ceremony to enhance the spear!<br>
If you wish, I can also bestow on you some of our tribe's powerful enhancement magic!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon upgrade_weapon">"I want to have my weapon enhanced."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement_page">"Can I get some enhancement magic?"</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon ask_buff">"Can I get some enhancement magic?"</Button>
</body></html>

View File

@ -1,3 +1,3 @@
<html><body>Ketra Orc Intelligence Officer:<br>
You still need an Enchant Scroll. Acquire one by slaying more Silenos!
This spear has already been enhanced to its full potential. It is stronger than any other power in this place!
</body></html>

View File

@ -1,3 +1,3 @@
<html><body>Ketra Orc Intelligence Officer:<br>
This spear has already been enhanced to its full potential. It is stronger than any other power in this place!
You still need an Enchant Scroll. Acquire one by slaying more Silenos!
</body></html>

View File

@ -1,3 +1,16 @@
<html><body>Ketra Orc Intelligence Officer:<br>
The fifth and final enhancement is complete!
We possess several types of enhancement magic. I can grant you <font color="LEVEL">at most 5 spells</font>.<br>
Select them from the list below:<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 0">Haste Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 1">Wind Walk Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 2">Empower Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 3">Acumen Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 4">Concentration Lv6</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 5">Might Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 6">Guidance Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 7">Focus Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 8">Death Whisper Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 9">Berserker Spirit Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 10">Vampiric Rage Lv4</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 11">Blessed Body Lv6</Button>
</body></html>

View File

@ -1,15 +1,3 @@
<html><body>Ketra Orc Intelligence Officer:<br>
Please select the next spell you wish to receive.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 1">Haste Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 2">Wind Walk Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 3">Empower Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 4">Acumen Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 5">Concentration Lv6</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 6">Might Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 7">Guidance Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 8">Focus Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 9">Death Whisper Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 10">Berserker Spirit Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 11">Vampiric Rage Lv4</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 12">Blessed Body Lv6</Button>
The fifth and final enhancement is complete!
</body></html>

View File

@ -1,16 +1,15 @@
<html><body>Ketra Orc Intelligence Officer:<br>
We possess several types of enhancement magic. I can grant you <font color="LEVEL">at most 5 spells</font>.<br>
Select them from the list below:<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 1">Haste Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 2">Wind Walk Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 3">Empower Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 4">Acumen Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 5">Concentration Lv6</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 6">Might Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 7">Guidance Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 8">Focus Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 9">Death Whisper Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 10">Berserker Spirit Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 11">Vampiric Rage Lv4</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 12">Blessed Body Lv6</Button>
Please select the next spell you wish to receive.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 0">Haste Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 1">Wind Walk Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 2">Empower Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 3">Acumen Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 4">Concentration Lv6</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 5">Might Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 6">Guidance Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 7">Focus Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 8">Death Whisper Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 9">Berserker Spirit Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 10">Vampiric Rage Lv4</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 11">Blessed Body Lv6</Button>
</body></html>

View File

@ -1,4 +1,6 @@
<html><body>Ketra Orc Supporter:<br>
Would you return the Spear of Silenos to us, since it is a sacred relic of our people! We will neturally reward you for it.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32512-02.html">"Return the Spear."</Button>
Dejakar Oroka!<br>
Latana used the last flicker of energy to summon me here! My friend, you have earned the gratitude of all the Ketra Orcs.<br>
Would you return the Spear of Silenos to us, since it is a sacred relic of our people! We will naturally reward you for it.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32512-03.html">"Yes, here."</Button>
</body></html>

View File

@ -1,6 +1,5 @@
<html><body>Ketra Orc Supporter:<br>
You have done it!<br>
You have lifted the curse! I no longer feel the taint of darkness upon our Atlar of Fire!<br>
Warrior, I wish you could stay heer with us, but our shaman decrees that you must leave...<br>
Here is a Scroll of Escape that he has prepared for you. Use it to return safely to your world.
</body></html>
What happened here has not affected your world, but it may help you in the future...<br>
Now you must return to where you belong.<br>
Use the Scroll of Escape to leave Pailaka and return to your world!
</body></html>

View File

@ -1,3 +1,6 @@
<html><body>Ketra Orc Supporter:<br>
Use the Scroll of Escape that I gave you to return to your world.
</body></html>
You have done it!<br>
You have lifted the curse! I no longer feel the taint of darkness upon our Altar of Fire!<br>
Warrior, I wish you could stay here with us, but our shaman decrees that you must leave...<br>
Here is a Scroll of Escape that he has prepared for you. Use it to return safely to your world.
</body></html>

View File

@ -16,43 +16,39 @@
*/
package quests.Q00144_PailakaInjuredDragon;
import com.l2jmobius.commons.util.CommonUtil;
import com.l2jmobius.gameserver.instancemanager.InstanceManager;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.holders.ItemHolder;
import com.l2jmobius.gameserver.model.holders.SkillHolder;
import com.l2jmobius.gameserver.model.instancezone.Instance;
import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.quest.State;
import com.l2jmobius.gameserver.model.skills.SkillCaster;
/**
* @author Mathael
* @author Sdw
*/
public class Q00144_PailakaInjuredDragon extends Quest
{
// NPCs
private static final int KETRA_ORC_SHAMAN = 32499;
private static final int KETRA_ORC_SUPPORTER = 32502;
private static final int KETRA_ORC_SUPPORTER_END = 32512;
private static final int KETRA_ORC_INTELLIGENCE_OFFICIER = 32509;
// Monsters
private static final int KETRA_ORC_SUPPORTER_2 = 32512;
private static final int LATANA = 18660;
private static final int[] MONSTERS =
{
18635,
18636,
18642,
18646,
18649,
18650,
18653,
18654,
18655,
18657,
18659
};
// Buffs
// Items
private static final int SPEAR_OF_SILENOS = 13052;
private static final int SPEAR_OF_SILENOS_REINFORCED = 13053;
private static final int SPEAR_OF_SILENOS_COMPLETED = 13054;
private static final int WEAPON_UPGRADE_STAGE_1 = 13056;
private static final int WEAPON_UPGRADE_STAGE_2 = 13057;
private static final int PAILAKA_INSTANT_SHIELD = 13032;
private static final int QUICK_HEALING_POTION = 13033;
private static final int SCROLL_OF_ESCAPE = 736;
private static final ItemHolder PAILAKA_SHIRT = new ItemHolder(13296, 1);
// Skills
private static final SkillHolder[] BUFFS =
{
new SkillHolder(1086, 2),
@ -68,61 +64,56 @@ public class Q00144_PailakaInjuredDragon extends Quest
new SkillHolder(1268, 4),
new SkillHolder(1045, 6),
};
// Quest Items
private static final int SPEAR_OF_SILENOS = 13052;
private static final int SPEAR_OF_SILENOS_REINFORCED = 13053;
private static final int SPEAR_OF_SILENOS_COMPLETED = 13054;
private static final int WEAPON_UPGRADE_STAGE_1 = 13056;
private static final int WEAPON_UPGRADE_STAGE_2 = 13057;
// Usable Quest Items
private static final int SHIELD_POTION = 13032;
private static final int HEAL_POTION = 13033;
// Rewards
private static final long REWARD_EXP = 24570000;
private static final int REWARD_SP = 5896;
private static final int REWARD_PAILAKA_SHIRT = 13296;
private static final int REWARD_ADENA = 798840;
private static final int SCROLL_OF_ESCAPE = 736;
// Misc
private static final int MIN_LEVEL = 73;
private static final int MAX_LEVEL = 77;
private boolean WEAPON_UPGRADE_STAGE_1_DROPED = false;
private boolean WEAPON_UPGRADE_STAGE_2_DROPED = false;
private int BUFF_COUNT = 0;
public Q00144_PailakaInjuredDragon()
{
super(144);
addStartNpc(KETRA_ORC_SHAMAN);
addFirstTalkId(KETRA_ORC_SUPPORTER_END);
addTalkId(KETRA_ORC_SHAMAN, KETRA_ORC_SUPPORTER, KETRA_ORC_INTELLIGENCE_OFFICIER, KETRA_ORC_SUPPORTER_END);
addFirstTalkId(KETRA_ORC_INTELLIGENCE_OFFICIER, KETRA_ORC_SUPPORTER_2);
addTalkId(KETRA_ORC_SHAMAN, KETRA_ORC_SUPPORTER, KETRA_ORC_INTELLIGENCE_OFFICIER);
addKillId(LATANA);
addKillId(MONSTERS);
addCondMinLevel(MIN_LEVEL, "32499-03.html");
addCondMaxLevel(MAX_LEVEL, "32499-04z.html");
registerQuestItems(SPEAR_OF_SILENOS, SPEAR_OF_SILENOS_REINFORCED, SPEAR_OF_SILENOS_COMPLETED, WEAPON_UPGRADE_STAGE_1, WEAPON_UPGRADE_STAGE_2, HEAL_POTION, SHIELD_POTION);
addCondMinLevel(MAX_LEVEL, "32499-04.html");
registerQuestItems(SPEAR_OF_SILENOS, SPEAR_OF_SILENOS_REINFORCED, SPEAR_OF_SILENOS_COMPLETED, WEAPON_UPGRADE_STAGE_1, WEAPON_UPGRADE_STAGE_2, PAILAKA_INSTANT_SHIELD, QUICK_HEALING_POTION);
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
if (npc.getId() == KETRA_ORC_INTELLIGENCE_OFFICIER)
{
return "32509-01.html";
}
else if (npc.getId() == KETRA_ORC_SUPPORTER_2)
{
final QuestState qs = getQuestState(player, false);
if (qs != null)
{
return qs.isCompleted() ? "32512-02.html" : "32512-01.html";
}
}
return null;
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = getNoQuestMsg(player);
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return htmltext;
return null;
}
final String request = event.contains(" ") ? event.substring(0, event.indexOf(" ")) : event;
switch (request)
String htmltext = null;
switch (event)
{
case "32499-04.htm":
case "32499-05.htm":
case "32499-06.htm":
case "32499-08a.html":
case "32499-08.htm":
case "32499-09.htm":
case "32502-01.html":
case "32499-05.html":
case "32499-06.html":
case "32499-07.html":
case "32499-11.html":
case "32502-02.html":
case "32502-03.html":
case "32502-04.html":
@ -131,73 +122,54 @@ public class Q00144_PailakaInjuredDragon extends Quest
htmltext = event;
break;
}
case "32499-07.htm":
{
qs.startQuest();
htmltext = event;
break;
}
case "32502-05.html":
{
if (qs.isCond(2))
{
qs.setCond(3, true);
giveItems(player, SPEAR_OF_SILENOS, 1, true);
giveItems(player, SPEAR_OF_SILENOS, 1);
htmltext = event;
}
break;
}
case "32512-02.html":
case "32499-08.html":
{
final Instance inst = InstanceManager.getInstance().getPlayerInstance(player, true);
if ((inst != null) && qs.isCond(4))
{
takeItems(player, SPEAR_OF_SILENOS_COMPLETED, -1);
rewardItems(player, 57, REWARD_ADENA);
rewardItems(player, REWARD_PAILAKA_SHIRT, 1);
addExpAndSp(player, REWARD_EXP, REWARD_SP);
giveItems(player, SCROLL_OF_ESCAPE, 1); // Not a reward.
qs.exitQuest(false, true);
inst.finishInstance();
htmltext = event;
}
qs.startQuest();
htmltext = event;
break;
}
case "upgrade_weapon":
{
if (qs.isCond(3) || qs.isCond(4))
if (hasQuestItems(player, SPEAR_OF_SILENOS_COMPLETED))
{
if (hasQuestItems(player, SPEAR_OF_SILENOS_COMPLETED))
htmltext = "32509-06.html";
}
else if (hasQuestItems(player, SPEAR_OF_SILENOS))
{
if (hasQuestItems(player, WEAPON_UPGRADE_STAGE_1))
{
htmltext = "32509-06.html";
takeItems(player, SPEAR_OF_SILENOS, -1);
takeItems(player, WEAPON_UPGRADE_STAGE_1, -1);
giveItems(player, SPEAR_OF_SILENOS_REINFORCED, 1, true);
htmltext = "32509-02.html";
}
else if (hasQuestItems(player, SPEAR_OF_SILENOS))
else
{
if (hasQuestItems(player, WEAPON_UPGRADE_STAGE_1))
{
takeItems(player, SPEAR_OF_SILENOS, -1);
takeItems(player, WEAPON_UPGRADE_STAGE_1, -1);
giveItems(player, SPEAR_OF_SILENOS_REINFORCED, 1, true);
htmltext = "32509-02.html";
}
else
{
htmltext = "32509-04.html";
}
htmltext = "32509-05.html";
}
else if (hasQuestItems(player, SPEAR_OF_SILENOS_REINFORCED))
}
else if (hasQuestItems(player, SPEAR_OF_SILENOS_REINFORCED))
{
if (hasQuestItems(player, WEAPON_UPGRADE_STAGE_2))
{
if (hasQuestItems(player, WEAPON_UPGRADE_STAGE_2))
{
takeItems(player, SPEAR_OF_SILENOS_REINFORCED, -1);
takeItems(player, WEAPON_UPGRADE_STAGE_2, -1);
giveItems(player, SPEAR_OF_SILENOS_COMPLETED, 1, true);
htmltext = "32509-08.html";
}
else
{
htmltext = "32509-04.html";
}
takeItems(player, SPEAR_OF_SILENOS_REINFORCED, -1);
takeItems(player, WEAPON_UPGRADE_STAGE_2, -1);
giveItems(player, SPEAR_OF_SILENOS_COMPLETED, 1, true);
htmltext = "32509-08.html";
}
else
{
htmltext = "32509-04.html";
}
}
else
@ -206,141 +178,125 @@ public class Q00144_PailakaInjuredDragon extends Quest
}
break;
}
case "enhancement_page":
case "ask_buff":
{
htmltext = BUFF_COUNT < 5 ? "32509-10.html" : "32509-07.html";
htmltext = npc.isScriptValue(1) ? "32509-07.html" : "32509-08.html";
break;
}
case "enhancement":
case "32512-03.html":
{
if (BUFF_COUNT < 5)
if (qs.isCond(4))
{
final int key = Integer.parseInt(event.substring(request.length() + 1)) - 1;
SkillCaster.triggerCast(npc, player, BUFFS[key].getSkill());
BUFF_COUNT++;
if (BUFF_COUNT < 5)
if (player.getLevel() >= MIN_LEVEL)
{
htmltext = "32509-09.html";
addExpAndSp(player, 24570000, 5896);
giveAdena(player, 798840, true);
giveItems(player, PAILAKA_SHIRT);
giveItems(player, SCROLL_OF_ESCAPE, 1); // Not a reward.
qs.exitQuest(false, true);
htmltext = event;
}
else
{
htmltext = "32509-08.html";
htmltext = getNoQuestLevelRewardMsg(player);
}
final Instance inst = InstanceManager.getInstance().getPlayerInstance(player, true);
if (inst != null)
{
inst.finishInstance();
}
}
break;
}
}
if (event.startsWith("buff"))
{
if (npc.isScriptValue(0))
{
final int currentBuffCount = npc.getVariables().getInt("buff_count");
if (currentBuffCount < 5)
{
final int buffOffset = CommonUtil.constrain(Integer.parseInt(event.substring(event.indexOf(" ") + 1)), 0, BUFFS.length);
npc.setTarget(player);
npc.doCast(BUFFS[buffOffset].getSkill());
npc.getVariables().set("buff_count", currentBuffCount + 1);
htmltext = "32509-10.html";
if ((currentBuffCount + 1) >= 5)
{
htmltext = "32509-09.html";
npc.setScriptValue(1);
}
}
else
{
htmltext = "32509-07.html";
npc.setScriptValue(1);
}
break;
}
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance talker)
public String onTalk(L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(talker, true);
String htmltext = getNoQuestMsg(talker);
final QuestState qs = getQuestState(player, true);
String htmltext = null;
switch (npc.getId())
switch (qs.getState())
{
case KETRA_ORC_SHAMAN:
case State.CREATED:
{
switch (qs.getState())
if (npc.getId() == KETRA_ORC_SHAMAN)
{
case State.CREATED:
htmltext = "32499-01.html";
}
break;
}
case State.STARTED:
{
if (npc.getId() == KETRA_ORC_SHAMAN)
{
if (qs.isCond(1))
{
htmltext = "32499-01.htm";
break;
htmltext = "32499-09.html";
}
case State.COMPLETED:
{
htmltext = "32499-02.html";
break;
}
case State.STARTED:
else
{
htmltext = "32499-10.html";
break;
}
}
break;
}
case KETRA_ORC_SUPPORTER:
{
switch (qs.getCond())
else if (npc.getId() == KETRA_ORC_SUPPORTER)
{
case 3:
{
htmltext = "32502-07.html";
break;
}
case 4:
{
htmltext = "32502-06.html";
break;
}
default:
if (qs.isCond(2))
{
htmltext = "32502-01.html";
break;
}
else
{
htmltext = "32502-06.html";
}
}
break;
}
case KETRA_ORC_INTELLIGENCE_OFFICIER:
case State.COMPLETED:
{
htmltext = !qs.isCond(3) && !qs.isCond(4) ? "32509-01a.html" : "32509-01.html";
htmltext = "32499-02.html";
break;
}
case KETRA_ORC_SUPPORTER_END:
{
htmltext = hasQuestItems(talker, SPEAR_OF_SILENOS_COMPLETED) ? "32512-01.html" : "32512-03.html";
}
}
return htmltext;
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return getNoQuestMsg(player);
}
return qs.getState() == State.COMPLETED ? "32512-03.html" : "32512-01.html";
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final int npcId = npc.getId();
if (npcId != LATANA)
final QuestState qs = getQuestState(killer, false);
if (qs != null)
{
if (!WEAPON_UPGRADE_STAGE_1_DROPED && !hasQuestItems(killer, WEAPON_UPGRADE_STAGE_1) && hasQuestItems(killer, SPEAR_OF_SILENOS))
{
if (getRandom(1, 6) > 2)
{
giveItems(killer, WEAPON_UPGRADE_STAGE_1, 1, true);
WEAPON_UPGRADE_STAGE_1_DROPED = true;
}
}
if (!WEAPON_UPGRADE_STAGE_2_DROPED && !hasQuestItems(killer, WEAPON_UPGRADE_STAGE_2) && hasQuestItems(killer, SPEAR_OF_SILENOS_REINFORCED))
{
if (getRandom(1, 6) > 4)
{
giveItems(killer, WEAPON_UPGRADE_STAGE_2, 1, true);
WEAPON_UPGRADE_STAGE_2_DROPED = true;
}
}
}
else
{
final QuestState qs = getQuestState(killer, false);
if (qs != null)
if (qs.isCond(3) && (npc.calculateDistance(killer, false, false) <= 1500))
{
qs.setCond(4, true);
}

View File

@ -68,6 +68,26 @@
<xs:attribute name="Y" type="xs:integer" use="required" />
</xs:complexType>
</xs:element>
<xs:element name="bannedAreas" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="area" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="node" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute type="xs:int" name="X" use="required" />
<xs:attribute type="xs:int" name="Y" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:int" name="minZ" use="required" />
<xs:attribute type="xs:int" name="maxZ" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="race" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:attribute name="point" type="xs:token" use="required" />
@ -101,7 +121,7 @@
<xs:attribute name="id" type="xs:positiveInteger" />
<xs:attribute name="maxZ" type="xs:integer" use="required" />
<xs:attribute name="minZ" type="xs:integer" use="required" />
<xs:attribute name="name" type="xs:normalizedString" use="required" />
<xs:attribute name="name" type="xs:normalizedString" use="optional" />
<xs:attribute name="rad" type="xs:positiveInteger" />
<xs:attribute name="shape" use="required">
<xs:simpleType>
@ -151,6 +171,7 @@
<xs:enumeration value="WaterZone" />
<xs:enumeration value="SayuneZone" />
<xs:enumeration value="UndyingZone" />
<xs:enumeration value="TeleportZone" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>

View File

@ -0,0 +1,158 @@
<?xml version="1.0" encoding="UTF-8"?>
<list enabled="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/zones.xsd">
<!-- No Restart Zones -->
<zone name="23_16_pailaka_restrict_01" type="TeleportZone" shape="NPoly" minZ="-4048" maxZ="2952"> <!-- 18_23 -->
<stat name="oustX" val="125738" />
<stat name="oustY" val="-40933" />
<stat name="oustZ" val="-3770" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="98811" Y="-34975" />
<node X="130758" Y="-35003" />
<node X="130758" Y="-33299" />
<node X="98811" Y="-33271" />
</zone>
<zone name="23_16_pailaka_restrict_02" type="TeleportZone" shape="NPoly" minZ="-3616" maxZ="3384"> <!-- 21_24 -->
<stat name="oustX" val="125738" />
<stat name="oustY" val="-40933" />
<stat name="oustZ" val="-3770" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="128431" Y="-64174" />
<node X="130329" Y="-64198" />
<node X="130613" Y="-33178" />
<node X="128605" Y="-33061" />
</zone>
<zone name="23_16_pailaka_restrict_03" type="TeleportZone" shape="NPoly" minZ="-3644" maxZ="3356"> <!-- 21_24 -->
<stat name="oustX" val="125738" />
<stat name="oustY" val="-40933" />
<stat name="oustZ" val="-3770" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="99156" Y="-64692" />
<node X="130104" Y="-64748" />
<node X="130064" Y="-63280" />
<node X="99280" Y="-63472" />
</zone>
<zone name="23_16_pailaka_restrict_04" type="TeleportZone" shape="NPoly" minZ="-4048" maxZ="2952"> <!-- 21_24 -->
<stat name="oustX" val="125738" />
<stat name="oustY" val="-40933" />
<stat name="oustZ" val="-3770" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="99036" Y="-64632" />
<node X="100868" Y="-64668" />
<node X="100868" Y="-33268" />
<node X="99036" Y="-33232" />
</zone>
<zone name="23_16_pailaka_telezone_01" type="TeleportZone" shape="NPoly" minZ="-2981" maxZ="-2481"> <!-- 21_24 -->
<stat name="oustX" val="122805" />
<stat name="oustY" val="-45782" />
<stat name="oustZ" val="-3016" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="118216" Y="-46771" />
<node X="122061" Y="-46748" />
<node X="122061" Y="-44615" />
<node X="118216" Y="-44959" />
</zone>
<zone name="23_16_pailaka_telezone_02" type="TeleportZone" shape="NPoly" minZ="-4048" maxZ="2952"> <!-- 21_24 -->
<stat name="oustX" val="118160" />
<stat name="oustY" val="-52645" />
<stat name="oustZ" val="-2508" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="116072" Y="-52080" />
<node X="116660" Y="-52840" />
<node X="118176" Y="-50956" />
<node X="117104" Y="-50792" />
</zone>
<zone name="23_16_pailaka_telezone_03" type="TeleportZone" shape="NPoly" minZ="-2652" maxZ="-1952"> <!-- 21_24 -->
<stat name="oustX" val="117215" />
<stat name="oustY" val="-55906" />
<stat name="oustZ" val="-2399" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="114848" Y="-58218" />
<node X="115692" Y="-58128" />
<node X="116024" Y="-55252" />
<node X="114968" Y="-55216" />
</zone>
<zone name="23_16_pailaka_telezone_04" type="TeleportZone" shape="NPoly" minZ="-2704" maxZ="-2104"> <!-- 21_24 -->
<stat name="oustX" val="118026" />
<stat name="oustY" val="-46424" />
<stat name="oustZ" val="-2544" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="114888" Y="-47128" />
<node X="116052" Y="-47076" />
<node X="116052" Y="-45776" />
<node X="114888" Y="-45828" />
</zone>
<zone name="23_16_pailaka_telezone_05" type="TeleportZone" shape="NPoly" minZ="-2708" maxZ="-2108"> <!-- 21_24 -->
<stat name="oustX" val="116381" />
<stat name="oustY" val="-51189" />
<stat name="oustZ" val="-2624" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="115016" Y="-51012" />
<node X="116764" Y="-49796" />
<node X="115824" Y="-49168" />
<node X="114320" Y="-50436" />
</zone>
<zone name="23_16_pailaka_telezone_06" type="TeleportZone" shape="NPoly" minZ="-2324" maxZ="-1824"> <!-- 21_24 -->
<stat name="oustX" val="108347" />
<stat name="oustY" val="-50558" />
<stat name="oustZ" val="-2360" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="107700" Y="-49920" />
<node X="109616" Y="-49712" />
<node X="109500" Y="-49084" />
<node X="107508" Y="-49184" />
</zone>
<zone name="23_16_pailaka_telezone_07" type="TeleportZone" shape="NPoly" minZ="-2695" maxZ="-2095"> <!-- 21_24 -->
<stat name="oustX" val="112816" />
<stat name="oustY" val="-44040" />
<stat name="oustZ" val="-2755" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="110632" Y="-45140" />
<node X="111476" Y="-44652" />
<node X="111568" Y="-43216" />
<node X="110724" Y="-42856" />
</zone>
<zone name="23_16_pailaka_telezone_08" type="TeleportZone" shape="NPoly" minZ="-2388" maxZ="-1888"> <!-- 21_24 -->
<stat name="oustX" val="108197" />
<stat name="oustY" val="-46679" />
<stat name="oustZ" val="-2092" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="109292" Y="-46528" />
<node X="110180" Y="-45876" />
<node X="109680" Y="-45144" />
<node X="108664" Y="-45496" />
</zone>
<zone name="23_16_pailaka_telezone_09" type="TeleportZone" shape="NPoly" minZ="-1924" maxZ="-1024"> <!-- 21_24 -->
<stat name="oustX" val="110059" />
<stat name="oustY" val="-40650" />
<stat name="oustZ" val="-2141" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="109544" Y="-39720" />
<node X="110708" Y="-39692" />
<node X="110808" Y="-38852" />
<node X="108700" Y="-38796" />
</zone>
<zone name="23_16_pailaka_telezone_10" type="TeleportZone" shape="NPoly" minZ="-2280" maxZ="-1680"> <!-- 21_24 -->
<stat name="oustX" val="109884" />
<stat name="oustY" val="-41358" />
<stat name="oustZ" val="-2327" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="107812" Y="-41728" />
<node X="108616" Y="-41676" />
<node X="108816" Y="-40776" />
<node X="107856" Y="-40652" />
</zone>
</list>

View File

@ -24,6 +24,7 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.OptionalInt;
import java.util.logging.Level;
import java.util.logging.Logger;
@ -487,6 +488,24 @@ public final class ZoneManager implements IGameXmlReader
return null;
}
/**
* Get zone by name.
* @param name the zone name
* @return the zone by name
*/
public L2ZoneType getZoneByName(String name)
{
for (Map<Integer, ? extends L2ZoneType> map : _classZones.values())
{
final Optional<? extends L2ZoneType> zoneType = map.values().stream().filter(z -> (z.getName() != null) && z.getName().equals(name)).findAny();
if (zoneType.isPresent())
{
return zoneType.get();
}
}
return null;
}
/**
* Get zone by ID and zone class.
* @param <T> the generic type
@ -500,6 +519,24 @@ public final class ZoneManager implements IGameXmlReader
return (T) _classZones.get(zoneType).get(id);
}
/**
* Get zone by name.
* @param <T> the generic type
* @param name the zone name
* @param zoneType the zone type
* @return
*/
@SuppressWarnings("unchecked")
public <T extends L2ZoneType> T getZoneByName(String name, Class<T> zoneType)
{
final Optional<? extends L2ZoneType> zone = _classZones.get(zoneType).values().stream().filter(z -> (z.getName() != null) && z.getName().equals(name)).findAny();
if (zone.isPresent())
{
return (T) zone.get();
}
return null;
}
/**
* Returns all zones from where the object is located.
* @param locational the locational

View File

@ -34,6 +34,7 @@ import com.l2jmobius.gameserver.model.events.EventDispatcher;
import com.l2jmobius.gameserver.model.events.ListenersContainer;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureZoneEnter;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureZoneExit;
import com.l2jmobius.gameserver.model.instancezone.Instance;
import com.l2jmobius.gameserver.model.interfaces.ILocational;
import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
@ -47,6 +48,7 @@ public abstract class L2ZoneType extends ListenersContainer
private final int _id;
protected L2ZoneForm _zone;
protected List<L2ZoneForm> _blockedZone;
protected Map<Integer, L2Character> _characterList = new ConcurrentHashMap<>();
/** Parameters to affect specific characters */
@ -61,6 +63,8 @@ public abstract class L2ZoneType extends ListenersContainer
private boolean _allowStore;
protected boolean _enabled;
private AbstractZoneSettings _settings;
private int _instanceTemplateId;
private Map<Integer, Boolean> _enabledInInstance;
protected L2ZoneType(int id)
{
@ -181,6 +185,10 @@ public abstract class L2ZoneType extends ListenersContainer
{
_enabled = Boolean.parseBoolean(value);
}
else if (name.equals("instanceId"))
{
_instanceTemplateId = Integer.parseInt(value);
}
else
{
_log.info(getClass().getSimpleName() + ": Unknown parameter - " + name + " in zone: " + getId());
@ -193,6 +201,24 @@ public abstract class L2ZoneType extends ListenersContainer
*/
private boolean isAffected(L2Character character)
{
// Check instance
final Instance world = character.getInstanceWorld();
if (world != null)
{
if (world.getTemplateId() != getInstanceTemplateId())
{
return false;
}
if (!isEnabled(character.getInstanceId()))
{
return false;
}
}
else if (getInstanceTemplateId() > 0)
{
return false;
}
// Check lvl
if ((character.getLevel() < _minLvl) || (character.getLevel() > _maxLvl))
{
@ -288,6 +314,20 @@ public abstract class L2ZoneType extends ListenersContainer
return _zone;
}
public void setBlockedZones(List<L2ZoneForm> blockedZones)
{
if (_blockedZone != null)
{
throw new IllegalStateException("Blocked zone already set");
}
_blockedZone = blockedZones;
}
public List<L2ZoneForm> getBlockedZones()
{
return _blockedZone;
}
/**
* Set the zone name.
* @param name
@ -306,6 +346,29 @@ public abstract class L2ZoneType extends ListenersContainer
return _name;
}
/**
* Checks if the given coordinates are within the zone, ignores instanceId check
* @param x
* @param y
* @param z
* @return
*/
public boolean isInsideZone(int x, int y, int z)
{
return _zone.isInsideZone(x, y, z) && !isInsideBannedZone(x, y, z);
}
/**
* @param x
* @param y
* @param z
* @return {@code true} if this location is within banned zone boundaries, {@code false} otherwise
*/
public boolean isInsideBannedZone(int x, int y, int z)
{
return (_blockedZone != null) && _blockedZone.stream().allMatch(zone -> !zone.isInsideZone(x, y, z));
}
/**
* Checks if the given coordinates are within zone's plane
* @param x
@ -314,7 +377,7 @@ public abstract class L2ZoneType extends ListenersContainer
*/
public boolean isInsideZone(int x, int y)
{
return _zone.isInsideZone(x, y, _zone.getHighZ());
return isInsideZone(x, y, _zone.getHighZ());
}
/**
@ -324,19 +387,7 @@ public abstract class L2ZoneType extends ListenersContainer
*/
public boolean isInsideZone(ILocational loc)
{
return _zone.isInsideZone(loc.getX(), loc.getY(), loc.getZ());
}
/**
* Checks if the given coordinates are within the zone, ignores instanceId check
* @param x
* @param y
* @param z
* @return
*/
public boolean isInsideZone(int x, int y, int z)
{
return _zone.isInsideZone(x, y, z);
return isInsideZone(loc.getX(), loc.getY(), loc.getZ());
}
/**
@ -361,27 +412,22 @@ public abstract class L2ZoneType extends ListenersContainer
public void revalidateInZone(L2Character character)
{
// If the character can't be affected by this zone return
if (_checkAffected)
{
if (!isAffected(character))
{
return;
}
}
// If the object is inside the zone...
if (isInsideZone(character))
{
// Was the character not yet inside this zone?
if (!_characterList.containsKey(character.getObjectId()))
// If the character can't be affected by this zone return
if (_checkAffected)
{
if (!isAffected(character))
{
return;
}
}
if (_characterList.putIfAbsent(character.getObjectId(), character) == null)
{
// Notify to scripts.
EventDispatcher.getInstance().notifyEventAsync(new OnCreatureZoneEnter(character, this), this);
// Register player.
_characterList.put(character.getObjectId(), character);
// Notify Zone implementation.
onEnter(character);
}
@ -516,6 +562,11 @@ public abstract class L2ZoneType extends ListenersContainer
return _allowStore;
}
public int getInstanceTemplateId()
{
return _instanceTemplateId;
}
@Override
public String toString()
{
@ -537,6 +588,32 @@ public abstract class L2ZoneType extends ListenersContainer
return _enabled;
}
public void setEnabled(boolean state, int instanceId)
{
if (_enabledInInstance == null)
{
synchronized (this)
{
if (_enabledInInstance == null)
{
_enabledInInstance = new ConcurrentHashMap<>();
}
}
}
_enabledInInstance.put(instanceId, state);
}
public boolean isEnabled(int instanceId)
{
if (_enabledInInstance != null)
{
return _enabledInInstance.getOrDefault(instanceId, isEnabled());
}
return isEnabled();
}
public void oustAllPlayers()
{
//@formatter:off

View File

@ -45,7 +45,6 @@ public class L2OlympiadStadiumZone extends L2ZoneRespawn
private final List<L2DoorInstance> _doors = new ArrayList<>(2);
private final List<L2Spawn> _buffers = new ArrayList<>(2);
private final List<Location> _spectatorLocations = new ArrayList<>(1);
private int _instanceTemplate = 0;
public L2OlympiadStadiumZone(int id)
{
@ -102,19 +101,6 @@ public class L2OlympiadStadiumZone extends L2ZoneRespawn
}
}
@Override
public void setParameter(String name, String value)
{
if (name.equals("instanceTemplate"))
{
_instanceTemplate = Integer.parseInt(value);
}
else
{
super.setParameter(name, value);
}
}
public final void registerTask(OlympiadGameTask task)
{
getSettings().setTask(task);
@ -211,13 +197,4 @@ public class L2OlympiadStadiumZone extends L2ZoneRespawn
{
return _spectatorLocations;
}
/**
* Returns zone instanceTemplate
* @return
*/
public int getInstanceTemplateId()
{
return _instanceTemplate;
}
}

View File

@ -0,0 +1,74 @@
/*
* 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 com.l2jmobius.gameserver.model.zone.type;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.zone.L2ZoneType;
/**
* @author Sdw
*/
public class L2TeleportZone extends L2ZoneType
{
private int _x = -1;
private int _y = -1;
private int _z = -1;
public L2TeleportZone(int id)
{
super(id);
}
@Override
public void setParameter(String name, String value)
{
switch (name)
{
case "oustX":
{
_x = Integer.parseInt(value);
break;
}
case "oustY":
{
_y = Integer.parseInt(value);
break;
}
case "oustZ":
{
_z = Integer.parseInt(value);
break;
}
default:
{
super.setParameter(name, value);
}
}
}
@Override
protected void onEnter(L2Character character)
{
character.teleToLocation(new Location(_x, _y, _z));
}
@Override
protected void onExit(L2Character character)
{
}
}

View File

@ -1,129 +1,524 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="45" name="Pailaka (Injured dragon)" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/instance.xsd">
<!-- Pailaka Injured Dragon -->
<instance id="45" name="Pailaka (Injured dragon)" maxWorlds="100" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/instance.xsd">
<time duration="90" empty="3" />
<locations>
<enter type="FIXED">
<location x="125757" y="-40928" z="-3736" />
<location x="125738" y="-40933" z="-3770" />
</enter>
<exit type="ORIGIN" />
</locations>
<conditions>
<condition type="Level">
<param name="min" value="73" />
<param name="max" value="77" />
</condition>
<condition type="Quest">
<param name="id" value="144" />
</condition>
</conditions>
<spawnlist>
<group name="general">
<npc id="32502" x="125524" y="-40946" z="-3718" heading="8279" />
<npc id="32509" x="110074" y="-41324" z="-2285" heading="33580" />
<npc id="32509" x="113745" y="-47565" z="-2593" heading="55710" />
<npc id="18660" x="105618" y="-41801" z="-1782" heading="34701" /> <!-- Latana -->
<group name="pailaka_2316_1m1">
<territories>
<territory name="pailaka_2316_1" minZ="-3000" maxZ="-2700">
<node x="121312" y="-46106" />
<node x="122368" y="-46174" />
<node x="122368" y="-45526" />
<node x="121296" y="-45474" />
</territory>
</territories>
<npc id="18635" x="122122" y="-45658" z="-2884" count="1" /> <!-- Varka Silenos Recruit -->
<npc id="18636" x="122130" y="-45754" z="-2884" count="1" /> <!-- Varka Silenos Footman -->
<npc id="18642" x="122134" y="-45862" z="-2884" count="1" /> <!-- Varka Silenos Warrior -->
<npc id="18636" x="122130" y="-45958" z="-2880" count="1" /> <!-- Varka Silenos Footman -->
<npc id="18635" x="122122" y="-46042" z="-2880" count="1" /> <!-- Varka Silenos Recruit -->
</group>
<group name="wall_200001" spawnByDefault="false">
<npc id="18635" x="122077" y="-46098" z="-2914" heading="5028" />
<npc id="18636" x="122023" y="-45769" z="-2910" heading="63593" />
<npc id="18642" x="122038" y="-45904" z="-2914" heading="771" />
<npc id="18636" x="122050" y="-45999" z="-2910" heading="1701" />
<npc id="18635" x="122019" y="-45634" z="-2908" heading="64841" />
<group name="pailaka_2316_1m2">
<territories>
<territory name="pailaka_2316_1" minZ="-3000" maxZ="-2700">
<node x="121312" y="-46106" />
<node x="122368" y="-46174" />
<node x="122368" y="-45526" />
<node x="121296" y="-45474" />
</territory>
</territories>
<npc id="18640" x="121900" y="-45774" z="-2876" count="1" /> <!-- Varka Silenos Shaman -->
<npc id="18641" x="121898" y="-45904" z="-2875" count="1" /> <!-- Varka Silenos Priest -->
<npc id="18663" x="121898" y="-45904" z="-2875" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_01" />
<param name="GM_ID" value="2316001" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_1m1" />
</parameters>
</npc>
</group>
<group name="wall_200001_add" spawnByDefault="false">
<npc id="18640" x="121931" y="-45844" z="-2902" heading="664" /> <!-- Varka Silenos Shaman -->
<group name="pailaka_2316_2m1">
<territories>
<territory name="pailaka_2316_2" minZ="-2648" maxZ="-2148">
<node x="116604" y="-51752" />
<node x="117320" y="-52676" />
<node x="117944" y="-51812" />
<node x="117056" y="-51204" />
</territory>
</territories>
<npc id="18635" x="117460" y="-51832" z="-2528" heading="57343" count="1" /> <!-- Varka Silenos Recruit -->
<npc id="18636" x="117396" y="-51928" z="-2520" heading="57343" count="1" /> <!-- Varka Silenos Footman -->
<npc id="18642" x="117328" y="-52020" z="-2528" heading="57343" count="1" /> <!-- Varka Silenos Warrior -->
<npc id="18636" x="117252" y="-52104" z="-2528" heading="57343" count="1" /> <!-- Varka Silenos Footman -->
<npc id="18635" x="117180" y="-52180" z="-2528" heading="57343" count="1" /> <!-- Varka Silenos Recruit -->
</group>
<group name="wall_200002" spawnByDefault="false">
<npc id="18653" x="115997" y="-46271" z="-2637" heading="63732" />
<npc id="18654" x="116056" y="-46341" z="-2630" heading="63791" />
<npc id="18646" x="116054" y="-46439" z="-2637" heading="63477" />
<npc id="18646" x="116057" y="-46521" z="-2644" heading="65025" />
<npc id="18654" x="116084" y="-46587" z="-2651" heading="1141" />
<npc id="18653" x="116063" y="-46680" z="-2658" heading="4323" />
<group name="pailaka_2316_2m2">
<territories>
<territory name="pailaka_2316_2" minZ="-2648" maxZ="-2148">
<node x="116604" y="-51752" />
<node x="117320" y="-52676" />
<node x="117944" y="-51812" />
<node x="117056" y="-51204" />
</territory>
</territories>
<npc id="18640" x="117196" y="-51832" z="-2560" heading="57344" count="1" /> <!-- Varka Silenos Shaman -->
<npc id="18641" x="117088" y="-51948" z="-2544" heading="57344" count="1" /> <!-- Varka Silenos Priest -->
<npc id="18663" x="117088" y="-51948" z="-2544" heading="57344" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_02" />
<param name="GM_ID" value="2316002" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_2m1" />
</parameters>
</npc>
</group>
<group name="wall_200002_add" spawnByDefault="false">
<npc id="18648" x="115989" y="-46537" z="-2641" heading="1087" />
<npc id="18652" x="115984" y="-46471" z="-2635" heading="0" />
<group name="pailaka_2316_3m1">
<territories>
<territory name="pailaka_2316_3" minZ="-2680" maxZ="-2180">
<node x="115340" y="-56344" />
<node x="116404" y="-56356" />
<node x="116516" y="-55524" />
<node x="115460" y="-55488" />
</territory>
</territories>
<npc id="18635" x="116024" y="-55796" z="-2512" count="1" /> <!-- Varka Silenos Recruit -->
<npc id="18636" x="116016" y="-55888" z="-2527" count="1" /> <!-- Varka Silenos Footman -->
<npc id="18642" x="116000" y="-55992" z="-2528" count="1" /> <!-- Varka Silenos Warrior -->
<npc id="18636" x="115984" y="-56092" z="-2512" count="1" /> <!-- Varka Silenos Footman -->
<npc id="18635" x="115968" y="-56176" z="-2493" count="1" /> <!-- Varka Silenos Recruit -->
</group>
<group name="wall_200003" spawnByDefault="false">
<npc id="18653" x="116213" y="-50301" z="-2622" heading="50611" />
<npc id="18654" x="116155" y="-50420" z="-2635" heading="53262" />
<npc id="18646" x="116075" y="-50463" z="-2642" heading="53954" />
<npc id="18646" x="116020" y="-50497" z="-2643" heading="55751" />
<npc id="18654" x="115952" y="-50528" z="-2646" heading="52507" />
<npc id="18653" x="115780" y="-50465" z="-2620" heading="52135" />
<group name="pailaka_2316_3m2">
<territories>
<territory name="pailaka_2316_3" minZ="-2680" maxZ="-2180">
<node x="115340" y="-56344" />
<node x="116404" y="-56356" />
<node x="116516" y="-55524" />
<node x="115460" y="-55488" />
</territory>
</territories>
<npc id="18640" x="115755" y="-55866" z="-2579" count="1" /> <!-- Varka Silenos Shaman -->
<npc id="18641" x="115760" y="-56025" z="-2569" count="1" /> <!-- Varka Silenos Priest -->
<npc id="18663" x="115760" y="-56025" z="-2569" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_03" />
<param name="GM_ID" value="2316003" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_3m1" />
</parameters>
</npc>
</group>
<group name="wall_200003_add" spawnByDefault="false">
<npc id="18648" x="116065" y="-50355" z="-2639" heading="53280" />
<npc id="18652" x="115988" y="-50389" z="-2641" heading="52342" />
<npc id="18648" x="115906" y="-50447" z="-2643" heading="54768" />
<group name="pailaka_2316_4m1">
<territories>
<territory name="pailaka_2316_4" minZ="-2704" maxZ="-2104">
<node x="114708" y="-46884" />
<node x="116404" y="-46820" />
<node x="116404" y="-46032" />
<node x="114708" y="-46096" />
</territory>
</territories>
<npc id="18653" x="116150" y="-46307" z="-2614" count="1" /> <!-- Varka's Elite Escort -->
<npc id="18654" x="116151" y="-46369" z="-2622" count="1" /> <!-- Varka's Commander -->
<npc id="18646" x="116153" y="-46431" z="-2623" count="1" /> <!-- Varka Silenos Sergeant -->
<npc id="18646" x="116152" y="-46491" z="-2631" count="1" /> <!-- Varka Silenos Sergeant -->
<npc id="18654" x="116147" y="-46552" z="-2635" count="1" /> <!-- Varka's Commander -->
<npc id="18653" x="116144" y="-46608" z="-2640" count="1" /> <!-- Varka's Elite Escort -->
</group>
<group name="wall_200004">
<npc id="18635" x="117184" y="-51722" z="-2575" heading="55468" />
<npc id="18636" x="117097" y="-51774" z="-2577" heading="51453" />
<npc id="18642" x="117013" y="-51840" z="-2578" heading="55135" />
<npc id="18636" x="116926" y="-51876" z="-2580" heading="56322" />
<npc id="18635" x="116876" y="-51937" z="-2572" heading="59301" />
<group name="pailaka_2316_4m2">
<territories>
<territory name="pailaka_2316_4" minZ="-2704" maxZ="-2104">
<node x="114708" y="-46884" />
<node x="116404" y="-46820" />
<node x="116404" y="-46032" />
<node x="114708" y="-46096" />
</territory>
</territories>
<npc id="18645" x="115947" y="-46458" z="-2617" count="1" /> <!-- Varka Silenos Magus -->
<npc id="18644" x="115911" y="-46378" z="-2623" count="1" /> <!-- Varka Silenos Medium -->
<npc id="18648" x="115916" y="-46525" z="-2608" count="1" /> <!-- Varka Silenos Chief Priest -->
<npc id="18663" x="115916" y="-46525" z="-2608" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_04" />
<param name="GM_ID" value="2316004" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_4m1" />
</parameters>
</npc>
</group>
<group name="wall_200004_add" spawnByDefault="false">
<npc id="18648" x="117060" y="-51674" z="-2580" heading="57161" />
<npc id="18648" x="116918" y="-51781" z="-2582" heading="57343" />
<group name="pailaka_2316_5m1">
<territories>
<territory name="pailaka_2316_5" minZ="-2684" maxZ="-2184">
<node x="115756" y="-50960" />
<node x="116448" y="-50512" />
<node x="115760" y="-49552" />
<node x="114896" y="-50368" />
</territory>
</territories>
<npc id="18653" x="116163" y="-50317" z="-2612" heading="53247" count="1" /> <!-- Varka's Elite Escort -->
<npc id="18654" x="116104" y="-50357" z="-2620" heading="53247" count="1" /> <!-- Varka's Commander -->
<npc id="18646" x="116048" y="-50397" z="-2622" heading="53247" count="1" /> <!-- Varka Silenos Sergeant -->
<npc id="18646" x="115993" y="-50439" z="-2624" heading="53247" count="1" /> <!-- Varka Silenos Sergeant -->
<npc id="18654" x="115932" y="-50481" z="-2627" heading="53247" count="1" /> <!-- Varka's Commander -->
<npc id="18653" x="115869" y="-50505" z="-2609" heading="53247" count="1" /> <!-- Varka's Elite Escort -->
</group>
<group name="wall_200005" spawnByDefault="false">
<npc id="18649" x="111606" y="-43746" z="-2633" heading="62267" />
<npc id="18650" x="111602" y="-43846" z="-2638" heading="63427" />
<npc id="18649" x="111616" y="-43922" z="-2635" heading="60699" />
<npc id="18650" x="111618" y="-44003" z="-2637" heading="59709" />
<npc id="18649" x="111614" y="-44071" z="-2642" heading="63794" />
<npc id="18650" x="111619" y="-44129" z="-2650" heading="2365" />
<group name="pailaka_2316_5m2">
<territories>
<territory name="pailaka_2316_5" minZ="-2684" maxZ="-2184">
<node x="115756" y="-50960" />
<node x="116448" y="-50512" />
<node x="115760" y="-49552" />
<node x="114896" y="-50368" />
</territory>
</territories>
<npc id="18645" x="116054" y="-50230" z="-2618" heading="53247" count="1" /> <!-- Varka Silenos Magus -->
<npc id="18644" x="115944" y="-50297" z="-2624" heading="53247" count="1" /> <!-- Varka Silenos Medium -->
<npc id="18648" x="115837" y="-50357" z="-2624" heading="53247" count="1" /> <!-- Varka Silenos Chief Priest -->
<npc id="18663" x="115837" y="-50357" z="-2624" heading="53247" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_05" />
<param name="GM_ID" value="2316005" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_5m1" />
</parameters>
</npc>
</group>
<group name="wall_200005_add" spawnByDefault="false">
<npc id="18652" x="111499" y="-43867" z="-2619" heading="1338" />
<npc id="18648" x="111539" y="-43743" z="-2623" heading="62952" />
<npc id="18648" x="111522" y="-43965" z="-2616" heading="63399" />
<npc id="18652" x="111514" y="-44085" z="-2625" heading="379" />
<group name="pailaka_2316_6m1">
<territories>
<territory name="pailaka_2316_6" minZ="-2360" maxZ="-1960">
<node x="108020" y="-50088" />
<node x="108940" y="-50004" />
<node x="108872" y="-49284" />
<node x="107924" y="-49328" />
</territory>
</territories>
<npc id="18653" x="108622" y="-49901" z="-2169" heading="49151" count="1" /> <!-- Varka's Elite Escort -->
<npc id="18654" x="108510" y="-49908" z="-2200" heading="49151" count="1" /> <!-- Varka's Commander -->
<npc id="18646" x="108398" y="-49916" z="-2229" heading="49151" count="1" /> <!-- Varka Silenos Sergeant -->
<npc id="18646" x="108296" y="-49937" z="-2242" heading="49151" count="1" /> <!-- Varka Silenos Sergeant -->
<npc id="18654" x="108185" y="-49947" z="-2261" heading="49151" count="1" /> <!-- Varka's Commander -->
<npc id="18653" x="108078" y="-49950" z="-2268" heading="49151" count="1" /> <!-- Varka's Elite Escort -->
</group>
<group name="wall_200006" spawnByDefault="false">
<npc id="18657" x="109272" y="-45665" z="-2210" heading="4731" />
<npc id="18655" x="109326" y="-45781" z="-2235" heading="5945" />
<npc id="18657" x="109393" y="-45893" z="-2253" heading="5549" />
<npc id="18655" x="109458" y="-45980" z="-2263" heading="6915" />
<npc id="18657" x="109516" y="-46032" z="-2268" heading="4362" />
<npc id="18655" x="109584" y="-46100" z="-2263" heading="9356" />
<group name="pailaka_2316_6m2">
<territories>
<territory name="pailaka_2316_6" minZ="-2360" maxZ="-1960">
<node x="108020" y="-50088" />
<node x="108940" y="-50004" />
<node x="108872" y="-49284" />
<node x="107924" y="-49328" />
</territory>
</territories>
<npc id="18645" x="108514" y="-49748" z="-2175" heading="45055" count="1" /> <!-- Varka Silenos Magus -->
<npc id="18644" x="108322" y="-49726" z="-2214" heading="49151" count="1" /> <!-- Varka Silenos Medium -->
<npc id="18648" x="108149" y="-49766" z="-2243" heading="53247" count="1" /> <!-- Varka Silenos Chief Priest -->
<npc id="18663" x="108149" y="-49766" z="-2243" heading="53247" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_06" />
<param name="GM_ID" value="2316006" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_6m1" />
</parameters>
</npc>
</group>
<group name="wall_200006_add" spawnByDefault="false">
<npc id="18652" x="109442" y="-46077" z="-2256" heading="8191" />
<npc id="18648" x="109298" y="-45890" z="-2232" heading="7391" />
<npc id="18652" x="109373" y="-45985" z="-2250" heading="7882" />
<group name="pailaka_2316_7m1">
<territories>
<territory name="pailaka_2316_7" minZ="-2745" maxZ="-2345">
<node x="110628" y="-44180" />
<node x="111680" y="-44220" />
<node x="111740" y="-43532" />
<node x="110700" y="-43484" />
</territory>
</territories>
<npc id="18649" x="111552" y="-43594" z="-2629" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="111549" y="-43688" z="-2616" count="1" /> <!-- Varka Silenos Officer -->
<npc id="18649" x="111545" y="-43776" z="-2611" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="111540" y="-43868" z="-2610" count="1" /> <!-- Varka Silenos Officer -->
<npc id="18649" x="111536" y="-43952" z="-2606" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="111533" y="-44038" z="-2608" count="1" /> <!-- Varka Silenos Officer -->
</group>
<group name="wall_200007">
<npc id="18653" x="116432" y="-55729" z="-2441" heading="65250" />
<npc id="18654" x="116499" y="-55822" z="-2449" heading="63477" />
<npc id="18646" x="116503" y="-55918" z="-2449" heading="589" />
<npc id="18646" x="116490" y="-56022" z="-2445" heading="61772" />
<npc id="18654" x="116481" y="-56108" z="-2437" heading="62531" />
<npc id="18653" x="116433" y="-56194" z="-2432" heading="927" />
<group name="pailaka_2316_7m2">
<territories>
<territory name="pailaka_2316_7" minZ="-2745" maxZ="-2345">
<node x="110628" y="-44180" />
<node x="111680" y="-44220" />
<node x="111740" y="-43532" />
<node x="110700" y="-43484" />
</territory>
</territories>
<npc id="18652" x="111360" y="-43664" z="-2592" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18648" x="111360" y="-43744" z="-2576" count="1" /> <!-- Varka Silenos Chief Priest -->
<npc id="18652" x="111344" y="-43824" z="-2576" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18648" x="111347" y="-43905" z="-2576" count="1" /> <!-- Varka Silenos Chief Priest -->
<npc id="18652" x="111344" y="-43984" z="-2576" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18663" x="111344" y="-43984" z="-2576" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_07" />
<param name="GM_ID" value="2316007" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_7m1" />
</parameters>
</npc>
</group>
<group name="wall_200007_add" spawnByDefault="false">
<npc id="18648" x="116348" y="-56103" z="-2460" heading="63868" />
<npc id="18652" x="116394" y="-55968" z="-2465" heading="2634" />
<npc id="18648" x="116398" y="-55821" z="-2464" heading="664" />
<group name="pailaka_2316_8m1">
<territories>
<territory name="pailaka_2316_8" minZ="-2376" maxZ="-1976">
<node x="109092" y="-46644" />
<node x="109916" y="-45888" />
<node x="109580" y="-45208" />
<node x="108612" y="-45880" />
</territory>
</territories>
<npc id="18649" x="109081" y="-46337" z="-2176" heading="36864" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="109048" y="-46280" z="-2176" heading="36864" count="1" /> <!-- Varka Silenos Officer -->
<npc id="18649" x="109015" y="-46222" z="-2160" heading="36864" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="108984" y="-46168" z="-2160" heading="36864" count="1" /> <!-- Varka Silenos Officer -->
<npc id="18649" x="108951" y="-46120" z="-2144" heading="36864" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="108916" y="-46068" z="-2144" heading="36864" count="1" /> <!-- Varka Silenos Officer -->
</group>
<group name="wall_200008" spawnByDefault="false">
<npc id="18655" x="108892" y="-41031" z="-2204" heading="64381" />
<npc id="18657" x="108888" y="-41114" z="-2195" heading="64256" />
<npc id="18655" x="108886" y="-41185" z="-2196" heading="64884" />
<npc id="18657" x="108878" y="-41260" z="-2188" heading="64876" />
<npc id="18655" x="108862" y="-41323" z="-2174" heading="62422" />
<npc id="18657" x="108869" y="-41376" z="-2163" heading="2280" />
<npc id="18655" x="108877" y="-41436" z="-2144" heading="64321" />
<group name="pailaka_2316_8m2">
<territories>
<territory name="pailaka_2316_8" minZ="-2376" maxZ="-1976">
<node x="109092" y="-46644" />
<node x="109916" y="-45888" />
<node x="109580" y="-45208" />
<node x="108612" y="-45880" />
</territory>
</territories>
<npc id="18652" x="109203" y="-46244" z="-2190" heading="36863" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18648" x="109169" y="-46186" z="-2190" heading="36863" count="1" /> <!-- Varka Silenos Chief Priest -->
<npc id="18652" x="109134" y="-46127" z="-2174" heading="36863" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18648" x="109094" y="-46071" z="-2174" heading="36863" count="1" /> <!-- Varka Silenos Chief Priest -->
<npc id="18652" x="109058" y="-46013" z="-2158" heading="36863" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18663" x="109058" y="-46013" z="-2158" heading="36863" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_08" />
<param name="GM_ID" value="2316008" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_8m1" />
</parameters>
</npc>
</group>
<group name="wall_200008_add" spawnByDefault="false">
<npc id="18652" x="108797" y="-41101" z="-2176" heading="62980" />
<npc id="18652" x="108819" y="-41198" z="-2183" heading="0" />
<npc id="18652" x="108811" y="-41293" z="-2170" heading="473" />
<group name="pailaka_2316_9m1">
<territories>
<territory name="pailaka_2316_9" minZ="-1924" maxZ="-1424">
<node x="109752" y="-39880" />
<node x="110416" y="-39860" />
<node x="110348" y="-39020" />
<node x="109716" y="-38908" />
</territory>
</territories>
<npc id="18650" x="110224" y="-39828" z="-1808" heading="49152" count="1" /> <!-- Varka Silenos Officer -->
<npc id="18649" x="110144" y="-39840" z="-1840" heading="49152" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="110064" y="-39844" z="-1840" heading="49152" count="1" /> <!-- Varka Silenos Officer -->
<npc id="18649" x="109978" y="-39848" z="-1840" heading="49152" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="109892" y="-39847" z="-1824" heading="49152" count="1" /> <!-- Varka Silenos Officer -->
</group>
<group name="wall_200009">
<npc id="18650" x="110205" y="-39800" z="-1840" heading="46882" />
<npc id="18649" x="110110" y="-39799" z="-1850" heading="46038" />
<npc id="18659" x="110023" y="-39802" z="-1852" heading="48655" />
<npc id="18649" x="109955" y="-39811" z="-1855" heading="48647" />
<npc id="18650" x="109874" y="-39833" z="-1837" heading="48408" />
<group name="pailaka_2316_9m2">
<territories>
<territory name="pailaka_2316_9" minZ="-1924" maxZ="-1424">
<node x="109752" y="-39880" />
<node x="110416" y="-39860" />
<node x="110348" y="-39020" />
<node x="109716" y="-38908" />
</territory>
</territories>
<npc id="18652" x="110143" y="-39645" z="-1776" heading="49152" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18652" x="110048" y="-39648" z="-1776" heading="49152" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18652" x="109950" y="-39646" z="-1776" heading="49152" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18663" x="109950" y="-39646" z="-1776" heading="49152" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_09" />
<param name="GM_ID" value="2316009" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_9m1" />
</parameters>
</npc>
</group>
<group name="wall_200009_add" spawnByDefault="false">
<npc id="18652" x="109965" y="-39685" z="-1815" heading="48384" />
<npc id="18652" x="110087" y="-39710" z="-1827" heading="48270" />
<group name="pailaka_2316_10m1">
<territories>
<territory name="pailaka_2316_10" minZ="-2272" maxZ="-1772">
<node x="108388" y="-41460" />
<node x="108912" y="-41460" />
<node x="109048" y="-41020" />
<node x="108432" y="-40848" />
</territory>
</territories>
<npc id="18655" x="108917" y="-41028" z="-2188" count="1" /> <!-- Varka's Chief Escort -->
<npc id="18657" x="108912" y="-41089" z="-2180" count="1" /> <!-- Prophet's Royal Guard -->
<npc id="18655" x="108901" y="-41147" z="-2181" count="1" /> <!-- Varka's Chief Escort -->
<npc id="18657" x="108894" y="-41207" z="-2182" count="1" /> <!-- Prophet's Royal Guard -->
<npc id="18655" x="108885" y="-41267" z="-2170" count="1" /> <!-- Varka's Chief Escort -->
<npc id="18657" x="108868" y="-41320" z="-2157" count="1" /> <!-- Prophet's Royal Guard -->
<npc id="18655" x="108894" y="-41379" z="-2144" count="1" /> <!-- Varka's Chief Escort -->
</group>
<group name="pailaka_2316_10m2">
<territories>
<territory name="pailaka_2316_10" minZ="-2272" maxZ="-1772">
<node x="108388" y="-41460" />
<node x="108912" y="-41460" />
<node x="109048" y="-41020" />
<node x="108432" y="-40848" />
</territory>
</territories>
<npc id="18656" x="108676" y="-41069" z="-2137" count="1" /> <!-- Varka's Chief Magus -->
<npc id="18658" x="108669" y="-41136" z="-2133" count="1" /> <!-- Prophet's Disciple -->
<npc id="18659" x="108665" y="-41207" z="-2131" count="1" /> <!-- Varka's Prophet -->
<npc id="18658" x="108653" y="-41273" z="-2119" count="1" /> <!-- Prophet's Disciple -->
<npc id="18663" x="108653" y="-41273" z="-2119" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_10" />
<param name="GM_ID" value="2316010" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_10m1" />
</parameters>
</npc>
</group>
<group name="pailaka_2316_bossm1">
<territories>
<territory name="pailaka_2316_boss" minZ="-1960" maxZ="-1360">
<node x="105320" y="-43124" />
<node x="107304" y="-42412" />
<node x="107352" y="-40940" />
<node x="105028" y="-41188" />
</territory>
</territories>
<npc id="18660" x="105785" y="-41785" z="-1810" heading="32768" count="1" /> <!-- Latana -->
<npc id="18603" x="105974" y="-41794" z="-1784" heading="32768" count="1" /> <!-- -->
</group>
<group name="pailaka_2316_animal_1m1">
<territories>
<territory name="pailaka_2316_animal_1" minZ="-3416" maxZ="-2816">
<node x="121076" y="-43420" />
<node x="124120" y="-43760" />
<node x="123704" y="-41368" />
<node x="120276" y="-41568" />
</territory>
</territories>
<npc id="18637" count="5" /> <!-- Grazing Antelope -->
</group>
<group name="pailaka_2316_animal_2m1">
<territories>
<territory name="pailaka_2316_animal_2" minZ="-2680" maxZ="-2080">
<node x="123792" y="-53020" />
<node x="126076" y="-50516" />
<node x="124300" y="-49584" />
<node x="122536" y="-51908" />
</territory>
</territories>
<npc id="18637" count="4" /> <!-- Grazing Antelope -->
</group>
<group name="pailaka_2316_animal_3m1">
<territories>
<territory name="pailaka_2316_animal_3" minZ="-2464" maxZ="-1664">
<node x="119348" y="-56704" />
<node x="122056" y="-56624" />
<node x="122040" y="-53536" />
<node x="118812" y="-54188" />
</territory>
</territories>
<npc id="18643" count="3" /> <!-- Grazing Antelope -->
</group>
<group name="pailaka_2316_animal_4m1">
<territories>
<territory name="pailaka_2316_animal_4" minZ="-3004" maxZ="-2404">
<node x="110524" y="-56436" />
<node x="112908" y="-56756" />
<node x="113144" y="-54140" />
<node x="110428" y="-53384" />
</territory>
</territories>
<npc id="18647" count="5" /> <!-- Grazing Flava -->
</group>
<group name="pailaka_2316_animal_5m1">
<territories>
<territory name="pailaka_2316_animal_5" minZ="-2676" maxZ="-2076">
<node x="107688" y="-55456" />
<node x="109016" y="-55748" />
<node x="108976" y="-51696" />
<node x="107800" y="-51872" />
</territory>
</territories>
<npc id="18647" count="5" /> <!-- Grazing Flava -->
</group>
<group name="pailaka_2316_animal_6m1">
<territories>
<territory name="pailaka_2316_animal_6" minZ="-2620" maxZ="-2020">
<node x="114232" y="-40504" />
<node x="115736" y="-40892" />
<node x="116260" y="-38364" />
<node x="114140" y="-38540" />
</territory>
</territories>
<npc id="18651" count="5" /> <!-- Grazing Elder Antelope -->
</group>
<group name="pailaka_2316_animal_7m1">
<territories>
<territory name="pailaka_2316_animal_7" minZ="-1292" maxZ="-592">
<node x="108865" y="-36896" />
<node x="110601" y="-37196" />
<node x="109833" y="-35720" />
<node x="108521" y="-35800" />
</territory>
</territories>
<npc id="18651" count="5" /> <!-- Grazing Elder Antelope -->
</group>
<group name="pailaka_2316_npc_1m1">
<territories>
<territory name="pailaka_2316_npc_1" minZ="-3780" maxZ="-3580">
<node x="125436" y="-41028" />
<node x="125636" y="-41028" />
<node x="125636" y="-40828" />
<node x="125436" y="-40828" />
</territory>
</territories>
<npc id="32502" x="125536" y="-40928" z="-3780" heading="8192" count="1" /> <!-- Ketra Orc Supporter -->
</group>
<group name="pailaka_2316_npc_2m1">
<territories>
<territory name="pailaka_2316_npc_2" minZ="-2668" maxZ="-2468">
<node x="113720" y="-47688" />
<node x="113920" y="-47688" />
<node x="113920" y="-47488" />
<node x="113720" y="-47488" />
</territory>
</territories>
<npc id="32509" x="113820" y="-47588" z="-2668" count="1" /> <!-- Ketra Orc Intelligence Officer -->
</group>
<group name="pailaka_2316_npc_3m1">
<territories>
<territory name="pailaka_2316_npc_3" minZ="-2448" maxZ="-2248">
<node x="107452" y="-53252" />
<node x="107652" y="-53252" />
<node x="107652" y="-53052" />
<node x="107452" y="-53052" />
</territory>
</territories>
<npc id="32509" x="107552" y="-53152" z="-2448" count="1" /> <!-- Ketra Orc Intelligence Officer -->
</group>
<group name="pailaka_2316_npc_4m1">
<territories>
<territory name="pailaka_2316_npc_4" minZ="-2340" maxZ="-1940">
<node x="110080" y="-41380" />
<node x="110280" y="-41380" />
<node x="110280" y="-41180" />
<node x="110080" y="-41180" />
</territory>
</territories>
<npc id="32509" x="110144" y="-41260" z="-2260" heading="36864" count="1" /> <!-- Ketra Orc Intelligence Officer -->
</group>
</spawnlist>
</instance>

View File

@ -0,0 +1,3 @@
<html><body>Ketra Orc Shaman:<br>
Remember to seek out a Ketra Orc in that world. There must be one there who will aid you in your quest!
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Ketra Orc Shaman:<br>
I have faith that you will remove the dark shadow which hides our Great Flame!
</body></html>

View File

@ -16,221 +16,616 @@
*/
package instances.PailakaInjuredDragon;
import java.util.HashMap;
import java.util.List;
import com.l2jmobius.gameserver.ai.CtrlIntention;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.commons.util.CommonUtil;
import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
import com.l2jmobius.gameserver.model.L2World;
import com.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
import com.l2jmobius.gameserver.model.events.annotations.Id;
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureSee;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnAttackableFactionCall;
import com.l2jmobius.gameserver.model.holders.SkillHolder;
import com.l2jmobius.gameserver.model.instancezone.Instance;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.spawns.SpawnGroup;
import com.l2jmobius.gameserver.model.skills.AbnormalType;
import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.gameserver.model.zone.L2ZoneType;
import com.l2jmobius.gameserver.model.zone.type.L2TeleportZone;
import com.l2jmobius.gameserver.network.serverpackets.SpecialCamera;
import instances.AbstractInstance;
import quests.Q00144_PailakaInjuredDragon.Q00144_PailakaInjuredDragon;
/**
* @author Mathael
* Pailaka (Varka Silenos Barracks) Instance zone.
* @author Sdw
*/
public class PailakaInjuredDragon extends AbstractInstance
public final class PailakaInjuredDragon extends AbstractInstance
{
// NPCs
private static final int KETRA_ORC_SUPPORTER_END = 32512;
// Monsters
private static final int RECRUIT = 18635;
private static final int FOOTMAN = 18636;
private static final int WARRIOR = 18642;
private static final int OFFICER = 18646;
private static final int GREAT_MAGUS = 18649;
private static final int GENERAL = 18650;
private static final int ELITE_GUARD = 18653;
private static final int COMMANDER = 18654;
private static final int HEAD_GUARD = 18655;
private static final int PROPHET_GUARD = 18657;
private static final int PROPHET = 18659;
private static final int SHAMAN = 18640;
private static final int CHIEF_PRIEST = 18648;
private static final int GRAND_PRIEST = 18652;
private static final int KETRA_ORC_SHAMAN = 32499;
private static final int KETRA_ORC_INTELLIGENCE_OFFICIER = 32509;
private static final int KETRA_ORC_SUPPORTER = 32512;
private static final int LATANA = 18660;
private static final int ANTELOPE1 = 18637;
private static final int ANTELOPE2 = 18643;
private static final int ANTELOPE3 = 18651;
// Usable Quest Items
private static final int SHIELD_POTION = 13032;
private static final int HEAL_POTION = 13033;
// Walls
private static final HashMap<Integer, Location> ZONES_TELEPORTS = new HashMap<>();
static
private static final int DRAGON_CAMERA_1 = 18603;
private static final int DRAGON_CAMERA_2 = 18604;
private static final int DRAGON_TARGET = 18605;
private static final int LATANA_SKILL_USE = 18661;
private static final int TELEPORT_TRAP = 18663;
//@formatter:off
private static final int[] WARRIORS =
{
ZONES_TELEPORTS.put(200001, new Location(122452, -45808, -2981));
ZONES_TELEPORTS.put(200002, new Location(116610, -46418, -2641));
ZONES_TELEPORTS.put(200003, new Location(116237, -50961, -2636));
ZONES_TELEPORTS.put(200004, new Location(117384, -52141, -2544));
ZONES_TELEPORTS.put(200005, new Location(112169, -44004, -2707));
ZONES_TELEPORTS.put(200006, new Location(109460, -45869, -2265));
ZONES_TELEPORTS.put(200007, new Location(117111, -55927, -2380));
ZONES_TELEPORTS.put(200008, new Location(109274, -41277, -2271));
ZONES_TELEPORTS.put(200009, new Location(110023, -40263, -2001));
}
// Skill
private static final SkillHolder LATANA_PRESENTATION_SKILL = new SkillHolder(5759, 1);
18635, 18636, 18638,
18642, 18646, 18649,
18650, 18653, 18654,
18655, 18657,
};
private static final int[] WIZARDS =
{
18639, 18640, 18641,
18644, 18645, 18648,
18652, 18656, 18658,
18659,
};
private static final int[] ANIMALS =
{
18637, 18643,
18647, 18651,
};
// Skills
private static final SkillHolder ULTIMATE_DEFENCE = new SkillHolder(5044, 3);
private static final SkillHolder HEAL = new SkillHolder(4065, 7);
private static final SkillHolder ELECTRIC_FLAME = new SkillHolder(5715, 1);
private static final SkillHolder STUN = new SkillHolder(5716, 1);
private static final SkillHolder FIRE_BREATH = new SkillHolder(5717, 1);
private static final SkillHolder ANGER = new SkillHolder(5719, 1);
private static final SkillHolder RISE_OF_LATANA = new SkillHolder(5759, 1);
private static final int[] REJECTED_SKILLS =
{
28, 680, 51,
511, 15, 254,
1069, 1097, 1042,
1072, 1170, 352,
358, 1394, 695,
115, 1083, 1160,
1164, 1201, 1206,
1222, 1223, 1224,
1092, 65, 106,
122, 127, 1049,
1064, 1071, 1074,
1169, 1263, 1269,
352, 353, 1336,
1337, 1338, 1358,
1359, 402, 403,
412, 1386, 1394,
1396, 485, 501,
1445, 1446, 1447,
522, 531, 1481,
1482, 1483, 1484,
1485, 1486, 695,
696, 716, 775,
1511, 792, 1524,
1529,
};
//@formatter:on
// Items
private static final int PAILAKA_INSTANT_SHIELD = 13032;
private static final int QUICK_HEALING_POTION = 13033;
private static final int WEAPON_UPGRADE_STAGE_1 = 13056;
private static final int WEAPON_UPGRADE_STAGE_2 = 13057;
// Misc
private static final int TEMPLATE_ID = 45;
public PailakaInjuredDragon()
{
super(TEMPLATE_ID);
addInstanceEnterId(TEMPLATE_ID);
addKillId(ANTELOPE1, ANTELOPE2, ANTELOPE3, GENERAL, GREAT_MAGUS, PROPHET, ELITE_GUARD, COMMANDER, OFFICER, RECRUIT, FOOTMAN, WARRIOR, PROPHET_GUARD, HEAD_GUARD, SHAMAN, CHIEF_PRIEST, GRAND_PRIEST, LATANA);
addSpawnId(LATANA);
addAggroRangeEnterId(LATANA);
addEnterZoneId(ZONES_TELEPORTS.keySet());
addInstanceCreatedId(TEMPLATE_ID);
addStartNpc(KETRA_ORC_SHAMAN);
addTalkId(KETRA_ORC_SHAMAN, KETRA_ORC_INTELLIGENCE_OFFICIER);
addAttackId(WARRIORS);
addAttackId(WIZARDS);
addAttackId(LATANA);
addSpawnId(TELEPORT_TRAP, LATANA, DRAGON_TARGET, LATANA_SKILL_USE, DRAGON_CAMERA_2);
addSpawnId(WIZARDS);
setCreatureSeeId(this::onCreatureSee, WIZARDS);
setCreatureSeeId(this::onCreatureSee, LATANA);
addKillId(ANIMALS);
addKillId(LATANA);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
switch (event)
String htmltext = null;
final QuestState qs = player.getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName());
if (qs != null)
{
case "enter":
switch (event)
{
enterInstance(player, npc, TEMPLATE_ID);
break;
}
case "camera_start":
{
specialCamera(player, npc, 0, 0, 180, 800, 5000, 800, 0, 1, 0, 0);
break; // TODO: Need retail values
}
case "camera_end":
{
specialCamera(player, npc, 0, 0, 180, 600, 5000, 600, 0, 1, 0, 0);
break; // TODO: Need retail values
}
}
return super.onAdvEvent(event, npc, player);
}
@Override
protected void onEnter(L2PcInstance player, Instance instance, boolean firstEnter)
{
super.onEnter(player, instance, firstEnter);
if (firstEnter)
{
final QuestState qs = player.getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName());
if ((qs != null) && qs.isCond(1))
{
qs.setCond(2, true);
showHtmlFile(player, "32499-09.html");
}
}
}
@Override
public String onAggroRangeEnter(L2Npc npc, L2PcInstance player, boolean isSummon)
{
if (npc.isScriptValue(0))
{
npc.setScriptValue(1);
startQuestTimer("camera_start", 300, npc, player);
npc.doCast(LATANA_PRESENTATION_SKILL.getSkill());
}
return super.onAggroRangeEnter(npc, player, isSummon);
}
@Override
public void onInstanceCreated(Instance instance, L2PcInstance player)
{
for (int i = 0; i < 9; i++)
{
final int zoneId = 200000 + (i + 1);
final List<L2Npc> npcs = instance.spawnGroup("wall_" + zoneId);
npcs.forEach(k -> k.setScriptValue(zoneId));
instance.getParameters().set("wall_" + zoneId, npcs.size());
}
super.onInstanceCreated(instance, player);
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final int npcId = npc.getId();
if (npcId == LATANA)
{
startQuestTimer("camera_end", 1000, npc, killer);
addSpawn(KETRA_ORC_SUPPORTER_END, new Location(105517, -41692, -1781, 65323), false, 0, false, npc.getInstanceWorld().getId());
}
else
{
switch (getRandom(1, 3))
{
case 1:
case "enterInstance":
{
npc.dropItem(killer, SHIELD_POTION, getRandom(1, 8));
enterInstance(player, npc, TEMPLATE_ID);
qs.setCond(2, true);
htmltext = "32499-01.html";
break;
}
case 2:
case "reEnterInstance":
{
npc.dropItem(killer, HEAL_POTION, getRandom(1, 4));
enterInstance(player, npc, TEMPLATE_ID);
htmltext = "32499-02.html";
break;
}
case "exitInstance":
{
finishInstance(player, 0);
break;
}
}
if ((npcId != ANTELOPE1) && (npcId != ANTELOPE2) && (npcId != ANTELOPE3) && (npcId != SHAMAN) && (npcId != CHIEF_PRIEST) && (npcId != GRAND_PRIEST))
}
return htmltext;
}
@Override
public void onTimerEvent(String event, StatsSet params, L2Npc npc, L2PcInstance player)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (event)
{
final Instance world = npc.getInstanceWorld();
final int zoneId = npc.getScriptValue();
int killcount = world.getParameters().getInt("wall_" + zoneId);
killcount--;
world.setParameter("wall_" + zoneId, killcount);
if (killcount <= 0)
case "SET_VISIBLE":
{
world.getSpawnGroup("wall_" + zoneId).forEach(SpawnGroup::despawnAll);
world.getSpawnGroup("wall_" + zoneId + "_add").forEach(SpawnGroup::despawnAll);
}
else if (!world.getParameters().getBoolean("wall_" + zoneId + "_add", false))
{
world.setParameter("wall_" + zoneId + "_add", true);
world.spawnGroup("wall_" + zoneId + "_add").forEach(mage ->
if (!npc.getVariables().getBoolean("visible", false))
{
mage.setTarget(killer);
mage.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, killer);
npc.setInvisible(false);
npc.getVariables().set("visible", true);
getTimers().addTimer("CAST_SKILL", 5000, npc, player);
}
break;
}
case "CAST_SKILL":
{
final SkillHolder holder = npc.getParameters().getSkillHolder(getRandomBoolean() ? "Skill01_ID" : "Skill02_ID");
if (holder != null)
{
addSkillCastDesire(npc, player, holder, 500000);
}
getTimers().addTimer("CAST_SKILL", 10000, npc, player);
break;
}
case "LOOK_NEIGHBOR":
{
L2World.getInstance().forEachVisibleObjectInRange(npc, L2Npc.class, HEAL.getSkill().getCastRange(), npcs ->
{
if ((npcs.getCurrentHpPercent() < 70) && (getRandom(100) < 10))
{
addSkillCastDesire(npc, npcs, HEAL, 1000000);
}
});
getTimers().addTimer("LOOK_NEIGHBOR", 5000, npc, null);
break;
}
case "CHECK_FOR_DROP":
{
if (world.getNpcsOfGroup(npc.getParameters().getString("control_maker"), n -> !n.isDead()).isEmpty())
{
final L2ZoneType zone = ZoneManager.getInstance().getZoneByName(npc.getParameters().getString("AreaName"), L2TeleportZone.class);
if (zone != null)
{
zone.setEnabled(false, world.getId());
}
npc.dropItem(world.getFirstPlayer(), PAILAKA_INSTANT_SHIELD, getRandom(10) + 1);
npc.dropItem(world.getFirstPlayer(), QUICK_HEALING_POTION, getRandom(10) + 1);
switch (npc.getParameters().getInt("GM_ID", 0))
{
case 2316001:
case 2316002:
case 2316003:
{
if ((world.getParameters().getInt("2316001", 0) == 1) && (world.getParameters().getInt("2316002", 0) == 1) && (world.getParameters().getInt("2316003", 0) == 1))
{
giveItems(world.getFirstPlayer(), WEAPON_UPGRADE_STAGE_1, 1, true);
world.getParameters().set(npc.getParameters().getString("GM_ID"), 0);
}
break;
}
case 2316007:
case 2316008:
{
if ((world.getParameters().getInt("2316007", 0) == 1) && (world.getParameters().getInt("2316008", 0) == 1))
{
giveItems(world.getFirstPlayer(), WEAPON_UPGRADE_STAGE_2, 1, true);
world.getParameters().set(npc.getParameters().getString("GM_ID"), 0);
}
break;
}
}
npc.deleteMe();
}
else
{
getTimers().addTimer("CHECK_FOR_DROP", 2000, npc, null);
}
break;
}
case "SCE_RATANA_CAMERA_START_1":
{
npc.broadcastPacket(new SpecialCamera(npc, 600, 200, 5, 0, 15000, 10000, -10, 8, 1, 1, 1));
getTimers().addTimer("SCE_RATANA_CAMERA_START_1_1", 2000, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_1_1":
{
npc.broadcastPacket(new SpecialCamera(npc, 400, 200, 5, 4000, 15000, 10000, -10, 8, 1, 1, 0));
getTimers().addTimer("SCE_RATANA_CAMERA_START_1_2", 4000, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_1_2":
{
npc.broadcastPacket(new SpecialCamera(npc, 300, 195, 4, 1500, 15000, 10000, -5, 10, 1, 1, 0));
getTimers().addTimer("SCE_RATANA_CAMERA_START_1_3", 1700, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_1_3":
{
npc.broadcastPacket(new SpecialCamera(npc, 130, 2, 5, 0, 15000, 10000, 0, 0, 1, 0, 1));
getTimers().addTimer("SCE_RATANA_CAMERA_START_1_4", 2000, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_1_4":
{
npc.broadcastPacket(new SpecialCamera(npc, 220, 0, 4, 800, 15000, 10000, 5, 10, 1, 0, 0));
getTimers().addTimer("SCE_RATANA_CAMERA_START_1_5", 2000, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_1_5":
{
npc.broadcastPacket(new SpecialCamera(npc, 250, 185, 5, 4000, 15000, 10000, -5, 10, 1, 1, 0));
getTimers().addTimer("SCE_RATANA_CAMERA_START_1_6", 4000, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_1_6":
{
npc.broadcastPacket(new SpecialCamera(npc, 200, 0, 5, 2000, 15000, 10000, 0, 25, 1, 0, 0));
getTimers().addTimer("SCE_RATANA_CAMERA_START_1_7", 4530, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_1_7":
{
npc.broadcastPacket(new SpecialCamera(npc, 300, -3, 5, 3500, 15000, 6000, 0, 6, 1, 0, 0));
getTimers().addTimer("SUICIDE_DRAGON", 10000, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_2":
{
npc.broadcastPacket(new SpecialCamera(npc, 250, 0, 6, 0, 15000, 10000, 2, 0, 1, 0, 1));
getTimers().addTimer("SCE_RATANA_CAMERA_START_2_1", 2000, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_2_1":
{
npc.broadcastPacket(new SpecialCamera(npc, 230, 0, 5, 2000, 15000, 10000, 0, 0, 1, 0, 0));
getTimers().addTimer("SCE_RATANA_CAMERA_START_2_2", 2500, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_2_2":
{
npc.broadcastPacket(new SpecialCamera(npc, 180, 175, 2, 1500, 15000, 10000, 0, 10, 1, 1, 0));
getTimers().addTimer("SCE_RATANA_CAMERA_START_2_3", 1500, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_2_3":
{
npc.broadcastPacket(new SpecialCamera(npc, 300, 180, 5, 1500, 15000, 3000, 0, 6, 1, 1, 0));
getTimers().addTimer("SUICIDE_DRAGON", 3000, npc, player);
break;
}
case "SUICIDE_DRAGON":
{
npc.deleteMe();
break;
}
case "LATANA_ANGER_RESET":
{
npc.setScriptValue(0);
break;
}
case "SPAWN_DRAGON_TARGET":
{
addSpawn(npc, DRAGON_TARGET, 105465, -41817, -1768, 0, false, 0, false, world.getId());
getTimers().addTimer("SOCIAL_ACTION", 3000, npc, player);
break;
}
case "SOCIAL_ACTION":
{
npc.broadcastSocialAction(0);
getTimers().addTimer("DISPLAY_SKILL", 3000, npc, player);
break;
}
case "DISPLAY_SKILL":
{
final L2Npc target = world.getNpc(DRAGON_TARGET);
if (target != null)
{
addSkillCastDesire(npc, target, RISE_OF_LATANA, 5000);
}
getTimers().addTimer("LATANA_CAST", 9700, npc, player);
break;
}
case "LATANA_CAST":
{
final L2Npc target = world.getNpc(DRAGON_TARGET);
if (target != null)
{
addSkillCastDesire(npc, target, STUN, 5000);
}
getTimers().addTimer("ATTACK", 11030, npc, player);
break;
}
case "ATTACK":
{
if (npc.calculateDistance(player, false, false) < 100)
{
if (getRandom(100) < 30)
{
addSkillCastDesire(npc, player, ELECTRIC_FLAME, 500000);
}
else
{
addAttackDesire(npc, player);
}
}
else if (getRandomBoolean())
{
addSpawn(npc, LATANA_SKILL_USE, player.getLocation(), false, world.getId());
}
else
{
addSkillCastDesire(npc, player, FIRE_BREATH, 500000);
}
getTimers().addTimer("ATTACK", 6000, npc, player);
break;
}
case "SPAWN_DRAGON_TARGET2":
{
addSpawn(npc, DRAGON_TARGET, 105465, -41817, -1768, 0, false, 0, false, world.getId());
getTimers().addTimer("SOCIAL_ACTION", 3000, npc, player);
break;
}
case "LATANA_ATTACK":
{
addSkillCastDesire(npc, npc, ELECTRIC_FLAME, 50000);
getTimers().addTimer("LATANA_CAST", 3000, npc, player);
break;
}
case "SPAWN_REWARD_NPC":
{
addSpawn(npc, KETRA_ORC_SUPPORTER, npc.getLocation(), false, world.getId());
npc.deleteMe();
break;
}
case "DRAGON_CAMERA_2_1":
{
npc.broadcastPacket(new SpecialCamera(npc, 350, 200, 5, 5600, 15000, 10000, -15, 10, 1, 1, 0));
getTimers().addTimer("DRAGON_CAMERA_2_2", 5600, npc, null);
break;
}
case "DRAGON_CAMERA_2_2":
{
npc.broadcastPacket(new SpecialCamera(npc, 360, 200, 5, 1000, 15000, 2000, -15, 10, 1, 1, 0));
getTimers().addTimer("SUICIDE", 10000, npc, null);
break;
}
}
}
return super.onKill(npc, killer, isSummon);
}
@Override
public String onSpawn(L2Npc npc)
{
npc.setIsImmobilized(true);
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case TELEPORT_TRAP:
{
world.getParameters().set(npc.getParameters().getString("GM_ID"), 1);
getTimers().addTimer("CHECK_FOR_DROP", 2000, npc, null);
break;
}
case DRAGON_TARGET:
{
getTimers().addTimer("SUICIDE", 60000, npc, null);
break;
}
case LATANA_SKILL_USE:
{
final L2Npc latana = world.getNpc(LATANA);
final L2PcInstance player = world.getFirstPlayer();
if ((latana != null) && (player != null) && (latana.calculateDistance(player, false, false) <= 900))
{
addSkillCastDesire(npc, player, STUN, 500000);
}
getTimers().addTimer("SUICIDE", 5000, npc, null);
break;
}
case DRAGON_CAMERA_2:
{
npc.broadcastPacket(new SpecialCamera(npc, 450, 200, 3, 0, 15000, 10000, -15, 20, 1, 1, 1));
getTimers().addTimer("DRAGON_CAMERA_2_1", 100, npc, null);
break;
}
default:
{
if (CommonUtil.contains(WIZARDS, npc.getId()))
{
npc.setInvisible(true);
getTimers().addTimer("LOOK_NEIGHBOR", 1000, npc, null);
}
npc.initSeenCreatures();
}
}
}
return super.onSpawn(npc);
}
@Override
public String onEnterZone(L2Character character, L2ZoneType zone)
private void onCreatureSee(OnCreatureSee event)
{
if (!character.isPlayer() || (character.getInstanceId() == 0))
final L2Character creature = event.getSeen();
final L2Npc npc = (L2Npc) event.getSeer();
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
return super.onEnterZone(character, zone);
if (CommonUtil.contains(WIZARDS, npc.getId()))
{
if (creature.isPlayer() && npc.isScriptValue(0))
{
npc.setScriptValue(1);
getTimers().addTimer("SET_VISIBLE", 1000, npc, creature.getActingPlayer());
}
}
else if ((npc.getId() == LATANA) && !npc.getVariables().getBoolean("creatureSeen", false) && creature.isPlayer())
{
final QuestState qs = creature.getActingPlayer().getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName());
if (qs != null)
{
if (qs.getCond() == 4)
{
getTimers().addTimer("SPAWN_REWARD_NPC", 1000, npc, creature.getActingPlayer());
npc.setScriptValue(1);
}
else
{
playSound(creature.getActingPlayer(), QuestSound.BS08_A);
getTimers().addTimer("SPAWN_DRAGON_TARGET", 1000, npc, creature.getActingPlayer());
getTimers().addTimer("SCE_RATANA_CAMERA_START_1", 10, world.getNpc(DRAGON_CAMERA_1), creature.getActingPlayer());
npc.getVariables().set("creatureSeen", true);
}
}
}
}
final Instance world = character.getInstanceWorld();
if (world.getParameters().getInt("wall_" + zone.getId()) > 0)
}
@Override
public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon, Skill skill)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
character.teleToLocation(ZONES_TELEPORTS.get(zone.getId()));
if (CommonUtil.contains(WARRIORS, npc.getId()) || CommonUtil.contains(WIZARDS, npc.getId()))
{
final int longRangeGuardRate = npc.getParameters().getInt("LongRangeGuardRate", -1);
if ((longRangeGuardRate != -1) && ((skill != null) && !CommonUtil.contains(REJECTED_SKILLS, skill.getId())))
{
if (npc.calculateDistance(attacker, false, false) > 150)
{
if ((npc.getEffectList().getFirstBuffInfoByAbnormalType(AbnormalType.PD_UP_SPECIAL) == null) && (getRandom(100) < longRangeGuardRate))
{
addSkillCastDesire(npc, npc, ULTIMATE_DEFENCE.getSkill(), 1000000000);
}
}
else
{
npc.getEffectList().stopEffects(AbnormalType.PD_UP_SPECIAL);
}
}
if (CommonUtil.contains(WARRIORS, npc.getId()))
{
if (npc.calculateDistance(attacker, false, false) < 40)
{
addAttackPlayerDesire(npc, attacker, 1000);
}
else if (getRandom(100) < 33)
{
final SkillHolder holder = npc.getParameters().getSkillHolder(getRandomBoolean() ? "Skill01_ID" : "Skill02_ID");
if (holder != null)
{
addSkillCastDesire(npc, attacker, holder, 500000);
}
}
}
}
else if ((npc.getId() == LATANA))
{
if (!npc.getVariables().getBoolean("creatureSeen", false))
{
final QuestState qs = attacker.getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName());
if (qs != null)
{
if (qs.getCond() == 4)
{
getTimers().addTimer("SPAWN_REWARD_NPC", 1000, npc, attacker);
npc.setScriptValue(1);
}
else
{
playSound(attacker, QuestSound.BS08_A);
getTimers().addTimer("SPAWN_DRAGON_TARGET2", 1000, npc, attacker);
getTimers().addTimer("SCE_RATANA_CAMERA_START_2", 10, world.getNpc(DRAGON_CAMERA_1), attacker);
npc.getVariables().set("creatureSeen", true);
}
}
}
if ((npc.getCurrentHpPercent() < 30) && npc.isScriptValue(0))
{
addSkillCastDesire(npc, npc, ANGER, 50000000);
npc.setScriptValue(1);
getTimers().addTimer("LATANA_ANGER_RESET", 120000, npc, attacker);
}
}
}
return super.onEnterZone(character, zone);
return super.onAttack(npc, attacker, damage, isSummon, skill);
}
// @formatter:off
@RegisterEvent(EventType.ON_ATTACKABLE_FACTION_CALL)
@RegisterType(ListenerRegisterType.NPC)
@Id({18635,18636,18638,18642,18646,18649,18650,18653,18654,18655,18657})
// @formatter:on
public void onAttackableFactionCall(OnAttackableFactionCall event)
{
final L2Npc npc = event.getNpc();
final L2PcInstance attacker = event.getAttacker();
if (npc.calculateDistance(attacker, false, false) < 40)
{
addAttackPlayerDesire(npc, attacker, 1000);
}
else if (getRandom(100) < 33)
{
final SkillHolder holder = npc.getParameters().getSkillHolder(getRandomBoolean() ? "Skill01_ID" : "Skill02_ID");
if (holder != null)
{
addSkillCastDesire(npc, attacker, holder, 500000);
}
}
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
if (CommonUtil.contains(ANIMALS, npc.getId()))
{
npc.dropItem(killer, getRandomBoolean() ? PAILAKA_INSTANT_SHIELD : QUICK_HEALING_POTION, getRandom(10) + 1);
}
else if (npc.getId() == LATANA)
{
addSpawn(npc, KETRA_ORC_SUPPORTER, 105974, -41794, -1784, 32768, false, 0, false, world.getId());
addSpawn(npc, DRAGON_CAMERA_2, npc.getLocation(), false, world.getId());
}
}
return super.onKill(npc, killer, isSummon);
}
public static void main(String[] args)

View File

@ -0,0 +1,5 @@
<html><body>Ketra Orc Shaman:<br>
I perceive darkness...and chaos... The protector of our race, the great Red Dragon, lies imprisoned and in torment there.<br>
He summons us to return him to his rightful place of glory, but...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32499-05.html">"But what?"</Button>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Ketra Orc Shaman:<br>
You are already a legend to our people! As much as I would crave your help, you have even more important tasks to attend to...<br>
(Only characters level 77 or below may undertake this quest.)</body></html>

View File

@ -0,0 +1,6 @@
<html><body>Ketra Orc Shaman:<br>
The Ketra believe we are children of the Fire Spirit.<br>
We worship the Red Dragon, who wields the strongest fire in all Goddard.<br>
Lately, however, we have felt a darkness flickering within the pure flame. It seem to be growing -- and the fire's power seems to be weakening!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32499-06.html">"Tell me about the darkness."</Button>
</body></html>

View File

@ -0,0 +1,7 @@
<html><body>Ketra Orc Shaman:<br>
It is a darkness without shape or substance.<br>
It came from across the sea, and now spreads its black shadow over our land as well.<br>
The Humans call the source of the darkness "Kamaloka" and shadow it casts "Pailaka." Now even our great protector is helpless before it!<br>
We must summon all our strength to defeat the darkness!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32499-07.html">"Go on."</Button>
</body></html>

View File

@ -0,0 +1,8 @@
<html><body>Ketra Orc Shaman:<br>
Warrior, I ask for your aid!<br>
We are of Ketra descent, so we cannot enter the Shadow of Darkness.<br>
But I believe that an adventurer like you can enter and remove this foul curse from us.<br>
Will you do it?<br>
(This quest takes place in Pailaka. It does not affect the Varka Silenos alliance quest or the Ketra Orc alliance quest.)<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32499-08.html">"Sure."</Button>
</body></html>

View File

@ -0,0 +1,7 @@
<html><body>Ketra Orc Shaman:<br>
Our thanks, warrior! One of the last visions the flames gave me before becoming too weak was that there are others like us in the Shadow World.<br>
They will help you.<br>
When you are prepared, I will send you to the Shadow World, Pailaka!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest PailakaInjuredDragon enterInstance">"No, I can go now."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32499-11.html">"Okay. I will be back soon."</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Ketra Orc Shaman:<br>
Warrior, do you wish to enter the Shadow World, Pailaka?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest PailakaInjuredDragon enterInstance">"Yup!"</Button>
</body></html>

View File

@ -1,4 +1,4 @@
<html><body>Ketra Orc Shaman:<br>
The darkness still exists! Will you enter Pailaka again?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest PailakaInjuredDragon enter">"Yup!"</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest PailakaInjuredDragon reEnterInstance">"Yup!"</Button>
</body></html>

View File

@ -1,3 +1,3 @@
<html><body>Ketra Orc Shaman:<br>
I have faith that you will remove the dark shadow which hides our Great Flame!
Very well, I shall wait here until you are ready.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Ketra Orc Supporter:<br>
Know that, even wounded, the Dragon of Fire is very powerful. To help you slay him and set his spirit free, use this <font color="LEVEL">Spear of Silenos</font>, which we captured from our enemy. Its power has not reached its full potential, but by defeating the Varka Silenos you can obtain items necessary to enhance its power. Use it to destroy our enemy and send Latana's spirit to the World of Fire!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32502-07.html">"Give me some details about the enemy."</Button>
</body></html>

View File

@ -1,9 +1,9 @@
<html><head><body>Ketra Orc Intelligence Officer:<br>
<html><body>Ketra Orc Intelligence Officer:<br>
Dejakar Oroka!<br>
You hold the Spear of Silenos! Your coming was foretold.<br>
But Latana's power is very strong, and the Spear of Silenos is not yet strong enough.<br>
If you have the Scroll of Enchant Weapon made with the blood of Silenos, I will perform a sacred ceremony to enhance the spear!<br>
If you wish, I can also bestow on you some of our tribe's powerful enhancement magic!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon upgrade_weapon">"I want to have my weapon enhanced."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement_page">"Can I get some enhancement magic?"</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon ask_buff">"Can I get some enhancement magic?"</Button>
</body></html>

View File

@ -1,3 +1,3 @@
<html><body>Ketra Orc Intelligence Officer:<br>
You still need an Enchant Scroll. Acquire one by slaying more Silenos!
This spear has already been enhanced to its full potential. It is stronger than any other power in this place!
</body></html>

View File

@ -1,3 +1,3 @@
<html><body>Ketra Orc Intelligence Officer:<br>
This spear has already been enhanced to its full potential. It is stronger than any other power in this place!
You still need an Enchant Scroll. Acquire one by slaying more Silenos!
</body></html>

View File

@ -1,3 +1,16 @@
<html><body>Ketra Orc Intelligence Officer:<br>
The fifth and final enhancement is complete!
We possess several types of enhancement magic. I can grant you <font color="LEVEL">at most 5 spells</font>.<br>
Select them from the list below:<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 0">Haste Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 1">Wind Walk Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 2">Empower Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 3">Acumen Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 4">Concentration Lv6</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 5">Might Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 6">Guidance Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 7">Focus Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 8">Death Whisper Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 9">Berserker Spirit Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 10">Vampiric Rage Lv4</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 11">Blessed Body Lv6</Button>
</body></html>

View File

@ -1,15 +1,3 @@
<html><body>Ketra Orc Intelligence Officer:<br>
Please select the next spell you wish to receive.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 1">Haste Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 2">Wind Walk Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 3">Empower Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 4">Acumen Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 5">Concentration Lv6</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 6">Might Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 7">Guidance Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 8">Focus Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 9">Death Whisper Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 10">Berserker Spirit Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 11">Vampiric Rage Lv4</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 12">Blessed Body Lv6</Button>
The fifth and final enhancement is complete!
</body></html>

View File

@ -1,16 +1,15 @@
<html><body>Ketra Orc Intelligence Officer:<br>
We possess several types of enhancement magic. I can grant you <font color="LEVEL">at most 5 spells</font>.<br>
Select them from the list below:<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 1">Haste Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 2">Wind Walk Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 3">Empower Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 4">Acumen Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 5">Concentration Lv6</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 6">Might Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 7">Guidance Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 8">Focus Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 9">Death Whisper Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 10">Berserker Spirit Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 11">Vampiric Rage Lv4</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 12">Blessed Body Lv6</Button>
Please select the next spell you wish to receive.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 0">Haste Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 1">Wind Walk Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 2">Empower Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 3">Acumen Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 4">Concentration Lv6</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 5">Might Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 6">Guidance Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 7">Focus Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 8">Death Whisper Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 9">Berserker Spirit Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 10">Vampiric Rage Lv4</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon buff 11">Blessed Body Lv6</Button>
</body></html>

View File

@ -1,4 +1,6 @@
<html><body>Ketra Orc Supporter:<br>
Would you return the Spear of Silenos to us, since it is a sacred relic of our people! We will neturally reward you for it.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32512-02.html">"Return the Spear."</Button>
Dejakar Oroka!<br>
Latana used the last flicker of energy to summon me here! My friend, you have earned the gratitude of all the Ketra Orcs.<br>
Would you return the Spear of Silenos to us, since it is a sacred relic of our people! We will naturally reward you for it.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32512-03.html">"Yes, here."</Button>
</body></html>

View File

@ -1,6 +1,5 @@
<html><body>Ketra Orc Supporter:<br>
You have done it!<br>
You have lifted the curse! I no longer feel the taint of darkness upon our Atlar of Fire!<br>
Warrior, I wish you could stay heer with us, but our shaman decrees that you must leave...<br>
Here is a Scroll of Escape that he has prepared for you. Use it to return safely to your world.
</body></html>
What happened here has not affected your world, but it may help you in the future...<br>
Now you must return to where you belong.<br>
Use the Scroll of Escape to leave Pailaka and return to your world!
</body></html>

View File

@ -1,3 +1,6 @@
<html><body>Ketra Orc Supporter:<br>
Use the Scroll of Escape that I gave you to return to your world.
</body></html>
You have done it!<br>
You have lifted the curse! I no longer feel the taint of darkness upon our Altar of Fire!<br>
Warrior, I wish you could stay here with us, but our shaman decrees that you must leave...<br>
Here is a Scroll of Escape that he has prepared for you. Use it to return safely to your world.
</body></html>

View File

@ -16,43 +16,39 @@
*/
package quests.Q00144_PailakaInjuredDragon;
import com.l2jmobius.commons.util.CommonUtil;
import com.l2jmobius.gameserver.instancemanager.InstanceManager;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.holders.ItemHolder;
import com.l2jmobius.gameserver.model.holders.SkillHolder;
import com.l2jmobius.gameserver.model.instancezone.Instance;
import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.quest.State;
import com.l2jmobius.gameserver.model.skills.SkillCaster;
/**
* @author Mathael
* @author Sdw
*/
public class Q00144_PailakaInjuredDragon extends Quest
{
// NPCs
private static final int KETRA_ORC_SHAMAN = 32499;
private static final int KETRA_ORC_SUPPORTER = 32502;
private static final int KETRA_ORC_SUPPORTER_END = 32512;
private static final int KETRA_ORC_INTELLIGENCE_OFFICIER = 32509;
// Monsters
private static final int KETRA_ORC_SUPPORTER_2 = 32512;
private static final int LATANA = 18660;
private static final int[] MONSTERS =
{
18635,
18636,
18642,
18646,
18649,
18650,
18653,
18654,
18655,
18657,
18659
};
// Buffs
// Items
private static final int SPEAR_OF_SILENOS = 13052;
private static final int SPEAR_OF_SILENOS_REINFORCED = 13053;
private static final int SPEAR_OF_SILENOS_COMPLETED = 13054;
private static final int WEAPON_UPGRADE_STAGE_1 = 13056;
private static final int WEAPON_UPGRADE_STAGE_2 = 13057;
private static final int PAILAKA_INSTANT_SHIELD = 13032;
private static final int QUICK_HEALING_POTION = 13033;
private static final int SCROLL_OF_ESCAPE = 736;
private static final ItemHolder PAILAKA_SHIRT = new ItemHolder(13296, 1);
// Skills
private static final SkillHolder[] BUFFS =
{
new SkillHolder(1086, 2),
@ -68,61 +64,56 @@ public class Q00144_PailakaInjuredDragon extends Quest
new SkillHolder(1268, 4),
new SkillHolder(1045, 6),
};
// Quest Items
private static final int SPEAR_OF_SILENOS = 13052;
private static final int SPEAR_OF_SILENOS_REINFORCED = 13053;
private static final int SPEAR_OF_SILENOS_COMPLETED = 13054;
private static final int WEAPON_UPGRADE_STAGE_1 = 13056;
private static final int WEAPON_UPGRADE_STAGE_2 = 13057;
// Usable Quest Items
private static final int SHIELD_POTION = 13032;
private static final int HEAL_POTION = 13033;
// Rewards
private static final long REWARD_EXP = 24570000;
private static final int REWARD_SP = 5896;
private static final int REWARD_PAILAKA_SHIRT = 13296;
private static final int REWARD_ADENA = 798840;
private static final int SCROLL_OF_ESCAPE = 736;
// Misc
private static final int MIN_LEVEL = 73;
private static final int MAX_LEVEL = 77;
private boolean WEAPON_UPGRADE_STAGE_1_DROPED = false;
private boolean WEAPON_UPGRADE_STAGE_2_DROPED = false;
private int BUFF_COUNT = 0;
public Q00144_PailakaInjuredDragon()
{
super(144);
addStartNpc(KETRA_ORC_SHAMAN);
addFirstTalkId(KETRA_ORC_SUPPORTER_END);
addTalkId(KETRA_ORC_SHAMAN, KETRA_ORC_SUPPORTER, KETRA_ORC_INTELLIGENCE_OFFICIER, KETRA_ORC_SUPPORTER_END);
addFirstTalkId(KETRA_ORC_INTELLIGENCE_OFFICIER, KETRA_ORC_SUPPORTER_2);
addTalkId(KETRA_ORC_SHAMAN, KETRA_ORC_SUPPORTER, KETRA_ORC_INTELLIGENCE_OFFICIER);
addKillId(LATANA);
addKillId(MONSTERS);
addCondMinLevel(MIN_LEVEL, "32499-03.html");
addCondMaxLevel(MAX_LEVEL, "32499-04z.html");
registerQuestItems(SPEAR_OF_SILENOS, SPEAR_OF_SILENOS_REINFORCED, SPEAR_OF_SILENOS_COMPLETED, WEAPON_UPGRADE_STAGE_1, WEAPON_UPGRADE_STAGE_2, HEAL_POTION, SHIELD_POTION);
addCondMinLevel(MAX_LEVEL, "32499-04.html");
registerQuestItems(SPEAR_OF_SILENOS, SPEAR_OF_SILENOS_REINFORCED, SPEAR_OF_SILENOS_COMPLETED, WEAPON_UPGRADE_STAGE_1, WEAPON_UPGRADE_STAGE_2, PAILAKA_INSTANT_SHIELD, QUICK_HEALING_POTION);
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
if (npc.getId() == KETRA_ORC_INTELLIGENCE_OFFICIER)
{
return "32509-01.html";
}
else if (npc.getId() == KETRA_ORC_SUPPORTER_2)
{
final QuestState qs = getQuestState(player, false);
if (qs != null)
{
return qs.isCompleted() ? "32512-02.html" : "32512-01.html";
}
}
return null;
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = getNoQuestMsg(player);
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return htmltext;
return null;
}
final String request = event.contains(" ") ? event.substring(0, event.indexOf(" ")) : event;
switch (request)
String htmltext = null;
switch (event)
{
case "32499-04.htm":
case "32499-05.htm":
case "32499-06.htm":
case "32499-08a.html":
case "32499-08.htm":
case "32499-09.htm":
case "32502-01.html":
case "32499-05.html":
case "32499-06.html":
case "32499-07.html":
case "32499-11.html":
case "32502-02.html":
case "32502-03.html":
case "32502-04.html":
@ -131,73 +122,54 @@ public class Q00144_PailakaInjuredDragon extends Quest
htmltext = event;
break;
}
case "32499-07.htm":
{
qs.startQuest();
htmltext = event;
break;
}
case "32502-05.html":
{
if (qs.isCond(2))
{
qs.setCond(3, true);
giveItems(player, SPEAR_OF_SILENOS, 1, true);
giveItems(player, SPEAR_OF_SILENOS, 1);
htmltext = event;
}
break;
}
case "32512-02.html":
case "32499-08.html":
{
final Instance inst = InstanceManager.getInstance().getPlayerInstance(player, true);
if ((inst != null) && qs.isCond(4))
{
takeItems(player, SPEAR_OF_SILENOS_COMPLETED, -1);
rewardItems(player, 57, REWARD_ADENA);
rewardItems(player, REWARD_PAILAKA_SHIRT, 1);
addExpAndSp(player, REWARD_EXP, REWARD_SP);
giveItems(player, SCROLL_OF_ESCAPE, 1); // Not a reward.
qs.exitQuest(false, true);
inst.finishInstance();
htmltext = event;
}
qs.startQuest();
htmltext = event;
break;
}
case "upgrade_weapon":
{
if (qs.isCond(3) || qs.isCond(4))
if (hasQuestItems(player, SPEAR_OF_SILENOS_COMPLETED))
{
if (hasQuestItems(player, SPEAR_OF_SILENOS_COMPLETED))
htmltext = "32509-06.html";
}
else if (hasQuestItems(player, SPEAR_OF_SILENOS))
{
if (hasQuestItems(player, WEAPON_UPGRADE_STAGE_1))
{
htmltext = "32509-06.html";
takeItems(player, SPEAR_OF_SILENOS, -1);
takeItems(player, WEAPON_UPGRADE_STAGE_1, -1);
giveItems(player, SPEAR_OF_SILENOS_REINFORCED, 1, true);
htmltext = "32509-02.html";
}
else if (hasQuestItems(player, SPEAR_OF_SILENOS))
else
{
if (hasQuestItems(player, WEAPON_UPGRADE_STAGE_1))
{
takeItems(player, SPEAR_OF_SILENOS, -1);
takeItems(player, WEAPON_UPGRADE_STAGE_1, -1);
giveItems(player, SPEAR_OF_SILENOS_REINFORCED, 1, true);
htmltext = "32509-02.html";
}
else
{
htmltext = "32509-04.html";
}
htmltext = "32509-05.html";
}
else if (hasQuestItems(player, SPEAR_OF_SILENOS_REINFORCED))
}
else if (hasQuestItems(player, SPEAR_OF_SILENOS_REINFORCED))
{
if (hasQuestItems(player, WEAPON_UPGRADE_STAGE_2))
{
if (hasQuestItems(player, WEAPON_UPGRADE_STAGE_2))
{
takeItems(player, SPEAR_OF_SILENOS_REINFORCED, -1);
takeItems(player, WEAPON_UPGRADE_STAGE_2, -1);
giveItems(player, SPEAR_OF_SILENOS_COMPLETED, 1, true);
htmltext = "32509-08.html";
}
else
{
htmltext = "32509-04.html";
}
takeItems(player, SPEAR_OF_SILENOS_REINFORCED, -1);
takeItems(player, WEAPON_UPGRADE_STAGE_2, -1);
giveItems(player, SPEAR_OF_SILENOS_COMPLETED, 1, true);
htmltext = "32509-08.html";
}
else
{
htmltext = "32509-04.html";
}
}
else
@ -206,141 +178,125 @@ public class Q00144_PailakaInjuredDragon extends Quest
}
break;
}
case "enhancement_page":
case "ask_buff":
{
htmltext = BUFF_COUNT < 5 ? "32509-10.html" : "32509-07.html";
htmltext = npc.isScriptValue(1) ? "32509-07.html" : "32509-08.html";
break;
}
case "enhancement":
case "32512-03.html":
{
if (BUFF_COUNT < 5)
if (qs.isCond(4))
{
final int key = Integer.parseInt(event.substring(request.length() + 1)) - 1;
SkillCaster.triggerCast(npc, player, BUFFS[key].getSkill());
BUFF_COUNT++;
if (BUFF_COUNT < 5)
if (player.getLevel() >= MIN_LEVEL)
{
htmltext = "32509-09.html";
addExpAndSp(player, 24570000, 5896);
giveAdena(player, 798840, true);
giveItems(player, PAILAKA_SHIRT);
giveItems(player, SCROLL_OF_ESCAPE, 1); // Not a reward.
qs.exitQuest(false, true);
htmltext = event;
}
else
{
htmltext = "32509-08.html";
htmltext = getNoQuestLevelRewardMsg(player);
}
final Instance inst = InstanceManager.getInstance().getPlayerInstance(player, true);
if (inst != null)
{
inst.finishInstance();
}
}
break;
}
}
if (event.startsWith("buff"))
{
if (npc.isScriptValue(0))
{
final int currentBuffCount = npc.getVariables().getInt("buff_count");
if (currentBuffCount < 5)
{
final int buffOffset = CommonUtil.constrain(Integer.parseInt(event.substring(event.indexOf(" ") + 1)), 0, BUFFS.length);
npc.setTarget(player);
npc.doCast(BUFFS[buffOffset].getSkill());
npc.getVariables().set("buff_count", currentBuffCount + 1);
htmltext = "32509-10.html";
if ((currentBuffCount + 1) >= 5)
{
htmltext = "32509-09.html";
npc.setScriptValue(1);
}
}
else
{
htmltext = "32509-07.html";
npc.setScriptValue(1);
}
break;
}
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance talker)
public String onTalk(L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(talker, true);
String htmltext = getNoQuestMsg(talker);
final QuestState qs = getQuestState(player, true);
String htmltext = null;
switch (npc.getId())
switch (qs.getState())
{
case KETRA_ORC_SHAMAN:
case State.CREATED:
{
switch (qs.getState())
if (npc.getId() == KETRA_ORC_SHAMAN)
{
case State.CREATED:
htmltext = "32499-01.html";
}
break;
}
case State.STARTED:
{
if (npc.getId() == KETRA_ORC_SHAMAN)
{
if (qs.isCond(1))
{
htmltext = "32499-01.htm";
break;
htmltext = "32499-09.html";
}
case State.COMPLETED:
{
htmltext = "32499-02.html";
break;
}
case State.STARTED:
else
{
htmltext = "32499-10.html";
break;
}
}
break;
}
case KETRA_ORC_SUPPORTER:
{
switch (qs.getCond())
else if (npc.getId() == KETRA_ORC_SUPPORTER)
{
case 3:
{
htmltext = "32502-07.html";
break;
}
case 4:
{
htmltext = "32502-06.html";
break;
}
default:
if (qs.isCond(2))
{
htmltext = "32502-01.html";
break;
}
else
{
htmltext = "32502-06.html";
}
}
break;
}
case KETRA_ORC_INTELLIGENCE_OFFICIER:
case State.COMPLETED:
{
htmltext = !qs.isCond(3) && !qs.isCond(4) ? "32509-01a.html" : "32509-01.html";
htmltext = "32499-02.html";
break;
}
case KETRA_ORC_SUPPORTER_END:
{
htmltext = hasQuestItems(talker, SPEAR_OF_SILENOS_COMPLETED) ? "32512-01.html" : "32512-03.html";
}
}
return htmltext;
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return getNoQuestMsg(player);
}
return qs.getState() == State.COMPLETED ? "32512-03.html" : "32512-01.html";
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final int npcId = npc.getId();
if (npcId != LATANA)
final QuestState qs = getQuestState(killer, false);
if (qs != null)
{
if (!WEAPON_UPGRADE_STAGE_1_DROPED && !hasQuestItems(killer, WEAPON_UPGRADE_STAGE_1) && hasQuestItems(killer, SPEAR_OF_SILENOS))
{
if (getRandom(1, 6) > 2)
{
giveItems(killer, WEAPON_UPGRADE_STAGE_1, 1, true);
WEAPON_UPGRADE_STAGE_1_DROPED = true;
}
}
if (!WEAPON_UPGRADE_STAGE_2_DROPED && !hasQuestItems(killer, WEAPON_UPGRADE_STAGE_2) && hasQuestItems(killer, SPEAR_OF_SILENOS_REINFORCED))
{
if (getRandom(1, 6) > 4)
{
giveItems(killer, WEAPON_UPGRADE_STAGE_2, 1, true);
WEAPON_UPGRADE_STAGE_2_DROPED = true;
}
}
}
else
{
final QuestState qs = getQuestState(killer, false);
if (qs != null)
if (qs.isCond(3) && (npc.calculateDistance(killer, false, false) <= 1500))
{
qs.setCond(4, true);
}

View File

@ -68,6 +68,26 @@
<xs:attribute name="Y" type="xs:integer" use="required" />
</xs:complexType>
</xs:element>
<xs:element name="bannedAreas" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="area" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="node" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute type="xs:int" name="X" use="required" />
<xs:attribute type="xs:int" name="Y" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:int" name="minZ" use="required" />
<xs:attribute type="xs:int" name="maxZ" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="race" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:attribute name="point" type="xs:token" use="required" />
@ -101,7 +121,7 @@
<xs:attribute name="id" type="xs:positiveInteger" />
<xs:attribute name="maxZ" type="xs:integer" use="required" />
<xs:attribute name="minZ" type="xs:integer" use="required" />
<xs:attribute name="name" type="xs:normalizedString" use="required" />
<xs:attribute name="name" type="xs:normalizedString" use="optional" />
<xs:attribute name="rad" type="xs:positiveInteger" />
<xs:attribute name="shape" use="required">
<xs:simpleType>
@ -151,6 +171,7 @@
<xs:enumeration value="WaterZone" />
<xs:enumeration value="SayuneZone" />
<xs:enumeration value="UndyingZone" />
<xs:enumeration value="TeleportZone" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>

View File

@ -0,0 +1,158 @@
<?xml version="1.0" encoding="UTF-8"?>
<list enabled="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/zones.xsd">
<!-- No Restart Zones -->
<zone name="23_16_pailaka_restrict_01" type="TeleportZone" shape="NPoly" minZ="-4048" maxZ="2952"> <!-- 18_23 -->
<stat name="oustX" val="125738" />
<stat name="oustY" val="-40933" />
<stat name="oustZ" val="-3770" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="98811" Y="-34975" />
<node X="130758" Y="-35003" />
<node X="130758" Y="-33299" />
<node X="98811" Y="-33271" />
</zone>
<zone name="23_16_pailaka_restrict_02" type="TeleportZone" shape="NPoly" minZ="-3616" maxZ="3384"> <!-- 21_24 -->
<stat name="oustX" val="125738" />
<stat name="oustY" val="-40933" />
<stat name="oustZ" val="-3770" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="128431" Y="-64174" />
<node X="130329" Y="-64198" />
<node X="130613" Y="-33178" />
<node X="128605" Y="-33061" />
</zone>
<zone name="23_16_pailaka_restrict_03" type="TeleportZone" shape="NPoly" minZ="-3644" maxZ="3356"> <!-- 21_24 -->
<stat name="oustX" val="125738" />
<stat name="oustY" val="-40933" />
<stat name="oustZ" val="-3770" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="99156" Y="-64692" />
<node X="130104" Y="-64748" />
<node X="130064" Y="-63280" />
<node X="99280" Y="-63472" />
</zone>
<zone name="23_16_pailaka_restrict_04" type="TeleportZone" shape="NPoly" minZ="-4048" maxZ="2952"> <!-- 21_24 -->
<stat name="oustX" val="125738" />
<stat name="oustY" val="-40933" />
<stat name="oustZ" val="-3770" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="99036" Y="-64632" />
<node X="100868" Y="-64668" />
<node X="100868" Y="-33268" />
<node X="99036" Y="-33232" />
</zone>
<zone name="23_16_pailaka_telezone_01" type="TeleportZone" shape="NPoly" minZ="-2981" maxZ="-2481"> <!-- 21_24 -->
<stat name="oustX" val="122805" />
<stat name="oustY" val="-45782" />
<stat name="oustZ" val="-3016" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="118216" Y="-46771" />
<node X="122061" Y="-46748" />
<node X="122061" Y="-44615" />
<node X="118216" Y="-44959" />
</zone>
<zone name="23_16_pailaka_telezone_02" type="TeleportZone" shape="NPoly" minZ="-4048" maxZ="2952"> <!-- 21_24 -->
<stat name="oustX" val="118160" />
<stat name="oustY" val="-52645" />
<stat name="oustZ" val="-2508" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="116072" Y="-52080" />
<node X="116660" Y="-52840" />
<node X="118176" Y="-50956" />
<node X="117104" Y="-50792" />
</zone>
<zone name="23_16_pailaka_telezone_03" type="TeleportZone" shape="NPoly" minZ="-2652" maxZ="-1952"> <!-- 21_24 -->
<stat name="oustX" val="117215" />
<stat name="oustY" val="-55906" />
<stat name="oustZ" val="-2399" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="114848" Y="-58218" />
<node X="115692" Y="-58128" />
<node X="116024" Y="-55252" />
<node X="114968" Y="-55216" />
</zone>
<zone name="23_16_pailaka_telezone_04" type="TeleportZone" shape="NPoly" minZ="-2704" maxZ="-2104"> <!-- 21_24 -->
<stat name="oustX" val="118026" />
<stat name="oustY" val="-46424" />
<stat name="oustZ" val="-2544" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="114888" Y="-47128" />
<node X="116052" Y="-47076" />
<node X="116052" Y="-45776" />
<node X="114888" Y="-45828" />
</zone>
<zone name="23_16_pailaka_telezone_05" type="TeleportZone" shape="NPoly" minZ="-2708" maxZ="-2108"> <!-- 21_24 -->
<stat name="oustX" val="116381" />
<stat name="oustY" val="-51189" />
<stat name="oustZ" val="-2624" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="115016" Y="-51012" />
<node X="116764" Y="-49796" />
<node X="115824" Y="-49168" />
<node X="114320" Y="-50436" />
</zone>
<zone name="23_16_pailaka_telezone_06" type="TeleportZone" shape="NPoly" minZ="-2324" maxZ="-1824"> <!-- 21_24 -->
<stat name="oustX" val="108347" />
<stat name="oustY" val="-50558" />
<stat name="oustZ" val="-2360" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="107700" Y="-49920" />
<node X="109616" Y="-49712" />
<node X="109500" Y="-49084" />
<node X="107508" Y="-49184" />
</zone>
<zone name="23_16_pailaka_telezone_07" type="TeleportZone" shape="NPoly" minZ="-2695" maxZ="-2095"> <!-- 21_24 -->
<stat name="oustX" val="112816" />
<stat name="oustY" val="-44040" />
<stat name="oustZ" val="-2755" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="110632" Y="-45140" />
<node X="111476" Y="-44652" />
<node X="111568" Y="-43216" />
<node X="110724" Y="-42856" />
</zone>
<zone name="23_16_pailaka_telezone_08" type="TeleportZone" shape="NPoly" minZ="-2388" maxZ="-1888"> <!-- 21_24 -->
<stat name="oustX" val="108197" />
<stat name="oustY" val="-46679" />
<stat name="oustZ" val="-2092" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="109292" Y="-46528" />
<node X="110180" Y="-45876" />
<node X="109680" Y="-45144" />
<node X="108664" Y="-45496" />
</zone>
<zone name="23_16_pailaka_telezone_09" type="TeleportZone" shape="NPoly" minZ="-1924" maxZ="-1024"> <!-- 21_24 -->
<stat name="oustX" val="110059" />
<stat name="oustY" val="-40650" />
<stat name="oustZ" val="-2141" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="109544" Y="-39720" />
<node X="110708" Y="-39692" />
<node X="110808" Y="-38852" />
<node X="108700" Y="-38796" />
</zone>
<zone name="23_16_pailaka_telezone_10" type="TeleportZone" shape="NPoly" minZ="-2280" maxZ="-1680"> <!-- 21_24 -->
<stat name="oustX" val="109884" />
<stat name="oustY" val="-41358" />
<stat name="oustZ" val="-2327" />
<stat name="instanceId" val="45" />
<stat name="targetClass" val="L2PcInstance" />
<node X="107812" Y="-41728" />
<node X="108616" Y="-41676" />
<node X="108816" Y="-40776" />
<node X="107856" Y="-40652" />
</zone>
</list>

View File

@ -24,6 +24,7 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.OptionalInt;
import java.util.logging.Level;
import java.util.logging.Logger;
@ -487,6 +488,24 @@ public final class ZoneManager implements IGameXmlReader
return null;
}
/**
* Get zone by name.
* @param name the zone name
* @return the zone by name
*/
public L2ZoneType getZoneByName(String name)
{
for (Map<Integer, ? extends L2ZoneType> map : _classZones.values())
{
final Optional<? extends L2ZoneType> zoneType = map.values().stream().filter(z -> (z.getName() != null) && z.getName().equals(name)).findAny();
if (zoneType.isPresent())
{
return zoneType.get();
}
}
return null;
}
/**
* Get zone by ID and zone class.
* @param <T> the generic type
@ -500,6 +519,24 @@ public final class ZoneManager implements IGameXmlReader
return (T) _classZones.get(zoneType).get(id);
}
/**
* Get zone by name.
* @param <T> the generic type
* @param name the zone name
* @param zoneType the zone type
* @return
*/
@SuppressWarnings("unchecked")
public <T extends L2ZoneType> T getZoneByName(String name, Class<T> zoneType)
{
final Optional<? extends L2ZoneType> zone = _classZones.get(zoneType).values().stream().filter(z -> (z.getName() != null) && z.getName().equals(name)).findAny();
if (zone.isPresent())
{
return (T) zone.get();
}
return null;
}
/**
* Returns all zones from where the object is located.
* @param locational the locational

View File

@ -34,6 +34,7 @@ import com.l2jmobius.gameserver.model.events.EventDispatcher;
import com.l2jmobius.gameserver.model.events.ListenersContainer;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureZoneEnter;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureZoneExit;
import com.l2jmobius.gameserver.model.instancezone.Instance;
import com.l2jmobius.gameserver.model.interfaces.ILocational;
import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
@ -47,6 +48,7 @@ public abstract class L2ZoneType extends ListenersContainer
private final int _id;
protected L2ZoneForm _zone;
protected List<L2ZoneForm> _blockedZone;
protected Map<Integer, L2Character> _characterList = new ConcurrentHashMap<>();
/** Parameters to affect specific characters */
@ -61,6 +63,8 @@ public abstract class L2ZoneType extends ListenersContainer
private boolean _allowStore;
protected boolean _enabled;
private AbstractZoneSettings _settings;
private int _instanceTemplateId;
private Map<Integer, Boolean> _enabledInInstance;
protected L2ZoneType(int id)
{
@ -181,6 +185,10 @@ public abstract class L2ZoneType extends ListenersContainer
{
_enabled = Boolean.parseBoolean(value);
}
else if (name.equals("instanceId"))
{
_instanceTemplateId = Integer.parseInt(value);
}
else
{
_log.info(getClass().getSimpleName() + ": Unknown parameter - " + name + " in zone: " + getId());
@ -193,6 +201,24 @@ public abstract class L2ZoneType extends ListenersContainer
*/
private boolean isAffected(L2Character character)
{
// Check instance
final Instance world = character.getInstanceWorld();
if (world != null)
{
if (world.getTemplateId() != getInstanceTemplateId())
{
return false;
}
if (!isEnabled(character.getInstanceId()))
{
return false;
}
}
else if (getInstanceTemplateId() > 0)
{
return false;
}
// Check lvl
if ((character.getLevel() < _minLvl) || (character.getLevel() > _maxLvl))
{
@ -288,6 +314,20 @@ public abstract class L2ZoneType extends ListenersContainer
return _zone;
}
public void setBlockedZones(List<L2ZoneForm> blockedZones)
{
if (_blockedZone != null)
{
throw new IllegalStateException("Blocked zone already set");
}
_blockedZone = blockedZones;
}
public List<L2ZoneForm> getBlockedZones()
{
return _blockedZone;
}
/**
* Set the zone name.
* @param name
@ -306,6 +346,29 @@ public abstract class L2ZoneType extends ListenersContainer
return _name;
}
/**
* Checks if the given coordinates are within the zone, ignores instanceId check
* @param x
* @param y
* @param z
* @return
*/
public boolean isInsideZone(int x, int y, int z)
{
return _zone.isInsideZone(x, y, z) && !isInsideBannedZone(x, y, z);
}
/**
* @param x
* @param y
* @param z
* @return {@code true} if this location is within banned zone boundaries, {@code false} otherwise
*/
public boolean isInsideBannedZone(int x, int y, int z)
{
return (_blockedZone != null) && _blockedZone.stream().allMatch(zone -> !zone.isInsideZone(x, y, z));
}
/**
* Checks if the given coordinates are within zone's plane
* @param x
@ -314,7 +377,7 @@ public abstract class L2ZoneType extends ListenersContainer
*/
public boolean isInsideZone(int x, int y)
{
return _zone.isInsideZone(x, y, _zone.getHighZ());
return isInsideZone(x, y, _zone.getHighZ());
}
/**
@ -324,19 +387,7 @@ public abstract class L2ZoneType extends ListenersContainer
*/
public boolean isInsideZone(ILocational loc)
{
return _zone.isInsideZone(loc.getX(), loc.getY(), loc.getZ());
}
/**
* Checks if the given coordinates are within the zone, ignores instanceId check
* @param x
* @param y
* @param z
* @return
*/
public boolean isInsideZone(int x, int y, int z)
{
return _zone.isInsideZone(x, y, z);
return isInsideZone(loc.getX(), loc.getY(), loc.getZ());
}
/**
@ -361,27 +412,22 @@ public abstract class L2ZoneType extends ListenersContainer
public void revalidateInZone(L2Character character)
{
// If the character can't be affected by this zone return
if (_checkAffected)
{
if (!isAffected(character))
{
return;
}
}
// If the object is inside the zone...
if (isInsideZone(character))
{
// Was the character not yet inside this zone?
if (!_characterList.containsKey(character.getObjectId()))
// If the character can't be affected by this zone return
if (_checkAffected)
{
if (!isAffected(character))
{
return;
}
}
if (_characterList.putIfAbsent(character.getObjectId(), character) == null)
{
// Notify to scripts.
EventDispatcher.getInstance().notifyEventAsync(new OnCreatureZoneEnter(character, this), this);
// Register player.
_characterList.put(character.getObjectId(), character);
// Notify Zone implementation.
onEnter(character);
}
@ -516,6 +562,11 @@ public abstract class L2ZoneType extends ListenersContainer
return _allowStore;
}
public int getInstanceTemplateId()
{
return _instanceTemplateId;
}
@Override
public String toString()
{
@ -537,6 +588,32 @@ public abstract class L2ZoneType extends ListenersContainer
return _enabled;
}
public void setEnabled(boolean state, int instanceId)
{
if (_enabledInInstance == null)
{
synchronized (this)
{
if (_enabledInInstance == null)
{
_enabledInInstance = new ConcurrentHashMap<>();
}
}
}
_enabledInInstance.put(instanceId, state);
}
public boolean isEnabled(int instanceId)
{
if (_enabledInInstance != null)
{
return _enabledInInstance.getOrDefault(instanceId, isEnabled());
}
return isEnabled();
}
public void oustAllPlayers()
{
//@formatter:off

View File

@ -45,7 +45,6 @@ public class L2OlympiadStadiumZone extends L2ZoneRespawn
private final List<L2DoorInstance> _doors = new ArrayList<>(2);
private final List<L2Spawn> _buffers = new ArrayList<>(2);
private final List<Location> _spectatorLocations = new ArrayList<>(1);
private int _instanceTemplate = 0;
public L2OlympiadStadiumZone(int id)
{
@ -102,19 +101,6 @@ public class L2OlympiadStadiumZone extends L2ZoneRespawn
}
}
@Override
public void setParameter(String name, String value)
{
if (name.equals("instanceTemplate"))
{
_instanceTemplate = Integer.parseInt(value);
}
else
{
super.setParameter(name, value);
}
}
public final void registerTask(OlympiadGameTask task)
{
getSettings().setTask(task);
@ -211,13 +197,4 @@ public class L2OlympiadStadiumZone extends L2ZoneRespawn
{
return _spectatorLocations;
}
/**
* Returns zone instanceTemplate
* @return
*/
public int getInstanceTemplateId()
{
return _instanceTemplate;
}
}

View File

@ -0,0 +1,74 @@
/*
* 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 com.l2jmobius.gameserver.model.zone.type;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.zone.L2ZoneType;
/**
* @author Sdw
*/
public class L2TeleportZone extends L2ZoneType
{
private int _x = -1;
private int _y = -1;
private int _z = -1;
public L2TeleportZone(int id)
{
super(id);
}
@Override
public void setParameter(String name, String value)
{
switch (name)
{
case "oustX":
{
_x = Integer.parseInt(value);
break;
}
case "oustY":
{
_y = Integer.parseInt(value);
break;
}
case "oustZ":
{
_z = Integer.parseInt(value);
break;
}
default:
{
super.setParameter(name, value);
}
}
}
@Override
protected void onEnter(L2Character character)
{
character.teleToLocation(new Location(_x, _y, _z));
}
@Override
protected void onExit(L2Character character)
{
}
}

View File

@ -1,129 +1,524 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="45" name="Pailaka (Injured dragon)" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/instance.xsd">
<!-- Pailaka Injured Dragon -->
<instance id="45" name="Pailaka (Injured dragon)" maxWorlds="100" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/instance.xsd">
<time duration="90" empty="3" />
<locations>
<enter type="FIXED">
<location x="125757" y="-40928" z="-3736" />
<location x="125738" y="-40933" z="-3770" />
</enter>
<exit type="ORIGIN" />
</locations>
<conditions>
<condition type="Level">
<param name="min" value="73" />
<param name="max" value="77" />
</condition>
<condition type="Quest">
<param name="id" value="144" />
</condition>
</conditions>
<spawnlist>
<group name="general">
<npc id="32502" x="125524" y="-40946" z="-3718" heading="8279" />
<npc id="32509" x="110074" y="-41324" z="-2285" heading="33580" />
<npc id="32509" x="113745" y="-47565" z="-2593" heading="55710" />
<npc id="18660" x="105618" y="-41801" z="-1782" heading="34701" /> <!-- Latana -->
<group name="pailaka_2316_1m1">
<territories>
<territory name="pailaka_2316_1" minZ="-3000" maxZ="-2700">
<node x="121312" y="-46106" />
<node x="122368" y="-46174" />
<node x="122368" y="-45526" />
<node x="121296" y="-45474" />
</territory>
</territories>
<npc id="18635" x="122122" y="-45658" z="-2884" count="1" /> <!-- Varka Silenos Recruit -->
<npc id="18636" x="122130" y="-45754" z="-2884" count="1" /> <!-- Varka Silenos Footman -->
<npc id="18642" x="122134" y="-45862" z="-2884" count="1" /> <!-- Varka Silenos Warrior -->
<npc id="18636" x="122130" y="-45958" z="-2880" count="1" /> <!-- Varka Silenos Footman -->
<npc id="18635" x="122122" y="-46042" z="-2880" count="1" /> <!-- Varka Silenos Recruit -->
</group>
<group name="wall_200001" spawnByDefault="false">
<npc id="18635" x="122077" y="-46098" z="-2914" heading="5028" />
<npc id="18636" x="122023" y="-45769" z="-2910" heading="63593" />
<npc id="18642" x="122038" y="-45904" z="-2914" heading="771" />
<npc id="18636" x="122050" y="-45999" z="-2910" heading="1701" />
<npc id="18635" x="122019" y="-45634" z="-2908" heading="64841" />
<group name="pailaka_2316_1m2">
<territories>
<territory name="pailaka_2316_1" minZ="-3000" maxZ="-2700">
<node x="121312" y="-46106" />
<node x="122368" y="-46174" />
<node x="122368" y="-45526" />
<node x="121296" y="-45474" />
</territory>
</territories>
<npc id="18640" x="121900" y="-45774" z="-2876" count="1" /> <!-- Varka Silenos Shaman -->
<npc id="18641" x="121898" y="-45904" z="-2875" count="1" /> <!-- Varka Silenos Priest -->
<npc id="18663" x="121898" y="-45904" z="-2875" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_01" />
<param name="GM_ID" value="2316001" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_1m1" />
</parameters>
</npc>
</group>
<group name="wall_200001_add" spawnByDefault="false">
<npc id="18640" x="121931" y="-45844" z="-2902" heading="664" /> <!-- Varka Silenos Shaman -->
<group name="pailaka_2316_2m1">
<territories>
<territory name="pailaka_2316_2" minZ="-2648" maxZ="-2148">
<node x="116604" y="-51752" />
<node x="117320" y="-52676" />
<node x="117944" y="-51812" />
<node x="117056" y="-51204" />
</territory>
</territories>
<npc id="18635" x="117460" y="-51832" z="-2528" heading="57343" count="1" /> <!-- Varka Silenos Recruit -->
<npc id="18636" x="117396" y="-51928" z="-2520" heading="57343" count="1" /> <!-- Varka Silenos Footman -->
<npc id="18642" x="117328" y="-52020" z="-2528" heading="57343" count="1" /> <!-- Varka Silenos Warrior -->
<npc id="18636" x="117252" y="-52104" z="-2528" heading="57343" count="1" /> <!-- Varka Silenos Footman -->
<npc id="18635" x="117180" y="-52180" z="-2528" heading="57343" count="1" /> <!-- Varka Silenos Recruit -->
</group>
<group name="wall_200002" spawnByDefault="false">
<npc id="18653" x="115997" y="-46271" z="-2637" heading="63732" />
<npc id="18654" x="116056" y="-46341" z="-2630" heading="63791" />
<npc id="18646" x="116054" y="-46439" z="-2637" heading="63477" />
<npc id="18646" x="116057" y="-46521" z="-2644" heading="65025" />
<npc id="18654" x="116084" y="-46587" z="-2651" heading="1141" />
<npc id="18653" x="116063" y="-46680" z="-2658" heading="4323" />
<group name="pailaka_2316_2m2">
<territories>
<territory name="pailaka_2316_2" minZ="-2648" maxZ="-2148">
<node x="116604" y="-51752" />
<node x="117320" y="-52676" />
<node x="117944" y="-51812" />
<node x="117056" y="-51204" />
</territory>
</territories>
<npc id="18640" x="117196" y="-51832" z="-2560" heading="57344" count="1" /> <!-- Varka Silenos Shaman -->
<npc id="18641" x="117088" y="-51948" z="-2544" heading="57344" count="1" /> <!-- Varka Silenos Priest -->
<npc id="18663" x="117088" y="-51948" z="-2544" heading="57344" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_02" />
<param name="GM_ID" value="2316002" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_2m1" />
</parameters>
</npc>
</group>
<group name="wall_200002_add" spawnByDefault="false">
<npc id="18648" x="115989" y="-46537" z="-2641" heading="1087" />
<npc id="18652" x="115984" y="-46471" z="-2635" heading="0" />
<group name="pailaka_2316_3m1">
<territories>
<territory name="pailaka_2316_3" minZ="-2680" maxZ="-2180">
<node x="115340" y="-56344" />
<node x="116404" y="-56356" />
<node x="116516" y="-55524" />
<node x="115460" y="-55488" />
</territory>
</territories>
<npc id="18635" x="116024" y="-55796" z="-2512" count="1" /> <!-- Varka Silenos Recruit -->
<npc id="18636" x="116016" y="-55888" z="-2527" count="1" /> <!-- Varka Silenos Footman -->
<npc id="18642" x="116000" y="-55992" z="-2528" count="1" /> <!-- Varka Silenos Warrior -->
<npc id="18636" x="115984" y="-56092" z="-2512" count="1" /> <!-- Varka Silenos Footman -->
<npc id="18635" x="115968" y="-56176" z="-2493" count="1" /> <!-- Varka Silenos Recruit -->
</group>
<group name="wall_200003" spawnByDefault="false">
<npc id="18653" x="116213" y="-50301" z="-2622" heading="50611" />
<npc id="18654" x="116155" y="-50420" z="-2635" heading="53262" />
<npc id="18646" x="116075" y="-50463" z="-2642" heading="53954" />
<npc id="18646" x="116020" y="-50497" z="-2643" heading="55751" />
<npc id="18654" x="115952" y="-50528" z="-2646" heading="52507" />
<npc id="18653" x="115780" y="-50465" z="-2620" heading="52135" />
<group name="pailaka_2316_3m2">
<territories>
<territory name="pailaka_2316_3" minZ="-2680" maxZ="-2180">
<node x="115340" y="-56344" />
<node x="116404" y="-56356" />
<node x="116516" y="-55524" />
<node x="115460" y="-55488" />
</territory>
</territories>
<npc id="18640" x="115755" y="-55866" z="-2579" count="1" /> <!-- Varka Silenos Shaman -->
<npc id="18641" x="115760" y="-56025" z="-2569" count="1" /> <!-- Varka Silenos Priest -->
<npc id="18663" x="115760" y="-56025" z="-2569" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_03" />
<param name="GM_ID" value="2316003" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_3m1" />
</parameters>
</npc>
</group>
<group name="wall_200003_add" spawnByDefault="false">
<npc id="18648" x="116065" y="-50355" z="-2639" heading="53280" />
<npc id="18652" x="115988" y="-50389" z="-2641" heading="52342" />
<npc id="18648" x="115906" y="-50447" z="-2643" heading="54768" />
<group name="pailaka_2316_4m1">
<territories>
<territory name="pailaka_2316_4" minZ="-2704" maxZ="-2104">
<node x="114708" y="-46884" />
<node x="116404" y="-46820" />
<node x="116404" y="-46032" />
<node x="114708" y="-46096" />
</territory>
</territories>
<npc id="18653" x="116150" y="-46307" z="-2614" count="1" /> <!-- Varka's Elite Escort -->
<npc id="18654" x="116151" y="-46369" z="-2622" count="1" /> <!-- Varka's Commander -->
<npc id="18646" x="116153" y="-46431" z="-2623" count="1" /> <!-- Varka Silenos Sergeant -->
<npc id="18646" x="116152" y="-46491" z="-2631" count="1" /> <!-- Varka Silenos Sergeant -->
<npc id="18654" x="116147" y="-46552" z="-2635" count="1" /> <!-- Varka's Commander -->
<npc id="18653" x="116144" y="-46608" z="-2640" count="1" /> <!-- Varka's Elite Escort -->
</group>
<group name="wall_200004">
<npc id="18635" x="117184" y="-51722" z="-2575" heading="55468" />
<npc id="18636" x="117097" y="-51774" z="-2577" heading="51453" />
<npc id="18642" x="117013" y="-51840" z="-2578" heading="55135" />
<npc id="18636" x="116926" y="-51876" z="-2580" heading="56322" />
<npc id="18635" x="116876" y="-51937" z="-2572" heading="59301" />
<group name="pailaka_2316_4m2">
<territories>
<territory name="pailaka_2316_4" minZ="-2704" maxZ="-2104">
<node x="114708" y="-46884" />
<node x="116404" y="-46820" />
<node x="116404" y="-46032" />
<node x="114708" y="-46096" />
</territory>
</territories>
<npc id="18645" x="115947" y="-46458" z="-2617" count="1" /> <!-- Varka Silenos Magus -->
<npc id="18644" x="115911" y="-46378" z="-2623" count="1" /> <!-- Varka Silenos Medium -->
<npc id="18648" x="115916" y="-46525" z="-2608" count="1" /> <!-- Varka Silenos Chief Priest -->
<npc id="18663" x="115916" y="-46525" z="-2608" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_04" />
<param name="GM_ID" value="2316004" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_4m1" />
</parameters>
</npc>
</group>
<group name="wall_200004_add" spawnByDefault="false">
<npc id="18648" x="117060" y="-51674" z="-2580" heading="57161" />
<npc id="18648" x="116918" y="-51781" z="-2582" heading="57343" />
<group name="pailaka_2316_5m1">
<territories>
<territory name="pailaka_2316_5" minZ="-2684" maxZ="-2184">
<node x="115756" y="-50960" />
<node x="116448" y="-50512" />
<node x="115760" y="-49552" />
<node x="114896" y="-50368" />
</territory>
</territories>
<npc id="18653" x="116163" y="-50317" z="-2612" heading="53247" count="1" /> <!-- Varka's Elite Escort -->
<npc id="18654" x="116104" y="-50357" z="-2620" heading="53247" count="1" /> <!-- Varka's Commander -->
<npc id="18646" x="116048" y="-50397" z="-2622" heading="53247" count="1" /> <!-- Varka Silenos Sergeant -->
<npc id="18646" x="115993" y="-50439" z="-2624" heading="53247" count="1" /> <!-- Varka Silenos Sergeant -->
<npc id="18654" x="115932" y="-50481" z="-2627" heading="53247" count="1" /> <!-- Varka's Commander -->
<npc id="18653" x="115869" y="-50505" z="-2609" heading="53247" count="1" /> <!-- Varka's Elite Escort -->
</group>
<group name="wall_200005" spawnByDefault="false">
<npc id="18649" x="111606" y="-43746" z="-2633" heading="62267" />
<npc id="18650" x="111602" y="-43846" z="-2638" heading="63427" />
<npc id="18649" x="111616" y="-43922" z="-2635" heading="60699" />
<npc id="18650" x="111618" y="-44003" z="-2637" heading="59709" />
<npc id="18649" x="111614" y="-44071" z="-2642" heading="63794" />
<npc id="18650" x="111619" y="-44129" z="-2650" heading="2365" />
<group name="pailaka_2316_5m2">
<territories>
<territory name="pailaka_2316_5" minZ="-2684" maxZ="-2184">
<node x="115756" y="-50960" />
<node x="116448" y="-50512" />
<node x="115760" y="-49552" />
<node x="114896" y="-50368" />
</territory>
</territories>
<npc id="18645" x="116054" y="-50230" z="-2618" heading="53247" count="1" /> <!-- Varka Silenos Magus -->
<npc id="18644" x="115944" y="-50297" z="-2624" heading="53247" count="1" /> <!-- Varka Silenos Medium -->
<npc id="18648" x="115837" y="-50357" z="-2624" heading="53247" count="1" /> <!-- Varka Silenos Chief Priest -->
<npc id="18663" x="115837" y="-50357" z="-2624" heading="53247" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_05" />
<param name="GM_ID" value="2316005" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_5m1" />
</parameters>
</npc>
</group>
<group name="wall_200005_add" spawnByDefault="false">
<npc id="18652" x="111499" y="-43867" z="-2619" heading="1338" />
<npc id="18648" x="111539" y="-43743" z="-2623" heading="62952" />
<npc id="18648" x="111522" y="-43965" z="-2616" heading="63399" />
<npc id="18652" x="111514" y="-44085" z="-2625" heading="379" />
<group name="pailaka_2316_6m1">
<territories>
<territory name="pailaka_2316_6" minZ="-2360" maxZ="-1960">
<node x="108020" y="-50088" />
<node x="108940" y="-50004" />
<node x="108872" y="-49284" />
<node x="107924" y="-49328" />
</territory>
</territories>
<npc id="18653" x="108622" y="-49901" z="-2169" heading="49151" count="1" /> <!-- Varka's Elite Escort -->
<npc id="18654" x="108510" y="-49908" z="-2200" heading="49151" count="1" /> <!-- Varka's Commander -->
<npc id="18646" x="108398" y="-49916" z="-2229" heading="49151" count="1" /> <!-- Varka Silenos Sergeant -->
<npc id="18646" x="108296" y="-49937" z="-2242" heading="49151" count="1" /> <!-- Varka Silenos Sergeant -->
<npc id="18654" x="108185" y="-49947" z="-2261" heading="49151" count="1" /> <!-- Varka's Commander -->
<npc id="18653" x="108078" y="-49950" z="-2268" heading="49151" count="1" /> <!-- Varka's Elite Escort -->
</group>
<group name="wall_200006" spawnByDefault="false">
<npc id="18657" x="109272" y="-45665" z="-2210" heading="4731" />
<npc id="18655" x="109326" y="-45781" z="-2235" heading="5945" />
<npc id="18657" x="109393" y="-45893" z="-2253" heading="5549" />
<npc id="18655" x="109458" y="-45980" z="-2263" heading="6915" />
<npc id="18657" x="109516" y="-46032" z="-2268" heading="4362" />
<npc id="18655" x="109584" y="-46100" z="-2263" heading="9356" />
<group name="pailaka_2316_6m2">
<territories>
<territory name="pailaka_2316_6" minZ="-2360" maxZ="-1960">
<node x="108020" y="-50088" />
<node x="108940" y="-50004" />
<node x="108872" y="-49284" />
<node x="107924" y="-49328" />
</territory>
</territories>
<npc id="18645" x="108514" y="-49748" z="-2175" heading="45055" count="1" /> <!-- Varka Silenos Magus -->
<npc id="18644" x="108322" y="-49726" z="-2214" heading="49151" count="1" /> <!-- Varka Silenos Medium -->
<npc id="18648" x="108149" y="-49766" z="-2243" heading="53247" count="1" /> <!-- Varka Silenos Chief Priest -->
<npc id="18663" x="108149" y="-49766" z="-2243" heading="53247" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_06" />
<param name="GM_ID" value="2316006" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_6m1" />
</parameters>
</npc>
</group>
<group name="wall_200006_add" spawnByDefault="false">
<npc id="18652" x="109442" y="-46077" z="-2256" heading="8191" />
<npc id="18648" x="109298" y="-45890" z="-2232" heading="7391" />
<npc id="18652" x="109373" y="-45985" z="-2250" heading="7882" />
<group name="pailaka_2316_7m1">
<territories>
<territory name="pailaka_2316_7" minZ="-2745" maxZ="-2345">
<node x="110628" y="-44180" />
<node x="111680" y="-44220" />
<node x="111740" y="-43532" />
<node x="110700" y="-43484" />
</territory>
</territories>
<npc id="18649" x="111552" y="-43594" z="-2629" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="111549" y="-43688" z="-2616" count="1" /> <!-- Varka Silenos Officer -->
<npc id="18649" x="111545" y="-43776" z="-2611" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="111540" y="-43868" z="-2610" count="1" /> <!-- Varka Silenos Officer -->
<npc id="18649" x="111536" y="-43952" z="-2606" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="111533" y="-44038" z="-2608" count="1" /> <!-- Varka Silenos Officer -->
</group>
<group name="wall_200007">
<npc id="18653" x="116432" y="-55729" z="-2441" heading="65250" />
<npc id="18654" x="116499" y="-55822" z="-2449" heading="63477" />
<npc id="18646" x="116503" y="-55918" z="-2449" heading="589" />
<npc id="18646" x="116490" y="-56022" z="-2445" heading="61772" />
<npc id="18654" x="116481" y="-56108" z="-2437" heading="62531" />
<npc id="18653" x="116433" y="-56194" z="-2432" heading="927" />
<group name="pailaka_2316_7m2">
<territories>
<territory name="pailaka_2316_7" minZ="-2745" maxZ="-2345">
<node x="110628" y="-44180" />
<node x="111680" y="-44220" />
<node x="111740" y="-43532" />
<node x="110700" y="-43484" />
</territory>
</territories>
<npc id="18652" x="111360" y="-43664" z="-2592" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18648" x="111360" y="-43744" z="-2576" count="1" /> <!-- Varka Silenos Chief Priest -->
<npc id="18652" x="111344" y="-43824" z="-2576" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18648" x="111347" y="-43905" z="-2576" count="1" /> <!-- Varka Silenos Chief Priest -->
<npc id="18652" x="111344" y="-43984" z="-2576" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18663" x="111344" y="-43984" z="-2576" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_07" />
<param name="GM_ID" value="2316007" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_7m1" />
</parameters>
</npc>
</group>
<group name="wall_200007_add" spawnByDefault="false">
<npc id="18648" x="116348" y="-56103" z="-2460" heading="63868" />
<npc id="18652" x="116394" y="-55968" z="-2465" heading="2634" />
<npc id="18648" x="116398" y="-55821" z="-2464" heading="664" />
<group name="pailaka_2316_8m1">
<territories>
<territory name="pailaka_2316_8" minZ="-2376" maxZ="-1976">
<node x="109092" y="-46644" />
<node x="109916" y="-45888" />
<node x="109580" y="-45208" />
<node x="108612" y="-45880" />
</territory>
</territories>
<npc id="18649" x="109081" y="-46337" z="-2176" heading="36864" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="109048" y="-46280" z="-2176" heading="36864" count="1" /> <!-- Varka Silenos Officer -->
<npc id="18649" x="109015" y="-46222" z="-2160" heading="36864" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="108984" y="-46168" z="-2160" heading="36864" count="1" /> <!-- Varka Silenos Officer -->
<npc id="18649" x="108951" y="-46120" z="-2144" heading="36864" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="108916" y="-46068" z="-2144" heading="36864" count="1" /> <!-- Varka Silenos Officer -->
</group>
<group name="wall_200008" spawnByDefault="false">
<npc id="18655" x="108892" y="-41031" z="-2204" heading="64381" />
<npc id="18657" x="108888" y="-41114" z="-2195" heading="64256" />
<npc id="18655" x="108886" y="-41185" z="-2196" heading="64884" />
<npc id="18657" x="108878" y="-41260" z="-2188" heading="64876" />
<npc id="18655" x="108862" y="-41323" z="-2174" heading="62422" />
<npc id="18657" x="108869" y="-41376" z="-2163" heading="2280" />
<npc id="18655" x="108877" y="-41436" z="-2144" heading="64321" />
<group name="pailaka_2316_8m2">
<territories>
<territory name="pailaka_2316_8" minZ="-2376" maxZ="-1976">
<node x="109092" y="-46644" />
<node x="109916" y="-45888" />
<node x="109580" y="-45208" />
<node x="108612" y="-45880" />
</territory>
</territories>
<npc id="18652" x="109203" y="-46244" z="-2190" heading="36863" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18648" x="109169" y="-46186" z="-2190" heading="36863" count="1" /> <!-- Varka Silenos Chief Priest -->
<npc id="18652" x="109134" y="-46127" z="-2174" heading="36863" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18648" x="109094" y="-46071" z="-2174" heading="36863" count="1" /> <!-- Varka Silenos Chief Priest -->
<npc id="18652" x="109058" y="-46013" z="-2158" heading="36863" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18663" x="109058" y="-46013" z="-2158" heading="36863" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_08" />
<param name="GM_ID" value="2316008" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_8m1" />
</parameters>
</npc>
</group>
<group name="wall_200008_add" spawnByDefault="false">
<npc id="18652" x="108797" y="-41101" z="-2176" heading="62980" />
<npc id="18652" x="108819" y="-41198" z="-2183" heading="0" />
<npc id="18652" x="108811" y="-41293" z="-2170" heading="473" />
<group name="pailaka_2316_9m1">
<territories>
<territory name="pailaka_2316_9" minZ="-1924" maxZ="-1424">
<node x="109752" y="-39880" />
<node x="110416" y="-39860" />
<node x="110348" y="-39020" />
<node x="109716" y="-38908" />
</territory>
</territories>
<npc id="18650" x="110224" y="-39828" z="-1808" heading="49152" count="1" /> <!-- Varka Silenos Officer -->
<npc id="18649" x="110144" y="-39840" z="-1840" heading="49152" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="110064" y="-39844" z="-1840" heading="49152" count="1" /> <!-- Varka Silenos Officer -->
<npc id="18649" x="109978" y="-39848" z="-1840" heading="49152" count="1" /> <!-- Varka Silenos Great Magus -->
<npc id="18650" x="109892" y="-39847" z="-1824" heading="49152" count="1" /> <!-- Varka Silenos Officer -->
</group>
<group name="wall_200009">
<npc id="18650" x="110205" y="-39800" z="-1840" heading="46882" />
<npc id="18649" x="110110" y="-39799" z="-1850" heading="46038" />
<npc id="18659" x="110023" y="-39802" z="-1852" heading="48655" />
<npc id="18649" x="109955" y="-39811" z="-1855" heading="48647" />
<npc id="18650" x="109874" y="-39833" z="-1837" heading="48408" />
<group name="pailaka_2316_9m2">
<territories>
<territory name="pailaka_2316_9" minZ="-1924" maxZ="-1424">
<node x="109752" y="-39880" />
<node x="110416" y="-39860" />
<node x="110348" y="-39020" />
<node x="109716" y="-38908" />
</territory>
</territories>
<npc id="18652" x="110143" y="-39645" z="-1776" heading="49152" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18652" x="110048" y="-39648" z="-1776" heading="49152" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18652" x="109950" y="-39646" z="-1776" heading="49152" count="1" /> <!-- Varka Silenos Grand Priest -->
<npc id="18663" x="109950" y="-39646" z="-1776" heading="49152" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_09" />
<param name="GM_ID" value="2316009" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_9m1" />
</parameters>
</npc>
</group>
<group name="wall_200009_add" spawnByDefault="false">
<npc id="18652" x="109965" y="-39685" z="-1815" heading="48384" />
<npc id="18652" x="110087" y="-39710" z="-1827" heading="48270" />
<group name="pailaka_2316_10m1">
<territories>
<territory name="pailaka_2316_10" minZ="-2272" maxZ="-1772">
<node x="108388" y="-41460" />
<node x="108912" y="-41460" />
<node x="109048" y="-41020" />
<node x="108432" y="-40848" />
</territory>
</territories>
<npc id="18655" x="108917" y="-41028" z="-2188" count="1" /> <!-- Varka's Chief Escort -->
<npc id="18657" x="108912" y="-41089" z="-2180" count="1" /> <!-- Prophet's Royal Guard -->
<npc id="18655" x="108901" y="-41147" z="-2181" count="1" /> <!-- Varka's Chief Escort -->
<npc id="18657" x="108894" y="-41207" z="-2182" count="1" /> <!-- Prophet's Royal Guard -->
<npc id="18655" x="108885" y="-41267" z="-2170" count="1" /> <!-- Varka's Chief Escort -->
<npc id="18657" x="108868" y="-41320" z="-2157" count="1" /> <!-- Prophet's Royal Guard -->
<npc id="18655" x="108894" y="-41379" z="-2144" count="1" /> <!-- Varka's Chief Escort -->
</group>
<group name="pailaka_2316_10m2">
<territories>
<territory name="pailaka_2316_10" minZ="-2272" maxZ="-1772">
<node x="108388" y="-41460" />
<node x="108912" y="-41460" />
<node x="109048" y="-41020" />
<node x="108432" y="-40848" />
</territory>
</territories>
<npc id="18656" x="108676" y="-41069" z="-2137" count="1" /> <!-- Varka's Chief Magus -->
<npc id="18658" x="108669" y="-41136" z="-2133" count="1" /> <!-- Prophet's Disciple -->
<npc id="18659" x="108665" y="-41207" z="-2131" count="1" /> <!-- Varka's Prophet -->
<npc id="18658" x="108653" y="-41273" z="-2119" count="1" /> <!-- Prophet's Disciple -->
<npc id="18663" x="108653" y="-41273" z="-2119" count="1"> <!-- -->
<parameters>
<param name="AreaName" value="23_16_pailaka_telezone_10" />
<param name="GM_ID" value="2316010" />
<!-- Custom param to avoid maker -->
<param name="control_maker" value="pailaka_2316_10m1" />
</parameters>
</npc>
</group>
<group name="pailaka_2316_bossm1">
<territories>
<territory name="pailaka_2316_boss" minZ="-1960" maxZ="-1360">
<node x="105320" y="-43124" />
<node x="107304" y="-42412" />
<node x="107352" y="-40940" />
<node x="105028" y="-41188" />
</territory>
</territories>
<npc id="18660" x="105785" y="-41785" z="-1810" heading="32768" count="1" /> <!-- Latana -->
<npc id="18603" x="105974" y="-41794" z="-1784" heading="32768" count="1" /> <!-- -->
</group>
<group name="pailaka_2316_animal_1m1">
<territories>
<territory name="pailaka_2316_animal_1" minZ="-3416" maxZ="-2816">
<node x="121076" y="-43420" />
<node x="124120" y="-43760" />
<node x="123704" y="-41368" />
<node x="120276" y="-41568" />
</territory>
</territories>
<npc id="18637" count="5" /> <!-- Grazing Antelope -->
</group>
<group name="pailaka_2316_animal_2m1">
<territories>
<territory name="pailaka_2316_animal_2" minZ="-2680" maxZ="-2080">
<node x="123792" y="-53020" />
<node x="126076" y="-50516" />
<node x="124300" y="-49584" />
<node x="122536" y="-51908" />
</territory>
</territories>
<npc id="18637" count="4" /> <!-- Grazing Antelope -->
</group>
<group name="pailaka_2316_animal_3m1">
<territories>
<territory name="pailaka_2316_animal_3" minZ="-2464" maxZ="-1664">
<node x="119348" y="-56704" />
<node x="122056" y="-56624" />
<node x="122040" y="-53536" />
<node x="118812" y="-54188" />
</territory>
</territories>
<npc id="18643" count="3" /> <!-- Grazing Antelope -->
</group>
<group name="pailaka_2316_animal_4m1">
<territories>
<territory name="pailaka_2316_animal_4" minZ="-3004" maxZ="-2404">
<node x="110524" y="-56436" />
<node x="112908" y="-56756" />
<node x="113144" y="-54140" />
<node x="110428" y="-53384" />
</territory>
</territories>
<npc id="18647" count="5" /> <!-- Grazing Flava -->
</group>
<group name="pailaka_2316_animal_5m1">
<territories>
<territory name="pailaka_2316_animal_5" minZ="-2676" maxZ="-2076">
<node x="107688" y="-55456" />
<node x="109016" y="-55748" />
<node x="108976" y="-51696" />
<node x="107800" y="-51872" />
</territory>
</territories>
<npc id="18647" count="5" /> <!-- Grazing Flava -->
</group>
<group name="pailaka_2316_animal_6m1">
<territories>
<territory name="pailaka_2316_animal_6" minZ="-2620" maxZ="-2020">
<node x="114232" y="-40504" />
<node x="115736" y="-40892" />
<node x="116260" y="-38364" />
<node x="114140" y="-38540" />
</territory>
</territories>
<npc id="18651" count="5" /> <!-- Grazing Elder Antelope -->
</group>
<group name="pailaka_2316_animal_7m1">
<territories>
<territory name="pailaka_2316_animal_7" minZ="-1292" maxZ="-592">
<node x="108865" y="-36896" />
<node x="110601" y="-37196" />
<node x="109833" y="-35720" />
<node x="108521" y="-35800" />
</territory>
</territories>
<npc id="18651" count="5" /> <!-- Grazing Elder Antelope -->
</group>
<group name="pailaka_2316_npc_1m1">
<territories>
<territory name="pailaka_2316_npc_1" minZ="-3780" maxZ="-3580">
<node x="125436" y="-41028" />
<node x="125636" y="-41028" />
<node x="125636" y="-40828" />
<node x="125436" y="-40828" />
</territory>
</territories>
<npc id="32502" x="125536" y="-40928" z="-3780" heading="8192" count="1" /> <!-- Ketra Orc Supporter -->
</group>
<group name="pailaka_2316_npc_2m1">
<territories>
<territory name="pailaka_2316_npc_2" minZ="-2668" maxZ="-2468">
<node x="113720" y="-47688" />
<node x="113920" y="-47688" />
<node x="113920" y="-47488" />
<node x="113720" y="-47488" />
</territory>
</territories>
<npc id="32509" x="113820" y="-47588" z="-2668" count="1" /> <!-- Ketra Orc Intelligence Officer -->
</group>
<group name="pailaka_2316_npc_3m1">
<territories>
<territory name="pailaka_2316_npc_3" minZ="-2448" maxZ="-2248">
<node x="107452" y="-53252" />
<node x="107652" y="-53252" />
<node x="107652" y="-53052" />
<node x="107452" y="-53052" />
</territory>
</territories>
<npc id="32509" x="107552" y="-53152" z="-2448" count="1" /> <!-- Ketra Orc Intelligence Officer -->
</group>
<group name="pailaka_2316_npc_4m1">
<territories>
<territory name="pailaka_2316_npc_4" minZ="-2340" maxZ="-1940">
<node x="110080" y="-41380" />
<node x="110280" y="-41380" />
<node x="110280" y="-41180" />
<node x="110080" y="-41180" />
</territory>
</territories>
<npc id="32509" x="110144" y="-41260" z="-2260" heading="36864" count="1" /> <!-- Ketra Orc Intelligence Officer -->
</group>
</spawnlist>
</instance>

View File

@ -1,4 +1,4 @@
<html><body>[Desk]:<br>
You've found <font color="LEVEL">The War of Gods and Giants</font>.<br1>
Found It!
<font color="LEVEL">The War of Gods and Giants</font>...<br1>
Found it!
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Ketra Orc Shaman:<br>
Remember to seek out a Ketra Orc in that world. There must be one there who will aid you in your quest!
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Ketra Orc Shaman:<br>
I have faith that you will remove the dark shadow which hides our Great Flame!
</body></html>

View File

@ -16,221 +16,616 @@
*/
package instances.PailakaInjuredDragon;
import java.util.HashMap;
import java.util.List;
import com.l2jmobius.gameserver.ai.CtrlIntention;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.commons.util.CommonUtil;
import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
import com.l2jmobius.gameserver.model.L2World;
import com.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
import com.l2jmobius.gameserver.model.events.annotations.Id;
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureSee;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnAttackableFactionCall;
import com.l2jmobius.gameserver.model.holders.SkillHolder;
import com.l2jmobius.gameserver.model.instancezone.Instance;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.spawns.SpawnGroup;
import com.l2jmobius.gameserver.model.skills.AbnormalType;
import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.gameserver.model.zone.L2ZoneType;
import com.l2jmobius.gameserver.model.zone.type.L2TeleportZone;
import com.l2jmobius.gameserver.network.serverpackets.SpecialCamera;
import instances.AbstractInstance;
import quests.Q00144_PailakaInjuredDragon.Q00144_PailakaInjuredDragon;
/**
* @author Mathael
* Pailaka (Varka Silenos Barracks) Instance zone.
* @author Sdw
*/
public class PailakaInjuredDragon extends AbstractInstance
public final class PailakaInjuredDragon extends AbstractInstance
{
// NPCs
private static final int KETRA_ORC_SUPPORTER_END = 32512;
// Monsters
private static final int RECRUIT = 18635;
private static final int FOOTMAN = 18636;
private static final int WARRIOR = 18642;
private static final int OFFICER = 18646;
private static final int GREAT_MAGUS = 18649;
private static final int GENERAL = 18650;
private static final int ELITE_GUARD = 18653;
private static final int COMMANDER = 18654;
private static final int HEAD_GUARD = 18655;
private static final int PROPHET_GUARD = 18657;
private static final int PROPHET = 18659;
private static final int SHAMAN = 18640;
private static final int CHIEF_PRIEST = 18648;
private static final int GRAND_PRIEST = 18652;
private static final int KETRA_ORC_SHAMAN = 32499;
private static final int KETRA_ORC_INTELLIGENCE_OFFICIER = 32509;
private static final int KETRA_ORC_SUPPORTER = 32512;
private static final int LATANA = 18660;
private static final int ANTELOPE1 = 18637;
private static final int ANTELOPE2 = 18643;
private static final int ANTELOPE3 = 18651;
// Usable Quest Items
private static final int SHIELD_POTION = 13032;
private static final int HEAL_POTION = 13033;
// Walls
private static final HashMap<Integer, Location> ZONES_TELEPORTS = new HashMap<>();
static
private static final int DRAGON_CAMERA_1 = 18603;
private static final int DRAGON_CAMERA_2 = 18604;
private static final int DRAGON_TARGET = 18605;
private static final int LATANA_SKILL_USE = 18661;
private static final int TELEPORT_TRAP = 18663;
//@formatter:off
private static final int[] WARRIORS =
{
ZONES_TELEPORTS.put(200001, new Location(122452, -45808, -2981));
ZONES_TELEPORTS.put(200002, new Location(116610, -46418, -2641));
ZONES_TELEPORTS.put(200003, new Location(116237, -50961, -2636));
ZONES_TELEPORTS.put(200004, new Location(117384, -52141, -2544));
ZONES_TELEPORTS.put(200005, new Location(112169, -44004, -2707));
ZONES_TELEPORTS.put(200006, new Location(109460, -45869, -2265));
ZONES_TELEPORTS.put(200007, new Location(117111, -55927, -2380));
ZONES_TELEPORTS.put(200008, new Location(109274, -41277, -2271));
ZONES_TELEPORTS.put(200009, new Location(110023, -40263, -2001));
}
// Skill
private static final SkillHolder LATANA_PRESENTATION_SKILL = new SkillHolder(5759, 1);
18635, 18636, 18638,
18642, 18646, 18649,
18650, 18653, 18654,
18655, 18657,
};
private static final int[] WIZARDS =
{
18639, 18640, 18641,
18644, 18645, 18648,
18652, 18656, 18658,
18659,
};
private static final int[] ANIMALS =
{
18637, 18643,
18647, 18651,
};
// Skills
private static final SkillHolder ULTIMATE_DEFENCE = new SkillHolder(5044, 3);
private static final SkillHolder HEAL = new SkillHolder(4065, 7);
private static final SkillHolder ELECTRIC_FLAME = new SkillHolder(5715, 1);
private static final SkillHolder STUN = new SkillHolder(5716, 1);
private static final SkillHolder FIRE_BREATH = new SkillHolder(5717, 1);
private static final SkillHolder ANGER = new SkillHolder(5719, 1);
private static final SkillHolder RISE_OF_LATANA = new SkillHolder(5759, 1);
private static final int[] REJECTED_SKILLS =
{
28, 680, 51,
511, 15, 254,
1069, 1097, 1042,
1072, 1170, 352,
358, 1394, 695,
115, 1083, 1160,
1164, 1201, 1206,
1222, 1223, 1224,
1092, 65, 106,
122, 127, 1049,
1064, 1071, 1074,
1169, 1263, 1269,
352, 353, 1336,
1337, 1338, 1358,
1359, 402, 403,
412, 1386, 1394,
1396, 485, 501,
1445, 1446, 1447,
522, 531, 1481,
1482, 1483, 1484,
1485, 1486, 695,
696, 716, 775,
1511, 792, 1524,
1529,
};
//@formatter:on
// Items
private static final int PAILAKA_INSTANT_SHIELD = 13032;
private static final int QUICK_HEALING_POTION = 13033;
private static final int WEAPON_UPGRADE_STAGE_1 = 13056;
private static final int WEAPON_UPGRADE_STAGE_2 = 13057;
// Misc
private static final int TEMPLATE_ID = 45;
public PailakaInjuredDragon()
{
super(TEMPLATE_ID);
addInstanceEnterId(TEMPLATE_ID);
addKillId(ANTELOPE1, ANTELOPE2, ANTELOPE3, GENERAL, GREAT_MAGUS, PROPHET, ELITE_GUARD, COMMANDER, OFFICER, RECRUIT, FOOTMAN, WARRIOR, PROPHET_GUARD, HEAD_GUARD, SHAMAN, CHIEF_PRIEST, GRAND_PRIEST, LATANA);
addSpawnId(LATANA);
addAggroRangeEnterId(LATANA);
addEnterZoneId(ZONES_TELEPORTS.keySet());
addInstanceCreatedId(TEMPLATE_ID);
addStartNpc(KETRA_ORC_SHAMAN);
addTalkId(KETRA_ORC_SHAMAN, KETRA_ORC_INTELLIGENCE_OFFICIER);
addAttackId(WARRIORS);
addAttackId(WIZARDS);
addAttackId(LATANA);
addSpawnId(TELEPORT_TRAP, LATANA, DRAGON_TARGET, LATANA_SKILL_USE, DRAGON_CAMERA_2);
addSpawnId(WIZARDS);
setCreatureSeeId(this::onCreatureSee, WIZARDS);
setCreatureSeeId(this::onCreatureSee, LATANA);
addKillId(ANIMALS);
addKillId(LATANA);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
switch (event)
String htmltext = null;
final QuestState qs = player.getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName());
if (qs != null)
{
case "enter":
switch (event)
{
enterInstance(player, npc, TEMPLATE_ID);
break;
}
case "camera_start":
{
specialCamera(player, npc, 0, 0, 180, 800, 5000, 800, 0, 1, 0, 0);
break; // TODO: Need retail values
}
case "camera_end":
{
specialCamera(player, npc, 0, 0, 180, 600, 5000, 600, 0, 1, 0, 0);
break; // TODO: Need retail values
}
}
return super.onAdvEvent(event, npc, player);
}
@Override
protected void onEnter(L2PcInstance player, Instance instance, boolean firstEnter)
{
super.onEnter(player, instance, firstEnter);
if (firstEnter)
{
final QuestState qs = player.getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName());
if ((qs != null) && qs.isCond(1))
{
qs.setCond(2, true);
showHtmlFile(player, "32499-09.html");
}
}
}
@Override
public String onAggroRangeEnter(L2Npc npc, L2PcInstance player, boolean isSummon)
{
if (npc.isScriptValue(0))
{
npc.setScriptValue(1);
startQuestTimer("camera_start", 300, npc, player);
npc.doCast(LATANA_PRESENTATION_SKILL.getSkill());
}
return super.onAggroRangeEnter(npc, player, isSummon);
}
@Override
public void onInstanceCreated(Instance instance, L2PcInstance player)
{
for (int i = 0; i < 9; i++)
{
final int zoneId = 200000 + (i + 1);
final List<L2Npc> npcs = instance.spawnGroup("wall_" + zoneId);
npcs.forEach(k -> k.setScriptValue(zoneId));
instance.getParameters().set("wall_" + zoneId, npcs.size());
}
super.onInstanceCreated(instance, player);
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final int npcId = npc.getId();
if (npcId == LATANA)
{
startQuestTimer("camera_end", 1000, npc, killer);
addSpawn(KETRA_ORC_SUPPORTER_END, new Location(105517, -41692, -1781, 65323), false, 0, false, npc.getInstanceWorld().getId());
}
else
{
switch (getRandom(1, 3))
{
case 1:
case "enterInstance":
{
npc.dropItem(killer, SHIELD_POTION, getRandom(1, 8));
enterInstance(player, npc, TEMPLATE_ID);
qs.setCond(2, true);
htmltext = "32499-01.html";
break;
}
case 2:
case "reEnterInstance":
{
npc.dropItem(killer, HEAL_POTION, getRandom(1, 4));
enterInstance(player, npc, TEMPLATE_ID);
htmltext = "32499-02.html";
break;
}
case "exitInstance":
{
finishInstance(player, 0);
break;
}
}
if ((npcId != ANTELOPE1) && (npcId != ANTELOPE2) && (npcId != ANTELOPE3) && (npcId != SHAMAN) && (npcId != CHIEF_PRIEST) && (npcId != GRAND_PRIEST))
}
return htmltext;
}
@Override
public void onTimerEvent(String event, StatsSet params, L2Npc npc, L2PcInstance player)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (event)
{
final Instance world = npc.getInstanceWorld();
final int zoneId = npc.getScriptValue();
int killcount = world.getParameters().getInt("wall_" + zoneId);
killcount--;
world.setParameter("wall_" + zoneId, killcount);
if (killcount <= 0)
case "SET_VISIBLE":
{
world.getSpawnGroup("wall_" + zoneId).forEach(SpawnGroup::despawnAll);
world.getSpawnGroup("wall_" + zoneId + "_add").forEach(SpawnGroup::despawnAll);
}
else if (!world.getParameters().getBoolean("wall_" + zoneId + "_add", false))
{
world.setParameter("wall_" + zoneId + "_add", true);
world.spawnGroup("wall_" + zoneId + "_add").forEach(mage ->
if (!npc.getVariables().getBoolean("visible", false))
{
mage.setTarget(killer);
mage.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, killer);
npc.setInvisible(false);
npc.getVariables().set("visible", true);
getTimers().addTimer("CAST_SKILL", 5000, npc, player);
}
break;
}
case "CAST_SKILL":
{
final SkillHolder holder = npc.getParameters().getSkillHolder(getRandomBoolean() ? "Skill01_ID" : "Skill02_ID");
if (holder != null)
{
addSkillCastDesire(npc, player, holder, 500000);
}
getTimers().addTimer("CAST_SKILL", 10000, npc, player);
break;
}
case "LOOK_NEIGHBOR":
{
L2World.getInstance().forEachVisibleObjectInRange(npc, L2Npc.class, HEAL.getSkill().getCastRange(), npcs ->
{
if ((npcs.getCurrentHpPercent() < 70) && (getRandom(100) < 10))
{
addSkillCastDesire(npc, npcs, HEAL, 1000000);
}
});
getTimers().addTimer("LOOK_NEIGHBOR", 5000, npc, null);
break;
}
case "CHECK_FOR_DROP":
{
if (world.getNpcsOfGroup(npc.getParameters().getString("control_maker"), n -> !n.isDead()).isEmpty())
{
final L2ZoneType zone = ZoneManager.getInstance().getZoneByName(npc.getParameters().getString("AreaName"), L2TeleportZone.class);
if (zone != null)
{
zone.setEnabled(false, world.getId());
}
npc.dropItem(world.getFirstPlayer(), PAILAKA_INSTANT_SHIELD, getRandom(10) + 1);
npc.dropItem(world.getFirstPlayer(), QUICK_HEALING_POTION, getRandom(10) + 1);
switch (npc.getParameters().getInt("GM_ID", 0))
{
case 2316001:
case 2316002:
case 2316003:
{
if ((world.getParameters().getInt("2316001", 0) == 1) && (world.getParameters().getInt("2316002", 0) == 1) && (world.getParameters().getInt("2316003", 0) == 1))
{
giveItems(world.getFirstPlayer(), WEAPON_UPGRADE_STAGE_1, 1, true);
world.getParameters().set(npc.getParameters().getString("GM_ID"), 0);
}
break;
}
case 2316007:
case 2316008:
{
if ((world.getParameters().getInt("2316007", 0) == 1) && (world.getParameters().getInt("2316008", 0) == 1))
{
giveItems(world.getFirstPlayer(), WEAPON_UPGRADE_STAGE_2, 1, true);
world.getParameters().set(npc.getParameters().getString("GM_ID"), 0);
}
break;
}
}
npc.deleteMe();
}
else
{
getTimers().addTimer("CHECK_FOR_DROP", 2000, npc, null);
}
break;
}
case "SCE_RATANA_CAMERA_START_1":
{
npc.broadcastPacket(new SpecialCamera(npc, 600, 200, 5, 0, 15000, 10000, -10, 8, 1, 1, 1));
getTimers().addTimer("SCE_RATANA_CAMERA_START_1_1", 2000, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_1_1":
{
npc.broadcastPacket(new SpecialCamera(npc, 400, 200, 5, 4000, 15000, 10000, -10, 8, 1, 1, 0));
getTimers().addTimer("SCE_RATANA_CAMERA_START_1_2", 4000, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_1_2":
{
npc.broadcastPacket(new SpecialCamera(npc, 300, 195, 4, 1500, 15000, 10000, -5, 10, 1, 1, 0));
getTimers().addTimer("SCE_RATANA_CAMERA_START_1_3", 1700, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_1_3":
{
npc.broadcastPacket(new SpecialCamera(npc, 130, 2, 5, 0, 15000, 10000, 0, 0, 1, 0, 1));
getTimers().addTimer("SCE_RATANA_CAMERA_START_1_4", 2000, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_1_4":
{
npc.broadcastPacket(new SpecialCamera(npc, 220, 0, 4, 800, 15000, 10000, 5, 10, 1, 0, 0));
getTimers().addTimer("SCE_RATANA_CAMERA_START_1_5", 2000, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_1_5":
{
npc.broadcastPacket(new SpecialCamera(npc, 250, 185, 5, 4000, 15000, 10000, -5, 10, 1, 1, 0));
getTimers().addTimer("SCE_RATANA_CAMERA_START_1_6", 4000, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_1_6":
{
npc.broadcastPacket(new SpecialCamera(npc, 200, 0, 5, 2000, 15000, 10000, 0, 25, 1, 0, 0));
getTimers().addTimer("SCE_RATANA_CAMERA_START_1_7", 4530, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_1_7":
{
npc.broadcastPacket(new SpecialCamera(npc, 300, -3, 5, 3500, 15000, 6000, 0, 6, 1, 0, 0));
getTimers().addTimer("SUICIDE_DRAGON", 10000, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_2":
{
npc.broadcastPacket(new SpecialCamera(npc, 250, 0, 6, 0, 15000, 10000, 2, 0, 1, 0, 1));
getTimers().addTimer("SCE_RATANA_CAMERA_START_2_1", 2000, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_2_1":
{
npc.broadcastPacket(new SpecialCamera(npc, 230, 0, 5, 2000, 15000, 10000, 0, 0, 1, 0, 0));
getTimers().addTimer("SCE_RATANA_CAMERA_START_2_2", 2500, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_2_2":
{
npc.broadcastPacket(new SpecialCamera(npc, 180, 175, 2, 1500, 15000, 10000, 0, 10, 1, 1, 0));
getTimers().addTimer("SCE_RATANA_CAMERA_START_2_3", 1500, npc, player);
break;
}
case "SCE_RATANA_CAMERA_START_2_3":
{
npc.broadcastPacket(new SpecialCamera(npc, 300, 180, 5, 1500, 15000, 3000, 0, 6, 1, 1, 0));
getTimers().addTimer("SUICIDE_DRAGON", 3000, npc, player);
break;
}
case "SUICIDE_DRAGON":
{
npc.deleteMe();
break;
}
case "LATANA_ANGER_RESET":
{
npc.setScriptValue(0);
break;
}
case "SPAWN_DRAGON_TARGET":
{
addSpawn(npc, DRAGON_TARGET, 105465, -41817, -1768, 0, false, 0, false, world.getId());
getTimers().addTimer("SOCIAL_ACTION", 3000, npc, player);
break;
}
case "SOCIAL_ACTION":
{
npc.broadcastSocialAction(0);
getTimers().addTimer("DISPLAY_SKILL", 3000, npc, player);
break;
}
case "DISPLAY_SKILL":
{
final L2Npc target = world.getNpc(DRAGON_TARGET);
if (target != null)
{
addSkillCastDesire(npc, target, RISE_OF_LATANA, 5000);
}
getTimers().addTimer("LATANA_CAST", 9700, npc, player);
break;
}
case "LATANA_CAST":
{
final L2Npc target = world.getNpc(DRAGON_TARGET);
if (target != null)
{
addSkillCastDesire(npc, target, STUN, 5000);
}
getTimers().addTimer("ATTACK", 11030, npc, player);
break;
}
case "ATTACK":
{
if (npc.calculateDistance(player, false, false) < 100)
{
if (getRandom(100) < 30)
{
addSkillCastDesire(npc, player, ELECTRIC_FLAME, 500000);
}
else
{
addAttackDesire(npc, player);
}
}
else if (getRandomBoolean())
{
addSpawn(npc, LATANA_SKILL_USE, player.getLocation(), false, world.getId());
}
else
{
addSkillCastDesire(npc, player, FIRE_BREATH, 500000);
}
getTimers().addTimer("ATTACK", 6000, npc, player);
break;
}
case "SPAWN_DRAGON_TARGET2":
{
addSpawn(npc, DRAGON_TARGET, 105465, -41817, -1768, 0, false, 0, false, world.getId());
getTimers().addTimer("SOCIAL_ACTION", 3000, npc, player);
break;
}
case "LATANA_ATTACK":
{
addSkillCastDesire(npc, npc, ELECTRIC_FLAME, 50000);
getTimers().addTimer("LATANA_CAST", 3000, npc, player);
break;
}
case "SPAWN_REWARD_NPC":
{
addSpawn(npc, KETRA_ORC_SUPPORTER, npc.getLocation(), false, world.getId());
npc.deleteMe();
break;
}
case "DRAGON_CAMERA_2_1":
{
npc.broadcastPacket(new SpecialCamera(npc, 350, 200, 5, 5600, 15000, 10000, -15, 10, 1, 1, 0));
getTimers().addTimer("DRAGON_CAMERA_2_2", 5600, npc, null);
break;
}
case "DRAGON_CAMERA_2_2":
{
npc.broadcastPacket(new SpecialCamera(npc, 360, 200, 5, 1000, 15000, 2000, -15, 10, 1, 1, 0));
getTimers().addTimer("SUICIDE", 10000, npc, null);
break;
}
}
}
return super.onKill(npc, killer, isSummon);
}
@Override
public String onSpawn(L2Npc npc)
{
npc.setIsImmobilized(true);
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (npc.getId())
{
case TELEPORT_TRAP:
{
world.getParameters().set(npc.getParameters().getString("GM_ID"), 1);
getTimers().addTimer("CHECK_FOR_DROP", 2000, npc, null);
break;
}
case DRAGON_TARGET:
{
getTimers().addTimer("SUICIDE", 60000, npc, null);
break;
}
case LATANA_SKILL_USE:
{
final L2Npc latana = world.getNpc(LATANA);
final L2PcInstance player = world.getFirstPlayer();
if ((latana != null) && (player != null) && (latana.calculateDistance(player, false, false) <= 900))
{
addSkillCastDesire(npc, player, STUN, 500000);
}
getTimers().addTimer("SUICIDE", 5000, npc, null);
break;
}
case DRAGON_CAMERA_2:
{
npc.broadcastPacket(new SpecialCamera(npc, 450, 200, 3, 0, 15000, 10000, -15, 20, 1, 1, 1));
getTimers().addTimer("DRAGON_CAMERA_2_1", 100, npc, null);
break;
}
default:
{
if (CommonUtil.contains(WIZARDS, npc.getId()))
{
npc.setInvisible(true);
getTimers().addTimer("LOOK_NEIGHBOR", 1000, npc, null);
}
npc.initSeenCreatures();
}
}
}
return super.onSpawn(npc);
}
@Override
public String onEnterZone(L2Character character, L2ZoneType zone)
private void onCreatureSee(OnCreatureSee event)
{
if (!character.isPlayer() || (character.getInstanceId() == 0))
final L2Character creature = event.getSeen();
final L2Npc npc = (L2Npc) event.getSeer();
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
return super.onEnterZone(character, zone);
if (CommonUtil.contains(WIZARDS, npc.getId()))
{
if (creature.isPlayer() && npc.isScriptValue(0))
{
npc.setScriptValue(1);
getTimers().addTimer("SET_VISIBLE", 1000, npc, creature.getActingPlayer());
}
}
else if ((npc.getId() == LATANA) && !npc.getVariables().getBoolean("creatureSeen", false) && creature.isPlayer())
{
final QuestState qs = creature.getActingPlayer().getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName());
if (qs != null)
{
if (qs.getCond() == 4)
{
getTimers().addTimer("SPAWN_REWARD_NPC", 1000, npc, creature.getActingPlayer());
npc.setScriptValue(1);
}
else
{
playSound(creature.getActingPlayer(), QuestSound.BS08_A);
getTimers().addTimer("SPAWN_DRAGON_TARGET", 1000, npc, creature.getActingPlayer());
getTimers().addTimer("SCE_RATANA_CAMERA_START_1", 10, world.getNpc(DRAGON_CAMERA_1), creature.getActingPlayer());
npc.getVariables().set("creatureSeen", true);
}
}
}
}
final Instance world = character.getInstanceWorld();
if (world.getParameters().getInt("wall_" + zone.getId()) > 0)
}
@Override
public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon, Skill skill)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
character.teleToLocation(ZONES_TELEPORTS.get(zone.getId()));
if (CommonUtil.contains(WARRIORS, npc.getId()) || CommonUtil.contains(WIZARDS, npc.getId()))
{
final int longRangeGuardRate = npc.getParameters().getInt("LongRangeGuardRate", -1);
if ((longRangeGuardRate != -1) && ((skill != null) && !CommonUtil.contains(REJECTED_SKILLS, skill.getId())))
{
if (npc.calculateDistance(attacker, false, false) > 150)
{
if ((npc.getEffectList().getFirstBuffInfoByAbnormalType(AbnormalType.PD_UP_SPECIAL) == null) && (getRandom(100) < longRangeGuardRate))
{
addSkillCastDesire(npc, npc, ULTIMATE_DEFENCE.getSkill(), 1000000000);
}
}
else
{
npc.getEffectList().stopEffects(AbnormalType.PD_UP_SPECIAL);
}
}
if (CommonUtil.contains(WARRIORS, npc.getId()))
{
if (npc.calculateDistance(attacker, false, false) < 40)
{
addAttackPlayerDesire(npc, attacker, 1000);
}
else if (getRandom(100) < 33)
{
final SkillHolder holder = npc.getParameters().getSkillHolder(getRandomBoolean() ? "Skill01_ID" : "Skill02_ID");
if (holder != null)
{
addSkillCastDesire(npc, attacker, holder, 500000);
}
}
}
}
else if ((npc.getId() == LATANA))
{
if (!npc.getVariables().getBoolean("creatureSeen", false))
{
final QuestState qs = attacker.getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName());
if (qs != null)
{
if (qs.getCond() == 4)
{
getTimers().addTimer("SPAWN_REWARD_NPC", 1000, npc, attacker);
npc.setScriptValue(1);
}
else
{
playSound(attacker, QuestSound.BS08_A);
getTimers().addTimer("SPAWN_DRAGON_TARGET2", 1000, npc, attacker);
getTimers().addTimer("SCE_RATANA_CAMERA_START_2", 10, world.getNpc(DRAGON_CAMERA_1), attacker);
npc.getVariables().set("creatureSeen", true);
}
}
}
if ((npc.getCurrentHpPercent() < 30) && npc.isScriptValue(0))
{
addSkillCastDesire(npc, npc, ANGER, 50000000);
npc.setScriptValue(1);
getTimers().addTimer("LATANA_ANGER_RESET", 120000, npc, attacker);
}
}
}
return super.onEnterZone(character, zone);
return super.onAttack(npc, attacker, damage, isSummon, skill);
}
// @formatter:off
@RegisterEvent(EventType.ON_ATTACKABLE_FACTION_CALL)
@RegisterType(ListenerRegisterType.NPC)
@Id({18635,18636,18638,18642,18646,18649,18650,18653,18654,18655,18657})
// @formatter:on
public void onAttackableFactionCall(OnAttackableFactionCall event)
{
final L2Npc npc = event.getNpc();
final L2PcInstance attacker = event.getAttacker();
if (npc.calculateDistance(attacker, false, false) < 40)
{
addAttackPlayerDesire(npc, attacker, 1000);
}
else if (getRandom(100) < 33)
{
final SkillHolder holder = npc.getParameters().getSkillHolder(getRandomBoolean() ? "Skill01_ID" : "Skill02_ID");
if (holder != null)
{
addSkillCastDesire(npc, attacker, holder, 500000);
}
}
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
if (CommonUtil.contains(ANIMALS, npc.getId()))
{
npc.dropItem(killer, getRandomBoolean() ? PAILAKA_INSTANT_SHIELD : QUICK_HEALING_POTION, getRandom(10) + 1);
}
else if (npc.getId() == LATANA)
{
addSpawn(npc, KETRA_ORC_SUPPORTER, 105974, -41794, -1784, 32768, false, 0, false, world.getId());
addSpawn(npc, DRAGON_CAMERA_2, npc.getLocation(), false, world.getId());
}
}
return super.onKill(npc, killer, isSummon);
}
public static void main(String[] args)

View File

@ -2,5 +2,5 @@
Are you an Inspector?<br>
Ah! I don't know how long it has been since I saw one who has mastered all the Kamael battle skills and reached the summit of our natural abilities.<br>
Since you've opted to become an Inspector, I suspect you have a healthy curiosity. Good! It will serve you well as you discover more about your new abilities...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00061_LawEnforcement 32138-02.html">Ask about your abilities.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00061_LawEnforcement 32138-02.html">"Tell me about my abilities."</Button>
</body></html>

View File

@ -1,5 +1,5 @@
<html><body>Kekropus:<br>
Before speak of that, I must ask you if you already know the origins and purpose of the Kamael.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00061_LawEnforcement 32138-03.html">I know.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00061_LawEnforcement 32138-09.html">I don't know.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00061_LawEnforcement 32138-03.html">"I do know."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00061_LawEnforcement 32138-04.html">"I don't, actually."</Button>
</body></html>

View File

@ -3,5 +3,5 @@ Ah, then we shall begin.<br>
As you know, the 3 Spiculas -- the 3 Heroes -- were the progenitors of our race, and the reason for our skill in battle.<br>
During the war against the gods, they fought valiantly, even slaying some of the daughters of Einhasad. Though they fell in that war, their power was handed down through magical sword, shield and cannon, eventually becoming the basis for the three current classes of Kamael.<br>
For more than ten thousand years, we have followed the path that they laid out for us...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00061_LawEnforcement 32138-04.html">Listen to the story.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00061_LawEnforcement 32138-05.html">"Go on."</Button>
</body></html>

View File

@ -1,5 +1,6 @@
<html><body>Kekropus:<br>
Before the advent of the 3 Heroes, we were created with certain unrealized spiritual potential, but no particular physical or martial abilities. Our creators, the Giants, had little need of protection from ordinary physical threats -- we were an interesting experiment they conducted, little more.<br>
We did, however, possess a special ability to use the soul as a medium. This is due to the fact that we were created using Mimir's Spring Water and as a result were closer to souls than other beings, not because the Giants intentionally bestowed that skill on us.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00061_LawEnforcement 32138-05.html">.........</Button>
Hmm, you have advanced this far without learning the truth of our people's origin?<br>
You have never heard of the 3 Heroes, then.<br>
All our martial skill is rooted in their tale...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00061_LawEnforcement 32138-05.html">"Go on."</Button>
</body></html>

View File

@ -1,4 +1,6 @@
<html><body>Kekropus:<br>
Because our natural powers were so weak, we were forced to develop other skills. Over time, and in order to inherit the abilities of the 3 Heroes, we learned the skill of manipulating souls. In doing so, however, we were confronted with a new question: why did we in fact possess this skill when the 3 Heroes did not?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00061_LawEnforcement 32138-06.html">"Is that what an Inspector is?"</Button>
Before the new heroes appeared, what were the Kamael?<br>
Our founders had no interest in combat skills. With their strength, there was no one to threaten them, and when they fought among themselves, they fought for their own amusement. The sealed beings were growing in numbers and organizing, but they could not defeat the giants.<br>
So the first Kamael had the ability but not the technology. The medium we use currently for souls can be used because we are made of Mimir's Elixir. Because of this we can become more close to a soul. The giants did not give us the technology to be close to souls.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00061_LawEnforcement 32138-06.html">........</Button>
</body></html>

Some files were not shown because too many files have changed in this diff Show More