summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-06-25 07:02:40 -0300
committerJesusaves <cpntb1@ymail.com>2020-06-25 07:02:40 -0300
commita52528b62fa6bff578da06fd731dbbdfd422dab0 (patch)
treeb4fd8061a99ada4f16bd8b70cc4507287f6c68c7 /src
parent1e26226415177653e97e4ef492ed95b8550aa289 (diff)
downloadevol-hercules-a52528b62fa6bff578da06fd731dbbdfd422dab0.tar.gz
evol-hercules-a52528b62fa6bff578da06fd731dbbdfd422dab0.tar.bz2
evol-hercules-a52528b62fa6bff578da06fd731dbbdfd422dab0.tar.xz
evol-hercules-a52528b62fa6bff578da06fd731dbbdfd422dab0.zip
getskillname() - strictly required
Diffstat (limited to 'src')
-rw-r--r--src/emap/init.c1
-rw-r--r--src/emap/script_buildins.c13
-rw-r--r--src/emap/script_buildins.h1
3 files changed, 14 insertions, 1 deletions
diff --git a/src/emap/init.c b/src/emap/init.c
index bd42f4a..5f662c6 100644
--- a/src/emap/init.c
+++ b/src/emap/init.c
@@ -239,6 +239,7 @@ HPExport void plugin_init (void)
addScriptCommand("calcdmg", "iii", calcdmg);
addScriptCommand("harm", "ii??", harm);
addScriptCommand("resetrng", "", resetrng);
+ addScriptCommand("getskillname", "i", getskillname);
// Overrides
addScriptCommand("debugmes","v*",debugmes);
diff --git a/src/emap/script_buildins.c b/src/emap/script_buildins.c
index 314d01a..b76ba6a 100644
--- a/src/emap/script_buildins.c
+++ b/src/emap/script_buildins.c
@@ -26,9 +26,10 @@
#include "map/mob.h"
#include "map/npc.h"
#include "map/pc.h"
+#include "map/quest.h"
#include "map/refine.h"
#include "map/script.h"
-#include "map/quest.h"
+#include "map/skill.h"
#include "map/map.h"
#include "emap/clif.h"
@@ -3280,6 +3281,16 @@ BUILDIN(resetrng)
return true;
}
+/*==========================================
+ * Get skill name
+ *------------------------------------------*/
+BUILDIN(getskillname)
+{
+ int skill_id = script_getnum(st, 2);
+ script_pushstr(st, skill->get_name(skill_id));
+ return true;
+}
+
//////////////////////////////////////////////////////////
/*
switch (bl->type) {
diff --git a/src/emap/script_buildins.h b/src/emap/script_buildins.h
index ef10c78..5c0544b 100644
--- a/src/emap/script_buildins.h
+++ b/src/emap/script_buildins.h
@@ -123,6 +123,7 @@ BUILDIN(aggravate);
BUILDIN(calcdmg);
BUILDIN(harm);
BUILDIN(resetrng);
+BUILDIN(getskillname);
// Overrides
BUILDIN(countitem);