From: EyYo96
Thanks for you reply. When I try to use if (sips mod 4) then this error comes up:"Type mismatch". What is mod? or were can I find someting bout it?
General info on
mod. In short it finds the remainder after dividing two numbers.
Ninja edit:
From: EyYo96
Hi thanks for your help. Ok I'll try to explain it again. The script should check HP, if hp are under 80, like your example, it should drink a sip of saradomin brew. When he has drunk 3 sips [combat stats r low so he must drink 1 sip of restore so stats go up to 99 again], it should drink one sip of restoration pot and start at beginning. [3 brew sips then 1 restore sip]
Then what you want is to keep track of how many sips of saradomin brew you have taken. Once that counter is >= 3 you can take your restore potion and wait until your health is below 80% again.
// Check if HP is less than 80
if(actionbar.getHPPercent() < 80)
then begin
drinkSaraPot();
saraPotCounter := saraPotCounter + 1;
end;
// Check how many times you drank sara.
if(saraPotCounter >= 3)
then begin
drinkRestorePot();
saraPotCounter := 0;
end
Make sure
saraPotCounter is a global variable. Or depending on how much sara heals and makes you lose in stats you might want to go with slacky's version instead.