summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authordaegaladh <daegaladh@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-23 01:10:15 +0000
committerdaegaladh <daegaladh@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-23 01:10:15 +0000
commit14aca94442c6b6cd353373dd33b45423575f48d2 (patch)
treeee68b24078e54d3b942346d1d4d396e996860fbd /src/map/script.c
parent19e9032d813623294128b6a2ad02037116c1d5b7 (diff)
downloadhercules-14aca94442c6b6cd353373dd33b45423575f48d2.tar.gz
hercules-14aca94442c6b6cd353373dd33b45423575f48d2.tar.bz2
hercules-14aca94442c6b6cd353373dd33b45423575f48d2.tar.xz
hercules-14aca94442c6b6cd353373dd33b45423575f48d2.zip
Added checkre() script command, which allows to check if a renewal feature is enabled or not.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16478 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c71
1 files changed, 71 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 6c34af6f2..91d063daf 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -16445,6 +16445,76 @@ BUILDIN_FUNC(useatcmd)
return 0;
}
+BUILDIN_FUNC(checkre)
+{
+ int num;
+
+ num=script_getnum(st,2);
+ switch(num){
+ case 0:
+ #ifdef RENEWAL
+ script_pushint(st, 1);
+ #else
+ script_pushint(st, 0);
+ #endif
+ break;
+ case 1:
+ #ifdef RENEWAL_CAST
+ script_pushint(st, 1);
+ #else
+ script_pushint(st, 0);
+ #endif
+ break;
+ case 2:
+ #ifdef RENEWAL_DROP
+ script_pushint(st, 1);
+ #else
+ script_pushint(st, 0);
+ #endif
+ break;
+ case 3:
+ #ifdef RENEWAL_EXP
+ script_pushint(st, 1);
+ #else
+ script_pushint(st, 0);
+ #endif
+ break;
+ case 4:
+ #ifdef RENEWAL_LVDMG
+ script_pushint(st, 1);
+ #else
+ script_pushint(st, 0);
+ #endif
+ break;
+ case 5:
+ #ifdef RENEWAL_CAST_VMIN
+ script_pushint(st, 1);
+ #else
+ script_pushint(st, 0);
+ #endif
+ break;
+ case 6:
+ #ifdef RENEWAL_EDP
+ script_pushint(st, 1);
+ #else
+ script_pushint(st, 0);
+ #endif
+ break;
+ case 7:
+ #ifdef RENEWAL_ASPD
+ script_pushint(st, 1);
+ #else
+ script_pushint(st, 0);
+ #endif
+ break;
+
+ default:
+ ShowWarning("buildin_checkre: unknown parameter.\n");
+ break;
+ }
+ return 0;
+}
+
// declarations that were supposed to be exported from npc_chat.c
#ifdef PCRE_SUPPORT
BUILDIN_FUNC(defpattern);
@@ -16873,6 +16943,7 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(setdragon,"?"),//[Ind]
BUILDIN_DEF(ismounting,""),//[Ind]
BUILDIN_DEF(setmounting,""),//[Ind]
+ BUILDIN_DEF(checkre,"i"),
/**
* rAthena and beyond!
**/