summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-04-28 03:59:42 -0300
committerJesusaves <cpntb1@ymail.com>2020-04-28 03:59:42 -0300
commit503a4b600768ee7599b4c065de519d4f42430f10 (patch)
tree5318578b99c72524d128f693ca5d5b48aa85afac /npc/functions
parent4c766ea76c95fa3f836bb10a1f543c8b8aa07949 (diff)
downloadserverdata-503a4b600768ee7599b4c065de519d4f42430f10.tar.gz
serverdata-503a4b600768ee7599b4c065de519d4f42430f10.tar.bz2
serverdata-503a4b600768ee7599b4c065de519d4f42430f10.tar.xz
serverdata-503a4b600768ee7599b4c065de519d4f42430f10.zip
Initial sketch of Guild Magic
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/filters.txt29
1 files changed, 29 insertions, 0 deletions
diff --git a/npc/functions/filters.txt b/npc/functions/filters.txt
index 77833d5fb..cec7a15af 100644
--- a/npc/functions/filters.txt
+++ b/npc/functions/filters.txt
@@ -26,6 +26,15 @@ function script filter_sameguild {
return (strcharinfo(2, "~!<mk>@tmw2.org", getarg(0)) == strcharinfo(2));
}
+// filter_sameguildnotyou( id )
+function script filter_sameguildnotyou {
+ if (getcharid(2) < 1)
+ return false;
+ if (getarg(0) == getcharid(3))
+ return false;
+ return (strcharinfo(2, "~!<mk>@tmw2.org", getarg(0)) == strcharinfo(2));
+}
+
// filter_sameparty( id )
function script filter_sameparty {
if (getcharid(1) < 1 && getarg(0) != getcharid(3))
@@ -33,6 +42,26 @@ function script filter_sameparty {
return (strcharinfo(1, "~!<mk>@tmw2.org", getarg(0)) == strcharinfo(1));
}
+// filter_sameguildorparty( id )
+function script filter_sameguildorparty {
+ if (getcharid(2) < 1 && getcharid(1) < 1)
+ return false;
+ .@party=(strcharinfo(1, "~!<mk>@tmw2.org", getarg(0)) == strcharinfo(1));
+ .@guild=(strcharinfo(2, "~!<mk>@tmw2.org", getarg(0)) == strcharinfo(2));
+ return ((getcharid(1) > 0 && .@party) || (getcharid(2) > 0 && .@guild));
+}
+
+// filter_sameguildorpartynotyou( id )
+function script filter_sameguildorpartynotyou {
+ if (getarg(0) == getcharid(3))
+ return false;
+ if (getcharid(2) < 1 && getcharid(1) < 1)
+ return false;
+ .@party=(strcharinfo(1, "~!<mk>@tmw2.org", getarg(0)) == strcharinfo(1));
+ .@guild=(strcharinfo(2, "~!<mk>@tmw2.org", getarg(0)) == strcharinfo(2));
+ return ((getcharid(1) > 0 && .@party) || (getcharid(2) > 0 && .@guild));
+}
+
// filter_notboss( id )
function script filter_notboss {
// 32 = MD_BOSS