L2JMobius

Prelude of War instances.FortressOfTheDead; quests.Q11026_PathOfDestinyConviction;

7exce · 7 · 7298

Offline 7exce

  • Vassal
  • *
    • Posts: 4
So when I go to the fortress, vampire soldiers show up to kill and after that nothing else happens.


Some of these:
game\data\scripts\instances\FortressOfTheDead;
game\data\scripts\quests\Q11026_PathOfDestinyConviction;

Waiting for answers.



Offline 7exce

  • Vassal
  • *
    • Posts: 4
Debug the code and tell us where it stops.

Nothing is showed in the console.
Code: [Select]
[22/08 08:36:29] Siege of Gludio: Sun Aug 30 16:00:00 BRT 2020
[22/08 08:36:29] Siege of Dion: Sun Aug 30 16:00:00 BRT 2020
[22/08 08:36:29] Siege of Giran: Sun Aug 30 16:00:00 BRT 2020
[22/08 08:36:29] Siege of Oren: Sun Aug 30 16:00:00 BRT 2020
[22/08 08:36:29] Siege of Aden: Sun Aug 30 16:00:00 BRT 2020
[22/08 08:36:29] Siege of Innadril: Sun Aug 30 20:00:00 BRT 2020
[22/08 08:36:29] Siege of Goddard: Sun Aug 30 20:00:00 BRT 2020
[22/08 08:36:29] Siege of Rune: Sun Aug 30 20:00:00 BRT 2020
[22/08 08:36:29] Siege of Schuttgart: Sun Aug 30 20:00:00 BRT 2020
[22/08 08:36:33] FortManager: Loaded 20 fortress.
[22/08 08:36:38] SiegeScheduleData: Loaded 2 siege schedulers.
[22/08 08:36:41] CastleManorManager: Loaded 258 seeds.
[22/08 08:36:49] CastleManorManager: Manor data loaded.
[22/08 08:36:53] SiegeGuardManager: Loaded 0 siege guards tickets.
[22/08 08:36:53] QuestManager: Loaded 309 quests.
[22/08 08:36:53] QuestManager: Loaded 379 scripts.
[22/08 08:36:58] TaskManager: Loaded 5 Tasks.
[22/08 08:36:59] MailManager: Loaded 0 messages.
[22/08 08:37:02] PunishmentManager: Loaded 0 active and 0 expired punishments.
[22/08 08:37:02] IdFactory: Free ObjectID's remaining: 1878990557
[22/08 08:37:02] OfflineTraderTable: Loading offline traders...
[22/08 08:37:03] OfflineTraderTable: Loaded 0 offline traders.
[22/08 08:37:15] GameServer: Started, using 1220 of 4096 MB total memory.
[22/08 08:37:15] GameServer: Maximum number of connected players is 2000.
[22/08 08:37:15] GameServer: Server loaded in 282 seconds.
[22/08 08:37:38] ClientNetworkManager: Listening on 0.0.0.0:7777
[22/08 08:37:41] LoginServerThread: Connecting to login on 127.0.0.1:9014
[22/08 08:38:30] LoginServerThread: Registered on login as Server 2: Sieghardt
[22/08 09:00:02] GlobalVariablesManager: Stored 7 variables.


I know less of java programing but if you mean this:

Code: [Select]

private static final int KAIN_PROPHECY_MACHINE_FRAGMENT = 39538;
// Location
private static final Location VON_HELLMAN_LOC = new Location(57963, -28676, 568, 49980);
private static final Location MYSTERIOUS_WIZARD_LOC = new Location(57982, -28645, 568);
private static final Location KAIN_VAN_HALTER_LOC = new Location(57963, -28676, 568, 49980);
// Misc
private static final int TEMPLATE_ID = 254;

