From e8dc22b41f89108c19fb5325a8887aa8e8221fbb Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 1 May 2020 07:39:17 -0300 Subject: Katazuli spell --- npc/042-10/ctrl.txt | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 2 deletions(-) (limited to 'npc/042-10') diff --git a/npc/042-10/ctrl.txt b/npc/042-10/ctrl.txt index 944bdd85c..1d9727404 100644 --- a/npc/042-10/ctrl.txt +++ b/npc/042-10/ctrl.txt @@ -90,10 +90,36 @@ L_NoAccessBlock: OnInit: .distance=2; + .pid=getnpcid(); + debugmes "Pattern %d", .pid; + //defpattern(.pid, "^([Kk][Aa][Tt][Aa][Zz][Uu][Ll][Ii])$", "OnTalkNearby"); + defpattern(.pid, "^(.*)$", "OnTalkNearby"); + activatepset(.pid); end; OnTouch: - npctalk l("TODO FIXME"); // TODO FIXME + npctalkonce l("You must %s and chant %s to begin channeling.", b(l("sit")), b(l("katazuli"))); + end; + +OnTalkNearby: + // not very obvious stuff by gumi + .@no_nick$ = strip(substr($@p0$, getstrlen(strcharinfo(PC_NAME)) + 3, getstrlen($@p0$) - 1)); + .@message$ = strtoupper(.@no_nick$); + + // It is with us! + if (.@message$ == "KATAZULI") { + // Not sitting - Do nothing + if (!issit()) + end; + // Not sitting on the circle - Again, do nothing + getmapxy(.@m$, .@x, .@y, 0); + if (.@x != .x || .@y != .y) + end; + + // All checks passed: KATAZULI + specialeffect FX_MGSHIELD, AREA, getcharid(3); // Temporary FX + + } end; } @@ -103,10 +129,36 @@ OnTouch: OnInit: .distance=2; + .pid=getnpcid(); + debugmes "Pattern %d", .pid; + //defpattern(.pid, "^([Kk][Aa][Tt][Aa][Zz][Uu][Ll][Ii])$", "OnTalkNearby"); + defpattern(.pid, "^(.*)$", "OnTalkNearby"); + activatepset(.pid); end; OnTouch: - npctalk l("TODO FIXME"); // TODO FIXME + npctalkonce l("You must %s and chant %s to begin channeling.", b(l("sit")), b(l("katazuli"))); + end; + +OnTalkNearby: + // not very obvious stuff by gumi + .@no_nick$ = strip(substr($@p0$, getstrlen(strcharinfo(PC_NAME)) + 3, getstrlen($@p0$) - 1)); + .@message$ = strtoupper(.@no_nick$); + + // It is with us! + if (.@message$ == "KATAZULI") { + // Not sitting - Do nothing + if (!issit()) + end; + // Not sitting on the circle - Again, do nothing + getmapxy(.@m$, .@x, .@y, 0); + if (.@x != .x || .@y != .y) + end; + + // All checks passed: KATAZULI + specialeffect FX_MGSHIELD, AREA, getcharid(3); // Temporary FX + + } end; } -- cgit v1.2.3-60-g2f50