summaryrefslogtreecommitdiff
path: root/npc/042-10/ctrl.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-05-01 07:39:17 -0300
committerJesusaves <cpntb1@ymail.com>2020-05-01 07:39:17 -0300
commite8dc22b41f89108c19fb5325a8887aa8e8221fbb (patch)
tree9941de7350f7b96c87092999ca78522efd92d27a /npc/042-10/ctrl.txt
parent014e9235bc05e62f96b0e791164af1a254d2aaa0 (diff)
downloadserverdata-e8dc22b41f89108c19fb5325a8887aa8e8221fbb.tar.gz
serverdata-e8dc22b41f89108c19fb5325a8887aa8e8221fbb.tar.bz2
serverdata-e8dc22b41f89108c19fb5325a8887aa8e8221fbb.tar.xz
serverdata-e8dc22b41f89108c19fb5325a8887aa8e8221fbb.zip
Katazuli spell
Diffstat (limited to 'npc/042-10/ctrl.txt')
-rw-r--r--npc/042-10/ctrl.txt56
1 files changed, 54 insertions, 2 deletions
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;
}