summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-19 08:13:37 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-19 08:13:37 +0000
commit4f1eaf958561c690b199953f0f3d14bee5c6b7f7 (patch)
tree307c84bc856c20ba188a615f9eedee5761f3f54d /src/map/script.c
parentccfcd256566afa04a502a8c0ae0151382610defc (diff)
downloadhercules-4f1eaf958561c690b199953f0f3d14bee5c6b7f7.tar.gz
hercules-4f1eaf958561c690b199953f0f3d14bee5c6b7f7.tar.bz2
hercules-4f1eaf958561c690b199953f0f3d14bee5c6b7f7.tar.xz
hercules-4f1eaf958561c690b199953f0f3d14bee5c6b7f7.zip
* Added getrefine()
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1253 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index c032fe401..fd2068cbd 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -311,6 +311,7 @@ int buildin_isday(struct script_state *st); // [celest]
int buildin_isequipped(struct script_state *st); // [celest]
int buildin_isequippedcnt(struct script_state *st); // [celest]
int buildin_cardscnt(struct script_state *st); // [Lupus]
+int buildin_getrefine(struct script_state *st); // [celest]
int buildin_getusersname(struct script_state *st); //jA commands added [Lupus]
int buildin_dispbottom(struct script_state *st);
int buildin_recovery(struct script_state *st);
@@ -558,6 +559,7 @@ struct {
{buildin_isequipped,"isequipped","i*"}, // check whether another item/card has been equipped [Celest]
{buildin_isequippedcnt,"isequippedcnt","i*"}, // check how many items/cards are being equipped [Celest]
{buildin_cardscnt,"cardscnt","i*"}, // check how many items/cards are being equipped in the same arm [Lupus]
+ {buildin_getrefine,"getrefine",""}, // returns the refined number of the current item, or an item with index specified [celest]
#ifdef PCRE_SUPPORT
{buildin_defpattern, "defpattern", "iss"}, // Define pattern to listen for [MouseJstr]
{buildin_activatepset, "activatepset", "i"}, // Activate a pattern set [MouseJstr]
@@ -7013,6 +7015,19 @@ int buildin_cardscnt(struct script_state *st)
return 0;
}
+/*=======================================================
+ * Returns the refined number of the current item, or an
+ * item with inventory index specified
+ *-------------------------------------------------------
+ */
+int buildin_getrefine(struct script_state *st)
+{
+ struct map_session_data *sd;
+ if ((sd = script_rid2sd(st))!= NULL)
+ push_val(st->stack, C_INT, sd->status.inventory[current_equip_item_index].refine);
+ return 0;
+}
+
//
// ŽÀs•”main
//