summaryrefslogtreecommitdiff
path: root/npc/commands/destroynpc.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-04-10 03:00:20 -0300
committerJesusaves <cpntb1@ymail.com>2021-04-10 03:00:20 -0300
commitba1e827b6b4c17c35a163e6b55be8c122de632b8 (patch)
tree819f93d0ffee3697e336471710afb9681f0b8d86 /npc/commands/destroynpc.txt
parent6e7f3113c0faad9edd4367d100ba9dd77e8d3130 (diff)
downloadserverdata-ba1e827b6b4c17c35a163e6b55be8c122de632b8.tar.gz
serverdata-ba1e827b6b4c17c35a163e6b55be8c122de632b8.tar.bz2
serverdata-ba1e827b6b4c17c35a163e6b55be8c122de632b8.tar.xz
serverdata-ba1e827b6b4c17c35a163e6b55be8c122de632b8.zip
Add several convenience functions. Fix some bugs regarding misuse of readparam()
Diffstat (limited to 'npc/commands/destroynpc.txt')
-rwxr-xr-xnpc/commands/destroynpc.txt34
1 files changed, 0 insertions, 34 deletions
diff --git a/npc/commands/destroynpc.txt b/npc/commands/destroynpc.txt
deleted file mode 100755
index 156c8200..00000000
--- a/npc/commands/destroynpc.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-- script @destroynpc NPC32767,{
- callfunc "argv_splitter";
- if (GM < CMD_DESTROYNPC && GM < G_SYSOP)
- goto L_GM;
-
- .@id = getnpcid(@argv$[0]);
- if (@argv$[0] == "" || .@id < 1)
- goto L_Failed;
- if (gettimetick(2) - @destroynpc[0] > 300 || @destroynpc[1] != .@id)
- goto L_Confirm;
-
- gmlog "@destroynpc " + @args$;
- message strcharinfo(0), "destroynpc : The operation succeeded.";
- debugmes "!!! => npc destroyed: `"+@argv$[0]+"` ("+.@id+")";
- if (1==1) destroy .@id; // FIXME: allow destroy to work as a non-terminator when arg0 is given (TMWA)
- end;
-
-L_Confirm:
- message strcharinfo(0), "destroynpc : ##BDANGER ZONE!##b This command permanently destroys a npc and its puppets (if any). Use the command again to confirm.";
- setarray @destroynpc[0], gettimetick(2), .@id;
- end;
-
-L_Failed:
- message strcharinfo(0), "destroynpc : Impossible to find the target npc. Did you try putting the name in \"quotation marks\"? Some npcs also have an invisible postfix in their name, ie `#_M`.";
- end;
-
-L_GM:
- message strcharinfo(0), "destroynpc : GM command is level "+ CMD_DESTROYNPC +", but you are level " + GM;
- end;
-
-OnInit:
- registercmd chr(ATCMD_SYMBOL) + "destroynpc", strnpcinfo(0);
- end;
-}