From dbb062c2f3657746a36feebc190c736ddcaa3881 Mon Sep 17 00:00:00 2001 From: euphyy Date: Mon, 4 Mar 2013 04:32:43 +0000 Subject: * 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 --- src/map/script.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src') 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 @@ -7782,6 +7782,29 @@ BUILDIN_FUNC(downrefitem) return 0; } +/*========================================== + * 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; +} + /*========================================== * *------------------------------------------*/ -- cgit v1.2.3-60-g2f50