Bläddra i källkod

Adjusted script command bindatcmd (#2518)

* Fixes #2513.
* Defaulted the char-command level to 100.
Thanks to @mazvi and @Lemongrass3110!
Aleos 7 år sedan
förälder
incheckning
b4106eb988
2 ändrade filer med 2 tillägg och 1 borttagningar
  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);