Hey all,
This is my first SCAR Script, but I can't get it to compile. I'm sure it is full of errors and missing features
. But I've read over it and can't figure it out. Can someone please debug it for me? And I'd love suggestions.
SCAR Code:
program WhoWantsABone;
{.include SRL\SRL.Scar}
//---------------------------------------------------------------| |
// * PROGRAM: WhoWantsABone |
// * CODER: jbrauman |
// * CATEGORY: Prayer |
// * DESCRIPTION: Picks up bones, then buries them for you. |
// * USAGE: Select the runescape client using the |
// * crosshair, fill out details, click play. |
// * AUTOCOLOR: YES! |
// * NOTES: Built for Scar Divi/SRL 3.7 |
//---------------------------------------------------------------|
// * 1. Use Runescape with Low Detail, Very Bright.
// * 2. 32 BIT TRUE COLOR.
// * 3. Use a busy world where people do not pick up bones.
// * 4. Position your character somewhere @ Lumby Cow Pen.
// * 5. Have nothing in inventory or it WILL be dropped.
}
const
BoneColor1 = 11053492;
BoneColor2 = 12500678;
BoneColor3 = 12698057;
Bone := BitmapFromString(4, 4, '000001000001000001D2CCCC9B9' +
'090A19595CEC7C79B909089807FDED9D9CAC3C29A8E8E000001C7' +
'BFBFA99D9D000001');
var
RunDirection = 'N'; //Can be N, S, E, W, R (Random).
LoadsPerPlayer = 10; //Loads before next player.
RandomLoads = 5; //Added to LoadsPerPlayer. NOTE random(RandomLoads);
procedure DeclarePlayers;
begin
HowManyPlayers := 1; //Number of players
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:= 0;
Players[0].Name :='chicken kllr';
Players[0].Pass :='gh12adkl';
Players[0].Nick :='cken';
Players[0].Active:=True;
end;
{ CODE BELOW, DON'T TOUCH UNLESS
YOU KNOW SCAR BACK TO FRONT!
}
Procedure PickUpBones;
var x, y :Integer
begin
repeat
if(not(LoggedIn)) then
begin
Writeln('Not logged in');
TerminateScript;
end;
begin
case (random(2)) of
0 : Exit;
1 : AntiBan;
2 : Exit;
end;
AntiRandoms;
if (FindObjMulti('ones', BoneColor1, BoneColor2, BoneColor3, 3) then
//Found Bones
begin
Wait(50 + random(100);
GetMouse(x, y);
If(IsUpTextMulti('option', 'opti', 'tion') then
begin
ClickMouse(x, y, false);
ChooseOption(x,y,'ick up');
//Picked up bones
AntiRandoms;
end;
end;
end;
until(InvFull);
Procedure BuryBones;
AntiRandoms;
Wait(Random(200)); //Always good to have random waits here and there
repeat
repeat
ClickAllItemsBmpTolWait('ury', Bone, 50, 250); //Buries all bones in inventory.
until(FindBitmap(Bone, x, y) = False) //Found no more bones.
DropAll; //Drops any other items we may have accumulated during our boneburying spree.
AntiRandoms;
until(InvEmpty);
end;
Procedure Antiban; //Credits EsteBan (change a few things.)
begin
if(not(LoggedIn))then
begin
Writeln('Error Line 37');
TerminateScript
end;
case Random(10) of
0: begin
HoverSkill('Random', false);
wait(2453+Random(432));
end;
1: RandomRClickEvery(3 + Random(2));
2: begin
HoverSkill('Woodcutting',false);
wait(2364+Random(413));
GameTab(4);
end;
3: PickUpMouse;
4: AlmostLogOut;
5: SayCurrentLevels('Woodcutting');
6: begin
case random(4) of
0: TypeSend('Whats up?');
1: TypeSend('wc lvls?');
2: TypeSend('Woodcutting levels?');
3: TypeSend('sup?');
end;
end;
7: begin
RandomCompassDirection;
wait(100+random(500));
RandomCompassDirection;
wait(100+random(500));
RandomCompassDirection;
end;
8: BoredEvery(10+random(5));
9: begin
LowestAngle;
wait(100+random(100));
HighestAngle;
end;
10: SleepAndMoveMouse(600000+random(400000));
end;
end.
procedure RandomCompassDirection;
begin
case random(3) of
0: MakeCompass('N');
1: MakeCompass('E');
2: MakeCompass('S');
3: MakeCompass('W');
end;
end;
procedure AntiRandoms;
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
begin
FindNormalRandoms;
FindTalk;
if (FindFight = True) then
begin
RunAwayDirection(RunDirection);
Wait(10000 + random(20000));
RunBack;
end;
FreeBitmap(NickNameBMP);
end;
begin
repeat
SetUpSRL; //Sets up SRL.
ActivateClient;
PickUpBones;
BuryBones;
AntiRandoms;
AntiBan;
until(not(LoggedIn));
end.
Thanks
-jbrauman
Don't know why but I like this emoticon...