// TMW2 scripts.
// Author:
// Jesusalva
// Description:
// 001-7 Monster King's Village Configuration File
// Part of Player Quest, see 023-3 scope and 024-16
// (C) Moubootaur Legends, 2019
001-7,91,89,0 script #Init0233 NPC_HIDDEN,0,0,{
end;
OnTouch:
.@q=getq(General_Narrator);
.@q2=getq2(General_Narrator);
// Cheater Detected
if (.@q < 15) {
warp "Save", 0, 0;
percentheal -100, -100;
return false;
}
if (.@q == 15) {
dispbottom lg("I'm not a coward! I must press forward!");
end;
}
.@mapn$="023-3";
warp .@mapn$, 48, 23;
end;
}
001-7,59,44,0 script #Init02331 NPC_HIDDEN,0,0,{
end;
OnTouch:
.@n=getq(General_Narrator);
.@q=getq2(FrostiaQuest_Homunculus);
// Cheater Detected
if (.@n < 15) {
warp "Save", 0, 0;
percentheal -100, -100;
return false;
}
if (.@q < 15) {
dispbottom l("It seems to be sealed.");
end;
}
.@mapn$="023-3-1";
warp .@mapn$, any(45,46), 79;
end;
}
// Okay, we're done with basic warps
001-7,50,112,0 script Abandoned Fountain#MKH NPC_NO_SPRITE,{
.@q=getq2(FrostiaQuest_Homunculus);
mesn;
mesc l("At a first glance, it seems to be full of water, but inspecting closer, it is not.");
next;
mesn;
mesc l("It is difficult to describe, it is like if it was mixed with mana itself. Drinking a bit of it was enough to recover your MP.");
percentheal 0, 100;
if (!(.@q & .objID))
setq2 FrostiaQuest_Homunculus, .@q|.objID;
close;
OnInit:
.objID=1;
.distance=2;
end;
}
001-7,48,111,0 script Sign#MKH NPC_NO_SPRITE,{
.@q=getq2(FrostiaQuest_Homunculus);
mesn;
mesc l("Welcome to ###########.");
mesc l("Yes, we have @@!", getitemlink(Coffee));
next;
mesn;
mesc l("The village name is difficult to read.");
if (!(.@q & .objID))
setq2 FrostiaQuest_Homunculus, .@q|.objID;
close;
OnInit:
.objID=2;
.distance=2;
end;
}
001-7,41,104,0 script Abandoned House#MKH1 NPC_NO_SPRITE,{
.@q=getq2(FrostiaQuest_Homunculus);
mesn;
mesc l("The door won't budge.");
if (!(.@q & .objID))
setq2 FrostiaQuest_Homunculus, .@q|.objID;
close;
OnInit:
.objID=4;
.distance=2;
end;
}
001-7,59,104,0 script Abandoned House#MKH2 NPC_NO_SPRITE,{
.@q=getq2(FrostiaQuest_Homunculus);
mesn;
mesc l("It seems to have been abandoned a long time ago, but the chimney is still going?");
if (!(.@q & .objID))
setq2 FrostiaQuest_Homunculus, .@q|.objID;
close;
OnInit:
.objID=8;
.distance=2;
end;
}
001-7,41,99,0 script Abandoned House#MKH3 NPC_NO_SPRITE,{
.@q=getq2(FrostiaQuest_Homunculus);
mesn;
mesc l("The knob has... melted down? What?");
if (!(.@q & .objID))
setq2 FrostiaQuest_Homunculus, .@q|.objID;
close;
OnInit:
.objID=16;
.distance=1;
end;
}
001-7,59,99,0 script Abandoned House#MKH4 NPC_NO_SPRITE,{
.@q=getq2(FrostiaQuest_Homunculus);
mesn;
mesc l("There seems to be signs of a fight long forgotten, but it still reeks blood.");
if (!(.@q & .objID))
setq2 FrostiaQuest_Homunculus, .@q|.objID;
close;
OnInit:
.objID=32;
.distance=1;
end;
}
001-7,33,89,0 script Apple Trees#MKH1 NPC_NO_SPRITE,{
.@q=getq2(FrostiaQuest_Homunculus);
mesn;
mesc l("It seems to be growing apples, but by the amount of magic particles...");
next;
mesn;
mesc l("A close inspection reveals nothing out of ordinary. It seems to be well kept.");
next;
if (!(.@q & 1)) {
mesn strcharinfo(0);
mesc l("You're hesitant to pick one, they could be dangerous.");
close;
}
mesn strcharinfo(0);
mesc l("You carefully pick a @@. It looks delicious, but you probably will need it later.", getitemlink(Manapple));
if (!(.@q & .objID)) {
inventoryplace Manapple, 1;
getitem Manapple, 1;
setq2 FrostiaQuest_Homunculus, .@q|.objID;
}
close;
OnInit:
.objID=64;
.distance=2;
end;
}
001-7,40,88,0 script Abandoned House#MKH6 NPC_NO_SPRITE,{
.@q=getq2(FrostiaQuest_Homunculus);
if (!(.@q & 64)) {
mesn strcharinfo(0);
mesc l("I should check the Apple Garden first.");
close;
}
// I hope this is right
if ((.@q & 60) < 4) {
mesn strcharinfo(0);
mesc l("I better not disturb the hut owner.");
close;
}
mesn;
mesc l("It's locked. But a close inspection reveals a small key under the rug.");
next;
mesn;
mesc l("Maybe there's a locked door somewhere, and this key will fit?");
if (!(.@q & .objID))
setq2 FrostiaQuest_Homunculus, .@q|.objID;
close;
OnInit:
.objID=128;
.distance=1;
end;
}
001-7,50,99,0 script Abandoned House#MKH5 NPC_NO_SPRITE,{
.@q=getq2(FrostiaQuest_Homunculus);
if (!(.@q & 128)) {
mesn;
mesc l("It's locked.");
close;
}
mesn;
mesc l("It's locked.");
next;
mesn;
mesc l("You use the small key from the apple garden hut. It fits neatly.");
next;
mesn;
mesc l("The hut is... empty. And it doesn't have a fireplace, either.");
next;
mesn;
mesc l("You don't know how the chimney keeps producing smoke. It must be using hiding magic.");
next;
mesn;
mesc l("However took control of this village is no ordinary mage. There's a switch on the wall.");
next;
mesn;
mesc l("You flip the switch. Nothing happens.");
// You can unflip it :>
setq2 FrostiaQuest_Homunculus, .@q^.objID;
close;
OnInit:
.objID=256;
.distance=1;
end;
}