// TMW2/LoF scripts.
// Authors:
// Jesusalva
// Description:
// Current Hurnscald Mayor
// Variable:
// SQuest_Sponsor
// Quest ID: 4
012-2,34,79,0 script Rakinorf, Mayor NPC_ANSELMO_BR,{
function resetSQS {
setq SQuest_Sponsor, 0, gettime(GETTIME_MONTH);
}
// Check monthly quest
.@d=getq2(SQuest_Sponsor);
if (.@d != gettime(GETTIME_MONTH)) resetSQS();
.@n=getq(General_Narrator);
.@q=getq(SQuest_Sponsor);
mesn;
mesq l("Ah... I need more beer to keep going... This is so awful...");
// Handle main storyline
if (.@n >= 5 && .@n < 6)
goto L_MainStory;
// Handle main storyline
// Core
.@q=getq(SQuest_Sponsor);
if (!(.@q & .questID) && getgmlevel()) goto L_Menu;
close;
L_Menu:
mesq l("I will reward you for 7 @@.", getitemlink(.itemID));
mes "";
menu
rif(countitem(.itemID) >= 7, l("Here they are!")), L_Finish,
l("Where can I find them?"),L_Where,
l("No, thanks."),L_Close;
L_Finish:
delitem .itemID, 7;
getitem StrangeCoin, rand(2,4);
.@q=getq(SQuest_Sponsor);
setq1 SQuest_Sponsor, .@q | .questID;
mes "";
mesn;
mesq l("Many thanks! Come back later to bring me extra @@!", getitemlink(.itemID));
close;
L_Where:
mes "";
mesq l("Ah, there are lots with Melina, downstairs.");
next;
L_Close:
closedialog;
goodbye;
close;
// Main Storyline
L_MainStory:
next;
// 5 - First time speaking
// setq2
// 0 - Not Assigned
// 1 - Need to bring Beer
// 2 - Need to find out how Arkim is doing
// 3 - Complete, Reluctancy node
// 4 - Told about Hurnscald Liberation Day, but didn't told where previous mayor is
// 5 - Told you to tell Airlia about.
// 6 - Airlia told you what she knew, must talk to Rakinorf
// 7 - Need to get levels (standard quest)
// 6 - Must visit Halinarzo Library
// 8 - TODO
.@n2=getq2(General_Narrator);
select
rif(getgmlevel(), l("Maybe I could give you more beer?")),
rif(.@n2 == 0, l("I know it may sound silly, but I need your help to find out who I am.")),
rif(.@n2 == 1, l("I have brought you the beer.")),
rif(.@n2 == 2, l("I know how many bat teeth and wings Arkim collected.")),
rif(.@n2 == 3, l("I know it may sound silly, but I need your help to find out who I am.")),
rif(.@n2 == 4, l("Where can I find the previous mayor?")),
rif(.@n2 == 6, l("Airlia told me XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")),
rif(.@n2 == 7, l("I think I'm ready.")),
l("Ok, thanks.");
mes "";
switch (@menu) {
case 1:
goto L_Menu; break;
case 2:
mesn;
mesq l("Not now... *hic* I need @@... *hic* Bring me seven if you *hic* can...", getitemlink(Beer));
setq2 General_Narrator, 1;
break;
case 3:
if (countitem(Beer) < 7) {
mesn;
mesq l("That's not *hic*... That's not what I asked you for...");
next;
mesn;
mesq l("Please bring me *hic*... Bring me 7 @@!", getitemlink(Beer));
close;
}
delitem Beer, 7;
getexp BaseLevel*10, JobLevel*3;
setq2 General_Narrator, 2;
mesn;
mesq l("Aaaaaaaahhhhh.... Much better now *hic*.");
next;
mesn;
mesq l("Could you *hic* do me a favor? Arkim, on a cave southeast of *hic* here, is collecting some stuff.");
next;
mesn;
mesq l("He's an *hic* hermit, and collects *hic* Bat teeth and wings... Tell me how many he collected!");
break;
case 4:
mesn;
mesq l("So? How many *hic* he collect?");
mesc l("Protip: Arkim is in a cave southeast of here and is an hermit.");
input .@am;
mes "";
// If players give up to 10 wings/teeths since you check, I don't mind
if (.@am < ($ARKIM_ST-10) || .@am > $ARKIM_ST)
goto L_Fail;
mesn;
mesq l("Thanks. You can go, now.");
getexp BaseLevel*2, JobLevel;
setq2 General_Narrator, 3;
break;
case 5:
mesn;
mesq l("Maybe later.");
break;
}
close;
L_Fail:
mesn;
mes l("Eh? You sure?");
if (.@am > $ARKIM_ST)
mes l("I don't think he could have collected that many!");
else
mes l("Last time they told me he collected more than that...");
next;
mesn;
mesq l("Could you try again, please?");
// No penalty? Really??
close;
OnInit:
.questID=4;
.itemID=Beer;
.sex=G_MALE;
.distance=5;
end;
}