SCAR Code:
//------------------------------------------------------------------------\\
// ________ _____ __ \\
// ___ __ \____________ _____ ______________ __ / / /_______ \\
// __ /_/ /_ ___/ __ `/_ / / / _ \_ ___/ _ / / /___ __ \ \\
// _ ____/_ / / /_/ /_ /_/ // __/ / / /_/ / __ /_/ / \\
// /_/ /_/ \__,_/ _\__, / \___//_/ \____/ _ .___/ \\
// /____/ /_/ \\
// __________ \\
// ___ ____/_____ ____________ __ \\
// __ __/ _ __ `/_ ___/_ / / / \\
// _ /___ / /_/ /_(__ )_ /_/ / \\
// /_____/ \__,_/ /____/ _\__, / \\
// /____/ \\
//------------------------------------------------------------------------\\
// Setup Lines : 34-36 \\
// 42-68 \\
//------------------------------------------------------------------------\\
// \\
//------------------------------------------------------------------------\\
// Instructions \\
//------------------------------------------------------------------------\\
// 1. Set Runescape on low detail and on Very Bright. \\
// 2. Join a crowded world where people dont pick up thier bones. \\
// 3. Start logged in or out where lots of bones are laying around. \\
// 4. Click on play and watch it get your prayer up for you. \\
//------------------------------------------------------------------------\\
program BoneBurier;
{.include SRL\SRL.scar}
Var
Buried, Picked: Integer;
const
Bonecolor = 15066600; //bone color on ground
RunDirection = 'N'; //direction you run away from random events(N,E,S,W)
Skillforlamp = 'Prayer'; //what to use a genie lamp on
//-------------------------------Players----------------------------------\\
procedure DeclarePlayers;
begin
HowManyPlayers := 4;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:=0;
Players[0].Name :='Username'; //Username goes here.
Players[0].Pass :='Password'; //Password goes here.
Players[0].Nick :='sern'; //Type 3-4 letters of your runescape username.
Players[0].Integer1 := 56; //Bones to bury until it switches players.
Players[0].Active :=true; //Is this player active?
Players[1].Name :='Username';
Players[1].Pass :='Password';
Players[1].Nick :='sern';
Players[1].Integer1 := 56;
Players[1].Active :=false;
Players[2].Name :='Username';
Players[2].Pass :='Password';
Players[2].Nick :='sern';
Players[2].Integer1 := 56;
Players[2].Active :=false;
Players[3].Name :='Username';
Players[3].Pass :='Password';
Players[3].Nick :='sern';
Players[3].Integer1 := 56;
Players[3].Active :=false;
end;
//-------------------------------Anti Ban---------------------------------\\
procedure Stopban;
begin
LeaveScreenEvery(4 + random(7));
RandomRClickEvery(3+Random(9));
PickUpMouseEvery(6 + random(5));
RandomChatEvery(11 + Random(6));
HoverEvery(7+random(5),'prayer');
LeaveScreenEvery(10 + Random(10));
RandomRClickEvery(8+Random(8));
RandomRClickEvery(5 + random(5));
end;
//------------------------------Progress Report-----------------------------\\
Procedure ProgressReport;
begin
Writeln('//----------------------------------------\\');
Writeln('//--------Progress On Bone Burying--------\\');
Writeln('//----------------------------------------\\');
Writeln('//-----Ran for '+TimeRunning+'--------\\');
Writeln('//-----Picked up '+IntToStr(picked)+' bones-----------------\\');
WriteLn('//-----Buried '+IntToStr(Buried)+' bones--------------------\\')
WriteLn('//-----Gained '+IntToStr((Buried)*5)+' xp total----------------\\')
Writeln('//----------------------------------------\\');
end;
//-----------------------------Anti Randoms-------------------------------\\
Procedure AntiRandoms;
Begin
FindNormalRandoms;
FindTalk;
FindLamp(Skillforlamp);
UseBoxSolver := True
UseCerterSolver := True
UseSandwichSolver :=True
FindMod;
FindMime;
FindDead;
FindMaze;
DwarfItem;
FindDemon;
Solvepinball;
FindScapeRune;
Stopban;
if (findfight) then begin
RunAwayDirection(RunDirection);
SleepAndMoveMouse(9500+Random(2500));
RunBack;
if InBlack then
begin
Players[CurrentPlayer].Active := false;
Writeln(Players[CurrentPlayer].Name + ' is stuck in a random event!');
ProgressReport;
NextPlayer(True);
wait(3000 + random(3000));
end;
if FindDead then
begin
Players[CurrentPlayer].Active := false;
Writeln(Players[CurrentPlayer].Name + ' has died!');
ProgressReport;
NextPlayer(True);
wait(3000 + random(3000));
end;
end;
end;
//------------------------------Responding--------------------------------\\
Procedure AutoRespond;
begin
if(InChat('Prayer lvls?') or
InChat('Prayer lvls') or
InChat('Prayer lvl?') or
InChat('Prayer lvl') or
InChat('Pray lvls?') or
InChat('Pray lvls') or
InChat('Pray lvl?') or
InChat('Pray lvl')) then
begin
TypeSend(IntToStr(GetSkillLevel('Prayer')))
end;
if (InChat('Cooking lvls?') or
InChat('Cooking lvls') or
InChat('Cooking lvl?') or
Inchat('Cookin lvls?') or
InChat('Cookin lvls') or
Inchat('Cookin lvl?') or
InChat('Cookin lvl') or
InChat('Cook lvls?') or
Inchat('Cook lvls') or
InChat('Cook lvl?') or
InChat('Cook lvl')) then
begin
TypeSend(IntToStr(GetSkillLevel('Cooking')))
end;
AntiRandoms;
ProgressReport;
end;
//------------------------------Bury bones--------------------------------\\
Procedure Bury;
var
Boneinv: Integer;
begin
Boneinv := DTMFromString('78DA633CC6C4C0B09B91011530229140FA085' +
'0CD66026A2E00D51C20A0662750CD4E026A0E03D51CC5AF06001F' +
'BF07A1');
repeat;
if(FindDTM(Boneinv, x, y, 550, 200, 745, 465))then
MMouse(x, y, 1, 1);
if (IsUpText('Bury') or IsUpText('ury')) then
GetMousePos(x, y);
wait(100+random(75))
Mouse(x, y, 3, 3, True);
Buried:=Buried+1;
wait(500+random(200))
SRLRandomsReport;
AntiRandoms;
until(invcount >= 2)
ProgressReport;
FreeDTM(Boneinv);
end;
//-----------------------------Pick up bones------------------------------\\
Procedure Pickup;
var
Takebonewhite, Takeboneyellow: Integer;
Begin
Takebonewhite := BitmapFromString(59, 1, 'z78DA737343000324' +
'E086216EEA626A6262EE86034064914937BC00D92E4CBDA8E6581' +
'A9818404854970CBC382689E92F00146F4FAE');
Takeboneyellow := BitmapFromString(59, 1, 'z78DA73737373333' +
'0700393C8C00D43DCD4C5D4C4C41C591C9984C82293B85462DA85' +
'A917D51C4B0313030889EA928117C72431FD050090804D72');
repeat;
if(Findcolor(x,y,Bonecolor,5,5,515,340))then
MMouse(x,y,1,1);
if (IsUpText('Bone') or IsUpText('ones') or IsUpText('eathe') or IsUpText('aw chic') or IsUpText('hicke')) then
GetMousePos(x,y);
Mouse(x, y, 1, 1, False);
if(FindBitmap(Takebonewhite, x, y)) or (FindBitmap(Takeboneyellow, x, y))then
MMouse(x,y,1,1);
GetMousePos(x,y);
Mouse(x, y, 1, 1, True);
Flag;
wait(300+random(200))
Picked:=Picked+1;
SRLRandomsReport;
AntiRandoms;
until(invcount >= 5)
if(invcount >= 5)then
Bury;
Freebitmap(Takebonewhite);
Freebitmap(Takeboneyellow);
end;
//------------------------------------------------------------------------\\
Begin
SetupSRL;
DisguiseScar('iTunes');
Activateclient;
DeclarePlayers;
repeat
If (Not(LoggedIn)) then
begin
Loginplayer;
SetChat('on', 1);
SetChat('friends', 2);
SetChat('off', 3);
HighestAngle;
Setrun(true);
Makecompass('N')
end;
repeat
Pickup;
Bury;
AntiRandoms;
until(LoggedIn) and (Buried >= Players[CurrentPlayer].Integer1)
If(LoggedIn) and (Buried >= Players[CurrentPlayer].Integer1)then
Writeln('Bones to bury has been reached, switching players.')
Logout;
ProgressReport;
Wait(20000+random(10000))
NextPlayer(True);
until (false);
end.
I just need some ideas where i might be able to put failsafes and other things that could improve this.