So, I've been crudescripting a wine of zamorak bot and when testing it yesterday i found that it jumped parts of the code for no obvious reason(that i can find atleast).
the problem was that it ignored the InvFull and InvCount that i had included in the repeat and went on like the lines of code didnt exist. I've rewritten it atleast 20 times by now and still can't find the reason for it not working and thus i turn to you since your knowledge far exceeds when it comes to this
the procedure as it is right now:
Simba Code:
Procedure WineGrabbing;
var
x, y, I, p: Integer;
MyPos: TPoint;
begin
if (rs_GetCompassAngleDegrees <> 0) then
begin
ClickNorth(true);
SetAngle(true);
end else;
begin
SetAngle(true);
end;
MyPos := SPS_GetMyPos();
if (MyPos.x <> 3545) and (MyPos.y <> 2575) then
repeat
SPS_WalkToPos(point(3545, 2575));
wait(2000);
MyPos := SPS_GetMyPos();
until (MyPos.x = 3545) and (MyPos.y = 2575);
o := 0
repeat
inc(o)
if (o>25) then
begin
GameTab(tab_inv);
for I := 1 to 28 do
if (ExistsItem(I)) then
Inc(p);
o := ((o + p - 2) / 2)
end;
Gametab(tab_Magic);
if (rs_GetCompassAngleDegrees <> 0) then
begin
ClickNorth(true);
SetAngle(true);
end;
repeat
x := RandomRange(614, 627)
y := RandomRange(295, 310)
MMouse(x, y, 3, 3);
Mouse(x, y, 0, 0, True);
wait(100 + RandomRange (100,450))
x := RandomRange(213, 219)
y := RandomRange(156, 161)
MMouse(x, y, 3, 3);
wait(50 + RandomRange (100,250))
until IsUpText('elekinetic') = true;
FindObject(x, y);
wait(randomrange(194, 673));
writeln('inventcount: ' + IntToStr(p));
writeln('tries: ' + IntToStr(o));
until (p = 27)
end;
earlier arrangements called invfull and broke loop when it turned true, also tried with using InvCount := p for example in the end of the script, which is preferable but didn't work either. don't get any errors while compiling but it wont even go as far as open the tab, only returns 0 as value, the rest of the script works without problems. Sorry for messy script...