SRL Archive - SRL Bugs

HpPercent.


Heavenzeyez1

2011-12-15 13:32:22

Is HpPercent broken? Results me -1 and 0.

~Eerik.

Tickyy

2011-12-15 14:07:24

Show your function?

I am going to show you my eating function on my thieving script, maybe it helps :D!

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;

Home

2011-12-15 14:21:07

Should be working correctly.

Tested.


~Home

Heavenzeyez1

2011-12-15 14:21:36

if (HPPercent <= EatAt) then
Eat;
EatAt is 50.
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;
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.

~Eerik.

onilika

2011-12-15 15:00:02

From: Heavenzeyez1
if (HPPercent <= EatAt) then
Eat;
EatAt is 50.
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;
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.

~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

Heavenzeyez1

2011-12-15 15:16:52

Thank you, sir, working like a charm! :)

~Eerik.

Hobbit

2011-12-18 14:52:26

Resolved

bg5

2011-12-21 16:23:23

I's broken for me.

writeln(inttostr(HPPercent));    

in gametab.scar:

Error: Out Of Range at line 615   
615:   if (Players[CurrentPlayer].Level[SKILL_HITPOINTS] < 1) then        

Nava2

2011-12-21 19:25:34

Have you called: NumberOfPlayers yet?

bg5

2011-12-22 11:13:12

I didn't. It works now ,thx :)