Reworked some scripts.

Contributed by Stayway, gigilo1968.
This commit is contained in:
MobiusDev
2017-05-28 18:37:26 +00:00
parent 9cb39dc889
commit 29042a9311
45 changed files with 487 additions and 390 deletions

View File

@@ -66,7 +66,7 @@ public final class LargeCocoon extends AbstractNpcAI
{
case "attack":
{
onCreatureAttacked(new OnCreatureAttacked(player, npc));
onCreatureAttacked(new OnCreatureAttacked(player, npc, null));
break;
}
case "attackPowerful":

View File

@@ -1,3 +1,4 @@
<html><body>Toyron:<br>
You! Aren't you here to find the <font color="LEVEL">book</font>?
Alright now, let's search for the intruder. It appears it's the Giant's Book he is after. Let us search around the bookshelf.<br>
Keep the tension up while searching, as the intruder may suddenly show himself.
</body></html>

View File

@@ -1,4 +1,4 @@
<html><body>Toyron:<br>
They're destroying the holy museum!<br>
Defeat them!
We cannot let the intruder be. Let us find him, and slay him.<br>
The intruder will not be easy to take down. Please use skills to bring him down.
</body></html>

View File

@@ -1,5 +1,6 @@
<html><body>Toyron:<br>
This museum displays the Giants' relics. Unfortunately, it's sometimes plagued by thieves.<br>
There are always more. We still uncover treasures in their ruins.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Toyron museum_teleport">"I'll return to the Museum Lobby now."</Button>
</body></html>
The Giants disappeared long ago, but we still uncover treasures in their ruins, even now.<br>
<button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Toyron museum_teleport">Return to the Museum Lobby</button>
<button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</button>
</body></html></body></html>

View File

@@ -24,7 +24,7 @@ import com.l2jmobius.gameserver.model.instancezone.Instance;
import com.l2jmobius.gameserver.model.quest.QuestState;
import ai.AbstractNpcAI;
import quests.Q10327_IntruderWhoWantsTheBookOfGiants.Q10327_IntruderWhoWantsTheBookOfGiants;
import quests.Q10542_SearchingForNewPower.Q10542_SearchingForNewPower;
/**
* Toyron AI.
@@ -37,7 +37,7 @@ public final class Toyron extends AbstractNpcAI
// Misc
private static final int TEMPLATE_ID = 182;
// Location
private static final Location MUSEUM_OUT = new Location(-114359, 260120, -1192);
private static final Location MUSEUM_OUT = new Location(-111464, 255828, -1440);
private Toyron()
{
@@ -57,7 +57,10 @@ public final class Toyron extends AbstractNpcAI
{
world.finishInstance(0);
}
player.teleToLocation(MUSEUM_OUT);
else
{
player.teleToLocation(MUSEUM_OUT);
}
}
return super.onAdvEvent(event, npc, player);
}
@@ -76,15 +79,15 @@ public final class Toyron extends AbstractNpcAI
final Instance world = npc.getInstanceWorld();
if ((world != null) && (world.getTemplateId() == TEMPLATE_ID))
{
final QuestState qs = player.getQuestState(Q10327_IntruderWhoWantsTheBookOfGiants.class.getSimpleName());
final QuestState qs = player.getQuestState(Q10542_SearchingForNewPower.class.getSimpleName());
if (qs != null)
{
switch (qs.getCond())
{
case 1:
case 3:
htmltext = "33004-01.html";
break;
case 2:
case 4:
htmltext = "33004-02.html";
break;
}