summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-05-16 16:56:43 +0000
committerrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-05-16 16:56:43 +0000
commit3089bee74700694461fdc50bf9e9aa01fe589730 (patch)
treecf330782d4f381fe4caad9915824f51dcdd39648 /src/map/script.c
parentf3bc6581829e1b0111110c4bd42626cd0886593d (diff)
downloadhercules-3089bee74700694461fdc50bf9e9aa01fe589730.tar.gz
hercules-3089bee74700694461fdc50bf9e9aa01fe589730.tar.bz2
hercules-3089bee74700694461fdc50bf9e9aa01fe589730.tar.xz
hercules-3089bee74700694461fdc50bf9e9aa01fe589730.zip
Fixed bugreport:5749 Amplify Magic Power should now work properly on multi-hit magical skills.
Fixed bugreport:5748 Masquerade-Groomy now removes Dragon and Warg. Fixed bugreport:5751 Implemented script command in checking/mounting Dragon, Warg and MADO Gear, also made a clean up regarding MADO Gear and Warg conditions. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16114 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c66
1 files changed, 65 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 4ca65a02a..eb1876008 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -7827,7 +7827,7 @@ BUILDIN_FUNC(checkriding)
if( sd == NULL )
return 0;// no player attached, report source
- if( pc_isriding(sd) || sd->sc.option&OPTION_MOUNTING )
+ if( pc_isriding(sd) || pc_isridingwug(sd) )
script_pushint(st, 1);
else
script_pushint(st, 0);
@@ -7856,6 +7856,67 @@ BUILDIN_FUNC(setriding)
return 0;
}
+/// Returns if the player has a warg.
+///
+/// checkwug() -> <bool>
+///
+BUILDIN_FUNC(checkwug)
+{
+ TBL_PC* sd;
+
+ sd = script_rid2sd(st);
+ if( sd == NULL )
+ return 0;// no player attached, report source
+
+ if( pc_iswug(sd) )
+ script_pushint(st, 1);
+ else
+ script_pushint(st, 0);
+
+ return 0;
+}
+
+/// Returns if the player is wearing MADO Gear.
+///
+/// checkmadogear() -> <bool>
+///
+BUILDIN_FUNC(checkmadogear)
+{
+ TBL_PC* sd;
+
+ sd = script_rid2sd(st);
+ if( sd == NULL )
+ return 0;// no player attached, report source
+
+ if( pc_ismadogear(sd) )
+ script_pushint(st, 1);
+ else
+ script_pushint(st, 0);
+
+ return 0;
+}
+
+/// Sets if the player is riding MADO Gear.
+/// <flag> defaults to 1
+///
+/// setmadogear <flag>;
+/// setmadogear;
+BUILDIN_FUNC(setmadogear)
+{
+ int flag = 1;
+ TBL_PC* sd;
+
+ sd = script_rid2sd(st);
+ if( sd == NULL )
+ return 0;// no player attached, report source
+
+ if( script_hasdata(st,2) )
+ flag = script_getnum(st,2);
+ pc_setmadogear(sd, flag);
+
+ return 0;
+}
+
/// Sets the save point of the player.
///
/// save "<map name>",<x>,<y>
@@ -16220,6 +16281,9 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(checkfalcon,""),
BUILDIN_DEF(setriding,"?"),
BUILDIN_DEF(checkriding,""),
+ BUILDIN_DEF(checkwug,""),
+ BUILDIN_DEF(checkmadogear,""),
+ BUILDIN_DEF(setmadogear,""),
BUILDIN_DEF2(savepoint,"save","sii"),
BUILDIN_DEF(savepoint,"sii"),
BUILDIN_DEF(gettimetick,"i"),