OK , Nice script for private ( kinda ).
Needs some failsafes i think..
Well first
Procedure R_Flax;
begin
Repeat
PickThatFlax;
Until(InvFull)
Flax := Flax + 28;
GC := Flax * GetFlaxPrice;
Antiban;
MakeCompass(0);
end;
That could be bad if something happens that you cant see flax.
So
Procedure R_Flax;
var TimerTime:Integer;
begin
marktime(TimerTime);
Repeat
PickThatFlax;
if timefrommark(timertime) > 320000 then
begin
writeln('Failed pickin flax');
logout;
terminatescript;
end;
Until(InvFull)
Flax := Flax + 28;
GC := Flax * GetFlaxPrice;
Antiban;
MakeCompass(0);
end;
And lastly, i made you a getflaxprice function..
Function GetFlaxPrice: Integer;//When called it will return an integer. EX: If (GetFlaxPrice = 81) then...
var
S,T:string;
begin
S := getpage('http://itemdb-rs.runescape.com/viewitem.ws?obj=1779')//Flax URL on GE Database
T := between('Market price:</b>','</span>',S);//Getting the price(between those two strings)
If StrToInt(t) > 0 then
Result := StrToInt(T);
Writeln(Inttostr(Result));
end;
Procedure R_Flax
var TimerTime:Integer;
begin
marktime(TimerTime);
Repeat
PickThatFlax;
if timefrommark(timertime) > 320000 then
begin
writeln('Failed pickin flax');
logout;
terminatescript;
end;
Until(InvFull)
Flax := Flax + 28;
GC := Flax * GetFlaxPrice;
Antiban;
MakeCompass(0);
end;
Your banking procedure should be just incase it doenst open the bank.
Procedure BankFlax;
begin
Wait(500+random(500));
if R_OpenBankBooth('seb') then
begin
Wait(500+random(500));
DepositAll;
if random(2) = 1 then CloseBank;
end else
begin
writeln('failed bankin');
logout;
terminatescript;
end;
end;
function PickThatFlax: boolean;
var
xx:TPoint;
begin
Antiban;
if FindObjectEx(xX,2646,7) then
begin
//Result:= True;
XX:= TileToMS(XX, 0);
Mouse(xX.x,xX.y,5,5,True);
If(IsUpText('offre')) then
begin
Mouse(xX.x,xX.y,5,5,False);
Result := r_ChooseOption('ick');
end;
Wait(700+random(300));
While(CharacterAnimating or CharacterMoving) do
Begin
wait(50);
R_FindRandoms;
end;
end;
end;
You should result = true rite after it loads the flax object in member, you should result true after it picks.
Theres alot of those kinda errors you should fix, but i bet this script probally runs real fine, but you gotta fix those type of things. Like add timers in a repeat until loop, dont just call booleans like procedures, call them like "if chooseoption('ick') then" etc. Nice job