summaryrefslogtreecommitdiff
path: root/npc/099-5/boss.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/099-5/boss.txt')
-rw-r--r--npc/099-5/boss.txt23
1 files changed, 19 insertions, 4 deletions
diff --git a/npc/099-5/boss.txt b/npc/099-5/boss.txt
index 9ee67a09..467c5295 100644
--- a/npc/099-5/boss.txt
+++ b/npc/099-5/boss.txt
@@ -964,10 +964,25 @@ OnInit:
setarray $@DD5MB_AVERAGE, VoidScorpion, VoidShroom, VoidScorpion, VoidShroom, VoidScorpion, VoidShroom, VoidSoldier, VoidMouboo;
setarray $@DD5MB_STRONG, VoidArchant, VoidSlime, VoidSnake, VoidArchant, VoidSlime, VoidSnake, VoidArchant, VoidSlime, VoidSnake;
setarray $@DD5MB_BOSSLV, Flashmob, Koyntety, Tengu, Sasquatch, ManaSlayer, Enchanter, DoomGolem, Tengu;
- // Flower VoidFlower, Mouboo VoidMouboo
- end;
-
-OnMiteyo:
+ // 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 "Doomsday: Pattern %d", .pid;
+ //I'm not going to learn PERL just for that
+ defpattern(.pid, "^(.*)$", "OnTalkNearby");
+ activatepset(.pid);
+ end;
+
+OnTalkNearby:
+ // 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$ != "MITEYO")
+ end;
if ($DOOMSDAY != 3)
end;
if ($@DD5_HP < 1)