Janilabo

Untitled

Aug 15th, 2012
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 1.01 KB | None | 0 0
  1. function TalkToBanker: Boolean;
  2. var
  3.   tm, tm2: Integer;
  4.   banker_p: TPoint;
  5. begin
  6.   tm := GetSystemTime;
  7.   repeat
  8.     Result := ChoiceIsOpen;
  9.     if not Result then
  10.       if SearchForNPC(banker_p, Banker) then
  11.       begin
  12.         MoveMouse(banker_p.X, banker_p.Y);
  13.         Wait(10 + Random(20));
  14.         if (Pos('banker', Lowercase(RSCE_UpText)) > 0) then
  15.         begin
  16.           ClickMouse(banker_p.X, banker_p.Y, Mouse_right);
  17.           Wait(10 + Random(20));
  18.           if (Pos('banker', Lowercase(RSCE_RightClickText)) > 0) then
  19.           begin
  20.             MoveMouse(banker_p.X, (banker_p.Y + 15));
  21.             ClickMouse(banker_p.X, banker_p.Y, Mouse_left);
  22.             tm2 := GetSystemTime;
  23.             repeat
  24.               Result := ChoiceIsOpen;
  25.               Wait(10);
  26.             until (Result or ((GetSystemTime - tm2) >= 3100));
  27.           end;
  28.         end;
  29.       end;
  30.     Wait(10);
  31.   until (Result or ((GetSystemTime - tm) >= 30000));
  32.   if Result then
  33.     ChooseChoice(1);
  34. end;
Advertisement
Add Comment
Please, Sign In to add comment