Results 1 to 19 of 19

Thread: Runique adamant bars buyer

  1. #1
    Join Date
    Apr 2016
    Posts
    18
    Mentioned
    1 Post(s)
    Quoted
    6 Post(s)

    Default Runique adamant bars buyer

    Hi could someone create script that would to like in the video https://www.youtube.com/watch?v=qJrmJh0ReYc it is very good money making you buy bars 3k each and then sell in ge for 20k-25k ea

  2. #2
    Join Date
    May 2012
    Location
    Glorious Nippon
    Posts
    1,011
    Mentioned
    50 Post(s)
    Quoted
    505 Post(s)

    Default

    Setup instructions: 317 context menus, medium zoom, camera facing North, start at the tile south of the west bank chest. You must have a visible GREEN cash stack in your coin pouch. Also make sure that your chatbox is empty, i.e. the tab is turned off.

    Got banned while testing it. Made around 190M/hr. Probably won't run for very long without messing up.
    Simba Code:
    1. program poop;
    2.  
    3. const
    4.   MOUSE_MOVE = 3;
    5.   choose_Option_Text_Color = 4674653;
    6.  
    7.   col = tcolor($99ff00);
    8.  
    9. var
    10.   count: integer;
    11.  
    12. type
    13.   TOption = record
    14.     bounds: TBox;
    15.     str: string;
    16.   end;
    17.  
    18.   TOptionArray = array of TOption;
    19.  
    20. procedure getAndSet();
    21. var
    22.   pp: TSysProcArr;
    23.   i: int32;
    24. begin
    25.   pp := client.getIOManager.getProcesses;
    26.   for i := 0 to high(pp) do
    27.   begin
    28.     if pos('Welcome to Runique', pp[i].title) then
    29.     begin
    30.       setTarget(pp[i]);
    31.       exit();
    32.     end;
    33.   end;
    34.   writeln('game not found');
    35.   terminateScript();
    36. end;
    37.  
    38. procedure wait(w1, w2: integer); overload;
    39. begin
    40.   wait(random(w1, w2));
    41. end;
    42.  
    43. procedure fastClick(button: integer);
    44. var
    45.   x, y: integer;
    46. begin
    47.   getMousePos(x, y);
    48.   holdMouse(x, y, button);
    49.   wait(69 + random(69));
    50.   releaseMouse(x, y, button);
    51. end;
    52.  
    53. procedure mouse(pnt: TPoint; button: integer);
    54. var
    55.   i, x, y: integer;
    56.   tpa: TPointArray;
    57. begin
    58.   moveMouse(pnt.x, pnt.y);
    59.   if (button = MOUSE_MOVE) then exit();
    60.   wait(22 + random(9));
    61.   holdMouse(pnt.x, pnt.y, button);
    62.   wait(69 + random(69));
    63.   getMousePos(x, y);
    64.   releaseMouse(x, y, button);
    65. end;
    66.  
    67. procedure mouseBox(b: TBox; button: integer);
    68. begin
    69.   mouse(point(b.x1 + random(b.x2 - b.x1), b.y1 + random(b.y2 - b.y1)), button);
    70. end;
    71.  
    72. procedure TBox.edit(const x1_, y1_, x2_, y2_: integer);
    73. begin
    74.   self.x1 := self.x1 + x1_;
    75.   self.y1 := self.y1 + y1_;
    76.   self.x2 := self.x2 + x2_;
    77.   self.y2 := self.y2 + y2_;
    78. end;
    79.  
    80. function shrinkBox(b: TBox; const size: integer): TBox;
    81. begin
    82.   result := b;
    83.   result.edit(+size, +size, -size, -size);
    84. end;
    85.  
    86. procedure TBox.shrink(const size: integer);
    87. begin
    88.   self.edit(+size, +size, -size, -size);
    89. end;
    90.  
    91. procedure TBox.offset(const p: TPoint);
    92. begin
    93.   self.X1 := self.X1 + p.x;
    94.   self.X2 := self.X2 + p.x;
    95.   self.Y1 := self.Y1 + p.y;
    96.   self.Y2 := self.Y2 + p.y;
    97. end;
    98.  
    99. function isOptionOpen(wait: integer = 0): boolean;
    100. var
    101.   w, h: integer;
    102.   t: longword;
    103. begin
    104.   result := false;
    105.   getClientDimensions(w, h);
    106.   t := getSystemTime() + wait;
    107.   repeat
    108.     result := (countColor(choose_Option_Text_Color, 0, 0, w-1, h-1) > 69);
    109.   until (result or (getSystemTime() > t));
    110. end;
    111.  
    112. procedure getOptionBounds(var box: TBox);
    113. var
    114.   w, h: integer;
    115.   tpa: TPointArray;
    116.   b: TBox;
    117. begin
    118.   if (not isOptionOpen(0)) then exit();
    119.   getClientDimensions(w, h);
    120.   b := [0, 0, w-1, h-1];
    121.   if findColors(tpa, choose_Option_Text_Color, b.x1, b.y1, b.x2, b.y2) then
    122.   begin
    123.     box := getTPABounds(tpa);
    124.     box.edit(2, 19, -2, -2);
    125.   end;
    126. end;
    127.  
    128. function getOptions(): TOptionArray;
    129. var
    130.   oldT, newT, bmp, w, h, i, n: integer;
    131.   bounds, box: TBox;
    132.   tpa: TPointArray;
    133.   atpa: T2DPointArray;
    134. begin
    135.   if (not isOptionOpen(0)) then exit();
    136.   oldT := getImageTarget();
    137.   getOptionBounds(bounds);
    138.   bmp := bitmapFromClient(bounds.x1, bounds.y1, bounds.x2, bounds.y2);
    139.   fastReplaceColor(bmp, 16777215, col); //pure white
    140.   fastReplaceColor(bmp, 4231423, col); //light orange item text
    141.   fastReplaceColor(bmp, 65280, col);
    142.   fastReplaceColor(bmp, 255, col);
    143.   fastReplaceColor(bmp, 65535, col);
    144.   fastReplaceColor(bmp, 16776960, col);
    145.   fastReplaceColor(bmp, 16744447, col);
    146.   fastReplaceColor(bmp, 28927, col);
    147.   fastReplaceColor(bmp, 25800, col);
    148.   w := bounds.x2 - bounds.x1;
    149.   h := bounds.y2 - bounds.y1;
    150.   n := floor(h / 15);
    151.   setLength(result, n);
    152.   try
    153.     setTargetBitmap(bmp);
    154.     for i := 0 to n-1 do
    155.     begin
    156.       result[i].str := getTextAtEx(3, (i * 15) + 3, w-2, min(h-1, (i * 15) + 17), 0, 5, 5, col, 0, 'upChars07');
    157.       result[i].bounds := [3, (i * 15) + 3, w-2, min(h-1, (i * 15) + 17)];
    158.       result[i].bounds.offset(point(bounds.x1, bounds.y1));
    159.       result[i].bounds.shrink(1);
    160.     end;
    161.   finally
    162.     newT := getImageTarget();
    163.     setImageTarget(oldT);
    164.     freeTarget(newT);
    165.     if bitmapExists(bmp) then freeBitmap(bmp);
    166.   end;
    167. end;
    168.  
    169. function selectOption(txt: TStringArray; mouseAction, waitTime: integer): boolean;
    170. var
    171.   opts: TOptionArray;
    172.   i, j, len: integer;
    173.   b: TBox;
    174.   t: longword;
    175. begin
    176.   if (not isOptionOpen(0)) then exit();
    177.   t := getSystemTime() + waitTime;
    178.   opts := getOptions();
    179.   repeat
    180.     if ((len := length(opts)) > 1) then
    181.     begin
    182.       for j := 0 to high(txt) do
    183.       begin
    184.         for i := 0 to high(opts) do
    185.         begin
    186.           if (getSystemTime() > t) then exit(false);
    187.           if (pos(txt[j], opts[i].str) > 0) then
    188.           begin
    189.             mouseBox(shrinkBox(opts[i].bounds, 1), mouseAction);
    190.             exit(true);
    191.           end;
    192.         end;
    193.       end;
    194.     end;
    195.   until false;
    196. end;
    197.  
    198. function getUpText(): string;
    199. var
    200.   bmp, w, h, oldT, newT: integer;
    201.   b: TBox;
    202.   tpa: TPointArray;
    203. begin
    204.   if findColors(tpa, 16777215, 12, 52, 520, 68) then
    205.   begin
    206.     oldT := getImageTarget();
    207.     b := getTPABounds(tpa);
    208.     bmp := bitmapFromClient(b.x1, b.y1, b.x2+1, b.y2+1);
    209.  
    210.     fastReplaceColor(bmp, 16777215, col); //pure white
    211.     fastReplaceColor(bmp, 4231423, col); //light orange item text
    212.     fastReplaceColor(bmp, 65280, col);
    213.     fastReplaceColor(bmp, 255, col); //red
    214.     fastReplaceColor(bmp, 65535, col); //yellow?
    215.     fastReplaceColor(bmp, 16776960, col);
    216.     fastReplaceColor(bmp, 16744447, col);
    217.     fastReplaceColor(bmp, 28927, col);
    218.     fastReplaceColor(bmp, 25800, col);
    219.  
    220.     getBitmapSize(bmp, w, h);
    221.  
    222.     try
    223.       setTargetBitmap(bmp);
    224.       result := getTextAtEx(0, 0, w-1, h-1, 0, 4, 4, col, 0, 'upChars07');
    225.     finally
    226.       newT := getImageTarget();
    227.       setImageTarget(oldT);
    228.       freeTarget(newT);
    229.       if bitmapExists(bmp) then freeBitmap(bmp);
    230.     end;
    231.  
    232.   end;
    233. end;
    234.  
    235. function isUpText(txt: TStringArray; waitTime: integer = 0): boolean;
    236. var
    237.   str: string;
    238.   i: integer;
    239.   t: longword;
    240. begin
    241.   result := false;
    242.   t := getSystemTime() + waitTime;
    243.   repeat
    244.     str := getUpText();
    245.     for i := 0 to high(txt) do
    246.     begin
    247.       if (pos(txt[i], str) > 0) then exit(true);
    248.       if (getSystemTime() > t) then exit(false);
    249.     end;
    250.   until false;
    251. end;
    252.  
    253. procedure clickClient();
    254. begin
    255.   mouse(point(444, 9), mouse_left);
    256.   wait(345, 543);
    257.   fastClick(mouse_left);
    258. end;
    259.  
    260. procedure mouseOff();
    261. begin
    262.   mouse(point(-10, 10), mouse_move);
    263. end;
    264.  
    265. function pickUpSticks(): boolean;
    266. begin
    267.   result := false;
    268.   wait(222, 444); mouseOff(); wait(222, 666);
    269.   mouseBox([20, 225, 44, 250], mouse_move);
    270.   if isUpText(['alk-'], 6969) then
    271.   begin
    272.     fastClick(mouse_right);
    273.     if isOptionOpen(6969) then
    274.       if selectOption(['rade P'], mouse_left, 6969) then
    275.         exit(true);
    276.   end;
    277. end;
    278.  
    279. function isTextOpen(wait: integer = 0): boolean;
    280. var
    281.   i: integer;
    282.   t: longword
    283. begin
    284.   mouseOff();
    285.   result := false;
    286.   t := getTimeRunning() + wait;
    287.   repeat
    288.     result := (countColor(128, 10, 389, 500, 500) > 222);
    289.   until (result or (getTimeRunning() > t));
    290. end;
    291.  
    292. function clickText(): boolean;
    293. var
    294.   tpa: TPointArray;
    295. begin
    296.   result := false;
    297.   if (findColors(tpa, 0, 180, 468, 350, 480) or findColors(tpa, 16777215, 180, 468, 350, 480)) then
    298.   begin
    299.     mouseBox(shrinkBox(getTPABounds(tpa), 2), mouse_move);
    300.     if isUpText(['Ok'], 6969) then
    301.     begin
    302.       fastClick(mouse_left); wait(222, 444);
    303.       exit(true);
    304.     end;
    305.   end;
    306. end;
    307.  
    308. function isShopOpen(wait: integer = 0): boolean;
    309. var
    310.   t: longword;
    311. begin
    312.   result := false;
    313.   t := getTimeRunning() + wait;
    314.   repeat
    315.     result := (countColor(4231423, 180, 60, 323, 81) > 400);
    316.   until (result or (getTimeRunning() > t));
    317. end;
    318.  
    319. function buyBars(): boolean;
    320. begin
    321.   result := false;
    322.   mouseBox([94, 282, 122, 306], mouse_move);
    323.   if isUpText(['damant'], 6969) then
    324.   begin
    325.     fastClick(mouse_right);
    326.     if isOptionOpen(6969) then
    327.       if selectOption(['100', '250'], mouse_left, 6969) then
    328.       begin
    329.         wait(222, 444);
    330.         exit(true);
    331.       end;
    332.   end;
    333. end;
    334.  
    335. function closeShop(wait: integer): boolean;
    336. var
    337.   t: longword;
    338. begin
    339.   if (not isShopOpen(0)) then exit(true);
    340.   result := false;
    341.   mouseBox([488, 63, 500, 75], mouse_move);
    342.   if isUpText(['Close'], 6969) then
    343.   begin
    344.     fastClick(mouse_left);
    345.     t := getTimeRunning() + wait;
    346.     repeat
    347.       result := (not isShopOpen(0));
    348.     until (result or (getTimeRunning() > t));
    349.   end;
    350. end;
    351.  
    352. function clickBank(): boolean;
    353. begin
    354.   result := false;
    355.   mouseBox([430, 140, 455, 155], mouse_move);
    356.   if isUpText(['Bank', 'chest'], 6969) then
    357.   begin
    358.     fastClick(mouse_right);
    359.     if isOptionOpen(6969) then
    360.     begin
    361.       if selectOption(['Use'], mouse_left, 6969) then
    362.         exit(true);
    363.     end;
    364.   end;
    365. end;
    366.  
    367. function isBankOpen(wait: integer): boolean;
    368. var
    369.   t: longword;
    370. begin
    371.   result := false;
    372.   t := getTimeRunning() + wait;
    373.   repeat
    374.     result := (countColor(2070783, 170, 60, 323, 90) > 400);
    375.   until (result or (getTimeRunning() > t));
    376. end;
    377.  
    378. function deposit(): boolean;
    379. begin
    380.   mouseBox([340, 335, 367, 352], mouse_move);
    381.   if isUpText(['eposit', 'carried'], 6969) then
    382.   begin
    383.     fastClick(mouse_left); wait(222, 444);
    384.     exit(true);
    385.   end;
    386. end;
    387.  
    388. function closeBank(wait: integer): boolean;
    389. var
    390.   t: longword;
    391. begin
    392.   if (not isBankOpen(0)) then exit(true);
    393.   result := false;
    394.   mouseBox([484, 66, 497, 77], mouse_move);
    395.   if isUpText(['Close'], 555) then
    396.   begin
    397.     fastClick(mouse_left);
    398.     t := getTimeRunning() + wait;
    399.     repeat
    400.       result := (not isBankOpen(0));
    401.     until (result or (getTimeRunning() > t));
    402.   end;
    403. end;
    404.  
    405. function hasCash(): boolean;
    406. var
    407.   x, y: integer;
    408. begin
    409.   result := findColor(x, y, 65280, 466, 138, 509, 152);
    410. end;
    411.  
    412. function progress(): boolean;
    413. begin
    414.   clearDebug();
    415.   result := true;
    416.   inc(count);
    417.   write('bars: ' + intToStr(count));
    418.   writeLn(' per hr: ' + intToStr(round((count * 28)/(getTimeRunning()/3600000))));
    419.   write('gp: ' + intToStr(count * 28 * 16500));
    420.   writeLn(' per hr: ' + intToStr(round((count * 28 * 16500)/(getTimeRunning()/3600000))));
    421. end;
    422.  
    423. procedure bars();
    424. begin
    425.   if pickUpSticks() then
    426.     if isTextOpen(6969) then
    427.       if clickText() then
    428.         if isShopOpen(6969) then
    429.           if buyBars() then
    430.             if closeShop(6969) then
    431.               if clickBank() then
    432.                 if deposit() then
    433.                   if closeBank(6969) then
    434.                     if progress() then
    435.                       exit();
    436.   terminateScript();
    437. end;
    438.  
    439. begin
    440.   clearDebug();
    441.   getAndSet();
    442.   clickClient();
    443.   while hasCash() do bars();
    444. end.
    Last edited by Citrus; 08-15-2017 at 01:38 AM. Reason: 444

  3. #3
    Join Date
    Apr 2016
    Posts
    18
    Mentioned
    1 Post(s)
    Quoted
    6 Post(s)

    Default

    Ty man, gonna test it right now.

  4. #4
    Join Date
    Feb 2017
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    12 Post(s)

    Default

    Quote Originally Posted by Citrus View Post
    Got banned while testing it. Made around 190M/hr. Probably won't run for very long without messing up.
    Simba Code:
    1. program poop;
    2.  
    3. const
    4.   MOUSE_MOVE = 3;
    5.   choose_Option_Text_Color = 4674653;
    6.  
    7.   col = tcolor($99ff00);
    8.  
    9. var
    10.   count: integer;
    11.  
    12. type
    13.   TOption = record
    14.     bounds: TBox;
    15.     str: string;
    16.   end;
    17.  
    18.   TOptionArray = array of TOption;
    19.  
    20. procedure wait(w1, w2: integer); overload;
    21. begin
    22.   wait(random(w1, w2));
    23. end;
    24.  
    25. procedure fastClick(button: integer);
    26. var
    27.   x, y: integer;
    28. begin
    29.   getMousePos(x, y);
    30.   holdMouse(x, y, button);
    31.   wait(69 + random(69));
    32.   releaseMouse(x, y, button);
    33. end;
    34.  
    35. procedure mouse(pnt: TPoint; button: integer);
    36. var
    37.   i, x, y: integer;
    38.   tpa: TPointArray;
    39. begin
    40.   moveMouse(pnt.x, pnt.y);
    41.   if (button = MOUSE_MOVE) then exit();
    42.   wait(22 + random(9));
    43.   holdMouse(pnt.x, pnt.y, button);
    44.   wait(69 + random(69));
    45.   getMousePos(x, y);
    46.   releaseMouse(x, y, button);
    47. end;
    48.  
    49. procedure mouseBox(b: TBox; button: integer);
    50. begin
    51.   mouse(point(b.x1 + random(b.x2 - b.x1), b.y1 + random(b.y2 - b.y1)), button);
    52. end;
    53.  
    54. procedure TBox.edit(const x1_, y1_, x2_, y2_: integer);
    55. begin
    56.   self.x1 := self.x1 + x1_;
    57.   self.y1 := self.y1 + y1_;
    58.   self.x2 := self.x2 + x2_;
    59.   self.y2 := self.y2 + y2_;
    60. end;
    61.  
    62. function shrinkBox(b: TBox; const size: integer): TBox;
    63. begin
    64.   result := b;
    65.   result.edit(+size, +size, -size, -size);
    66. end;
    67.  
    68. procedure TBox.shrink(const size: integer);
    69. begin
    70.   self.edit(+size, +size, -size, -size);
    71. end;
    72.  
    73. procedure TBox.offset(const p: TPoint);
    74. begin
    75.   self.X1 := self.X1 + p.x;
    76.   self.X2 := self.X2 + p.x;
    77.   self.Y1 := self.Y1 + p.y;
    78.   self.Y2 := self.Y2 + p.y;
    79. end;
    80.  
    81. function isOptionOpen(wait: integer = 0): boolean;
    82. var
    83.   w, h: integer;
    84.   t: longword;
    85. begin
    86.   result := false;
    87.   getClientDimensions(w, h);
    88.   t := getSystemTime() + wait;
    89.   repeat
    90.     result := (countColor(choose_Option_Text_Color, 0, 0, w-1, h-1) > 69);
    91.   until (result or (getSystemTime() > t));
    92. end;
    93.  
    94. procedure getOptionBounds(var box: TBox);
    95. var
    96.   w, h: integer;
    97.   tpa: TPointArray;
    98.   b: TBox;
    99. begin
    100.   if (not isOptionOpen(0)) then exit();
    101.   getClientDimensions(w, h);
    102.   b := [0, 0, w-1, h-1];
    103.   if findColors(tpa, choose_Option_Text_Color, b.x1, b.y1, b.x2, b.y2) then
    104.   begin
    105.     box := getTPABounds(tpa);
    106.     box.edit(2, 19, -2, -2);
    107.   end;
    108. end;
    109.  
    110. function getOptions(): TOptionArray;
    111. var
    112.   oldT, newT, bmp, w, h, i, n: integer;
    113.   bounds, box: TBox;
    114.   tpa: TPointArray;
    115.   atpa: T2DPointArray;
    116. begin
    117.   if (not isOptionOpen(0)) then exit();
    118.   oldT := getImageTarget();
    119.   getOptionBounds(bounds);
    120.   bmp := bitmapFromClient(bounds.x1, bounds.y1, bounds.x2, bounds.y2);
    121.   fastReplaceColor(bmp, 16777215, col); //pure white
    122.   fastReplaceColor(bmp, 4231423, col); //light orange item text
    123.   fastReplaceColor(bmp, 65280, col);
    124.   fastReplaceColor(bmp, 255, col);
    125.   fastReplaceColor(bmp, 65535, col);
    126.   fastReplaceColor(bmp, 16776960, col);
    127.   fastReplaceColor(bmp, 16744447, col);
    128.   fastReplaceColor(bmp, 28927, col);
    129.   fastReplaceColor(bmp, 25800, col);
    130.   w := bounds.x2 - bounds.x1;
    131.   h := bounds.y2 - bounds.y1;
    132.   n := floor(h / 15);
    133.   setLength(result, n);
    134.   try
    135.     setTargetBitmap(bmp);
    136.     for i := 0 to n-1 do
    137.     begin
    138.       result[i].str := getTextAtEx(3, (i * 15) + 3, w-2, min(h-1, (i * 15) + 17), 0, 5, 5, col, 0, 'upChars07');
    139.       result[i].bounds := [3, (i * 15) + 3, w-2, min(h-1, (i * 15) + 17)];
    140.       result[i].bounds.offset(point(bounds.x1, bounds.y1));
    141.       result[i].bounds.shrink(1);
    142.     end;
    143.   finally
    144.     newT := getImageTarget();
    145.     setImageTarget(oldT);
    146.     freeTarget(newT);
    147.     if bitmapExists(bmp) then freeBitmap(bmp);
    148.   end;
    149. end;
    150.  
    151. function selectOption(txt: TStringArray; mouseAction, waitTime: integer): boolean;
    152. var
    153.   opts: TOptionArray;
    154.   i, j, len: integer;
    155.   b: TBox;
    156.   t: longword;
    157. begin
    158.   if (not isOptionOpen(0)) then exit();
    159.   t := getSystemTime() + waitTime;
    160.   opts := getOptions();
    161.   repeat
    162.     if ((len := length(opts)) > 1) then
    163.     begin
    164.       for j := 0 to high(txt) do
    165.       begin
    166.         for i := 0 to high(opts) do
    167.         begin
    168.           if (getSystemTime() > t) then exit(false);
    169.           if (pos(txt[j], opts[i].str) > 0) then
    170.           begin
    171.             mouseBox(shrinkBox(opts[i].bounds, 1), mouseAction);
    172.             exit(true);
    173.           end;
    174.         end;
    175.       end;
    176.     end;
    177.   until false;
    178. end;
    179.  
    180. function getUpText(): string;
    181. var
    182.   bmp, w, h, oldT, newT: integer;
    183.   b: TBox;
    184.   tpa: TPointArray;
    185. begin
    186.   if findColors(tpa, 16777215, 12, 52, 520, 68) then
    187.   begin
    188.     oldT := getImageTarget();
    189.     b := getTPABounds(tpa);
    190.     bmp := bitmapFromClient(b.x1, b.y1, b.x2+1, b.y2+1);
    191.  
    192.     fastReplaceColor(bmp, 16777215, col); //pure white
    193.     fastReplaceColor(bmp, 4231423, col); //light orange item text
    194.     fastReplaceColor(bmp, 65280, col);
    195.     fastReplaceColor(bmp, 255, col); //red
    196.     fastReplaceColor(bmp, 65535, col); //yellow?
    197.     fastReplaceColor(bmp, 16776960, col);
    198.     fastReplaceColor(bmp, 16744447, col);
    199.     fastReplaceColor(bmp, 28927, col);
    200.     fastReplaceColor(bmp, 25800, col);
    201.  
    202.     getBitmapSize(bmp, w, h);
    203.  
    204.     try
    205.       setTargetBitmap(bmp);
    206.       result := getTextAtEx(0, 0, w-1, h-1, 0, 4, 4, col, 0, 'upChars07');
    207.     finally
    208.       newT := getImageTarget();
    209.       setImageTarget(oldT);
    210.       freeTarget(newT);
    211.       if bitmapExists(bmp) then freeBitmap(bmp);
    212.     end;
    213.  
    214.   end;
    215. end;
    216.  
    217. function isUpText(txt: TStringArray; waitTime: integer = 0): boolean;
    218. var
    219.   str: string;
    220.   i: integer;
    221.   t: longword;
    222. begin
    223.   result := false;
    224.   t := getSystemTime() + waitTime;
    225.   repeat
    226.     str := getUpText();
    227.     for i := 0 to high(txt) do
    228.     begin
    229.       if (pos(txt[i], str) > 0) then exit(true);
    230.       if (getSystemTime() > t) then exit(false);
    231.     end;
    232.   until false;
    233. end;
    234.  
    235. procedure clickClient();
    236. begin
    237.   mouse(point(644, 9), mouse_left);
    238.   wait(345, 543);
    239.   fastClick(mouse_left);
    240. end;
    241.  
    242. procedure mouseOff();
    243. begin
    244.   mouse(point(-10, 10), mouse_move);
    245. end;
    246.  
    247. function pickUpSticks(): boolean;
    248. begin
    249.   result := false;
    250.   wait(222, 444); mouseOff(); wait(222, 666);
    251.   mouseBox([20, 225, 44, 250], mouse_move);
    252.   if isUpText(['alk-'], 6969) then
    253.   begin
    254.     fastClick(mouse_right);
    255.     if isOptionOpen(6969) then
    256.       if selectOption(['rade P'], mouse_left, 6969) then
    257.         exit(true);
    258.   end;
    259. end;
    260.  
    261. function isTextOpen(wait: integer = 0): boolean;
    262. var
    263.   i: integer;
    264.   t: longword
    265. begin
    266.   mouseOff();
    267.   result := false;
    268.   t := getTimeRunning() + wait;
    269.   repeat
    270.     result := (countColor(128, 10, 389, 500, 500) > 222);
    271.   until (result or (getTimeRunning() > t));
    272. end;
    273.  
    274. function clickText(): boolean;
    275. var
    276.   tpa: TPointArray;
    277. begin
    278.   result := false;
    279.   if (findColors(tpa, 0, 180, 468, 350, 480) or findColors(tpa, 16777215, 180, 468, 350, 480)) then
    280.   begin
    281.     mouseBox(shrinkBox(getTPABounds(tpa), 2), mouse_move);
    282.     if isUpText(['Ok'], 6969) then
    283.     begin
    284.       fastClick(mouse_left); wait(222, 444);
    285.       exit(true);
    286.     end;
    287.   end;
    288. end;
    289.  
    290. function isShopOpen(wait: integer = 0): boolean;
    291. var
    292.   t: longword;
    293. begin
    294.   result := false;
    295.   t := getTimeRunning() + wait;
    296.   repeat
    297.     result := (countColor(4231423, 180, 60, 323, 81) > 400);
    298.   until (result or (getTimeRunning() > t));
    299. end;
    300.  
    301. function buyBars(): boolean;
    302. begin
    303.   result := false;
    304.   mouseBox([94, 282, 122, 306], mouse_move);
    305.   if isUpText(['damant'], 6969) then
    306.   begin
    307.     fastClick(mouse_right);
    308.     if isOptionOpen(6969) then
    309.       if selectOption(['100', '250'], mouse_left, 6969) then
    310.         exit(true);
    311.   end;
    312. end;
    313.  
    314. function closeShop(wait: integer): boolean;
    315. var
    316.   t: longword;
    317. begin
    318.   if (not isShopOpen(0)) then exit(true);
    319.   result := false;
    320.   mouseBox([488, 63, 500, 75], mouse_move);
    321.   if isUpText(['Close'], 6969) then
    322.   begin
    323.     fastClick(mouse_left);
    324.     t := getTimeRunning() + wait;
    325.     repeat
    326.       result := (not isShopOpen(0));
    327.     until (result or (getTimeRunning() > t));
    328.   end;
    329. end;
    330.  
    331. function clickBank(): boolean;
    332. begin
    333.   result := false;
    334.   mouseBox([430, 140, 455, 155], mouse_move);
    335.   if isUpText(['Bank', 'chest'], 6969) then
    336.   begin
    337.     fastClick(mouse_right);
    338.     if isOptionOpen(6969) then
    339.       if selectOption(['Use'], mouse_left, 6969) then
    340.         exit(true);
    341.   end;
    342. end;
    343.  
    344. function isBankOpen(wait: integer): boolean;
    345. var
    346.   t: longword;
    347. begin
    348.   result := false;
    349.   t := getTimeRunning() + wait;
    350.   repeat
    351.     result := (countColor(2070783, 170, 60, 323, 90) > 400);
    352.   until (result or (getTimeRunning() > t));
    353. end;
    354.  
    355. function deposit(): boolean;
    356. begin
    357.   mouseBox([340, 335, 367, 352], mouse_move);
    358.   if isUpText(['eposit', 'carried'], 6969) then
    359.   begin
    360.     fastClick(mouse_left); wait(222, 444);
    361.     exit(true);
    362.   end;
    363. end;
    364.  
    365. function closeBank(wait: integer): boolean;
    366. var
    367.   t: longword;
    368. begin
    369.   if (not isBankOpen(0)) then exit(true);
    370.   result := false;
    371.   mouseBox([484, 66, 497, 77], mouse_move);
    372.   if isUpText(['Close'], 555) then
    373.   begin
    374.     fastClick(mouse_left);
    375.     t := getTimeRunning() + wait;
    376.     repeat
    377.       result := (not isBankOpen(0));
    378.     until (result or (getTimeRunning() > t));
    379.   end;
    380. end;
    381.  
    382. function hasCash(): boolean;
    383. var
    384.   x, y: integer;
    385. begin
    386.   result := findColor(x, y, 65280, 466, 138, 509, 152);
    387. end;
    388.  
    389. function progress(): boolean;
    390. begin
    391.   clearDebug();
    392.   result := true;
    393.   inc(count);
    394.   write('bars: ' + intToStr(count));
    395.   writeLn(' per hr: ' + intToStr(round((count * 28)/(getTimeRunning()/3600000))));
    396.   write('gp: ' + intToStr(count * 28 * 16500));
    397.   writeLn(' per hr: ' + intToStr(round((count * 28 * 16500)/(getTimeRunning()/3600000))));
    398. end;
    399.  
    400. procedure bars();
    401. begin
    402.   if pickUpSticks() then
    403.     if isTextOpen(6969) then
    404.       if clickText() then
    405.         if isShopOpen(6969) then
    406.           if buyBars() then
    407.             if closeShop(6969) then
    408.               if clickBank() then
    409.                 if deposit() then
    410.                   if closeBank(6969) then
    411.                     if progress() then
    412.                       exit();
    413.   terminateScript();
    414. end;
    415.  
    416. begin
    417.   clearDebug();
    418.   clickClient();
    419.   while hasCash() do bars();
    420. end.
    edit: nvm thought it was normal runescape lol

  5. #5
    Join Date
    Jun 2017
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    bot just right clicks on ady seller and the script stops any problems i may be having?

  6. #6
    Join Date
    May 2012
    Location
    Glorious Nippon
    Posts
    1,011
    Mentioned
    50 Post(s)
    Quoted
    505 Post(s)

    Default

    Quote Originally Posted by trixgodz View Post
    bot just right clicks on ady seller and the script stops any problems i may be having?
    It works for me. Make sure you're using 317 context menus.

  7. #7
    Join Date
    Jun 2017
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    did that and now the script stops as soon as i run it says succesfully executed but just stops
    Last edited by trixgodz; 06-23-2017 at 01:07 PM.

  8. #8
    Join Date
    May 2012
    Location
    Glorious Nippon
    Posts
    1,011
    Mentioned
    50 Post(s)
    Quoted
    505 Post(s)

    Default

    Quote Originally Posted by trixgodz View Post
    did that and now the script stops as soon as i run it says succesfully executed but just stops
    I added instructions to my first post:
    Setup instructions: 317 context menus, medium zoom, camera facing North, start at the tile south of the west bank chest. You must have a visible GREEN cash stack in your coin pouch.

    I ran it for a bit earlier today, so I know it works. Made over 200m/hr easily.

  9. #9
    Join Date
    Jun 2017
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    script is working now thanks but it does tend to screw up alot. Would be cool if you fix it from messing up frequently.
    Last edited by trixgodz; 06-23-2017 at 06:30 PM.

  10. #10
    Join Date
    May 2012
    Location
    Glorious Nippon
    Posts
    1,011
    Mentioned
    50 Post(s)
    Quoted
    505 Post(s)

    Default

    Quote Originally Posted by trixgodz View Post
    script is working now thanks but it does tend to screw up alot. Would be cool if you fix it from messing up frequently.
    I ran it flawlessly for 2 hours yesterday. It didn't mess up once. You'll have to give some actual information if you want something to change.

  11. #11
    Join Date
    Jun 2017
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    The bot only runs for like 5 mins then stops and says successfully executed.

  12. #12
    Join Date
    May 2012
    Location
    Glorious Nippon
    Posts
    1,011
    Mentioned
    50 Post(s)
    Quoted
    505 Post(s)

    Default

    Quote Originally Posted by trixgodz View Post
    The bot only runs for like 5 mins then stops and says successfully executed.
    That still doesn't tell me anything.
    Do you have enough cash in your pouch? I added a line to the script that will tell you when you're too low.
    Maybe you're lagging a bit and some of the waits need to be increased?
    Maybe your camera angle is slightly off?

    It's hard to say without any information. You'll have to debug the script yourself to get the best results.

  13. #13
    Join Date
    Jun 2017
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    i got the script working fully thanks for the help

  14. #14
    Join Date
    Aug 2017
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by Citrus View Post
    That still doesn't tell me anything.
    Do you have enough cash in your pouch? I added a line to the script that will tell you when you're too low.
    Maybe you're lagging a bit and some of the waits need to be increased?
    Maybe your camera angle is slightly off?

    It's hard to say without any information. You'll have to debug the script yourself to get the best results.
    Could you help me set this up?

  15. #15
    Join Date
    May 2012
    Location
    Glorious Nippon
    Posts
    1,011
    Mentioned
    50 Post(s)
    Quoted
    505 Post(s)

    Default

    Quote Originally Posted by TruthDaProdigy View Post
    Could you help me set this up?
    All of the setup instructions are in this thread. What isn't working for you?

  16. #16
    Join Date
    Aug 2017
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by Citrus View Post
    All of the setup instructions are in this thread. What isn't working for you?
    I Followed exactly the instructions i am new to this but wasn't to hard. Copied and pasted changed my settings to 317 medium zoom. Now when you say stand in the tile could you took an image so i know im doing it right im pretty positive i am. But i start the script then it stops.

    Successfully executed. stops instant
    Last edited by TruthDaProdigy; 08-07-2017 at 02:24 PM.

  17. #17
    Join Date
    May 2012
    Location
    Glorious Nippon
    Posts
    1,011
    Mentioned
    50 Post(s)
    Quoted
    505 Post(s)

    Default

    Quote Originally Posted by TruthDaProdigy View Post
    I Followed exactly the instructions i am new to this but wasn't to hard. Copied and pasted changed my settings to 317 medium zoom. Now when you say stand in the tile could you took an image so i know im doing it right im pretty positive i am. But i start the script then it stops.

    Successfully executed. stops instant
    edit: are you targeting the client with Simba? https://villavu.com/forum/showthread...76#post1387776

    The correct tile is the one just south of the bank chest. Post screenshot of your setup if you can (hide your RSN if it matters to you).


    edit2: I updated the script so you don't have to target the game. Should work now.
    Last edited by Citrus; 08-07-2017 at 03:41 PM.

  18. #18
    Join Date
    Aug 2017
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by Citrus View Post
    edit: are you targeting the client with Simba? https://villavu.com/forum/showthread...76#post1387776

    The correct tile is the one just south of the bank chest. Post screenshot of your setup if you can (hide your RSN if it matters to you).


    edit2: I updated the script so you don't have to target the game. Should work now.
    Ok i got it working but it does around 200 then it stops for some odd reason.

  19. #19
    Join Date
    May 2012
    Location
    Glorious Nippon
    Posts
    1,011
    Mentioned
    50 Post(s)
    Quoted
    505 Post(s)

    Default

    Quote Originally Posted by TruthDaProdigy View Post
    Ok i got it working but it does around 200 then it stops for some odd reason.
    The script is set up such that if it messes up once, it will stop.
    I'm able to run it for hours though.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •