I made a macro to automatically pot and feed my character. Instead I just ended up taking 5 mana pots, 5 health pots, and got too full (you get digestive problems and need to take medicine). I used 'not' in my if statements and I believe that's where it went wrong. Take a look-
What it up?Code:program LazyHunter; var health, mana, hunger, healthc, manac, hungerc, cycle: integer; procedure SetBeginningVariables; begin health := GetColor(130, 66); mana := GetColor(130, 78); hunger := GetColor(149, 32); end; procedure CheckCurrentVariables; begin healthc := GetColor(130, 66); manac := GetColor(130, 78); hungerc := GetColor(149, 32); end; procedure CheckHealth; begin if not(healthc = health)then wait(100); KeyDown(VK_F1); wait(50); KeyUp(VK_F1); end; procedure CheckMana; begin if not(manac = mana)then wait(100); KeyDown(VK_F2); wait(50); KeyUp(VK_F2); end; procedure CheckHunger; begin if not(hungerc = hunger)then wait(100); KeyDown(VK_F3); wait(50); KeyUp(VK_F3); end; begin SetBeginningVariables; writeln(IntToStr(health) + ' ' + IntToStr(mana) + ' ' + IntToStr(hunger)); cycle := 0; repeat CheckCurrentVariables; CheckHealth; CheckMana; CheckHunger; wait(1500); cycle := cycle + 1; writeln('The macro has cycled through ' + IntToStr(cycle) + ' times.'); until(1=2); end.


Reply With Quote





