summaryrefslogtreecommitdiff
path: root/npc/005-5/nylo.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/005-5/nylo.txt')
-rw-r--r--npc/005-5/nylo.txt50
1 files changed, 50 insertions, 0 deletions
diff --git a/npc/005-5/nylo.txt b/npc/005-5/nylo.txt
index 18c3d3148..338614040 100644
--- a/npc/005-5/nylo.txt
+++ b/npc/005-5/nylo.txt
@@ -13,12 +13,14 @@
l("Visiting the bank too right? We're only a small village but Cynric is the best bank guy I know.");
.@q=getq(CandorQuest_Marggo);
+ .@q2=getq2(CandorQuest_Marggo);
do
{
select
l("Yeah, you're right."),
l("You store a large collection of goods. Could you perhaps sell me some?"),
rif(!.@q,l("What do you for a living?")),
+ rif(.@q && .@q2 < gettimetick(2),l("Can I help you again?")),
l("What is banking?");
switch (@menu)
{
@@ -57,6 +59,9 @@
goto L_Main;
break;
case 4:
+ goto L_Repeat;
+ break;
+ case 5:
nylo_explain();
.@mask=0;
do {
@@ -143,6 +148,51 @@ L_Main:
closeclientdialog;
close;
+L_Repeat:
+ mesn;
+ mesq l("Why, of course! But I can't reward you so well this time.");
+ next;
+ mesn;
+ mes l("Eight Maggots will rise from the ground and will start destroying the crops.");
+ mes l("You must kill them before the crops are gone. I'll reward you, but it won't be much.");
+ next;
+ mesn;
+ mesq l("Interested?");
+ if (askyesno() == ASK_NO) {
+ mes "";
+ mesn;
+ mesq l("Heh. Fair enough.");
+ close;
+ }
+
+ .@ID=getcharid(0);
+ .@MAP$="MRGO@"+str(.@ID);
+
+ // Create the Marggo
+ .@INSTID = instance_create("MRGX@"+(.@ID), 0, IOT_NONE);
+ if (.@INSTID < 0)
+ .@instanceMapName$ = "";
+ else
+ .@instanceMapName$ = instance_attachmap("005-1-1", .@INSTID, 0, .@MAP$);
+ // Instance already exists
+ if (.@instanceMapName$ == "") {
+ mesn;
+ mesq l("Wait. I remember you. You ruined my crops a few seconds ago!!");
+ next;
+ mesn;
+ mesq l("Shooo, shooo! Give my crops some time to recover, your noob.");
+ close;
+ }
+ // It was just created, so begin Marggo Quest
+ instance_set_timeout(300, 300, .@INSTID);
+ instance_init(.@INSTID);
+ warp .@MAP$, 29, 20;
+
+ // We'll need instance ID later and @vars are unreliable
+ MARGGO_ID=.@INSTID;
+ doevent("Nylo#Marggo::OnStart");
+ closeclientdialog;
+ close;
// Functions
function nylo_thanks {