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
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
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:
program poop; const MOUSE_MOVE = 3; choose_Option_Text_Color = 4674653; col = tcolor($99ff00); var count: integer; type TOption = record bounds: TBox; str: string; end; TOptionArray = array of TOption; procedure getAndSet(); var pp: TSysProcArr; i: int32; begin pp := client.getIOManager.getProcesses; for i := 0 to high(pp) do begin if pos('Welcome to Runique', pp[i].title) then begin setTarget(pp[i]); exit(); end; end; writeln('game not found'); terminateScript(); end; procedure wait(w1, w2: integer); overload; begin wait(random(w1, w2)); end; procedure fastClick(button: integer); var x, y: integer; begin getMousePos(x, y); holdMouse(x, y, button); wait(69 + random(69)); releaseMouse(x, y, button); end; procedure mouse(pnt: TPoint; button: integer); var i, x, y: integer; tpa: TPointArray; begin moveMouse(pnt.x, pnt.y); if (button = MOUSE_MOVE) then exit(); wait(22 + random(9)); holdMouse(pnt.x, pnt.y, button); wait(69 + random(69)); getMousePos(x, y); releaseMouse(x, y, button); end; procedure mouseBox(b: TBox; button: integer); begin mouse(point(b.x1 + random(b.x2 - b.x1), b.y1 + random(b.y2 - b.y1)), button); end; procedure TBox.edit(const x1_, y1_, x2_, y2_: integer); begin self.x1 := self.x1 + x1_; self.y1 := self.y1 + y1_; self.x2 := self.x2 + x2_; self.y2 := self.y2 + y2_; end; function shrinkBox(b: TBox; const size: integer): TBox; begin result := b; result.edit(+size, +size, -size, -size); end; procedure TBox.shrink(const size: integer); begin self.edit(+size, +size, -size, -size); end; procedure TBox.offset(const p: TPoint); begin self.X1 := self.X1 + p.x; self.X2 := self.X2 + p.x; self.Y1 := self.Y1 + p.y; self.Y2 := self.Y2 + p.y; end; function isOptionOpen(wait: integer = 0): boolean; var w, h: integer; t: longword; begin result := false; getClientDimensions(w, h); t := getSystemTime() + wait; repeat result := (countColor(choose_Option_Text_Color, 0, 0, w-1, h-1) > 69); until (result or (getSystemTime() > t)); end; procedure getOptionBounds(var box: TBox); var w, h: integer; tpa: TPointArray; b: TBox; begin if (not isOptionOpen(0)) then exit(); getClientDimensions(w, h); b := [0, 0, w-1, h-1]; if findColors(tpa, choose_Option_Text_Color, b.x1, b.y1, b.x2, b.y2) then begin box := getTPABounds(tpa); box.edit(2, 19, -2, -2); end; end; function getOptions(): TOptionArray; var oldT, newT, bmp, w, h, i, n: integer; bounds, box: TBox; tpa: TPointArray; atpa: T2DPointArray; begin if (not isOptionOpen(0)) then exit(); oldT := getImageTarget(); getOptionBounds(bounds); bmp := bitmapFromClient(bounds.x1, bounds.y1, bounds.x2, bounds.y2); fastReplaceColor(bmp, 16777215, col); //pure white fastReplaceColor(bmp, 4231423, col); //light orange item text fastReplaceColor(bmp, 65280, col); fastReplaceColor(bmp, 255, col); fastReplaceColor(bmp, 65535, col); fastReplaceColor(bmp, 16776960, col); fastReplaceColor(bmp, 16744447, col); fastReplaceColor(bmp, 28927, col); fastReplaceColor(bmp, 25800, col); w := bounds.x2 - bounds.x1; h := bounds.y2 - bounds.y1; n := floor(h / 15); setLength(result, n); try setTargetBitmap(bmp); for i := 0 to n-1 do begin result[i].str := getTextAtEx(3, (i * 15) + 3, w-2, min(h-1, (i * 15) + 17), 0, 5, 5, col, 0, 'upChars07'); result[i].bounds := [3, (i * 15) + 3, w-2, min(h-1, (i * 15) + 17)]; result[i].bounds.offset(point(bounds.x1, bounds.y1)); result[i].bounds.shrink(1); end; finally newT := getImageTarget(); setImageTarget(oldT); freeTarget(newT); if bitmapExists(bmp) then freeBitmap(bmp); end; end; function selectOption(txt: TStringArray; mouseAction, waitTime: integer): boolean; var opts: TOptionArray; i, j, len: integer; b: TBox; t: longword; begin if (not isOptionOpen(0)) then exit(); t := getSystemTime() + waitTime; opts := getOptions(); repeat if ((len := length(opts)) > 1) then begin for j := 0 to high(txt) do begin for i := 0 to high(opts) do begin if (getSystemTime() > t) then exit(false); if (pos(txt[j], opts[i].str) > 0) then begin mouseBox(shrinkBox(opts[i].bounds, 1), mouseAction); exit(true); end; end; end; end; until false; end; function getUpText(): string; var bmp, w, h, oldT, newT: integer; b: TBox; tpa: TPointArray; begin if findColors(tpa, 16777215, 12, 52, 520, 68) then begin oldT := getImageTarget(); b := getTPABounds(tpa); bmp := bitmapFromClient(b.x1, b.y1, b.x2+1, b.y2+1); fastReplaceColor(bmp, 16777215, col); //pure white fastReplaceColor(bmp, 4231423, col); //light orange item text fastReplaceColor(bmp, 65280, col); fastReplaceColor(bmp, 255, col); //red fastReplaceColor(bmp, 65535, col); //yellow? fastReplaceColor(bmp, 16776960, col); fastReplaceColor(bmp, 16744447, col); fastReplaceColor(bmp, 28927, col); fastReplaceColor(bmp, 25800, col); getBitmapSize(bmp, w, h); try setTargetBitmap(bmp); result := getTextAtEx(0, 0, w-1, h-1, 0, 4, 4, col, 0, 'upChars07'); finally newT := getImageTarget(); setImageTarget(oldT); freeTarget(newT); if bitmapExists(bmp) then freeBitmap(bmp); end; end; end; function isUpText(txt: TStringArray; waitTime: integer = 0): boolean; var str: string; i: integer; t: longword; begin result := false; t := getSystemTime() + waitTime; repeat str := getUpText(); for i := 0 to high(txt) do begin if (pos(txt[i], str) > 0) then exit(true); if (getSystemTime() > t) then exit(false); end; until false; end; procedure clickClient(); begin mouse(point(444, 9), mouse_left); wait(345, 543); fastClick(mouse_left); end; procedure mouseOff(); begin mouse(point(-10, 10), mouse_move); end; function pickUpSticks(): boolean; begin result := false; wait(222, 444); mouseOff(); wait(222, 666); mouseBox([20, 225, 44, 250], mouse_move); if isUpText(['alk-'], 6969) then begin fastClick(mouse_right); if isOptionOpen(6969) then if selectOption(['rade P'], mouse_left, 6969) then exit(true); end; end; function isTextOpen(wait: integer = 0): boolean; var i: integer; t: longword begin mouseOff(); result := false; t := getTimeRunning() + wait; repeat result := (countColor(128, 10, 389, 500, 500) > 222); until (result or (getTimeRunning() > t)); end; function clickText(): boolean; var tpa: TPointArray; begin result := false; if (findColors(tpa, 0, 180, 468, 350, 480) or findColors(tpa, 16777215, 180, 468, 350, 480)) then begin mouseBox(shrinkBox(getTPABounds(tpa), 2), mouse_move); if isUpText(['Ok'], 6969) then begin fastClick(mouse_left); wait(222, 444); exit(true); end; end; end; function isShopOpen(wait: integer = 0): boolean; var t: longword; begin result := false; t := getTimeRunning() + wait; repeat result := (countColor(4231423, 180, 60, 323, 81) > 400); until (result or (getTimeRunning() > t)); end; function buyBars(): boolean; begin result := false; mouseBox([94, 282, 122, 306], mouse_move); if isUpText(['damant'], 6969) then begin fastClick(mouse_right); if isOptionOpen(6969) then if selectOption(['100', '250'], mouse_left, 6969) then begin wait(222, 444); exit(true); end; end; end; function closeShop(wait: integer): boolean; var t: longword; begin if (not isShopOpen(0)) then exit(true); result := false; mouseBox([488, 63, 500, 75], mouse_move); if isUpText(['Close'], 6969) then begin fastClick(mouse_left); t := getTimeRunning() + wait; repeat result := (not isShopOpen(0)); until (result or (getTimeRunning() > t)); end; end; function clickBank(): boolean; begin result := false; mouseBox([430, 140, 455, 155], mouse_move); if isUpText(['Bank', 'chest'], 6969) then begin fastClick(mouse_right); if isOptionOpen(6969) then begin if selectOption(['Use'], mouse_left, 6969) then exit(true); end; end; end; function isBankOpen(wait: integer): boolean; var t: longword; begin result := false; t := getTimeRunning() + wait; repeat result := (countColor(2070783, 170, 60, 323, 90) > 400); until (result or (getTimeRunning() > t)); end; function deposit(): boolean; begin mouseBox([340, 335, 367, 352], mouse_move); if isUpText(['eposit', 'carried'], 6969) then begin fastClick(mouse_left); wait(222, 444); exit(true); end; end; function closeBank(wait: integer): boolean; var t: longword; begin if (not isBankOpen(0)) then exit(true); result := false; mouseBox([484, 66, 497, 77], mouse_move); if isUpText(['Close'], 555) then begin fastClick(mouse_left); t := getTimeRunning() + wait; repeat result := (not isBankOpen(0)); until (result or (getTimeRunning() > t)); end; end; function hasCash(): boolean; var x, y: integer; begin result := findColor(x, y, 65280, 466, 138, 509, 152); end; function progress(): boolean; begin clearDebug(); result := true; inc(count); write('bars: ' + intToStr(count)); writeLn(' per hr: ' + intToStr(round((count * 28)/(getTimeRunning()/3600000)))); write('gp: ' + intToStr(count * 28 * 16500)); writeLn(' per hr: ' + intToStr(round((count * 28 * 16500)/(getTimeRunning()/3600000)))); end; procedure bars(); begin if pickUpSticks() then if isTextOpen(6969) then if clickText() then if isShopOpen(6969) then if buyBars() then if closeShop(6969) then if clickBank() then if deposit() then if closeBank(6969) then if progress() then exit(); terminateScript(); end; begin clearDebug(); getAndSet(); clickClient(); while hasCash() do bars(); end.
Last edited by Citrus; 08-15-2017 at 01:38 AM. Reason: 444
Ty man, gonna test it right now.
bot just right clicks on ady seller and the script stops any problems i may be having?
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.
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.
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.
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.
i got the script working fully thanks for the help
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.
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)