SRL Archive - OSR Help

Dropping Procedure


lilcmp1

2011-12-28 10:17:04

For the life of me I cannot seem to get this to work. I've recreated it from the scripting tuts but it never drops the inventory :( Can anyone help out? It spams dropping a fish 28 times but never moves mouse to do any work.

program New;
{$i SRL\SRL.scar}
Procedure DropFish;
Var
SeX, SeY, CrayDTM, I: Integer;
Slotbox:TBox;
CrayPattern:TIntegerArray;

Begin

CrayDTM := DTMFromString('mggAAAHicY2NgYFBlZGAwAWIlIFYBYhkg1gLiPiDuBuIWIJ4FxDOAuBWIM63lgboYMbAkA3aAqRKCIQAA5I4FMw==');
CrayPattern:= [1,5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,19,23,27,4,8,12,16,20,24,28]

For I:=0 To 27 Do
Begin
Writeln('Dropping a Fish');
SlotBox:=InvBox(CrayPattern[I]);
If FindDtm(CrayDTM, SeX,SeY, Slotbox.X1,Slotbox.Y1,Slotbox.X2,Slotbox.Y2) Then
Begin
MouseItem(CrayPattern[I], False);
ChooseOption('Dro');
End;
End;

End;
begin
SetupSRL;
Dropfish;
end.

Kyle Undefined

2011-12-28 10:26:21

Put a "WriteLn('In the FindDTM');" just before the MouseItem();

lilcmp1

2011-12-28 11:26:31

From: Kyle Undefined
Put a "WriteLn('In the FindDTM');" just before the MouseItem();


Aha thank you. Just needed a nudge in the right direction. That didn't work so I generated a new DTM and turns out there was a different border color then from when I first made the DTM. Thank you, working perfectly now.

Kyle Undefined

2011-12-28 11:30:59

Awesome, glad it's working.