blob: 1bdcf0ee0222883d3f3eb59b7efe3440cf78d76b (
plain) (
tree)
|
|
// Evol scripts.
// Authors:
// Reid
// Description:
// Random heal every x seconds.
//
// Variables:
// @delay Second of healing
// @min Min amount of healing
// @max Max amount of healing
// @type 1 Heal
// 2 Other
// 3 Special 1
// 4 Special 2
- script rand_sc_heal -1,{
close;
OnUse:
if (@delay <= 0) close;
.@rand = rand (@min, @max) / @delay;
if (.@rand <= 0) close;
switch (@type)
{
case 1:
sc_end SC_S_LIFEPOTION;
sc_start2 SC_S_LIFEPOTION, @delay * 1000, .@rand, 1;
break;
case 2:
sc_end SC_L_LIFEPOTION;
sc_start2 SC_L_LIFEPOTION, @delay * 1000, .@rand, 1;
break;
case 3:
sc_end SC_G_LIFEPOTION;
sc_start2 SC_G_LIFEPOTION, @delay * 1000, .@rand, 1;
break;
case 4:
sc_end SC_M_LIFEPOTION;
sc_start2 SC_M_LIFEPOTION, @delay * 1000, .@rand, 1;
break;
default :
break;
}
close;
}
|