m34tcode
2012-04-14 02:23:48
This is what i am calling the craft menu: http://snpr.cm/tfvLB8.jpg
SRL currently has no function to choose options in there. This function currently works, but there is a single inefficiency I have yet to resolve. I will probably just use a variable tomorrow. Tired right now.
Works admirably. Try it :biggrin:
Will also modify those search box coords so it is searching only the area the text will be in, instead of the whole chat area
SRL currently has no function to choose options in there. This function currently works, but there is a single inefficiency I have yet to resolve. I will probably just use a variable tomorrow. Tired right now.
function SlideCraftMenu(Time : Integer; ToTheRight : Boolean) : Boolean;
var
Box : TBox;
BMP : Integer;
TP : TPoint;
begin
Result := False;
if ToTheRight then
begin
Box := IntToBox(493,394,505,462);
BMP := BitmapFromString(3, 5, 'meJyzC4zxi8sAIgNnfyufMN+Y1KDq' +
'Xj0HH++oJCBp4RUMZABJj7A4IAIASfsOPg==');
end else
begin
Box := IntToBox(12,394,24,463);
BMP := BitmapFromString(2, 5, 'meJwLSsq2C4xx8I80cPbXc/Cxj8u1' +
'9Q0DMryjkiy8ggGMfgjv');
end;
//exit func if we cant scroll
if FindBitmap(BMP,TP.x,TP.y) then
Exit;
MouseBox(Box.X1,Box.Y1,Box.X2,Box.Y2,mouse_move);
wait(Time);
GetMousePos(TP.x,TP.y);
MMouse(TP.x,TP.y-125,30,15);
//if we can still scroll further result = true
Result := not FindBitmap(BMP,TP.x,TP.y);
FreeBitmap(BMP);
end;
function ChooseCraftOption(OptionText : TStringArray) : Boolean;
var
MaxDuration : Integer;
T : LongInt;
begin
Result := False;
MaxDuration := RandomRange(10000,13000);
MarkTime(T);
while TimeFromMark(T) < MaxDuration do
begin
if FindTextTPAMulti(2070783,10,MCX1,MCY1,MCX2,MCY2,OptionText,StatChars,ClickLeft) then
begin
Result := True;
break;
end else if not SlideCraftMenu(RandomRange(1000,1300),True)
and not FindTextTPAMulti(2070783,10,MCX1,MCY1,MCX2,MCY2,OptionText,StatChars,ClickLeft) then
break;
end;
end; Works admirably. Try it :biggrin:
Will also modify those search box coords so it is searching only the area the text will be in, instead of the whole chat area