Janilabo

Untitled

Aug 15th, 2012
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 1.28 KB | None | 0 0
  1. program Banker;
  2.  
  3. {$i RSCS/RSCS.simba}
  4.  
  5. function SearchForNPC2(var p: TPoint; j: integer): Boolean;
  6. var
  7.   TPA: TPointArray;
  8. begin
  9.   Result := FindColorsSpiralTolerance(256, 171, TPA, j, 0, 0, 511, 343, 0);
  10.   if not Result then
  11.     Exit;
  12.   p := TPA[Random(Length(TPA))];
  13.   SetLength(TPA, 0);
  14. end;
  15.  
  16. function TalkToBanker: Boolean;
  17. var
  18.   tm: Integer;
  19.   banker_p: TPoint;
  20. begin
  21.   tm := GetSystemTime;
  22.   repeat
  23.     if SearchForNPC2(banker_p, Banker) then
  24.     begin
  25.       MoveMouse(banker_p.X, banker_p.Y);
  26.       Wait(10 + Random(20));
  27.       if (Pos('banker', Lowercase(RSCE_UpText)) > 0) then
  28.       begin
  29.         ClickMouse(banker_p.X, banker_p.Y, Mouse_right);
  30.         Wait(100 + Random(20));
  31.         if (Pos('banker', Lowercase(RSCE_RightClickText)) > 0) then
  32.         begin
  33.           Wait(1000);
  34.           MoveMouse(banker_p.X, (banker_p.Y + 15));
  35.           ClickMouse(banker_p.X, banker_p.Y, Mouse_left);
  36.           Wait(3000 + Random(20));
  37.         end;
  38.       end;
  39.     end;
  40.     if ((GetSystemTime - tm) >= 30000) then
  41.       Exit;
  42.     Wait(10);
  43.     Result := ChoiceIsOpen;
  44.     if Result then
  45.       ChooseChoice(1);
  46.   until Result;
  47. end;
  48.  
  49. begin
  50.   ActivateClient;
  51.   Wait(1500);
  52.   if TalkToBanker then
  53.     WriteLn('WOOHOO')
  54.   else
  55.     WriteLn('We failed. :(');
  56. end.
Advertisement
Add Comment
Please, Sign In to add comment