1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
addhook("second","Healing_Second")
function Healing_Second()
	for _,id in ipairs(player(0,"tableliving")) do
		if Natural_Healing.Wait[id] < Waiting_Time then
			Natural_Healing.Wait[id] = Natural_Healing.Wait[id] + 1
		end
		if Natural_Healing.Wait[id] == Waiting_Time then
			--[[ -------------------- MODIFIED CODE -------------------- ]]--
			local new_health = player(id,"health")+math.ceil(player(id,"health")*(Healing_Rate/100))
			if ( new_health > player(id, "maxhealth") ) then
				new_health = player(id, "maxhealth")
			end
			parse("sethealth "..id.." "..new_health)
			-- reset timer
			Natural_Healing.Wait[id] = 0
		end
	end
end