View Full Version : Hp Checker
Grumps
02-27-2012, 08:51 PM
Hello
does anybody know a decant Hp Checker guide, I am currently writting a Hill Giant Script however my Hp Checker does not work and I get a big error. I know that the script is nothing without this so does anybody know?
Function HPchecker: Boolean;
Begin
if (HPPercent > 50) then
Begin
Result := False
WriteLn('Hp is good');
end;
end;
That was my script but that doesnt work, any ideas :f:
x[Warrior]x3500
02-27-2012, 08:59 PM
if hppercent is messin up, try getMMLevels('hp', stringHere);
Grumps
02-27-2012, 09:49 PM
Yer, but i dont get how to use getMMLevels('hp', stringHere);
x[Warrior]x3500
02-27-2012, 09:59 PM
Returns the level shown next to the minimap.
Colorsign returns the color of the text (Green,Yellow,Orange,Red).
Returns -1 if failed.
so the function would return 0 for green, 1 for yellow, 2 for orange, 3 for red.
Grumps
02-28-2012, 08:19 PM
Mate i still dont get how to use it...
x[Warrior]x3500
02-28-2012, 09:28 PM
program new;
{$DEFINE SMART}
{$I SRL/SRL.simba}
procedure declareplayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Active := True;
end;
Function HPchecker: Boolean;
Begin
result:=true;
if (HPPercent > 50) then
Begin
Result := False
WriteLn('Hp is good');
end;
end;
begin
Smart_Server := 10;
setupsrl;
declareplayers();
hpchecker();
end.
masterBB
02-28-2012, 09:39 PM
program new;
{$DEFINE SMART}
{$I SRL/SRL.simba}
procedure declareplayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Active := True;
end;
Function HPchecker: Boolean;
var
color:String;
Begin
result:=true;
if not((HPPercent < 50) or (getMMLevels('hp',color) > 1)) then
Begin
Result := False
WriteLn('Hp is good');
end;
end;
begin
Smart_Server := 10;
setupsrl;
declareplayers();
hpchecker();
end.
Nemesis3X
02-28-2012, 09:40 PM
I saw your post Today. I see you are using Narcle hp method and Lets me Show you How I worked it around to work for My script.
Here if the function to Check how Much Hp left I got
Function HpCheckBank: boolean;
begin
if (HPPercent < 70) and LoggedIn then
begin
Result := True;
NeedToEat := 1;
end;
end;
I made a Global Variable(NeedToEat : integer;), so when it return True, It turn the Value NeedToEat to 1 Which Later will Result in My bot eating.
begin
HpCheckBank;
If(NeedToEat = 1) then
begin
Writeln('We Are Going to EAT!');
If FindDTM(Saumon,X,Y,MBx1,MBy1,MBx2,MBy2)then // Find saumon in Bank
begin
Mouse(x, y, 5, 5, true); // Withdraw one
wait(200 + random(500));
Mouse(x, y, 5, 5, true);
wait(200 + random (500));
EatFood;
end;
end;
As you see, when I am banking, My bot look if I need to Eat, if the function return true, the value Needtoeat is set to 1 which bring it to eat.
Here if my Procedure for eating.
Procedure EatFood;
begin
repeat
If FindDTMRotated(Saumon,x,y,MIx1,MIy1,MIx2,MIy2,-Pi/4, Pi/4, Pi/60, aFound)then
begin
Mouse(x, y, 5, 5, false);
ChooseOption('Eat');
wait(650 + random (500));
end;
until not (FindDTMRotated(Saumon,x,y,MIx1,MIy1,MIx2,MIy2,-Pi/4, Pi/4, Pi/60, aFound));
NeedToEat := 0;
end;
Hope I helped you out.
I use this
function HPCount: Integer;//357 - full;
var
CTS: Integer;
begin
Result := -1;
if not LoggedIn then Exit;
//if Debug then mClearDebug;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.12, 1.31);
Result := CountColorTolerance(660607, 693, 17, 719, 43, 11);
ColorToleranceSpeed(CTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.