浏览代码

Adjusted script command bindatcmd (#2518)

* Fixes #2513.
* Defaulted the char-command level to 100.
Thanks to @mazvi and @Lemongrass3110!
Aleos 7 年之前
父节点
当前提交
b4106eb988
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1 0
      doc/script_commands.txt
  2. 1 1
      src/map/script.cpp

+ 1 - 0
doc/script_commands.txt

@@ -7328,6 +7328,7 @@ The commands can also run without an attached rid.
 This command will bind a NPC event label to an atcommand. Upon execution of the
 atcommand, the user will invoke the NPC event label. Each atcommand is only allowed
 one binding. If you rebind, it will override the original binding.
+Note: The default level for atcommand is 0 while the default level for charcommand is 100.
 
 The following variables are set upon execution:
 	.@atcmd_command$       =  The name of the @command used.

+ 1 - 1
src/map/script.cpp

@@ -20826,7 +20826,7 @@ BUILDIN_FUNC(freeloop) {
 BUILDIN_FUNC(bindatcmd) {
 	const char* atcmd;
 	const char* eventName;
-	int i, level = 0, level2 = 0;
+	int i, level = 0, level2 = 100;
 	bool create = false;
 
 	atcmd = script_getstr(st,2);