Frt
2009-03-09 19:23:51
Hi,
I'm in the progress of making a TutRunner in reflection, but I'm stuck already at the cooking fish part.
I've made a function to interact with objects (posted further down) and it works with opening doors, clicking trees but I can't get it to interact with a fire.
It right clicks the fire and then it just freezes and doesn't choose the option it's supposed to do.
And the part where I'm calling it to cook the fish:
I'm in the progress of making a TutRunner in reflection, but I'm stuck already at the cooking fish part.
I've made a function to interact with objects (posted further down) and it works with opening doors, clicking trees but I can't get it to interact with a fire.
It right clicks the fire and then it just freezes and doesn't choose the option it's supposed to do.
function ObjectClicker(id, offx, offy: integer; options: String):Boolean;
var
Ti: TPoint;
FS, FS2: integer;
begin
repeat
if(FindObject(Ti, id)) then
begin
if not TileOnMS(Ti, 0) then
WalkToTile(Ti, 0, 0);
Ti := TileToMS(Ti, 0);
Mous(Ti.x + offx, Ti.y + offy, 2, 2, false, 500);
if R_ChooseOption(options) then Break;
repeat
if(FS > 10) then Break;
W(500);
Inc(FS);
until(not(CharacterMoving));
end;
Inc(FS2);
until(FS2 > 10);
end;And the part where I'm calling it to cook the fish:
MouseItem(5, true);
ObjectClicker(2732, 0, 0, 'Fire');