Added checkre() script command, which allows to check if a renewal feature is enabled or not.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16478 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
4f997e2b75
commit
677941e05e
@ -3596,6 +3596,22 @@ more:
|
|||||||
if (isday()) mes "I only prowl in the night.";
|
if (isday()) mes "I only prowl in the night.";
|
||||||
if (isnight()!=1) mes "I only prowl in the night.";
|
if (isnight()!=1) mes "I only prowl in the night.";
|
||||||
|
|
||||||
|
---------------------------------------
|
||||||
|
|
||||||
|
*checkre(<type>)
|
||||||
|
|
||||||
|
Checks if a renewal feature is enabled or not in renewal.h, and returns 1 if enabled and 0 for disabled.
|
||||||
|
The renewal feature to check is determined by type.
|
||||||
|
|
||||||
|
0 - RENEWAL (game renewal server mode)
|
||||||
|
1 - RENEWAL_CAST (renewal cast time)
|
||||||
|
2 - RENEWAL_DROP (renewal drop rate algorithms)
|
||||||
|
3 - RENEWAL_EXP (renewal exp rate algorithms)
|
||||||
|
4 - RENEWAL_LVDMG (renewal level modifier on damage)
|
||||||
|
5 - RENEWAL_CAST_VMIN (renewal cast time variable cast requirement)
|
||||||
|
6 - RENEWAL_EDP (renewal enchant deadly poison algorithm)
|
||||||
|
7 - RENEWAL_ASPD (renewal ASPD)
|
||||||
|
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
\\
|
\\
|
||||||
3,1.- Item-related commands
|
3,1.- Item-related commands
|
||||||
|
@ -16445,6 +16445,76 @@ BUILDIN_FUNC(useatcmd)
|
|||||||
return 0;
|
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
|
// declarations that were supposed to be exported from npc_chat.c
|
||||||
#ifdef PCRE_SUPPORT
|
#ifdef PCRE_SUPPORT
|
||||||
BUILDIN_FUNC(defpattern);
|
BUILDIN_FUNC(defpattern);
|
||||||
@ -16873,6 +16943,7 @@ struct script_function buildin_func[] = {
|
|||||||
BUILDIN_DEF(setdragon,"?"),//[Ind]
|
BUILDIN_DEF(setdragon,"?"),//[Ind]
|
||||||
BUILDIN_DEF(ismounting,""),//[Ind]
|
BUILDIN_DEF(ismounting,""),//[Ind]
|
||||||
BUILDIN_DEF(setmounting,""),//[Ind]
|
BUILDIN_DEF(setmounting,""),//[Ind]
|
||||||
|
BUILDIN_DEF(checkre,"i"),
|
||||||
/**
|
/**
|
||||||
* rAthena and beyond!
|
* rAthena and beyond!
|
||||||
**/
|
**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user