/////////////////////////
const 
ClickHeal = 50;//change when you want to heal at
ClickStam = 20;//change when you want to refresh at
CurePotionCD = 0;//change per server settings
HealPotionCD = 10;//change per server settings
StaminaPotionCD = 5;//change per server settings
/////////////////////////
var
CurePot, HealPot, StamPot : Cardinal;
/////////////////////////
Procedure DrinkStam;
begin
  if ((Timer > (StamPot + (StaminaPotionCD * 1000))) or (StamPot = 0)) then 
  begin 
    if (Count($0F0B) > 0) then
    begin 
      UseType($0F0B,$0000);
      wait(500);
    end; 
    StamPot :=Timer;
  end;
end;
Procedure DrinkHeal;
begin
  if ((Timer > (HealPot + (HealPotionCD * 1000))) or (HealPot = 0)) then 
  begin 
    if (Count($0F0C) > 0) then
    begin 
      UseType($0F0C,$0000);
      wait(500);
    end; 
    HealPot :=Timer;
  end;
end;
Procedure DrinkCure;
begin 
  if ((Timer > (CurePot + (CurePotionCD * 1000))) or (CurePot = 0)) then 
  begin 
    if (Count($0F07) > 0) then
    begin 
      UseType($0F07,$0000);
      wait(500);
    end; 
  end;
end;
Procedure AP;
begin
  repeat
    if (GetHP(self) < (GetMaxHP(self) - 1)) then
      begin
        if IsPoisoned(self) and not IsYellowHits(self) then DrinkCure;
        if (GetHP(Self) < ClickHeal) and (GetHP(Self) > 0) and not Poisoned and not IsYellowHits(self) then DrinkHeal;
      end;
    if (Stam < ClickStam) then DrinkStam;
    wait(50);
  until dead 
end;
Procedure AP1;
begin
  while not dead do
  begin 
    if (GetHP(self) < (GetMaxHP(self) - 1)) then
      begin
        if IsPoisoned(self) and not IsYellowHits(self) then DrinkCure;
        if (GetHP(Self) < ClickHeal) and (GetHP(Self) > 0) and not Poisoned and not IsYellowHits(self) then DrinkHeal;
      end;
    if (Stam < ClickStam) then DrinkStam;
    wait(50);
  end;
end;   
begin
end.