SRL Archive - SRL Bugs

Using Gift Fails


caused

2009-06-21 19:39:00

Hey!
When Randoms are solved, it clicks the gift, selects the Reward, and closes the window with the X instead of accepting the gift :X.

Is there a fix for that Problem yet :O?

~caused

Shuttleu

2009-06-21 20:26:52

what does it say in the debug box?

~shut

senrath

2009-06-21 20:35:34

Did you set up the BoxRewards option for your players?

caused

2009-06-21 21:21:56

Senrath: yes.

ShuttleU: Nothing ;/… And it tries it whenever the findrandoms function is called ; '(

caused

2009-06-22 20:48:43

I got the Same Problem again right now, Here's an Screenshot.


Nava2

2009-06-23 00:26:40

{*******************************************************************************
procedure UseRewardBox: Boolean;
by: Nava2
Description: Finds the reward box, and opens it getting the reward.
*******************************************************************************}

function UseRewardBox: Boolean;
var
I, Time, Height, fx, fy: Integer;
Text, TPA: TPointArray;
B: TBox;
bDTM: Integer;
begin
Result := False;
if not LoggedIn then Exit;
GameTab(4);
if (not(FindColorTolerance(fX, fY, 7280034, MIX1, MIY1, MIX2, MIY2, 20))) then Exit;
bDTM := DTMFromString('78DA634C626660B8C4C8800C568B963070006' +
'990E87F20608C04AA398EAA06220B23813448CD65026A0A816AAE' +
'12A1E62401359940351751D5DC889782BB19AC2619A8E6087E730' +
'0776A0F22');
for I := 1 to 28 do
begin
B := InvBox(I);
if FindItemEx(fx, fy, 'dtm', bDTM, B, []) then
begin
MMouseItem(I);
Wait(RandomRange(100, 150));
Result := IsUpText('event gift');
if Result then Break;
end;
end;
FreeDTM(bDTM);
if not Result then Exit;

GetMousePos(fx, fy);
Mouse(fx, fy, 0, 0, True);

Result := False;
Text := LoadTextTPA('hoose', UpChars, Height);
Time := GetTimeRunning + 10000;
FindColorsTolerance(TPA, 2070783, 185, 34, 327, 50, 3);
while not Result and (GetTimeRunning < Time) do
begin
Wait(RandomRange(80, 100));
FindColorsTolerance(TPA, 2070783, 185, 34, 327, 50, 3);
if Length(TPA) > 10 then
Result := FindTextTPAinTPA(Height, Text, TPA, TPA);
end;

if not Result then
begin
SRL_Warn('OpenRewardBox', 'Could not open Reward Screen', Warn_AllVersions);
Exit;
end;
Wait(Random(100));
if not FindBoxOption(B) then
begin
SRL_Warn('UseRewardBox', 'Could not find a usable option.', Warn_AllVersions);
Exit;
end;
MouseBox(B.x1, B.y1, B.x2, B.y2, 1);
Time := GetTimeRunning + 2000;
Result := False;
while (not Result) and (GetTimeRunning < Time) do
begin
FindColorsTolerance(TPA, 1317148, 35, 70, 362, 311, 3);
Result := Length(TPA) > 50;
end;
if not Result then
begin
CloseWindow;
Exit;
end;
Mouse(393, 166, 77, 39, True);
end;

Fix'd

ZephyrsFury

2009-06-23 10:15:07

Fixed properly :p