From 2678595e7dc973050327b87b84af8f849457f8d6 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 21 May 2024 23:56:45 -0300 Subject: Add some proof of concept for a possible future quest. --- npc/010-4-1/katze.txt | 1 + npc/017-1/_import.txt | 1 + npc/017-1/fairy_collector.txt | 1 + npc/017-1/inspector.txt | 40 ++++++++++++++++++++++++++++++++++++++++ npc/config/inspector.txt | 24 ++++++++++++++++++++++++ npc/scripts.conf | 1 + 6 files changed, 68 insertions(+) create mode 100644 npc/017-1/inspector.txt create mode 100644 npc/config/inspector.txt (limited to 'npc') diff --git a/npc/010-4-1/katze.txt b/npc/010-4-1/katze.txt index 737d6be0a..8d8114db7 100644 --- a/npc/010-4-1/katze.txt +++ b/npc/010-4-1/katze.txt @@ -144,6 +144,7 @@ OnLoadMobilia: if ($@GM_OVERRIDE) debugmes sprintf("Katze Donations: %s", fnum($KATZE_DONATION)); donpcevent "Katze::OnLoadMobilia"; + // TODO: INSPECTOR QUEST HANDLER = getq(LoFQuest_Inspector) } closeclientdialog; close; diff --git a/npc/017-1/_import.txt b/npc/017-1/_import.txt index 42925f9bb..7420b7e02 100644 --- a/npc/017-1/_import.txt +++ b/npc/017-1/_import.txt @@ -9,6 +9,7 @@ "npc/017-1/fairy_collector.txt", "npc/017-1/guards.txt", "npc/017-1/guild.txt", +"npc/017-1/inspector.txt", "npc/017-1/mapflags.txt", "npc/017-1/misc.txt", "npc/017-1/nowhere_man.txt", diff --git a/npc/017-1/fairy_collector.txt b/npc/017-1/fairy_collector.txt index fca6c2cce..fad061ada 100644 --- a/npc/017-1/fairy_collector.txt +++ b/npc/017-1/fairy_collector.txt @@ -7,6 +7,7 @@ // Cannot be completed yet, because not every piece of equipment is available ingame 017-1,135,106,0 script Royal Fairy NPC_FAIRY_B,{ + inspectorQuest(); .@n=getq(LoFQuest_Fairy); mesn; diff --git a/npc/017-1/inspector.txt b/npc/017-1/inspector.txt new file mode 100644 index 000000000..ffae2d420 --- /dev/null +++ b/npc/017-1/inspector.txt @@ -0,0 +1,40 @@ +// TMW2/LOF Script. +// Author: +// Jesusalva +// Description: +// Part of Katze quest +// See also +// npc/config/inspector.txt + +017-1,77,104,0 script Anselmo NPC_ANSELMO_BR,{ + .@q = getq(LoFQuest_Inspector); + mesn; + mesq l("Hello. My name is Anselmo and I'm investigating a recent string of robberies."); + if (BaseLevel < 50) close; + if (!is_staff()) close; // FIXME + next; + mesn; + mesq l("Well... Not robberies per se... Just cheese vanishing and being replaced by %s, which is super weird.", getitemlink(GoldenApple)); + next; + mesn; + mesq l("You look capable, will you help me solve these robberies? Of course, not for free."); + next; + if (askyesno() == ASK_NO) { + closeclientdialog; + close; + } + mesn; + mesq l("Excellent. I'd like you to ask around about the recent string of robberies."); + next; + mesn; + mesq l("But remember, they're stealing %s, not shinies, so try to limit your search a bit.", getitemlink(Cheese)); + setq LoFQuest_Inspector, 1, 0; + close; + +// function script inspector() -> Invokes strnpcinfo() internally + +OnInit: + .distance=5; + .sex = G_MALE; + end; +} diff --git a/npc/config/inspector.txt b/npc/config/inspector.txt new file mode 100644 index 000000000..93f1bc536 --- /dev/null +++ b/npc/config/inspector.txt @@ -0,0 +1,24 @@ +// TMW2/LOF Script. +// Author: +// Jesusalva +// Description: +// Inspector Quest core + +// Main logical loop, takes no argument +function script inspectorQuest { + .@npc$ = strnpcinfo(0); + if ($@GM_OVERRIDE) debugmes .@npc$; + .@q = getq(LoFQuest_Inspector); + if (.@q != 1) return; + select + l("Talk normally."), + l("Ask about the robberies."); + if (@menu == 1) { + clear; + return; + } + mes ""; + Exception("Oops, this is not yet implemented!", RB_SPEECH); + return; +} + diff --git a/npc/scripts.conf b/npc/scripts.conf index 204d22a09..ab2a6f850 100644 --- a/npc/scripts.conf +++ b/npc/scripts.conf @@ -153,6 +153,7 @@ "npc/functions/instances.txt", "npc/functions/captcha.txt", "npc/functions/dungeon.txt", +"npc/config/inspector.txt", "npc/config/config_blackbox.txt", // Maps specific scripts -- cgit v1.2.3-70-g09d2