viewing paste Unknown #5868 | C

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
---------------------------------------
 
*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 give a character a status effect.  Optionally, <rate> and <flag> can be defined.
 
<effect type> is which status change to invoke.  This can be a number or SC name.
A list of these are in the file 'db/const.txt' with the 'SC_' prefix.
 
A number of <ticks> refers to how long the status change should last.  (1000 = 1 sec)
<value 1> is used on certain status changes, generally modifying player stats by
the given value or a percentage.
 
Optional value <rate> is on a scale of 0-10000, with 0 being no chance to invoke
the status change, and 10000 being 100% chance.  NPCs given a <rate> without
defining a flag will ignore the value.  However, items can be given a rate
and don't require a flag to be given for the rate to be ignored.
 
Optional value <flag> allows the setting of how the status change start should
be handled.  These can be added together like a configuration parameter.
  <flag>: *Default 2*
        1: Cannot be avoided (it has to start)
        2: Tick should not be reduced (by vit, luk, lv, etc)
        4: sc_data loaded, no value has to be altered.
        8: rate should not be reduced
 
<GID> will cause the status effect to appear on a specified character, instead of the
one attached to the running script.  This can only be defined after setting <rate> and <flag>.
 
Using sc_start2 or sc_start4, extra arguments are able to be given when an
effect can take them. Extra argument's meaning differs depending on the effect type, for
most effects caused by a player skill the extra argument means the level of the skill
that would have been used to create that effect, for others it might have no meaning
whatsoever.
 
Examples:
        // This would poison them for 10 min at 50% chance
        sc_start SC_Poison,600000,0,5000;
 
        // This will bless someone with Bless 10
        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 said element.
        sc_start4 SC_DefEle,60000,Ele_Fire,20,Ele_Water,-15;
 
'sc_end' will remove a specified status effect. If SC_All is used (-1), it will
do a complete removal of all statuses (although permanent ones will re-apply).
 
You can see the full list of status effects caused by skills in
'src/map/status.h' - they are currently not fully documented, but most of that
should be rather obvious.
Viewed 278 times, submitted by unknown.