summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
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"),