Meh, I was bored so I put together this procedure. Don't even know if it compiles really
. Doing it straight from keyboard so dtn flame if it doesnt compile
.(or work
).
THIS IS STILL IN PROGRESS
I POSTED HERE SO I WOULDNT HAVE TO SAVE ON COMP AND I WAS BORED. POST ANY SUGGESTIONS
SCAR Code:
program New;
{.include srl/srl.scar}
var
Money : integer;
UmArray : array of integer;
None : TIntegerArray;
procedure CreateInventoryArray(var TheArray : array of integer; TheDTM : integer);
var
ii : TPoint;
i, iq : integer;
z : integer;
begin
z := 0;
i := 0;
repeat
I := I + 1;
ii := ItemCoords(I);
If(z <= 0)then Z := 1;
If (FindDTM(TheDTM, x, y, ii.x - 25, ii.y - 25, ii.x + 25, ii.y + 25))then
begin
SetArrayLength(TheArray,Z + 1);
TheArray[Z] := I;
Z := Z + 1;
end;
until(I = 28);
Z := GetArrayLength(TheArray) - 1;
If (z <= 0)then Z := 1;
Iq := 0;
repeat
Writeln(IntToStr(TheArray[IQ]));
IQ := IQ + 1;
until( IQ = Z);
end;
function DiscardAll(var ArrayToSkip : array of integer; Sell : boolean) : boolean;
var
z1,z2,z3 : integer;
begin
If ( Sell ) then
begin
z1 := 0;
repeat
If(IsFKeyDOwn(2))then TerminateScript;
z1 := z1 + 1;
If(ExistsItem(z1)) then
begin
z2 := GetArrayLength(ArrayToSkip);
if (z2 = 0) then z2 := 1;
for z3 := 0 to z2 do
begin
if not(z1 = ArrayToSkip[z3])then
begin
MouseItem(z1,false);
wait(30+random(400));
ChooseOption(x,y,'10');
end;
end;
end;
until(z1 = 28);
result := true;
end;
end;
begin
SetupSRL;
//Money DTM was set here
CreateInventoryArray(none,money);
DiscardAll(None,true);
end.