summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authoreuphyy <euphyy@54d463be-8e91-2dee-dedb-b68131a5f0ec>2013-03-04 04:32:43 +0000
committershennetsind <ind@henn.et>2013-04-11 16:48:45 -0300
commitdbb062c2f3657746a36feebc190c736ddcaa3881 (patch)
treec7471998af1d8aa399cae2fd4fd2713c9b493303 /src/map/script.c
parente1f41ae8fdac977851bfd090a6e266a0dda8ed29 (diff)
downloadhercules-dbb062c2f3657746a36feebc190c736ddcaa3881.tar.gz
hercules-dbb062c2f3657746a36feebc190c736ddcaa3881.tar.bz2
hercules-dbb062c2f3657746a36feebc190c736ddcaa3881.tar.xz
hercules-dbb062c2f3657746a36feebc190c736ddcaa3881.zip
* Initial implementation of Malangdo Card Separation script.
* Added and documented 'delequip' command, used in new official scripts. * Fixed issue in Guillotine Cross job quest where mobs did not properly reset (bugreport:7323). * Minor cleaning of script_commands.txt. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17168 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index ce312e894..0a33c1eef 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -7783,6 +7783,29 @@ BUILDIN_FUNC(downrefitem)
}
/*==========================================
+ * Delete the item equipped at pos.
+ *------------------------------------------*/
+BUILDIN_FUNC(delequip)
+{
+ int i=-1,num;
+ TBL_PC *sd;
+
+ num = script_getnum(st,2);
+ sd = script_rid2sd(st);
+ if( sd == NULL )
+ return 0;
+
+ if (num > 0 && num <= ARRAYLENGTH(equip))
+ i=pc_checkequip(sd,equip[num-1]);
+ if(i >= 0) {
+ pc_unequipitem(sd,i,3); //recalculate bonus
+ pc_delitem(sd,i,1,0,2,LOG_TYPE_SCRIPT);
+ }
+
+ return 0;
+}
+
+/*==========================================
*
*------------------------------------------*/
BUILDIN_FUNC(statusup)