// TMW2 scripts.
// Author:
// Jesusalva
// Description:
// Leads the Alliance in the Fortress Town
025-1,96,26,0 script Commander Povo NPC_BRGUARD_SPEAR,{
mesn;
mesq l("Greetings %s, I am %s, the man in charge for the Alliance ocupation of Fortress Town.", (strcharinfo(0) == $MOST_HEROIC$ ? lg("Hero") : lg("Adventurer")), .name$);
next;
// Endtrail
mes "";
mesc l("@@ You need to wait further releases to continue this quest!", b(l("WARNING:"))), 1;
close;
OnInit:
.sex = G_MALE;
.distance = 5;
end;
}
/////////////////////////////////////////////////////////////////////////////////
025-1,59,86,0 script Commander Cadis NPC_BRGUARD_SWORD,{
function cadisReward;
mesn;
mesq l("Greetings %s, I am %s, I am in charge of monster extermination.", (strcharinfo(0) == $MOST_HEROIC$ ? lg("Hero") : lg("Adventurer")), .name$);
next;
// Check for ongoing quests
if (getq(FortressQuest_SlimeHunter) == 1)
goto L_SlimeHunter;
if (getq(FortressQuest_Over100) == 1)
goto L_Over100;
mesn;
mesq l("I have extremely difficult quests for you; They are more painful than a Grand Hunter Quest, because I don't admit wimps fighting with me.");
next;
mesn;
mesq l("You will be rewarded by me shall you succeed in any of the tasks.");
mesc l("%s: Once accepted, you must complete them before taking another one.", b(l("WARNING")));
// Well, we *could* make it more GHQ-like but lazy devs are lazy.
next;
do
{
select
l("I'm not interested."),
rif(!getq(FortressQuest_SlimeHunter), l("The Great Slime Hunt")),
rif(!getq(FortressQuest_Over100), l("The Great Over 100 Hunt"));
mes "";
switch (@menu) {
case 1:
close;
case 2:
mesn;
mesq l("You'll have to slay %s %s for me! I don't care which ones, just SLAY THEM!", fnum(.million), l("slimes"));
next;
select
l("Accept"),
l("Reject");
mes "";
if (@menu == 1) {
setq1 FortressQuest_SlimeHunter, 1;
mesn;
mesq l("Then get to work already!");
close;
}
break;
case 3:
mesn;
mesq l("You'll have to slay %s %s for me! I don't care which ones, just SLAY THEM!", fnum(.million), l("monsters of at least level 100"));
next;
select
l("Accept"),
l("Reject");
mes "";
if (@menu == 1) {
setq1 FortressQuest_Over100, 1;
mesn;
mesq l("Then get to work already!");
close;
}
break;
}
}
close;
L_SlimeHunter:
cadisReward(FortressQuest_SlimeHunter);
close;
L_Over100:
cadisReward(FortressQuest_Over100);
close;
function cadisReward {
.@kill=getq2(getarg(0));
.@rewa=getq3(getarg(0));
mesn;
mesq l("Thus far you've slain %s/%s %s for me!", fnum(.@kill), fnum(.million), b(l("Slimes")));
inventoryplace NPCEyes, 4, Iten, 2;
// ***** ***** ***** Rewards ***** ***** *****
if (.@kill >= .tier1 && .@rewa < 1) {
mesc l("Milestone reached: %s kills", fnum(.tier1));
setq3 getarg(0), 1;
getitem MercenaryBoxsetDD, 3;
getitem SacredImmortalityPotion, 2;
getitem MercenaryBoxsetE, 1;
}
if (.@kill >= .tier2 && .@rewa < 2) {
mesc l("Milestone reached: %s kills", fnum(.tier2));
setq3 getarg(0), 2;
getitem MercenaryBoxsetEE, 1;
getitem MagicApple, 1;
getitem EquipmentBlueprintE, 1;
getitem IridiumOre, 2;
}
if (.@kill >= .tier3 && .@rewa < 3) {
mesc l("Milestone reached: %s kills", fnum(.tier3));
setq3 getarg(0), 3;
getitem MercenaryBoxsetEE, 2;
getitem StrangeCoin, 50;
getitem EarthPowder, 2;
getitem PlatinumOre, 1;
}
if (.@kill >= .tier4 && .@rewa < 4) {
mesc l("Milestone reached: %s kills", fnum(.tier4));
setq3 getarg(0), 4;
getitem MercenaryBoxsetEE, 3;
getitem ElixirOfLife, 5;
getitem EarthPowder, 2;
getitem PlatinumOre, 1;
}
// Quest complete
if (.@kill >= .million) {
mesc b(l("Quest complete: Congratulations!")), 3;
setq1 getarg(0), 2;
setq3 getarg(0), 5;
getitem MercenaryBoxsetEE, 5;
getitem StrangeCoin, 100;
getitem EarthPowder, 3;
getitem any(LuckFruit, DexterityFruit, IntelligenceFruit, VitalityFruit, AgilityFruit, StrengthFruit), 1;
getitem MysteriousFruit, 1;
}
return;
}
OnInit:
.sex = G_MALE;
.distance = 5;
.million = 1000000;
.tier1 = 10000;
.tier2 = 50000;
.tier3 = 250000;
.tier4 = 500000;
end;
}
// Commander Cadis Questcheck
function script CadisQuestCheck {
if (!playerattached())
return;
.@mobId=getarg(0, killedrid);
if (getq(FortressQuest_SlimeHunter) == 1) {
// Register the kill
if (compare("slime", strtolower(strmobinfo(1, .@mobId)))) {
setq2 FortressQuest_SlimeHunter, getq2(FortressQuest_SlimeHunter)+1;
// Report every 1000 kills
if (getq2(FortressQuest_SlimeHunter) % 1000 == 0)
dispbottom l("Cadis : You have slain %s %s out of a million.", fnum(getq2(FortressQuest_SlimeHunter)), l("slimes"));
}
}
if (getq(FortressQuest_Over100) == 1) {
// Register the kill
if (getmonsterinfo(.@mobId, MOB_LV) >= 100) {
setq2 FortressQuest_Over100, getq2(FortressQuest_Over100)+1;
// Report every 1000 kills
if (getq2(FortressQuest_Over100) % 1000 == 0)
dispbottom l("Cadis : You have slain %s %s out of a million.", fnum(getq2(FortressQuest_SlimeHunter)), l("mobs over lv 100"));
}
}
return;
}