From 691fd800c71ac982b9f02de36acbea5532b1a4c5 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 14 Jul 2021 23:20:32 -0300 Subject: Initial version of Doomsday Quest. Minimum Level 100. Temporary reward. Untested. Also, fix the Scythe and add stats to the Halberd. --- npc/099-7/boss.txt | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'npc/099-7/boss.txt') 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; } -- cgit v1.2.3-60-g2f50