SRL Archive - Help and Support

FindObjectMulti Help


puj

2006-04-27 13:35:27

In my bone buryer i am making when it finds the bone it doesnt click it very often. this is also happening for the bones that are in my inventory when i try to drop them.

Only 1 out of about 10 of the bones hovered over are clicked on and picked up and it is symilar for the bones to drop. Also it is weird because sometimes it picks up nearly all of the bones and the next minute it isn't working again.

I have the latest SRL and have no idea whats wrong.

Here is he script so far.

program BoneBuryer;
{.include SRL/SRL.scar}


//******************** Set These Constants if Needed *******************//

const
Bonecolour1 = 13355985;
Bonecolour2 = 13948122;
Bonecolour3 = 14342878;

//************************************************************************//

procedure PickUpBone;
begin

FindObjectMulti('Bones', 'feathers', 'Bones', Bonecolour1,Bonecolour2,Bonecolour3,2,1,true,true)

end;
//*************************************************************************//


procedure bury;
begin
repeat
if (FindItemName('Bones')) then
Mouse(x, y, 0, 0, false);
ClickOption('Bury',2)
until ((FindItemName('Bones')) = false)

end;
//*************************************************************************//
//
// Main EventLoop
//
//*************************************************************************//
begin
SetupSRL;
//SetRun(true);
repeat
FindNormalRandoms;
PickUpBone;
if InventoryFull or (not(FindObjFast(x, y, 'Bones', Bonecolour1, 5)))then bury
until(false)

end.

As you can see i am getting it to pick up any feathers if found too. :)

phantombmx

2006-04-27 16:18:36

try to change it to this

FindObjectMulti('Bon', 'eather', 'nes', Bonecolour1,Bonecolour2,Bonecolour3,2,1,true,true)

that will look for two different parts of the word bones instead of the whole word both times

WT-Fakawi

2006-04-27 16:30:22

or you might try to increase the tolerance.

And here is the Bone Bitmap (for the inventory) from my Cowkiller:
[php] Bone := BitmapFromString(4, 4, '000001000001000001D2CCCC9B9' + // centre of bonebmp
'090A19595CEC7C79B909089807FDED9D9CAC3C29A8E8E000001C7' +
'BFBFA99D9D000001');
[/php]
and this is how I bury them
[php]Procedure CleanUpInventory;
begin
ClickAllItemsBmpTolWait('Bury', Bone, 20, 1000); // buries bones by BitMap.
end;
[/php]

These are the old Stupid3ooo procs. I took me a while to figure them out, but once you get to know them, they turn out to be extremely powerfull!


and this is how I pick them up:
[php]Function FindMulti:Boolean;
var RX, RY:Integer;
begin
if FindObjectMulti('Ta','ak','ke', 1056925, 14342879, 12500678, 15, 3, True, True)
then
begin
MMouse(Rx, Ry, 0, 0);
WWait((200) + Random(200));
if (IsUpTextMulti(Ta',ak','ke ')) then
begin
Mouse(Rx, Ry, 0, 0, True);
MarkTime(Mark);
repeat
Wait(10); // waits until flag is gone or six seconds.
if not(Loggedin) then break;
until ( (not FlagPresent) or (TimeFromMark(Mark) > 6000) );
end;
Result := True;
end;
end;[/php]

Hopes this helps :)

WT-Fakawi

2006-04-27 16:37:31

This actually works :)

[php]program BoneBurier;
{.include SRL/SRL.scar}
var Bone:integer;
begin
SetupSRL;
Bone := BitmapFromString(4, 4, '000001000001000001D2CCCC9B9' + // centre of bonebmp
'090A19595CEC7C79B909089807FDED9D9CAC3C29A8E8E000001C7' +
'BFBFA99D9D000001');

ClickAllItemsBmpTolWait('Bury', Bone, 20, 1000); // buries bones by BitMap.

end.[/php]

puj

2006-04-27 16:55:37

Thanks that should really help, i will report back when i test it.