SRL Archive - OSR Help

2007 Bone finder and bury!


Aarondawg

2013-02-26 09:32:58

trying to get this script to Click the "Take Bone" from off the ground, but all it does is right click, and goes to a random text.

program boneAIO;

{$I SRL/SRL.Simba}
{$I P07Include.Simba}

var
x, y, Bones: integer;

procedure FindBones;
var
x, y: Integer;
begin
MouseSpeed:=20;
FindColorTolerance(x, y, 12434885, 0, 0, 520, 340, 4)
MoveMouse (x, y);
writeln('Found Bones...');
clickmouse2(mouse_right);
if FindObj(x, y, 'Take', 16777215, 1) then
Mouse(x, y, 0, 0, true);
P07_ChooseOptionMulti(['ake bon']);
ClickMouse2(mouse_left);
end;

begin
findBones;
end.

help please!!!!

Kevin

2013-02-26 10:24:06

As some general help overall…

Don't use
MoveMouse (x, y);
and instead use
MMouse (x, y, 3, 3);//This randomizes the click slightly and this function is a little less bot-like anyway
Mouse is also a deprecated method, instead use the MMouse and ClickMouse2 like you do just prior to it.

This:

if FindObj(x, y, 'Take', 16777215, 1) then
Mouse(x, y, 0, 0, true);
does about the same stuff as what you do just before it:

FindColorTolerance(x, y, 12434885, 0, 0, 520, 340, 4)
MoveMouse (x, y);
writeln('Found Bones...');
clickmouse2(mouse_right);
except in a different manner. At least I assume those are both supposed to be bone colors. Either way, you should only need one of them and not both of them to accomplish finding the bones on the ground.

This next section is where I believe you're trying to take the bones. I'll comment on what's happening at each step:

if FindObj(x, y, 'Take', 16777215, 1) then//Find the bone and highlight
Mouse(x, y, 0, 0, true);//Moves the mouse to current position and left clicks. Just use ClickMouse2(mouse_right) instead.
P07_ChooseOptionMulti(['ake bon']);//Searches the options for 'ake bon' and Selects it. I recommend using ['ake ', ' one'] instead of ['ake bon']
ClickMouse2(mouse_left);//Clicks the ground where the mouse is as the previous function picked the take bones option.