SCAR Code:
Function Findandpickpocket(x, y, Color1, color2, color3: integer; name1: string): boolean;
var i,v,b: integer;
var man,q,r: integer;
begin
man:= Createbitmapmaskfromtext(name1,upchars);
q:= createbitmapmaskfromtext('You pick the',smallchars);
r:= createbitmapmaskfromtext('What do you think',upchars);
i:=0;
repeat
i:=i+1;
if findcolortolerance(x,y,color1,1,1,700,700,2) or
findcolortolerance(x,y,color2,1,1,700,700,2) or
findcolortolerance(x,y,color3,1,1,700,700,2) then
begin
Mouse(x,y,0,0,false);
if findpopup(name1) or
(findbitmapmasktolerance(man,v,b,0,0,516,39,5,50)) then
begin
typesend(' ');
Popup('ickpock');
wait(1000+random(1000));
end;
if (GetlastChatTextblack ('You pick the woman')=true)
or Findbitmapmasktolerance(q,v,b,0,0,700,700,4,50) then
begin
findrandoms;
result:=true;
DisguiseScar('successful');
wait(2000+random(1000));
DisguiseScar('Trying again');
successfulPickpockets:=successfulPickpockets+1;
disguisescar(inttostr(successfulpickpockets));
typesend(' ');
end else;
if GetlastChatTextblack ('stunned')=true
or GetlastChatTextblack('reach that')=true
190 or Findbitmapmasktolerance(r,v,b,0,0,700,700,5,60) then
191 begin
findrandoms;
Result:=false;
UnsuccessfulPickpockets:= UnsuccessfulPickpockets+1;
end;
end;
until(successfulpickpockets=times) or (i>=10);
end;