summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-08-26 11:18:31 -0300
committerJesusaves <cpntb1@ymail.com>2020-09-17 08:41:51 -0300
commit257e8d3abcd6a80026d5e1de36e467710a4c0c10 (patch)
tree1f8945fb56fad60520c702c6b23b15caade67482
parent7eeb30b936164b6e7823a5e4d4b0cb58c4333c40 (diff)
downloadserverdata-257e8d3abcd6a80026d5e1de36e467710a4c0c10.tar.gz
serverdata-257e8d3abcd6a80026d5e1de36e467710a4c0c10.tar.bz2
serverdata-257e8d3abcd6a80026d5e1de36e467710a4c0c10.tar.xz
serverdata-257e8d3abcd6a80026d5e1de36e467710a4c0c10.zip
Code sketch for Morcant cutscene.
Please don't wait one hour or the instance will die, causing quest to break. And once it breaks I WILL NOT COME TO YOUR RESCUE. Ah, totally untested. A disaster on standby.
-rw-r--r--npc/008-1-1/cutscene.txt72
-rw-r--r--npc/008-1-1/koga.txt7
2 files changed, 72 insertions, 7 deletions
diff --git a/npc/008-1-1/cutscene.txt b/npc/008-1-1/cutscene.txt
index c0ea77db..fbfa37f2 100644
--- a/npc/008-1-1/cutscene.txt
+++ b/npc/008-1-1/cutscene.txt
@@ -21,12 +21,12 @@ OnTouch:
@mainquestinst = instance_create("m102@a"+getcharid(0), getcharid(3), IOT_CHAR);
instance_attachmap("008-1-1", @mainquestinst, false, .@mapn$);
instance_attachmap("008-2-32", @mainquestinst, false, .@mapx$);
- // Instance lasts 6 minutes
- instance_set_timeout(360, 360, @mainquestinst);
+ // Instance lasts 60 minutes
+ instance_set_timeout(3600, 3600, @mainquestinst);
instance_init(@mainquestinst);
} else {
// Restart instance timer if it already exists
- instance_set_timeout(360, 360, @mainquestinst);
+ instance_set_timeout(3600, 3600, @mainquestinst);
}
getmapxy(.@m$, .@x, .@y, 0);
warp .@mapn$, .@x, .@y;
@@ -69,24 +69,82 @@ OnBegin5:
.@n$=instance_npcname(.name$);
.@mc$=instance_npcname("Morcant");
unitwalk(getnpcid(), 51, 57);
+ addtimer(1000, .@n$+"::OnFollow");
+ end;
+
+OnFollow:
+ sc_end(SC_STUN);
+ setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_MOVE, false);
+ dispbottom col(l("1-1. Follow Morcant into his house."), 1);
+ addtimer(500, .@n$+"::OnVanish");
+ end;
+
+OnVanish:
+ .@mapx$="m022@"+getcharid(0);
+ unitwarp(getnpcid(), .@mapx$, 40, 24);
+ end;
+}
+
+// Series 2
+008-1-1,42,63,0 script #MQ2Cutscene2 NPC_HIDDEN,0,1,{
+ end;
+OnTouch:
+ if (getmap() == "008-1-1") end;
+ .@n$=instance_npcname(.name$);
+ .@mapx$="m022@"+getcharid(0);
+ warp .@mapx$, 40, 36;
+ addtimer(3000, .@n$+"::OnStunlock");
+ end;
+
+OnStunlock:
+ .@n$=instance_npcname(.name$);
+ addtimer(300, .@n$+"::OnBegin");
+ // Freeze player
+ // (M+ may render this incorrectly but it is not my job to care with that)
+ setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_MOVE, true);
+ sc_start(SC_STUN, 360000, 1, 10000, SCFLAG_NOAVOID|SCFLAG_FIXEDTICK);
+ end;
+
+OnBegin:
+ .@n$=instance_npcname(.name$);
+ .@mc$=instance_npcname("Morcant");
+ .@tm$=instance_npcname("Thamas");
+ npctalk l("Welcome to my humble abode."), .@mc$;
+ npctalk lg("Who is that fellow?"), .@tm$;
addtimer(5000, .@n$+"::OnFinishing");
end;
OnFinishing:
sc_end(SC_STUN);
setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_MOVE, false);
- addtimer(5000, .@n$+"::OnFinish");
+ addtimer(500, .@n$+"::OnFinish");
end;
OnFinish:
getmapxy(.@m$, .@x, .@y, 0);
- warp "008-1-1", .@x, .@y;
+ warp "008-2-32", .@x, .@y;
setq General_Narrator, 3;
end;
}
+// WHAT ARE YOU DOING
+008-1-1,83,65,0 script #MQ2CutsceneWAYD NPC_HIDDEN,0,10,{
+ end;
+OnTouch:
+ if (getmap() == "008-1-1") end;
+ // What are you doing?!
+ slide 51, 63;
+ mesc l("I really should follow Morcant into his house.");
+ end;
+}
-
-
+008-2-32,40,37,0 script #MQ2Cutscene2WAYD NPC_HIDDEN,1,0,{
+ end;
+OnTouch:
+ if (getmap() == "008-1-1") end;
+ slide 40, 36;
+ dispbottom l("But you just arrived! Seriously. Stop.");
+ end;
+}
diff --git a/npc/008-1-1/koga.txt b/npc/008-1-1/koga.txt
index 26f12772..cabfc7d3 100644
--- a/npc/008-1-1/koga.txt
+++ b/npc/008-1-1/koga.txt
@@ -6,6 +6,9 @@
// THIS IS A PLACEHOLDER!
008-1-1,30,60,0 script Koga#008-1-1 NPC_KOGA,{
+ if (getmap() != "008-1-1")
+ goto L_WrongMap;
+
speech
l("So, finally, we are here."),
l("Do you want to go back to Artis? You really should be afraid of the Legion there, now that you have been here in Woodland. They somehow smell the odor of the Brotherhood.");
@@ -20,6 +23,10 @@
}
close;
+L_WrongMap:
+ mesc l("I've just arrived here. I should enter in Morcant's house I guess.");
+ close;
+
OnInit:
.bodytype = BODYTYPE_3;
.distance = 4;