;'Plague' timed locust-disease script

UserID=#PARAM1
CountDown=#PARAM2

AbortCountdown = 0

Damage = Random(8,12)
If GetUserHP(UserID) < Damage+1
	AbortCountdown = 1
EndIf

DamageUser(UserID,Damage)

If CountDown = 0
	SendCombatMessage(UserID,"The disease has worn off ")
EndIf

If AbortCountdown = 0
	CountDown = 0
EndIf

If CountDown = 0
	SetUserEnduranceBonus(#PARAM1,GetUserEnduranceBonus(#PARAM1)+3)
	SetUserStrengthBonus(#PARAM1,GetUserStrengthBonus(#PARAM1)+3)
EndIf

If CountDown > 0
	Timer(381,1500,UserID,CountDown-1,0)
EndIf

Continue = 1