Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //OSRS07 - Willow Cutter and banker v0.2
- //Amberleaf
- //Instructions & more scripts can be found at http://www.scar-divi.com
- //9/3/13
- {.include OSI\OSI.scar}
- {$DEFINE RS07}
- {$I MSSL\MSSL.scar}
- const
- tree = 2317649;
- tree1 = 2910814;
- tree2 = 2447955;
- tree3 = 3632738;
- tree4 = 4094833;
- procedure ScriptTerminateMSSL;
- begin
- MSSL_Unsetup;
- end;
- procedure ScriptTerminate;
- begin
- FreeOSI;
- end;
- procedure GetBanking;
- var
- x, y, x1, y1: Integer;
- begin
- if RS07_InventoryFull then // bag full
- begin
- RS07_SetScreenBrightness(RS07_SCREEN_BRIGHTNESS_VERY_BRIGHT);
- MMouse(654, 26, 0, 0); //mouse over map
- Wait(50);
- If FindColorTol(x1, y1, 195836, 636, 14, 655, 45, 15) then // find ppl in bank
- begin
- MMouse(x, y, 0, 0); // mouse in bank on ppl
- Wait(200);
- Mouse(x1+17, y1+9, 0, 0, True); // left click position and run to bank
- WaitRR(13000, 16500);
- begin
- if RS07_OpenBank(RS07_BANK_DRAYNOR) then //find bank
- RS07_DepositEx(1, -1);
- MMouse(577, 231, 0, 0);
- WaitRR(250, 750);
- WaitRR(500, 1400);
- WaitRR(550, 1250);
- RS07_SetScreenBrightness(RS07_SCREEN_BRIGHTNESS_NORMAL);
- RS07_SetCompassDir('N');
- Mouse(626, 134, 1, 1, True);
- WaitRR(8000, 12000);
- end;
- end;
- end;
- end;
- procedure GetChopping;
- var x, y, x1, y1: Integer;
- begin
- If FindColorsSpiralTol(227, 159, x, y, [tree, tree1, tree2, tree3, tree4], 1, 1, 510, 334, 2) then
- begin
- MMouse(x, y, 0, 0);
- Wait(50);
- WriteLn('found a tree...');
- GetMousePos(x1, y1);
- MMouse(x, y, 10, 5);
- If FindColorTol(x, y, 14474496, 12, 12, 90, 19, 99) then
- begin
- Mouse(x1, y1, 0, 0, True);
- repeat
- Wait(50+ Random(100));
- GetMousePos(x, y);
- Wait(50+ Random(100));
- MMouse(x, y, 6, 7);
- GetBanking;
- WaitRR(550, 7000);
- If GetKeyState(VK_F12) then
- begin
- TerminateScript;
- end;
- //search for randoms here would be awesome. WIP
- until (FindColorTol(x, y, 14474496, 12, 12, 90, 19, 99) = False);
- //MMouse(x + Random(100), y - Random(100), 0, 0);
- //Wait(RandomRange(MINWAITTIME, MAXWAITTIME)); // adjust this time for faster/slower switching speed between trees.
- FindColorsSpiralTol(227, 159, x, y, [tree, tree1, tree2, tree3, tree4], 1, 1, 510, 334, 14);
- end else ;
- If FindColorTol(x, y, 14474496, 12, 12, 90, 19, 99) = False then
- begin
- GetMousePos(x, y);
- MMouse(x, y, 45, 90);
- Wait(50 + Random(100));
- MMouse(x, y, 90, 45);
- Wait(50 + Random(100));
- MMouse(x, y, 30, 30);
- Wait(50 + Random(100));
- end;
- If GetKeyState(VK_F12) then
- begin
- TerminateScript;
- end;
- end;
- end;
- begin
- SetUpOSI;
- MSSL_Setup;
- RS07_SetCompassDir('N');
- repeat
- GetChopping;
- until GetKeyState(VK_F12);
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement