For some reason it always returns false
Currently I'm trying to find fishing spot (to be more specific, draynor's net fishing spot), but it returns false even while standing right next of it.
My code below produces these comments (imo it's odd that standing still doing nothing returns True value from IsAnimating)
"start
True
not animated
False
on spot
already busy"
Simba Code:
program Netfishing;
{$DEFINE SMART8}
{$i reflection/Reflection.simba}
procedure FindFish();
Begin
End;
var
Fspot: TReflectObject;
MyPlayer: TReflectLocalPlayer;
begin
MyPlayer.Username := '';
MyPlayer.Password := '';
MyPlayer.Active := True;
WriteLn('start');
WriteLn(MyPlayer.IsAnimating);
if MyPlayer.IsAnimating = True then
begin
WriteLn('not animated');
WriteLn(Fspot.Find(objGame, 'Net Fishing spot', 10));
WriteLn('on spot')
if Fspot.Find(objGame, 'Net Fishing spot', 10) = true then
begin
Reflect.Mouse.Move(Fspot.GetMSPoint, 10, 10);
Reflect.Mouse.Click(Mouse_Left);
WriteLn('start fishing');
wait(50);
WriteLn('after start fishing command');
WriteLn(MyPlayer.IsAnimating);
end else
begin
wait(50);
WriteLn('already busy');
end;
end;
end;
I also tried code from
https://villavu.com/forum/showthread...45#post1370245 with minor modification. It always just writes how it attempts to find, but never clicks or write "found bank" while standing in draynor's bank. This code was used in attempt to try "working code", but maybe it's a problem with the reflection include itself?
Simba Code:
program new;
{$DEFINE SMART8}
{$i reflection/Reflection.simba}
procedure OpenBank();
var
Bank: TReflectObject;
begin
writeLn('trying to find bank');
if bank.Find(objGame, 'Bank booth', 10) then
begin
Reflect.Mouse.Move(bank.GetMSPoint, 10, 10);
writeLn('found bank');
end;
end;
begin
OpenBank();
end.