summaryrefslogtreecommitdiff
path: root/npc/099-7/boss.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/099-7/boss.txt')
-rw-r--r--npc/099-7/boss.txt30
1 files changed, 30 insertions, 0 deletions
diff --git a/npc/099-7/boss.txt b/npc/099-7/boss.txt
index 6afbf37c..ffd76bf5 100644
--- a/npc/099-7/boss.txt
+++ b/npc/099-7/boss.txt
@@ -549,6 +549,36 @@ L_Tools:
next;
mes "-- The ....";
close;
+
+OnInit:
+ // In theory, pattern ID must be between 1~9
+ // To set $@p1$~$@p9$ with the PERL expression
+ // But as we're only using $@p0$ (full string)
+ // the value itself is meaningless
+ .pid=getnpcid();
+ debugmes "Engraving: Pattern %d", .pid;
+ //I'm not going to learn PERL just for that
+ defpattern(.pid, "^(.*)$", "OnTalkNearby");
+ activatepset(.pid);
+ end;
+
+OnTalkNearby:
+ // Quest not assigned
+ if (!getq(Quest_Doomsday)) end;
+
+ // not very obvious stuff by gumi, $@p0$ contains the whole string
+ // so we must cut it. Could use $@p1$ if perl was proper but... meh.
+ .@no_nick$ = strip(substr($@p0$, getstrlen(strcharinfo(PC_NAME)) + 3, getstrlen($@p0$) - 1));
+ .@message$ = strtoupper(.@no_nick$);
+
+ // Only react if the message is what we want to hear
+ if (.@message$ == "TUTIN JANDE LIAISE") {
+ specialeffect(FX_MAGIC_TELEPORT, AREA, getcharid(3));
+ sleep2(800);
+ if (!ispcdead())
+ warp "099-1", 55, 49;
+ }
+ end;
}