summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-13 16:11:22 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-13 16:11:22 +0000
commit8f2296100ab52e631b0bf4e00ed6018d6596bcc0 (patch)
tree253975de68417dbde54062a3be4511f7c6609de1 /src/map/npc.c
parenta73bf03c82495f4ff0fe7c2f757ef20415f9ede5 (diff)
downloadhercules-8f2296100ab52e631b0bf4e00ed6018d6596bcc0.tar.gz
hercules-8f2296100ab52e631b0bf4e00ed6018d6596bcc0.tar.bz2
hercules-8f2296100ab52e631b0bf4e00ed6018d6596bcc0.tar.xz
hercules-8f2296100ab52e631b0bf4e00ed6018d6596bcc0.zip
- Modified the nocommand mapflag so you can specify the GM range that is blocked from using commands (eg: "prontera.gat mapflag nocommand 40" disables commands to characters in the GM range 0~39)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8733 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 9c3b4f096..8e1cfd336 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -2521,7 +2521,13 @@ static int npc_parse_mapflag (char *w1, char *w2, char *w3, char *w4)
map[m].flag.nomvploot=state;
}
else if (strcmpi(w3,"nocommand")==0) { // Skotlex
- map[m].flag.nocommand=state;
+ if (state) {
+ if (sscanf(w4, "%d", &state) == 1)
+ map[m].nocommand =state;
+ else //No level specified, block everyone.
+ map[m].nocommand =100;
+ } else
+ map[m].nocommand=0;
}
else if (strcmpi(w3,"restricted")==0) { // Komurka
if (state) {