Is HpPercent broken? Results me -1 and 0.
~Eerik.
Show your function?
I am going to show you my eating function on my thieving script, maybe it helps!
Simba Code:Function LowHPLetsEat(What: String): Boolean;
var
I, x, y: Integer;
begin
Result := (HPPercent < 50) and (LoggedIn);
If(not(Result)) then
Exit;
if Result then
If InvEmpty then
begin
Logout;
TerminateScript;
end
else
for i := 1 to 28 do
begin
InvMouse(I, 3);
if WaitUpText(What, RandomRange(250, 300)) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
Exit;
end else
Continue;
end;
end;
Hi
Should be working correctly.
Tested.
~Home
EatAt is 50.Code:if (HPPercent <= EatAt) then Eat;
It's from Flight's script, if I wasn't allowed to post it here, let me know, I don't mean to offend anyone in any way.Code:Procedure Eat; var DTM,X,Y,X2, Y2,T: Integer; begin if not LoggedIn then Exit; if not BankScreen then Exit; Case lowercase(Food) of 'lobster' : DTM := DTMFromString('mbQAAAHicY2VgYOgB4g4g7gPiyUA8FYjPA/F1IL4CxHeA+DQQrw+TAJJMKJiLARMwYsFgAACaUQgl'); 'monkfish': DTM := DTMFromString('mggAAAHicY2NgYJjEyMAwEYgXQPE8IJ4GxB+Bct+A+A0DhP0diH8AsbejJcP8miogiwkFcwFJEEYHjDgwBAAAZ90L0w=='); 'shark' : DTM := DTMFromString('mggAAAHicY2NgYLBjZGAwB2JHIHYHYg8g1gfiEqBcAxBXA3EzEJcCcQsQd+RHAUkmDMzFgB0w4sAQAAAltwXX'); end; if FindDTM(DTM, X, Y, MSX1, MSY1, MSX2, MSY2) then begin HumanMMouse(X, Y, 5, 5); ClickMouse2(False); WaitOption('Withdraw-5', 300); MarkTime(T); repeat FindNormalRandoms; if (TimeFromMark(T) > 5000) then Exit; if (HPPercent >= 85) then break; if FindDTM(DTM, X2, Y2, MIX1, MIY1, MIX2, MIY2) then begin HumanMMouse(X2, Y2, 5, 5); ClickMouse2(False); WaitOption('Eat', 300); Wait(RandomRange(425, 675)); MarkTime(T); end; until(false) end; if FindDTM(DTM, X, Y, MIX1, MIY1, MIX2, MIY2) then begin HumanMMouse(X, Y, 5, 5); ClickMouse2(False); WaitOption('Deposit-All', 300); Wait(RandomRange(425, 675)); end; FreeDTM(DTM); end;
~Eerik.
Yes Eerik. There is a problem with it. Do something like this:
begin
Name := '';
Pass := '';
Pin := '';
Level[SKILL_HITPOINTS] := 99;
BoxRewards := ['XP','xp','lamp'];
LampSkill := 'Runecrafting';
Active := True;
end;
Add that part to the script, below the pin. Place your HP level. Have fun!
~onilika
''If you want something you've never had, you have to do something you've never done''
total leve 2715/1b exp +... exterminated.
Resolved
STOP PM'ING ME
I's broken for me.
Simba Code:writeln(inttostr(HPPercent));
in gametab.scar:
Code:Error: Out Of Range at line 615Simba Code:615: if (Players[CurrentPlayer].Level[SKILL_HITPOINTS] < 1) then
Last edited by bg5; 12-21-2011 at 09:46 PM.
Have you called: NumberOfPlayers yet?
Writing an SRL Member Application | [Updated] Pascal Scripting Statements
My GitHub
Progress Report:13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you have serious physchological problems 13:46 <@BenLand100> HE GETS IT! 13:46 <@BenLand100> HE FINALLY GETS IT!!!!1
I didn't. It works now ,thx![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)