SRL Archive - OSR Help

Picking up items


xtrapsp

2012-02-20 17:51:11

Hey guys,

Having some issues here :(
I tried using DTM's to pickup items on the floor only to realise that depending on the camera angle the item changes shape etc…
I don't know if Autocolour is a wise choice either.

Any suggestions?

Snippet into stuff I've tried:

rocedure FindNest_old;
var
X, Y: Integer;
Begin
if not LoggedIn then
Exit;
FindNormalRandoms;

If FindObjCustom(x, y, ['Ne', 'st'], [3290938,3883332], 5) Then
begin
Mouse( x, y, 2, 2, True);
Writeln('Found a nest... Attempting to pickup');
MakeCompass(10 + random(50));
end;
End;

function ItemFind_Nest : boolean;
var
X, Y: Integer;
Begin
if not LoggedIn then
Exit;
FindNormalRandoms;
if (FindColorTolerance(x, y, NestColour, Msx1, Msy1, Msx2, Msy2, 10))
or (FindColorTolerance(x, y, NestColour1, Msx1, Msy1, Msx2, Msy2, 10)) then
begin
MMouse(x, y, 0, 0);
if (IsUpText('ake')) then
begin
Mouse(x, y, 2, 2, false);
Flag;
end;
end;
end;


Procedure X_FindNest;
var
X, Y, FindNest: Integer;
Begin
if not LoggedIn then
Exit;
FindNormalRandoms;

FindNest := DTMFromString('m6wAAAHic42ZgYOACYlEGCACxBaF8ISgfBFiAWBKIuaFsbqg6RiDmg7Jh6kB8diC2sdJgcLTXYfD1cWawtzMDs22sTSAYKOfibA3GIDYpgJEEjAQAXz4Ing==')

If FindDTM(FindNest, X, Y, MSX1, MSY1, MSX2, MSY2) Then
Begin
Writeln('Found a nest... Attempting to pickup');
MMouse (x, y, 5, 5);
MakeCompass(0 + random(50));

If IsUpText('nes') Then
Mouse(x, y, 2, 2, True);
End;

FreeDTM(FindNest);
End;

Procedure FindEmptyNest; //Probably not needed. It's a procedure incase the script drops a nest randomly?
var
X, Y, EmptyNest: Integer;
Begin
if not LoggedIn then
Exit;
FindNormalRandoms;

EmptyNest := DTMFromString('mlwAAAHicY2dgYMhmZGDIAuI4IE4B4nwgLgfiIiCew8TAsByIFwDxDCCeDsTzoGKeHhYMjo4WDN7ejkC2PYObmxmDjY0Gg56eBgM+wIgHQwEA+fEMeg==')

If FindDTM(EmptyNest, X, Y, MSX1, MSY1, MSX2, MSY2) Then
Begin
Writeln('Found a nest... Attempting to pickup');
MMouse (x, y, 5, 5);
MakeCompass(0 + random(50));

If IsUpText('nes') Then
Mouse(x, y, 0, 0, True);
End;

FreeDTM(EmptyNest);
End;


Procedure X_CrushNest;
var
X, Y, CrushNest: Integer;
Begin
if not LoggedIn then
Exit;
FindNormalRandoms;

CrushNest := DTMFromString('mggAAAHicY2NgYOADYiEgFgNiGSDmZYAATijNCGULQWkTAw0gyYSBuRiwA0YcGAIAboABOg==')

If FindDTM(CrushNest, X, Y, MIX1, MIY1, MIX2, MIY2) Then
Begin
Writeln('Found a nest inside Inventory, Attempting to crush');
MMouse (x, y, 5, 5);

If IsUpText('cru') Then
Mouse(x, y, 0, 0, True);
End;

FreeDTM(CrushNest);
End;

PatDuffy

2012-02-20 17:53:07

You could use ACA to get the best color for the 100% drop(such as bones) then right click and search a text array for said drop, that's what I did for the only time I ever picked up drops.

xtrapsp

2012-02-20 17:55:35

From: PatDuffy
You could use ACA to get the best color for the 100% drop(such as bones) then right click and search a text array for said drop, that's what I did for the only time I ever picked up drops.


can't believe I didn't think of it. RISK said same thing at same time :P will try it thanks