// Health Regeneration Script v1.2 by Avkon
// This script automatically replenishes lost health of all players at a specified pace.
// Declare a couple of essential values:
const
MAX_HEALTH = 150; // Set to 150 for non-realistic mode, else set to 65.
DROP_VALUE = 1; // Value of each 'drop' of health, def: 5.
// Incorporate main health regen code into AppOnIdle procedure:
procedure AppOnIdle(Ticks: integer);
var i: byte;
begin
if Ticks mod (60 * 1) = 0 then begin
for i := 1 to 32 do
if (GetPlayerStat(i,'Health') < (MAX_HEALTH - (DROP_VALUE - 1))) then begin
DoDamage(i,DROP_VALUE);
end else begin
DoDamage(i,(MAX_HEALTH - (GetPlayerStat(i,'Health'))));
end;
end;
end;
// Inform players of health regen modification:
procedure OnJoinTeam(ID, Team: byte);
begin
SayToPlayer(ID, 'This server runs the following mod:');
SayToPlayer(ID, '! Health Regeneration Script v1.2 (by Avkon)');
end;
i guess delating the + in onPlayerDamage and setting drop value to 1 will do
not tested