SCAR Code:
Function Fletch:Boolean;
Var
MaxTime:Integer;
Begin
If Not Loggedin Then Exit;
If Not FindKnife(X, Y, True) Then If GetKnife = False Then Logout;
If Not Loggedin Then Exit;
If FindKnife(X, Y, True) Then
Begin
Mouse(X, Y, 3, 3, TrueOrFalse);
If RightClick then HOption('Use');
RightClick:=True;
If FindItem(Players[0].Strings[0], X, Y, True) then Mouse(X, Y, 3, 3, TrueOrFalse);
If RightClick then HOption('Use');
RightClick:=True;
End;
MarkTime(MaxTime);
Repeat
Wait(100+random(50));
If LowerCase(Players[CurrentPlayer].Strings[1]) = 'longbow' Then Result:= FindTextTpa (0,10,MCX1, MCy1, MCX2, MCy2,'ong',NpcChars,ClickRight) else If (Players[CurrentPlayer].Strings[1]) = 'shortbow' Then Result:= FindTextTpa (0,10,MCX1, MCy1, MCX2, MCy2,'hort',NpcChars,ClickRight);
Until (FScreen) or Result or(TimeFromMark(MaxTime) >=5000);
Wait(100);
If Result Then Result:=HOption('X');
If Result Then Wait(750+random(500));
if Result Then TypeSend(IntToStr(RandomRange(28,99)));
If Not Result Then LogOut;//here does it logs out because something above this results false.
If Not Loggedin Then Exit;
MarkTime(MaxTime)
Repeat
Wait(100+random(50));
Until Not FindItem(Players[0].Strings[0], X, Y, True) or (TimeFromMark(MaxTime) >=60000*2);
Result:= Not FindItem(Players[0].Strings[0], X, Y, True);
If Result Then CountUp;
End;
when it finds the FScreen it logsout.
Can you help me?