Think My Handle Trade For The Slave Still Works?
SCAR Code:
Function HandleTrade: Boolean;
Var
TimeOut, Coins: Integer;
Begin
If SomeOneTrades Then
Begin
If AcceptTrade Then
Begin
MarkTime(TimeOut);
Repeat
Wait(100 + Random(500));
If (TimeFromMark(TimeOut) >= 10000) Then
Begin
Result := False;
Exit;
End;
Until (TradeScreen);
Wait(1000 + Random(500));
MarkTime(TimeOut);
Try
Coins := BitmapFromString(2, 2, '0000019D7709000001F6BB0E');
If (FindBitMapToleranceIn(Coins, X, Y, MIX1, MIY1, MIX2, MIY2, 40)) Then
Begin
MMouse(X, Y, 5, 5);
If (IsUpText('oin')) Then
Begin
If (CoinAmount('inv') >= 5000) Then
Begin
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, False);
Wait(50 + Random(50));
If ChooseOption('X') Then
Begin
TypeSend(IntToStr(PerNewt * 27));
Wait(3000 + Random(500));
End Else
Begin
Result := False;
Decline;
Try
FreeBitMap(Coins);
Except
WriteLn('Memorie Leak');
End;
Exit;
End;
End Else
Begin
Result := False;
Decline;
Try
FreeBitMap(Coins);
Except
WriteLn('Memorie Leak');
End;
Exit;
End;
Else Else
Begin
Result := False;
Decline;
Try
FreeBitMap(Coins);
Except
WriteLn('Memorie Leak');
End;
Exit;
End;
End Else
Begin
Decline;
Result := False;
Try
FreeBitMap(Coins);
Except
WriteLn('Memorie Leak');
End;
Exit;
End;
Finally
Try
FreeBitMap(Coins);
Except
WriteLn('Memorie Leak');
End;
End;
Accept;
MarkTime(TimeOut);
Repeat
Wait(500 + Random(100));
If (TimeFromMark(TimeOut) > 30000) Then
Begin
Result := False;
Decline;
Exit;
End;
Until (TradeScreen2);
MarkTime(TimeOut);
Repeat
Wait(500 + Random(100));
If (TimeFromMark(TimeOut) > 30000) Then
Begin
Result := False;
Decline;
Exit;
End;
Until (PlayerAccepted);
Accept;
MarkTime(TimeOut);
Repeat
Wait(500 + Random(100));
If (TimeFromMark(TimeOut) > 30000) Then
Begin
Result := False;
Decline;
Exit;
End;
Until (Not TradeScreen2);
End;
End Else
Result := False;
End;