this is for all you pures out there it drops the meat and the bones to perfection hope you enjoy ;) it worked perfect for me and it should fix up the srl/sps problem as well hope you all enjoy :d
Simba Code:
//----------------------------------------------------------------------------//
// -- birdtrap
// -- by wt-fakawi
// -- 0.12
// --
// -- hunting script
//----------------------------------------------------------------------------//
// --
// -- !!!! For the srl community only !!!!!
// -- !!!! Do not distribute this script !!!!!
// -- !!!! Use for your own private purposes !!!!
// --
// -- you are free to copy/paste/modify this script or parts
// -- of this script as long as you credit me and the srl-community.
//----------------------------------------------------------------------------//
// --
// -- this script traps birds
// -- use it to level your hunting to 30+
//----------------------------------------------------------------------------//
// -- instructions
// -- 1. Place your player at a bird hunting spot.
// -- 2. Have one (1) birdtrap in invspot 1-24 and have reserve traps in spot 25-28.
// -- 3. This script is not designed for multiplayer. Use one player only.
// -- enjoy!
//----------------------------------------------------------------------------//
program birdhunter;
{.include srl/srl/misc/smart.simba}
{.include srl\srl.simba}
var
bbones, birds, traps, missed, fallentraps, huntinglevel, hplevel: Integer;
var
obx, oby, caltime:integer;
const
fawkidebug = false;
birdxp = 95;
//----------------------------------------------------------------------------//
procedure declareplayers;
begin
numberofplayers(1);
currentplayer := 0;
players[0].name :='';
players[0].pass :='';
players[0].nick :='';
players[0].active := true;
end;
//----------------------------------------------------------------------------//
procedure progressreport;
begin
cleardebug;
writeln(' ');
writeln('<============== - progress report ===============>');
writeln('worked for '+ timerunning);
writeln('hunting level '+ inttostr(huntinglevel));
writeln('caught '+ inttostr(birds)+ ' birds');
writeln('xp gained '+ inttostr(birds * birdxp));
writeln('placed '+ inttostr(traps)+ ' traps');
writeln('missed '+ inttostr(missed)+ ' times');
writeln('picked up '+ inttostr(fallentraps)+ ' fallen traps');
writeln('buried '+ inttostr(bbones)+ ' bones');
end;
//----------------------------------------------------------------------------//
procedure up;
begin
keydown(vk_up);
wait(2500 + random(1000));
keyup(vk_up);
end;
//----------------------------------------------------------------------------//
procedure ftwait(mylen:integer);
var mywait: Integer;
begin
for mywait := 1 to mylen do
begin
wait(100 + random(100));
findnormalrandoms;
end
end;
//----------------------------------------------------------------------------//
function havebirdtrap(var wherex, wherey:integer):boolean;
var
birdtrap:integer;
begin
birdtrap := bitmapfromstring(16, 11, 'mejxjyeca////m5aicgpbu4cpni' +
'qfepz/mcboaphimabispdud+k3ar96nc3eowcrx/bygsycahr4ajg=');
if findbitmapmasktolerance(birdtrap, wherex, wherey, mix1, miy1, mix2, miy2 - 42, 10, 10) then
begin // keep lower row free! For extra reserve traps
result := true;
if fawkidebug then writeln('havebirdtrap returned true');
end;
// if fawkidebug then writeln('havebirdtrap returned false');
freebitmap(birdtrap);
end;
//----------------------------------------------------------------------------//
function placetrap(stepforward:boolean):boolean;
var
btx, bty:integer;
begin
if havebirdtrap(btx, bty) then
begin
if stepforward then mouse(mscx + 30, mscy + 5, 10, 10,true);
fflag(0);
ftwait(12);
mouse(btx, bty, 4, 4, true);
ftwait(24);
if pos('lay a trap here',getblackchatmessage) <> 0 then
begin
mouse(mscx + 30, mscy - 5, 10, 5,true);
end;
inc(traps);
result := true;
if fawkidebug then writeln('placetrap: Placed trap');
end
else
result := false;
end;
//----------------------------------------------------------------------------//
procedure dropandbury;
var
i, ix, iy, rawbirdmeat, bonesmask: Integer;
tb: Tbox;
begin
rawbirdmeat := bitmapfromstring(8, 6, 'benpny9skqeayrehhnzj' +
'fydqmq5jccogdlamd+q5we5tprsbuous6ksw8ri1h61rsozdjchlg' +
'+mesc997zh82xnsvmygl4tsfee9cog==');
bonesmask := bitmapfromstring(10, 9, 'mejxjyeah/8eaqxghcyfhiueawqq' +
'xaokasgx4tuczeq8dwt0aj6nnsw==');
makecompass('n');
gametab(tab_inv);
ftwait(1);
for i := 1 to 28 do
begin
tb := invbox(i);
if existsitem(i) then
begin
if findbitmaptolerancein(rawbirdmeat, ix, iy, tb.x1, tb.y1, tb.x2, tb.y2, 50) then
begin
if fawkidebug then writeln('dropping rawbirdmeat');
mouse(ix - 4, iy - 4 , 8, 8, false);
chooseoption('rop');
ftwait(2);
end;
if findbitmapmasktolerance(bonesmask, ix, iy, tb.x1, tb.y1, tb.x2, tb.y2, 20, 50) then
begin
if fawkidebug then writeln('dropping bones');
mouse(ix - 4, iy - 4 , 8, 8, false);
chooseoption('rop');
ftwait(2);
end;
end;
end;
freebitmap(rawbirdmeat);
freebitmap(bonesmask);
progressreport;
end;
//----------------------------------------------------------------------------//
procedure checklevels;
begin
gametab(tab_stats);
huntinglevel := getskilllevel('hunting');
hplevel := getskilllevel('hitpoints');
gametab(tab_inv);
end;
//----------------------------------------------------------------------------//
procedure quit(reason:string);
begin
writeln('quit: '+ reason + 'quit');
logout;
terminatescript;
end;
//----------------------------------------------------------------------------//
procedure setup;
begin
setupsrl;
declareplayers;
loginplayer;
checklevels;
end;
//----------------------------------------------------------------------------//
begin
setup;
caltime := getsystemtime;
repeat
if placetrap(true) then
begin
repeat
ftwait( 1 + random(3));
if random(50) = 0 then sleepandmovemouse(1000 + random(200));
repeat
if findcolortolerance(obx, oby, 4880299, 265, 143, 331, 185, 20)
or findcolortolerance(obx, oby, 3956845, 265, 143, 331, 185, 20) then
begin
mmouse(obx, oby, 0, 0);
getmousepos(obx,oby);
end;
until not isuptext('walk here') or not isuptext('walk here / ');
if isuptext('dismantle bird snare / 2 more options') then
begin
ftwait(2);
mouse(obx, oby, 0, 0, true);
ftwait(12);
inc(missed);
break;
end;
if isuptext('check bird snare / 2 more options') then
begin
ftwait(2);
mouse(obx, oby, 0, 0, true);
ftwait(12);
inc(birds);
if invcount > 10 + random(10) then dropandbury;
break;
end;
if isuptext('take bird snare / 3 more options') then
begin
ftwait(2);
mouse(obx, oby, 0, 0, true);
ftwait(12);
inc(fallentraps);
break;
end;
until false;
end;
until not loggedin;
quit('eof');
end.