Try combining these two (Kinda similar to Vanberk card)
autobonus
*autobonus <bonus script>,<rate>,<duration>{,<flag>,{<other script>}};
*autobonus2 <bonus script>,<rate>,<duration>{,<flag>,{<other script>}};
*autobonus3 <bonus script>,<rate>,<duration>,<skill id>,{<other script>};
*autobonus3 <bonus script>,<rate>,<duration>,"<skill name>",{<other script>};
These commands are meant to be used in item scripts. They will probably work
outside item scripts, but the bonus will not persist for long. They, as
expected, refer only to an invoking character.
What these commands do is 'attach' a script to the player which will get
executed on attack (or when attacked in the case of autobonus2).
Rate is the trigger rate of the script (10000 = 100%).
Duration is the time that the bonus will last for since the script has triggered.
Skill ID/skill name the skill which will be used as trigger to start the bonus. (autobonus3)
The optional argument 'flag' is used to classify the type of attack where the script
can trigger (it shares the same flags as the bAutoSpell bonus script):
Range criteria:
BF_SHORT: Trigger on melee attack
BF_LONG: Trigger on ranged attack
Default: BF_SHORT+BF_LONG
Attack type criteria:
BF_WEAPON: Trigger on weapon skills
BF_MAGIC: Trigger on magic skills
BF_MISC: Trigger on misc skills
Default: BF_WEAPON
Skill criteria:
BF_NORMAL: Trigger on normal attacks
BF_SKILL: Trigger on skills
default: If the attack type is BF_WEAPON (only) BF_NORMAL is used,
otherwise BF_SKILL+BF_NORMAL is used.
The difference between the optional argument 'other script' and the 'bonus script' is that,
the former one triggers only when attacking(or attacked) and the latter one runs on
status calculation as well, which makes sure, within the duration, the "bonus" that get
lost on status calculation is restored. So, 'bonus script' is technically supposed to accept
"bonus" command only. And we usually use 'other script' to show visual effects.
In all cases, when the script triggers, the attached player will be the one
who holds the bonus. There is currently no way of knowing within this script
who was the other character (the attacker in autobonus2, or the target in
autobonus and autobonus3).
//Grants a 1% chance of starting the state "all stats +10" for 10 seconds when
//using weapon or misc attacks (both melee and ranged skills) and shows a special
//effect when the bonus is active.
autobonus "{ bonus bAllStats,10; }",10,10000,BF_WEAPON|BF_MISC,"{ specialeffect2 EF_FIRESPLASHHIT; }";
and
sc_start
*sc_start <effect type>,<ticks>,<value 1>{,<rate>,<flag>{,<GID>}};
*sc_start2 <effect type>,<ticks>,<value 1>,<value 2>{,<rate>,<flag>{,<GID>}};
*sc_start4 <effect type>,<ticks>,<value 1>,<value 2>,<value 3>,<value 4>{,<rate>,<flag>{,<GID>}};
*sc_end <effect type>{,<GID>};
These commands will bestow a status effect on a character.
The <effect type> determines which status is invoked. This can be either a number
or constant, with the common statuses (mostly negative) found in 'db/const.txt'
with the 'SC_' prefix. A full list is located in 'src/map/status.h', though
they are not currently documented.
The duration of the status is given in <ticks>, or milleseconds.
Certain status changes take an additional parameter <value 1>, which typically
modifies player stats by the given number or percentage. This differs for each
status, and is sometimes zero.
Optional value <rate> is the chance that the status will be invoked (100 = 1%).
This is used primarily in item scripts. When used in an NPC script, a flag MUST
be defined for the rate to work.
Optional value <flag> is how the status change start will be handled (a bitmask).
1: Status change cannot be avoided.
2: Tick cannot be reduced by stats (default).
4: sc_data loaded, so no value will be altered.
8: Rate cannot be reduced.
If a <GID> is given, the status change will be invoked on the specified character
instead of the one attached to the script. This can only be defined after setting
a rate and flag.
'sc_start2' and 'sc_start4' allow extra parameters to be passed, and are used only
for effects that require them. The meaning of the extra values vary depending on the
effect type.
'sc_end' will remove a specified status effect. If SC_ALL (-1) is given, it will
perform a complete removal of all statuses (although permanent ones will re-apply).
Examples:
// This will poison the invoking character for 10 minutes at 50% chance.
sc_start SC_POISON,600000,0,5000;
// This will bestow the effect of Level 10 Blessing.
sc_start 10,240000,10;
// Elemental armor defense takes the following four values:
// val1 is the first element, val2 is the resistance to the element val1.
// val3 is the second element, val4 is the resistance to the element val3.
sc_start4 SC_DefEle,60000,Ele_Fire,20,Ele_Water,-15;
// This will end the Freezing status for the invoking character.
sc_end SC_FREEZE;