public FortressOfTheDead()
{
super(TEMPLATE_ID);
addStartNpc(KAIN_VAN_HALTER);
addFirstTalkId(KAIN_VAN_HALTER, MYSTERIOUS_WIZARD);
addTalkId(KAIN_VAN_HALTER, MYSTERIOUS_WIZARD);
addKillId(VAMPIRIC_SOLDIER, VON_HELLMAN);
}

@Override
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
String htmltext = null;
if (event.equals("enterInstance"))
{
enterInstance(player, npc, TEMPLATE_ID);
}
else
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
switch (event)
{
case "33979-01.html":
case "33979-02.html":
case "33979-03.html":
case "33979-04.html":
case "33979-05.html":
case "33979-06.html":
case "33979-07.html":
case "33979-08.html":
case "33979-09.html":
case "33979-10.html":
{
htmltext = event;
break;
}
case "exitInstance":
{
world.finishInstance(0);
break;
}
case "vampire_dead":
{
addSpawn(VON_HELLMAN, VON_HELLMAN_LOC, false, 0, false, world.getId());
break;
}


Online Mobius

  • Distinguished King
  • *****
    • Posts: 16135
Use
System.out.prinltn("test1");
on random part of the code
to see where script reaches.


Offline 7exce

  • Vassal
  • *
    • Posts: 4
Use
System.out.prinltn("test1");
on random part of the code
to see where script reaches.

I put the it here:
Code: [Select]
case "vampire_dead":
{
System.out.prinltn("test1");
addSpawn(VON_HELLMAN, VON_HELLMAN_LOC, false, 0, false, world.getId());
break;
}


And the gameserver send me this:

Code: [Select]
[22/08 11:11:14] GameServer: Failed to execute script list!
java.lang.RuntimeException:
----------------
File diagnostics
----------------

-----------------------
Compilation diagnostics
-----------------------
ERROR: C:\L2J_Mobius_7.0_PreludeOfWar\game\data\scripts\instances\FortressOfTheDead\FortressOfTheDead.java, Line 96, Column 59
code: compiler.err.cant.resolve.location.args
message: cannot find symbol
  symbol:   method prinltn(java.lang.String)
  location: variable out of type java.io.PrintStream

at org.l2jmobius.gameserver.scripting.java.JavaExecutionContext.executeScripts(JavaExecutionContext.java:171)
at org.l2jmobius.gameserver.scripting.ScriptEngineManager.executeScriptList(ScriptEngineManager.java:180)
at org.l2jmobius.gameserver.GameServer.<init>(GameServer.java:381)
at org.l2jmobius.gameserver.GameServer.main(GameServer.java:505)

The column ends on 53.



Offline 7exce

  • Vassal
  • *
    • Posts: 4
I solved.
I find this:
Code: [Select]
public String onKill(Npc npc, PlayerInstance player, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
if (npc.getId() == VAMPIRIC_SOLDIER)
{
if (world.getAliveNpcs(VAMPIRIC_SOLDIER).isEmpty())
{
startQuestTimer("vampire_dead", 3000, npc, player);
}
}
else if (npc.getId() == VON_HELLMAN)
{
npc.deleteMe();
playMovie(player, Movie.ERT_QUEST_A);
startQuestTimer("hellman_dead", 6000, npc, player);
}
}
return super.onKill(npc, player, isSummon);
}

And set to this:
Code: [Select]
public String onKill(Npc npc, PlayerInstance player, boolean isSummon)
{
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
if (npc.getId() == VAMPIRIC_SOLDIER)
{
if (world.getAliveNpcs(VAMPIRIC_SOLDIER).isEmpty())
{
startQuestTimer("vampire_dead", 180, npc, player);
}
}
else if (npc.getId() == VON_HELLMAN)
{
npc.deleteMe();
playMovie(player, Movie.ERT_QUEST_A);
startQuestTimer("hellman_dead", 180, npc, player);
}
}
return super.onKill(npc, player, isSummon);
}

Probably something with time difference on java.

Thanks Mobius.