From 94e745cce4166dea9b34b617cf66b14cfa1faab1 Mon Sep 17 00:00:00 2001 From: skotlex Date: Tue, 17 Apr 2007 15:43:40 +0000 Subject: - Expanded the autospell structure to hold a flag, which contains the required Battle Flag conditions required for a skill to trigger. - Added the required constants to const.txt to specify the autospell trigger properties. - Added bonus5 bAutoSpell/bAutoSpellWhenHit. The new parameter is used to specify when the spell should trigger (melee/range + weapon/magic/misc attack), see item_bonus for details. - Applied use of packet 0x28a (clif_changeoption2) to transmit opt3 changes. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10278 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/script.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/map/script.c') diff --git a/src/map/script.c b/src/map/script.c index 8e17495ff..691334802 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -3615,6 +3615,7 @@ BUILDIN_FUNC(bonus); BUILDIN_FUNC(bonus2); BUILDIN_FUNC(bonus3); BUILDIN_FUNC(bonus4); +BUILDIN_FUNC(bonus5); BUILDIN_FUNC(skill); BUILDIN_FUNC(addtoskill); // [Valaris] BUILDIN_FUNC(guildskill); @@ -3946,6 +3947,7 @@ struct script_function buildin_func[] = { BUILDIN_DEF2(bonus,"bonus2","iii"), BUILDIN_DEF2(bonus,"bonus3","iiii"), BUILDIN_DEF2(bonus,"bonus4","iiiii"), + BUILDIN_DEF2(bonus,"bonus5","iiiiii"), BUILDIN_DEF(skill,"ii?"), BUILDIN_DEF(addtoskill,"ii?"), // [Valaris] BUILDIN_DEF(guildskill,"ii"), @@ -6558,12 +6560,14 @@ BUILDIN_FUNC(statusup2) /// bonus2 ,, /// bonus3 ,,, /// bonus4 ,,,, +/// bonus4 ,,,,, BUILDIN_FUNC(bonus) { int type; int type2; int type3; int type4; + int type5; int val; TBL_PC* sd; @@ -6595,6 +6599,14 @@ BUILDIN_FUNC(bonus) val = script_getnum(st,6); pc_bonus4(sd, type, type2, type3, type4, val); break; + case 7: + type2 = script_getnum(st,3); + type3 = script_getnum(st,4); + type4 = script_getnum(st,5); + type5 = script_getnum(st,6); + val = script_getnum(st,7); + pc_bonus5(sd, type, type2, type3, type4, type5, val); + break; default: ShowDebug("buildin_bonus: unexpected last data (%d)\n", script_lastdata(st)); } -- cgit v1.2.3-60-g2f50