Warehouse Keeper's Pastime (384) fix.

Source: https://bitbucket.org/l2jserver
This commit is contained in:
MobiusDevelopment
2019-08-16 09:52:17 +00:00
parent ca1016aa5d
commit 3b6917814d

View File

@@ -106,6 +106,7 @@ public class Q00384_WarehouseKeepersPastime extends Quest
switch (npc.getId()) switch (npc.getId())
{ {
case CLIFF: case CLIFF:
{
if (qs.isCreated()) if (qs.isCreated())
{ {
if (player.getLevel() >= 40) if (player.getLevel() >= 40)
@@ -119,7 +120,9 @@ public class Q00384_WarehouseKeepersPastime extends Quest
return "30182-06.html"; return "30182-06.html";
} }
return "30182-07.html"; return "30182-07.html";
}
case WAREHOUSE_CHIEF_BAXT: case WAREHOUSE_CHIEF_BAXT:
{
if (qs.getMemoState() > 0) if (qs.getMemoState() > 0)
{ {
if (getQuestItemsCount(player, Q_IRONGATE_MEDAL) < 10) if (getQuestItemsCount(player, Q_IRONGATE_MEDAL) < 10)
@@ -128,6 +131,8 @@ public class Q00384_WarehouseKeepersPastime extends Quest
} }
return "30685-07.html"; return "30685-07.html";
} }
break;
}
} }
return htmltext; return htmltext;
} }
@@ -143,7 +148,6 @@ public class Q00384_WarehouseKeepersPastime extends Quest
return event; return event;
} }
final int ask = Integer.parseInt(event);
switch (npc.getId()) switch (npc.getId())
{ {
case CLIFF: case CLIFF:
@@ -157,25 +161,34 @@ public class Q00384_WarehouseKeepersPastime extends Quest
playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE); playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
return "30182-05.htm"; return "30182-05.htm";
} }
final int ask = Integer.parseInt(event);
switch (ask) switch (ask)
{ {
case 3: case 3:
{
return "30182-09a.htm"; return "30182-09a.htm";
}
case 4: case 4:
{
return "30182-02.htm"; return "30182-02.htm";
}
case 5: case 5:
{
if (npc.getId() != CLIFF) if (npc.getId() != CLIFF)
{ {
return getNoQuestMsg(player); return getNoQuestMsg(player);
} }
return "30182-03.htm"; return "30182-03.htm";
}
case 6: case 6:
{ {
qs.exitQuest(true); qs.exitQuest(true);
return "30182-08.html"; return "30182-08.html";
} }
case 9: case 9:
{
return "30182-09.html"; return "30182-09.html";
}
case 7: case 7:
{ {
if (getQuestItemsCount(player, Q_IRONGATE_MEDAL) >= 10) if (getQuestItemsCount(player, Q_IRONGATE_MEDAL) >= 10)
@@ -239,16 +252,25 @@ public class Q00384_WarehouseKeepersPastime extends Quest
break; break;
} }
case WAREHOUSE_CHIEF_BAXT: case WAREHOUSE_CHIEF_BAXT:
{
final int ask = Integer.parseInt(event);
switch (ask) switch (ask)
{ {
case 3: case 3:
{
return "30685-09a.html"; return "30685-09a.html";
}
case 6: case 6:
{
qs.exitQuest(true); qs.exitQuest(true);
return "30685-08.html"; return "30685-08.html";
}
case 9: case 9:
{
return "30685-09.html"; return "30685-09.html";
}
case 7: case 7:
{
if (getQuestItemsCount(player, Q_IRONGATE_MEDAL) >= 10) if (getQuestItemsCount(player, Q_IRONGATE_MEDAL) >= 10)
{ {
takeItems(player, Q_IRONGATE_MEDAL, 10); takeItems(player, Q_IRONGATE_MEDAL, 10);
@@ -257,7 +279,9 @@ public class Q00384_WarehouseKeepersPastime extends Quest
return "30685-10.html"; return "30685-10.html";
} }
return "30685-11.html"; return "30685-11.html";
}
case 8: case 8:
{
if (getQuestItemsCount(player, Q_IRONGATE_MEDAL) >= 100) if (getQuestItemsCount(player, Q_IRONGATE_MEDAL) >= 100)
{ {
takeItems(player, Q_IRONGATE_MEDAL, 100); takeItems(player, Q_IRONGATE_MEDAL, 100);
@@ -266,6 +290,7 @@ public class Q00384_WarehouseKeepersPastime extends Quest
return "30685-12.html"; return "30685-12.html";
} }
return "30685-11.html"; return "30685-11.html";
}
case 10: case 10:
case 11: case 11:
case 12: case 12:
@@ -304,6 +329,8 @@ public class Q00384_WarehouseKeepersPastime extends Quest
return beforeReward(player, qs, (ask - 54), WAREHOUSE_CHIEF_BAXT); return beforeReward(player, qs, (ask - 54), WAREHOUSE_CHIEF_BAXT);
} }
} }
break;
}
} }
} }
return super.onAdvEvent(event, npc, player); return super.onAdvEvent(event, npc, player);
@@ -648,162 +675,214 @@ public class Q00384_WarehouseKeepersPastime extends Quest
switch (npc.getId()) switch (npc.getId())
{ {
case HUNTER_GARGOYLE: case HUNTER_GARGOYLE:
{
if (getRandom(1000) < 328) if (getRandom(1000) < 328)
{ {
giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true); giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true);
} }
break; break;
}
case DUST_WIND: case DUST_WIND:
{
if (getRandom(100) < 35) if (getRandom(100) < 35)
{ {
giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true); giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true);
} }
break; break;
}
case THUNDER_WYRM: case THUNDER_WYRM:
{
if (getRandom(1000) < 312) if (getRandom(1000) < 312)
{ {
giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true); giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true);
} }
break; break;
}
case DUST_WIND_HOLD: case DUST_WIND_HOLD:
{
if (getRandom(100) < 35) if (getRandom(100) < 35)
{ {
giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true); giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true);
} }
break; break;
}
case THUNDER_WYRM_HOLD: case THUNDER_WYRM_HOLD:
{
if (getRandom(1000) < 312) if (getRandom(1000) < 312)
{ {
giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true); giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true);
} }
break; break;
}
case HUNTER_GARGOYLE_HOLD: case HUNTER_GARGOYLE_HOLD:
{
if (getRandom(1000) < 328) if (getRandom(1000) < 328)
{ {
giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true); giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true);
} }
break; break;
}
case GIANT_MONSTEREYE: case GIANT_MONSTEREYE:
{
if (getRandom(1000) < 176) if (getRandom(1000) < 176)
{ {
giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true); giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true);
} }
break; break;
}
case ROT_GOLEM: case ROT_GOLEM:
{
if (getRandom(1000) < 226) if (getRandom(1000) < 226)
{ {
giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true); giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true);
} }
break; break;
}
case WEIRD_DRAKE: case WEIRD_DRAKE:
{
if (getRandom(1000) < 218) if (getRandom(1000) < 218)
{ {
giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true); giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true);
} }
break; break;
}
case CARINKAIN: case CARINKAIN:
{
if (getRandom(1000) < 216) if (getRandom(1000) < 216)
{ {
giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true); giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true);
} }
break; break;
}
case GRAVE_GUARD: case GRAVE_GUARD:
{
if (getRandom(1000) < 312) if (getRandom(1000) < 312)
{ {
giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true); giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true);
} }
break; break;
}
case TULBEN: case TULBEN:
{
if (getRandom(1000) < 522) if (getRandom(1000) < 522)
{ {
giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true); giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true);
} }
break; break;
}
case DRAGON_BEARER_CHIEF: case DRAGON_BEARER_CHIEF:
{
if (getRandom(100) < 38) if (getRandom(100) < 38)
{ {
giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true); giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true);
} }
break; break;
}
case DRAGON_BEARER_WARRIOR: case DRAGON_BEARER_WARRIOR:
{
if (getRandom(100) < 39) if (getRandom(100) < 39)
{ {
giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true); giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true);
} }
break; break;
}
case DRAGON_BEARER_ARCHER: case DRAGON_BEARER_ARCHER:
{
if (getRandom(1000) < 372) if (getRandom(1000) < 372)
{ {
giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true); giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true);
} }
break; break;
}
case CONGERER_LORD: case CONGERER_LORD:
{
if (getRandom(1000) < 802) if (getRandom(1000) < 802)
{ {
giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true); giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true);
} }
break; break;
}
case CONGERER: case CONGERER:
{
if (getRandom(1000) < 844) if (getRandom(1000) < 844)
{ {
giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true); giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true);
} }
break; break;
}
case NIGHTMARE_GUIDE: case NIGHTMARE_GUIDE:
{
if (getRandom(1000) < 118) if (getRandom(1000) < 118)
{ {
giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true); giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true);
} }
break; break;
}
case NIGHTMARE_KEEPER: case NIGHTMARE_KEEPER:
{
if (getRandom(100) < 17) if (getRandom(100) < 17)
{ {
giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true); giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true);
} }
break; break;
}
case NIGHTMARE_LORD: case NIGHTMARE_LORD:
{
if (getRandom(1000) < 144) if (getRandom(1000) < 144)
{ {
giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true); giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true);
} }
break; break;
}
case CADEINE: case CADEINE:
{
if (getRandom(1000) < 162) if (getRandom(1000) < 162)
{ {
giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true); giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true);
} }
break; break;
}
case SANHIDRO: case SANHIDRO:
{
if (getRandom(100) < 25) if (getRandom(100) < 25)
{ {
giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true); giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true);
} }
break; break;
}
case CONNABI: case CONNABI:
{
if (getRandom(1000) < 272) if (getRandom(1000) < 272)
{ {
giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true); giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true);
} }
break; break;
}
case BARTAL: case BARTAL:
{
if (getRandom(100) < 27) if (getRandom(100) < 27)
{ {
giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true); giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true);
} }
break; break;
}
case LUMINUN: case LUMINUN:
{
if (getRandom(100) < 32) if (getRandom(100) < 32)
{ {
giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true); giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true);
} }
break; break;
}
case INNERSEN: case INNERSEN:
{
if (getRandom(1000) < 346) if (getRandom(1000) < 346)
{ {
giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true); giveItemRandomly(qs.getPlayer(), npc, Q_IRONGATE_MEDAL, 1, 0, 1, true);
} }
break; break;
} }
}
} }
return super.onKill(npc, killer, isSummon); return super.onKill(npc, killer, isSummon);