Pailaka Injured Dragon improvements.

Contributed by Mathael.
This commit is contained in:
MobiusDev 2016-08-08 19:11:16 +00:00
parent d55b5a075b
commit 8f5c716b5a
9 changed files with 311 additions and 227 deletions

View File

@ -9,79 +9,122 @@
</locations>
<spawnlist>
<group name="general">
<npc id="18635" x="122077" y="-46098" z="-2914" heading="5028" />
<npc id="18635" x="122019" y="-45634" z="-2908" heading="64841" />
<npc id="18635" x="117184" y="-51722" z="-2575" heading="55468" />
<npc id="18635" x="116876" y="-51937" z="-2572" heading="59301" />
<npc id="18636" x="122023" y="-45769" z="-2910" heading="63593" />
<npc id="18636" x="122050" y="-45999" z="-2910" heading="1701" />
<npc id="18636" x="117097" y="-51774" z="-2577" heading="51453" />
<npc id="18636" x="116926" y="-51876" z="-2580" heading="56322" />
<npc id="18637" x="123164" y="-52003" z="-2461" heading="13414" />
<npc id="18637" x="123726" y="-51665" z="-2467" heading="6603" />
<npc id="18637" x="111641" y="-56027" z="-2783" heading="43022" />
<npc id="18637" x="123965" y="-51293" z="-2471" heading="5746" />
<npc id="18637" x="125010" y="-50813" z="-2460" heading="1407" />
<npc id="18637" x="122474" y="-42594" z="-3240" heading="49260" />
<npc id="18637" x="121814" y="-41622" z="-3181" heading="5457" />
<npc id="18637" x="121424" y="-41452" z="-3163" heading="41426" />
<npc id="18637" x="121264" y="-41559" z="-3164" heading="47583" />
<npc id="18637" x="121516" y="-43081" z="-3216" heading="61535" />
<npc id="18642" x="117013" y="-51840" z="-2578" heading="55135" />
<npc id="18642" x="122038" y="-45904" z="-2914" heading="771" />
<npc id="18646" x="116054" y="-46439" z="-2637" heading="63477" />
<npc id="18646" x="116057" y="-46521" z="-2644" heading="65025" />
<npc id="18646" x="116503" y="-55918" z="-2449" heading="589" />
<npc id="18646" x="116490" y="-56022" z="-2445" heading="61772" />
<npc id="18646" x="116075" y="-50463" z="-2642" heading="53954" />
<npc id="18646" x="116020" y="-50497" z="-2643" heading="55751" />
<npc id="18647" x="108759" y="-53478" z="-2606" heading="25521" />
<npc id="18647" x="108415" y="-53924" z="-2564" heading="18727" />
<npc id="18647" x="107850" y="-52954" z="-2417" heading="21437" />
<npc id="18649" x="111616" y="-43922" z="-2635" heading="60699" />
<npc id="18649" x="110110" y="-39799" z="-1850" heading="46038" />
<npc id="18649" x="109955" y="-39811" z="-1855" heading="48647" />
<npc id="18649" x="111606" y="-43746" z="-2633" heading="62267" />
<npc id="18649" x="111614" y="-44071" z="-2642" heading="63794" />
<npc id="18650" x="109874" y="-39833" z="-1837" heading="48408" />
<npc id="18650" x="111602" y="-43846" z="-2638" heading="63427" />
<npc id="18650" x="110205" y="-39800" z="-1840" heading="46882" />
<npc id="18650" x="111618" y="-44003" z="-2637" heading="59709" />
<npc id="18650" x="111619" y="-44129" z="-2650" heading="2365" />
<npc id="18651" x="111214" y="-55683" z="-2798" heading="27410" />
<npc id="18651" x="111515" y="-55735" z="-2811" heading="24213" />
<npc id="18651" x="110462" y="-54609" z="-2882" heading="24283" />
<npc id="18651" x="111556" y="-54895" z="-2861" heading="20821" />
<npc id="18653" x="116213" y="-50301" z="-2622" heading="50611" />
<npc id="18653" x="116432" y="-55729" z="-2441" heading="65250" />
<npc id="18653" x="115780" y="-50465" z="-2620" heading="52135" />
<npc id="18653" x="116433" y="-56194" z="-2432" heading="927" />
<npc id="18653" x="115997" y="-46271" z="-2637" heading="63732" />
<npc id="18653" x="116063" y="-46680" z="-2658" heading="4323" />
<npc id="18654" x="116155" y="-50420" z="-2635" heading="53262" />
<npc id="18654" x="115952" y="-50528" z="-2646" heading="52507" />
<npc id="18654" x="116481" y="-56108" z="-2437" heading="62531" />
<npc id="18654" x="116499" y="-55822" z="-2449" heading="63477" />
<npc id="18654" x="116056" y="-46341" z="-2630" heading="63791" />
<npc id="18654" x="116084" y="-46587" z="-2651" heading="1141" />
<npc id="18655" x="108892" y="-41031" z="-2204" heading="64381" />
<npc id="18655" x="108877" y="-41436" z="-2144" heading="64321" />
<npc id="18655" x="109326" y="-45781" z="-2235" heading="5945" />
<npc id="18655" x="109584" y="-46100" z="-2263" heading="9356" />
<npc id="18655" x="108862" y="-41323" z="-2174" heading="62422" />
<npc id="18655" x="108886" y="-41185" z="-2196" heading="64884" />
<npc id="18655" x="109458" y="-45980" z="-2263" heading="6915" />
<npc id="18657" x="109393" y="-45893" z="-2253" heading="5549" />
<npc id="18657" x="109516" y="-46032" z="-2268" heading="4362" />
<npc id="18657" x="109272" y="-45665" z="-2210" heading="4731" />
<npc id="18657" x="108888" y="-41114" z="-2195" heading="64256" />
<npc id="18657" x="108878" y="-41260" z="-2188" heading="64876" />
<npc id="18657" x="108869" y="-41376" z="-2163" heading="2280" />
<npc id="18659" x="110023" y="-39802" z="-1852" heading="48655" />
<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>
<group name="wall_1" 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>
<group name="wall_1_add" spawnByDefault="false">
<npc id="18640" x="121931" y="-45844" z="-2902" heading="664" /> <!-- Varka Silenos Shaman -->
</group>
<group name="wall_2" 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>
<group name="wall_2_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>
<group name="wall_3" 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>
<group name="wall_3_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>
<group name="wall_4">
<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>
<group name="wall_4_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>
<group name="wall_5" 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>
<group name="wall_5_add" spawnByDefault="false">
<npc id="18652" x="111331" y="-43648" z="-2608" heading="62842" />
<npc id="18648" x="111284" y="-43780" z="-2592" heading="61754" />
<npc id="18648" x="111260" y="-43897" z="-2586" heading="63902" />
<npc id="18652" x="111257" y="-44014" z="-2590" heading="539" />
</group>
<group name="wall_6" 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>
<group name="wall_6_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>
<group name="wall_7">
<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>
<group name="wall_7_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>
<group name="wall_8" 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>
<group name="wall_8_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>
<group name="wall_9">
<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>
<group name="wall_9_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>
</spawnlist>
</instance>

