// TMW2 scripts.
// Authors:
// Jesusalva
// Description:
// Questmaker Handbook 14.0 (F = Favorable)
024-1,32,26,0 script Rydel NPC_ELF,{
.@q = getq(FrostiaQuest_Rydel);
if (BaseLevel < 50) {
mesc l("The elf seems busy. He ignores you.");
close;
}
if (.@q == 0) {
if (frally()) goto L_Start_F;
else goto L_Start_U;
}
else if (.@q == 1) {
if (frally()) goto L_Submit_F;
else goto L_Submit_U;
}
else if (.@q == 2) {
if (frally()) goto L_Done_F;
else goto L_Done_U;
}
Exception("Invalid quest state - "+str(.@q));
end;
L_Start_F:
mesn;
mesq lg("Hey gal, could you do me a little favor?", "Hey pal, could you do me a little favor?");
next;
mesn;
mesq l("Bring me %d %s so I may study its properties and improve our town water quality!", 3, getitemlink(BottleOfDivineWater));
setq FrostiaQuest_Rydel, 1;
close;
L_Submit_F:
mesn;
mesq l("Did you got the %d %s I've asked?", 3, getitemlink(BottleOfDivineWater));
next;
if (askyesno() == ASK_YES) {
if (countitem(BottleOfDivineWater) < 3) {
mesn;
mesq l("You've been spending too much time with humans. You are picking up bad habits from them like lying. Be careful.");
close;
}
delitem BottleOfDivineWater, 3;
getexp 24000, 0;
setq FrostiaQuest_Rydel, 2;
mesn;
mesq lg("Thanks to you, my friend, we will soon have good water to drink.");
}
close;
L_Done_F:
mesn;
mesq l("I am not done purifying the water yet. This may take years, but it'll be worth it.");
next;
mesn;
mesq l("By the way, I've heard that the name of the wizard of Aethyr is the key to open its gates. But I don't know neither where the gates are, nor who is the \"wizard of Aethyr\".");
close;
/////////////////////////////////////////////////////////////////////////////////
L_Start_U:
mesn;
mesq l("Hey silly %s, I need a favor from you.", get_race());
next;
mesn;
mesq l("I am not content with our water supply. It gives us common water, but we of the superior race deserve better water.");
next;
mesn;
mesq l("So! Bring me %d %s so I may study its properties and make a purifier or enhancer for our well.", 3, getitemlink(BottleOfDivineWater));
setq FrostiaQuest_Rydel, 1;
close;
L_Submit_U:
mesn;
mesq l("Did you got the %d %s I've asked?", 3, getitemlink(BottleOfDivineWater));
next;
if (askyesno() == ASK_YES) {
if (countitem(BottleOfDivineWater) < 3) {
mesn;
mesq l("You liar, I'll teach you a lesson you won't forget!");
mesc l("%s slaps you!", .name$);
percentheal -30, 0;
close;
}
delitem BottleOfDivineWater, 3;
getexp 24000, 0;
setq FrostiaQuest_Rydel, 2;
mesn;
mesq l("Thanks to you, lowly %s, we will soon have water we deserve!", get_race());
}
close;
L_Done_U:
mesn;
mesq l("I won't share our water with you!");
next;
mesn;
mesq l("The name of the wizard of Aethyr is the key to open its gates. I've heard it'll open for a lowly %s as you, as long that you know both. But I don't think anyone here would share that with you!", get_race());
close;
OnInit:
.@npcId = getnpcid(.name$);
setunitdata(.@npcId, UDT_HEADBOTTOM, CottonTrousers);
setunitdata(.@npcId, UDT_HEADMIDDLE, LeatherShirt);
setunitdata(.@npcId, UDT_HEADTOP, Beard);
setunitdata(.@npcId, UDT_HAIRSTYLE, 4);
setunitdata(.@npcId, UDT_HAIRCOLOR, 1);
.sex = G_MALE;
.distance = 5;
end;
}