Amberleaf Posted October 27, 2012 Share Posted October 27, 2012 (edited) Kills chickens inside the pen at Lumbridge, drag the target onto the RSC client and push play. You'll need OSI to run this script download it by going to File>>Includes Manager. Tap F6 to stop the script. v0.2 Now loots bones/feathers/chicken meat/eggs. It drops the meat and eggs. Burys bones TODO: add eating //AmberRSCFighter {.include OSI\OSI.scar} var i, r, xp: Integer; procedure ScriptTerminate; begin FreeOSI; end; procedure FindTarget; var x, y: Integer; begin If FindColorSpiral(x, y, x, y, 41957, 0, 0, 509, 327) then // You can replace this color 41957 with another color from a different enemy. begin MoveMouse(x, y); Wait(100); Mouse(x, y, 0, 0, False); end; end; procedure Atttack; var x, y: Integer; begin If FindColor(x, y, 65280, 23, 28, 490, 301) then begin MMouse(x, y, 0, 0); GetMousePos(x, y); Mouse(x, y+5, 0, 0, false); Wait(2500); xp := xp + 100; // Replace the 100 with the amount of XP from that given enemy Writeln('XP so far...'); Writeln(xp); end else begin MMouse(401, 181, 75, 75); Wait(100 + Random(1000)); end; end; procedure InCombat; var x, y: Integer; begin repeat If FindColorTol(x, y, 16777215, 57, 21, 126, 32, 4) then begin WriteLn('In Combat...'); MoveMouse(100 + Random(100), 100 + Random(100)); Wait(2000); end; until (FindColorTol(x, y, 16777215, 57, 21, 126, 32, 4) = False); end; procedure Loot; var x, y: Integer; begin If FindColorSpiral(x, y, x, y, 16579836, 23, 28, 490, 301) then begin repeat Mouse(x, y, 0, 0, False); If FindColor(x, y, 4231423, 23, 28, 490, 301) then begin Mouse(x, y, 0, 0, True); Wait(1500 + Random(1000)); end; until (FindColor(x, y, 4231423, 23, 28, 490, 301) = False); end; end; procedure BuryBones; var x, y: Integer; begin MMouse(498, 19, 3, 3); repeat If FindColor(x, y, 16775143, 267, 36, 504, 236) then begin Mouse(x, y, 0, 0, True); Wait(250); end; until (FindColor(x, y, 16775143, 267, 36, 504, 236) = False); repeat If FindColor(x, y, 2848472, 267, 36, 504, 236) then begin Mouse(x, y, 0, 0, False); Wait(100); Mouse(x, y+25, 0, 0, True); Wait(100); MMouse(498, 19, 3, 3); Wait(250); end; until (FindColor(x, y, 2848472, 267, 36, 504, 236) = False); MMouse(137, 216, 20, 20); end; begin SetupOSI; repeat FindTarget; Atttack; InCombat; Loot; i := Random(15); If i = 1 then begin BuryBones; end; until GetKeyState(VK_F6); end. Edited October 29, 2012 by Amberleaf version 2 1 Quote Link to comment Share on other sites More sharing options...
Janilabo Posted October 27, 2012 Share Posted October 27, 2012 Simple, but nice! Good job Al. Glad to see you are back to the scripting scene! -Jani Quote Link to comment Share on other sites More sharing options...
Amberleaf Posted October 29, 2012 Author Share Posted October 29, 2012 Thanks Jani nice to be back =] I've got a few more scripts in the 'works' I'll release in due time. Updated to v0.2 let me know what you think of this script. Quote Link to comment Share on other sites More sharing options...