View File

@ -17,7 +17,7 @@
package instances.PailakaInjuredDragon;
import java.util.HashMap;
import java.util.Map;
import java.util.List;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Character;
@ -38,7 +38,7 @@ public class PailakaInjuredDragon extends AbstractInstance
{
// NPCs
private static final int KETRA_ORC_SHAMAN = 34799;
private static final int KETRA_ORC_SUPPORTER = 32502;
private static final int KETRA_ORC_SUPPORTER_END = 32512;
// Monsters
private static final int RECRUIT = 18635;
private static final int FOOTMAN = 18636;
@ -51,44 +51,58 @@ public class PailakaInjuredDragon extends AbstractInstance
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 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;
// Zones
private static final int BARRIER1 = 200001; // Zone 1
private static final int BARRIER2 = 200002; // Zone 1
private static final int BARRIER3 = 200003; // Zone 1
private static final int BARRIER4 = 200004; // Zone 1
private static final int BARRIER5 = 200005; // Zone 2
private static final int BARRIER6 = 200006; // Zone 2
private static final int BARRIER7 = 200007; // Zone 2
private static final int BARRIER8 = 200008; // Zone 3
private static final int BARRIER9 = 200009; // Zone 3
private static final Map<Integer, Location> ZONE_TELEPORTS = new HashMap<>();
static
private static final int[] ZONES =
{
ZONE_TELEPORTS.put(BARRIER1, new Location(122452, -45808, -2981));
ZONE_TELEPORTS.put(BARRIER2, new Location(116610, -46418, -2641));
ZONE_TELEPORTS.put(BARRIER3, new Location(116237, -50961, -2636));
ZONE_TELEPORTS.put(BARRIER4, new Location(117384, -52141, -2544));
ZONE_TELEPORTS.put(BARRIER5, new Location(112169, -44004, -2707));
ZONE_TELEPORTS.put(BARRIER6, new Location(109460, -45869, -2265));
ZONE_TELEPORTS.put(BARRIER7, new Location(117111, -55927, -2380));
ZONE_TELEPORTS.put(BARRIER8, new Location(109274, -41277, -2271));
ZONE_TELEPORTS.put(BARRIER9, new Location(110023, -40263, -2001));
}
200001,
200002,
200003,
200004,
200005,
200006,
200007,
200008,
200009
};
// Walls
private final HashMap<Integer, MonsterWall> WALLS = new HashMap<>();
private static final Location[] ZONES_TELEPORTS =
{
new Location(122452, -45808, -2981),
new Location(116610, -46418, -2641),
new Location(116237, -50961, -2636),
new Location(117384, -52141, -2544),
new Location(112169, -44004, -2707),
new Location(109460, -45869, -2265),
new Location(117111, -55927, -2380),
new Location(109274, -41277, -2271),
new Location(110023, -40263, -2001)
};
// Skill
private static final SkillHolder LATANA_PRESENTATION_SKILL = new SkillHolder(5759, 1);
// Misc
private static final int TEMPLATE_ID = 45;
private int unlockZoneKillCount = 0;
public PailakaInjuredDragon()
{
addInstanceEnterId(TEMPLATE_ID);
addStartNpc(KETRA_ORC_SHAMAN);
addKillId(GENERAL, GREAT_MAGUS, PROPHET, ELITE_GUARD, COMMANDER, OFFICER, RECRUIT, FOOTMAN, WARRIOR, PROPHET_GUARD, HEAD_GUARD, LATANA);
addSpawnId(LATANA);
addKillId(ANTELOPE1, ANTELOPE2, ANTELOPE3, GENERAL, GREAT_MAGUS, PROPHET, ELITE_GUARD, COMMANDER, OFFICER, RECRUIT, FOOTMAN, WARRIOR, PROPHET_GUARD, HEAD_GUARD, LATANA);
addAttackId(SHAMAN, GRAND_PRIEST, CHIEF_PRIEST);
addSpawnId(LATANA, SHAMAN, CHIEF_PRIEST, GRAND_PRIEST);
addAggroRangeEnterId(LATANA);
addEnterZoneId(ZONE_TELEPORTS.keySet());
addEnterZoneId(ZONES);
addInstanceCreatedId(TEMPLATE_ID);
}
@Override
@ -142,69 +156,65 @@ public class PailakaInjuredDragon extends AbstractInstance
return super.onAggroRangeEnter(npc, player, isSummon);
}
@Override
public void onInstanceCreated(Instance instance, L2PcInstance player)
{
for (int i = 0; i < 9; i++)
{
final int zoneId = ZONES[i];
final List<L2Npc> npcs = instance.spawnGroup("wall_" + (i + 1));
npcs.forEach(k -> k.setScriptValue(zoneId));
WALLS.put(zoneId, new MonsterWall((i + 1), zoneId, npcs, ZONES_TELEPORTS[i]));
}
super.onInstanceCreated(instance, player);
}
@Override
public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon)
{
final MonsterWall wall = WALLS.get(npc.getScriptValue());
if ((wall != null) && !wall.isUnlocked())
{
if (wall.getMobs().stream().filter(mob -> !mob.isDead()).count() == 0)
{
wall.unlock();
}
attacker.teleToLocation(wall.getZoneTeleportBack());
}
return super.onAttack(npc, attacker, damage, isSummon);
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
if (npc.getId() == LATANA)
final int npcId = npc.getId();
if (npcId == LATANA)
{
startQuestTimer("camera_end", 1000, npc, killer);
addSpawn(KETRA_ORC_SUPPORTER, new Location(105517, -41692, -1781, 65323), false, 0, false, npc.getInstanceWorld().getId());
addSpawn(KETRA_ORC_SUPPORTER_END, new Location(105517, -41692, -1781, 65323), false, 0, false, npc.getInstanceWorld().getId());
}
else
{
final Instance world = npc.getInstanceWorld();
if (world.getStatus() < 3)
switch (getRandom(1, 3))
{
final int npcId = npc.getId();
switch (world.getStatus())
case 1:
{
case 0:
{
switch (npcId)
{
case RECRUIT:
case FOOTMAN:
case WARRIOR:
{
unlockZoneKillCount++;
}
}
break;
}
case 1:
{
switch (npcId)
{
case OFFICER:
case GREAT_MAGUS:
case GENERAL:
case ELITE_GUARD:
case COMMANDER:
{
unlockZoneKillCount++;
}
}
break;
}
case 2:
{
switch (npcId)
{
case HEAD_GUARD:
case PROPHET_GUARD:
{
unlockZoneKillCount++;
}
}
break;
}
npc.dropItem(killer, SHIELD_POTION, getRandom(1, 8));
break;
}
if (unlockZoneKillCount == 5)
case 2:
{
world.setStatus(npc.getInstanceWorld().getStatus() + 1);
unlockZoneKillCount = 0;
npc.dropItem(killer, HEAL_POTION, getRandom(1, 4));
break;
}
}
if ((npcId != ANTELOPE1) && (npcId != ANTELOPE2) && (npcId != ANTELOPE3))
{
final MonsterWall wall = WALLS.get(npc.getScriptValue());
if ((wall != null) && !wall.isUnlocked() && !wall.isPriestSpawned())
{
wall.spawnPriest(npc.getInstanceWorld());
}
}
}
@ -215,6 +225,10 @@ public class PailakaInjuredDragon extends AbstractInstance
public String onSpawn(L2Npc npc)
{
npc.setIsImmobilized(true);
if (npc.getId() != LATANA)
{
npc.setIsInvul(true);
}
return super.onSpawn(npc);
}
@ -226,44 +240,75 @@ public class PailakaInjuredDragon extends AbstractInstance
return super.onEnterZone(character, zone);
}
final Instance world = character.getInstanceWorld();
final int zoneId = zone.getId();
switch (zoneId)
final MonsterWall wall = WALLS.get(zone.getId());
if ((wall != null) && !wall.isUnlocked())
{
case BARRIER1:
case BARRIER2:
case BARRIER3:
case BARRIER4:
if ((wall.getMobs().stream().filter(mob -> !mob.isDead()).count() > 0) || wall.isPriestSpawned())
{
if (world.getStatus() < 1)
{
character.teleToLocation(ZONE_TELEPORTS.get(zoneId));
}
break;
}
case BARRIER5:
case BARRIER6:
case BARRIER7:
{
if (world.getStatus() < 2)
{
character.teleToLocation(ZONE_TELEPORTS.get(zoneId));
}
break;
}
case BARRIER8:
case BARRIER9:
{
if (world.getStatus() < 3)
{
character.teleToLocation(ZONE_TELEPORTS.get(zoneId));
}
break;
character.teleToLocation(wall.getZoneTeleportBack());
}
}
return super.onEnterZone(character, zone);
}
private class MonsterWall
{
private final int _wallNumber;
private final int _zoneId;
private boolean _unlocked;
private boolean _priestSpawned;
private final List<L2Npc> _mobs;
private List<L2Npc> _priests;
private final Location _zoneTeleportBack;
MonsterWall(int wallNumber, int zoneId, List<L2Npc> mobs, Location loc)
{
_unlocked = false;
_priestSpawned = false;
_wallNumber = wallNumber;
_zoneId = zoneId;
_mobs = mobs;
_priests = null;
_zoneTeleportBack = loc;
}
boolean isUnlocked()
{
return _unlocked;
}
boolean isPriestSpawned()
{
return _priestSpawned;
}
List<L2Npc> getMobs()
{
return _mobs;
}
Location getZoneTeleportBack()
{
return _zoneTeleportBack;
}
void spawnPriest(Instance instance)
{
_priests = instance.spawnGroup("wall_" + _wallNumber + "_add");
_priests.forEach(k -> k.setScriptValue(_zoneId));
_priestSpawned = true;
}
void unlock()
{
_unlocked = true;
_priestSpawned = false;
_priests.forEach(L2Npc::deleteMe);
_mobs.forEach(L2Npc::deleteMe);
}
}
public static void main(String[] args)
{
new PailakaInjuredDragon();

View File

@ -1,6 +0,0 @@
<html><body>Ketra Orc Supporter:<br>
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 32502-08.html">Return the Spear</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<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>
</body></html>

View File

@ -0,0 +1,6 @@
<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>

View File

@ -0,0 +1,3 @@
<html><body>Ketra Orc Supporter:<br>
Use the Scroll of Escape that I gave you to return to your world.
</body></html>

View File

@ -33,23 +33,23 @@ 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;
// Monster
// Monsters
private static final int LATANA = 18660;
// Area Monsters
private static final int[] MONSTERS =
{
18650,
18649,
18659,
18653,
18654,
18646,
18635,
18636,
18642,
18646,
18649,
18650,
18653,
18654,
18655,
18657,
18655
18659
};
// Buffs
private static final SkillHolder[] BUFFS =
@ -76,9 +76,6 @@ public class Q00144_PailakaInjuredDragon extends Quest
// Usable Quest Items
private static final int SHIELD_POTION = 13032;
private static final int HEAL_POTION = 13033;
// Conditions
private static final int MIN_LEVEL = 73;
private static final int MAX_LEVEL = 77;
// Rewards
private static final long REWARD_EXP = 24570000;
private static final int REWARD_SP = 5896;
@ -86,15 +83,18 @@ public class Q00144_PailakaInjuredDragon extends Quest
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; // TODO: need retail info about how buff works
private int BUFF_COUNT = 0;
public Q00144_PailakaInjuredDragon()
{
super(144);
addStartNpc(KETRA_ORC_SHAMAN);
addTalkId(KETRA_ORC_SHAMAN, KETRA_ORC_SUPPORTER, KETRA_ORC_INTELLIGENCE_OFFICIER);
addFirstTalkId(KETRA_ORC_SUPPORTER_END);
addTalkId(KETRA_ORC_SHAMAN, KETRA_ORC_SUPPORTER, KETRA_ORC_INTELLIGENCE_OFFICIER, KETRA_ORC_SUPPORTER_END);
addKillId(LATANA);
addKillId(MONSTERS);
addCondMinLevel(MIN_LEVEL, "32499-03.html");
@ -146,10 +146,10 @@ public class Q00144_PailakaInjuredDragon extends Quest
}
break;
}
case "32502-08.html":
case "32512-02.html":
{
final Instance inst = InstanceManager.getInstance().getPlayerInstance(player, true);
if ((inst != null) && qs.isCond(4) && hasQuestItems(player, SPEAR_OF_SILENOS_COMPLETED))
if ((inst != null) && qs.isCond(4))
{
takeItems(player, SPEAR_OF_SILENOS_COMPLETED, -1);
rewardItems(player, 57, REWARD_ADENA);
@ -160,10 +160,6 @@ public class Q00144_PailakaInjuredDragon extends Quest
inst.finishInstance();
htmltext = event;
}
else
{
htmltext = "32509-04.html";
}
break;
}
case "upgrade_weapon":
@ -302,6 +298,10 @@ public class Q00144_PailakaInjuredDragon extends Quest
htmltext = !qs.isCond(3) && !qs.isCond(4) ? "32509-01a.html" : "32509-01.html";
break;
}
case KETRA_ORC_SUPPORTER_END:
{
htmltext = hasQuestItems(talker, SPEAR_OF_SILENOS_COMPLETED) ? "32512-01.html" : "32512-03.html";
}
}
return htmltext;
}
@ -309,7 +309,8 @@ public class Q00144_PailakaInjuredDragon extends Quest
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
if (npc.getId() != LATANA)
final int npcId = npc.getId();
if (npcId != LATANA)
{
if (!WEAPON_UPGRADE_STAGE_1_DROPED && !hasQuestItems(killer, WEAPON_UPGRADE_STAGE_1) && hasQuestItems(killer, SPEAR_OF_SILENOS))
{
@ -327,20 +328,6 @@ public class Q00144_PailakaInjuredDragon extends Quest
WEAPON_UPGRADE_STAGE_2_DROPED = true;
}
}
switch (getRandom(1, 3))
{
case 1:
{
npc.dropItem(killer, SHIELD_POTION, getRandom(1, 8));
break;
}
case 2:
{
npc.dropItem(killer, HEAL_POTION, getRandom(1, 4));
break;
}
}
}
else
{

View File

@ -628,7 +628,7 @@
<set name="is_freightable" val="false" />
<set name="is_commissionable" val="false" />
<set name="is_private_storeable" val="false" />
<set name="is_questitem" val="true" />
<set name="is_questitem" val="false" />
<set name="for_npc" val="true" />
<cond addName="1" msgId="113">
<player instanceId="43,44,45" />
@ -657,7 +657,7 @@
<set name="is_freightable" val="false" />
<set name="is_commissionable" val="false" />
<set name="is_private_storeable" val="false" />
<set name="is_questitem" val="true" />
<set name="is_questitem" val="false" />
<set name="is_coc_restricted" val="true" />
<set name="for_npc" val="true" />
<cond addName="1" msgId="113">

View File

@ -21,8 +21,9 @@
<amount>30</amount>
<mode>PER</mode>
</effect>
<effect name="PhysicalCriticalRate">
<effect name="CriticalRate">
<amount>100</amount>
<mode>DIFF</mode>
</effect>
<effect name="SkillCritical">
<amount>30</amount>
@ -35,7 +36,7 @@
<effect name="AttackTrait">
<DRAGON_WEAKNESS>100</DRAGON_WEAKNESS>
</effect>
<effect name="PvpMagicalDamageBonus">
<effect name="PvpMagicalSkillDamageBonus">
<amount>30</amount>
<mode>PER</mode>
</effect>
@ -70,8 +71,9 @@
<amount>100</amount>
<mode>PER</mode>
</effect>
<effect name="PhysicalCriticalRate">
<effect name="CriticalRate">
<amount>500</amount>
<mode>DIFF</mode>
</effect>
<effect name="SkillCritical">
<amount>50</amount>
@ -84,7 +86,7 @@
<effect name="AttackTrait">
<DRAGON_WEAKNESS>300</DRAGON_WEAKNESS>
</effect>
<effect name="PvpMagicalDamageBonus">
<effect name="PvpMagicalSkillDamageBonus">
<amount>50</amount>
<mode>PER</mode>
</effect>
@ -129,7 +131,7 @@
<effect name="AttackTrait">
<DRAGON_WEAKNESS>100</DRAGON_WEAKNESS>
</effect>
<effect name="PvpMagicalDamageBonus">
<effect name="PvpMagicalSkillDamageBonus">
<amount>30</amount>
<mode>PER</mode>
</effect>
@ -174,7 +176,7 @@
<effect name="AttackTrait">
<DRAGON_WEAKNESS>300</DRAGON_WEAKNESS>
</effect>
<effect name="PvpMagicalDamageBonus">
<effect name="PvpMagicalSkillDamageBonus">
<amount>50</amount>
<mode>PER</mode>
</effect>