summaryrefslogtreecommitdiff
path: root/src/emap/atcommand.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emap/atcommand.c')
-rw-r--r--src/emap/atcommand.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/emap/atcommand.c b/src/emap/atcommand.c
index a972076..7978758 100644
--- a/src/emap/atcommand.c
+++ b/src/emap/atcommand.c
@@ -64,14 +64,19 @@ ACMD2(setSkill)
int skill_id = 0;
int skill_level = 0;
- if (!message || !*message || sscanf(message, "%5d %2d", &skill_id, &skill_level) < 2)
+ if (!*message || sscanf(message, "%5d %2d", &skill_id, &skill_level) < 2)
{
- const char* text = info->help;
+ char buf[100];
- if (text)
- clif->messageln (fd, text);
-
- return false;
+ if (!*message ||
+ sscanf(message, "%99s %2d", &buf[0], &skill_level) != 2 ||
+ !script->get_constant(buf, &skill_id))
+ {
+ const char* text = info->help;
+ if (text)
+ clif->messageln (fd, text);
+ return false;
+ }
}
if (!skill->get_index(skill_id))
{