summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-05-12 16:47:12 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-05-12 16:47:12 +0000
commitcd40a623549f42d77c54515360813131e6c9c33d (patch)
tree09afde7308a84efae2982546f73d7231d2e355b0 /src/map/script.c
parent0c5e8296319a3f1396e0208fba16135ac2c7b4b0 (diff)
downloadhercules-cd40a623549f42d77c54515360813131e6c9c33d.tar.gz
hercules-cd40a623549f42d77c54515360813131e6c9c33d.tar.bz2
hercules-cd40a623549f42d77c54515360813131e6c9c33d.tar.xz
hercules-cd40a623549f42d77c54515360813131e6c9c33d.zip
- Rental items now can be stackable items too.
- Added @font command to test kRO fonts. (Client side requires : Langtype 0 / Hex + Fonts Files on the data folder). - Rental now announces with a maximum time to fix a problem with 1 month or more rentals. - Reduced amount of calculations of Flee on map change (only if required). - More security on Rental items. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13761 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c36
1 files changed, 24 insertions, 12 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 85cd4d095..f0fab4ce6 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -5356,12 +5356,6 @@ BUILDIN_FUNC(rentitem)
return 1;
}
- if( itemdb_isstackable(nameid) )
- {
- ShowError("buildin_rentitem: invalid rental item %d requested.\n", nameid);
- return 1;
- }
-
seconds = script_getnum(st,3);
memset(&it, 0, sizeof(it));
it.nameid = nameid;
@@ -6268,14 +6262,12 @@ BUILDIN_FUNC(getequipisenableref)
if( sd == NULL )
return 0;
- if (num > 0 && num <= ARRAYLENGTH(equip))
- i=pc_checkequip(sd,equip[num-1]);
- if(i >= 0 && sd->inventory_data[i] && !sd->inventory_data[i]->flag.no_refine)
- {
+ if( num > 0 && num <= ARRAYLENGTH(equip) )
+ i = pc_checkequip(sd,equip[num-1]);
+ if( i >= 0 && sd->inventory_data[i] && !sd->inventory_data[i]->flag.no_refine && !sd->status.inventory[i].expire_time )
script_pushint(st,1);
- } else {
+ else
script_pushint(st,0);
- }
return 0;
}
@@ -13640,6 +13632,25 @@ BUILDIN_FUNC(bg_get_data)
return 0;
}
+/*==========================================
+ * Custom Fonts
+ *------------------------------------------*/
+BUILDIN_FUNC(setfont)
+{
+ struct map_session_data *sd = script_rid2sd(st);
+ int font = script_getnum(st,2);
+ if( sd == NULL )
+ return 0;
+
+ if( sd->state.user_font != font )
+ sd->state.user_font = font;
+ else
+ sd->state.user_font = 0;
+
+ clif_font_area(sd);
+ return 0;
+}
+
// declarations that were supposed to be exported from npc_chat.c
#ifdef PCRE_SUPPORT
BUILDIN_FUNC(defpattern);
@@ -13998,6 +14009,7 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(mercenary_set_calls,"ii"),
BUILDIN_DEF(mercenary_set_faith,"ii"),
BUILDIN_DEF(readbook,"ii"),
+ BUILDIN_DEF(setfont,"i"),
// WoE SE
BUILDIN_DEF(agitstart2,""),
BUILDIN_DEF(agitend2,""),