SCAR Code:
program HideTannerAndCrafter;
{.include srl/srl.scar}
var
CactusColor, Thread, CowHide, HideText, Loads, Load, Coin, HardLeather, EndSkill, StartSkill, Cash, AlKharidDTM, x, y: Integer;
AlKharidMP: TDTMPointDef;
AlKharidSP: array[0..4] of TDTMPointDef;
AlKharidDTMSkel: TDTM;
const
//set this or it wont work
RockColor = 3359103; //the red/brown rock outside bank(north)(for accurety:))
RoadColor1 = 7848401; //road color the yellow one
procedure DeclarePlayers;
begin
HowManyPlayers := 1; // Set Number of Players here.
NumberOfPlayers(HowManyPlayers); // Sets the Players Array Length;
CurrentPlayer := 0; // CurrentPlayer - Player That Will Login First
Players[0].Name := 'username'; //Player Username.
Players[0].Pass := 'password'; //Player Password.
Players[0].Nick := 'ser'; //3 or 4 Letters From The Username Of This Player.
Players[0].Active := True; //Will You Be Using This Player?
Players[0].Integers[0] := 5; //How Much Loads To Do?
writeln(inttostr(HowManyPlayers) + ' Players');
end;
{=====================================================================================]
DONT TOUCH THIS BELOW IF YOU DONT KNOW WHAT YOUR DOING!
[=====================================================================================}
{===============================================]
this function finds randoms by:wt-fawaki
[===============================================}
function FindFastRandoms: Boolean;
var
i: Integer;
begin
for i := 1 to 9 do
begin
case I of
1: if FindDead then
Result := True;
2: if FindMod then
Result := True;
3: if FindMime then
Result := True;
4: if FindMaze then
Result := True;
5: if FindQuiz then
Result := True;
6: if FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
8: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
9: begin
if FindFight then
begin
RunTo('N', False);
end;
end;
end;
end;
end;
procedure LoadRoadDDtms;
var
Tol: integer;
begin
Tol := 30;
AlKharidMP.x := 675;
AlKharidMP.y := 123;
AlKharidMP.areasize := 1;
AlKharidMP.areashape := 0;
AlKharidMP.color := RoadColor1;
AlKharidMP.tolerance := 255;
AlKharidSP[0].x := 671;
AlKharidSP[0].y := 122;
AlKharidSP[0].areasize := 1;
AlKharidSP[0].areashape := 0;
AlKharidSP[0].color := RoadColor1;
AlKharidSP[0].tolerance := Tol;
AlKharidSP[1].x := 681;
AlKharidSP[1].y := 121;
AlKharidSP[1].areasize := 1;
AlKharidSP[1].areashape := 0;
AlKharidSP[1].color := RoadColor1;
AlKharidSP[1].tolerance := Tol;
AlKharidSP[2].x := 674;
AlKharidSP[2].y := 125;
AlKharidSP[2].areasize := 1;
AlKharidSP[2].areashape := 0;
AlKharidSP[2].color := RoadColor1;
AlKharidSP[2].tolerance := Tol;
AlKharidSP[3].x := 680;
AlKharidSP[3].y := 124;
AlKharidSP[3].areasize := 1;
AlKharidSP[3].areashape := 0;
AlKharidSP[3].color := RoadColor1;
AlKharidSP[3].tolerance := Tol;
AlKharidDTMSkel.MainPoint := AlKharidMP;
AlKharidDTMSkel.SubPoints := AlKharidSP;
AlKharidDTM := AddDTM(AlKharidDTMSkel);
end;
procedure LoadDTMs;
begin
{HideText := DTMFromString('78DA633CCFC8C0D00CC458004C94F10890D54' +
'4849A3A026A761261CE7620AB910835AD04D4DC24C29C9744B8E7' +
'19116A1E03590DA86A7EA0ABD90B64F51350738C08351731D560B' +
'8E73A903599809A0340D624026AF6629A83E19EF544F87D139055' +
'4F40CD6622D2CF66C2691500FDE0200E'); }
Thread := DTMFromString('78DA63CC63666068656440061B972E65F80FA' +
'441A2FF81803111A86622AA1A882C8C04D22073A6105053095453' +
'4D404D2E504D250135A9986EC650530A54D349404D01504D1F11E' +
'634E157030022330FD3');
HideText := DTMFromString('78DA63DCCBC0C0B08101159CF8C1C005A4188' +
'1F83F103082D4AC63C00A1861F47E20B19E801A90395B8930670B' +
'7E350056450CFC');
HardLeather := DTMFromString('78DA633CCCCCC07098910119EC5ABF8EE13F9' +
'00689FE0702C61D4035BB51D540646124903E0954B393809AB340' +
'352708A8D909547396809A2D40354708A8390E547311BF1A001AC' +
'D11E9');
CowHide := DTMFromString('78DA63E4656060006124B06BE346062E20CD0' +
'8C4FF81809119C8606740038C48249006A91121A0860F48481150' +
'2301249809A891041202F8D50000C82E06DB');
end;
procedure GetCactusColor;
var
Cactus: Integer;
begin
if not LoggedIn then Exit;
Cactus := BitmapFromString2(False, 'aB199078DA1DCCC911C0200' +
'C43D1960C5E732404FA2F297C2E6F3492C722225F3F488D830E74' +
'5B18E4F0C208349A5EC6EA13F7EDEF034B2567C3879C2F97391D0' +
'78DA85F97564C6D3F568');
CactusColor := AutoColorThis(Cactus, 200, MMX1, MMY1, MMX2, MMY2);
WriteLn('//CactusColor: ' + IntToStr(CactusColor));
FreeBitmap(Cactus);
end;
procedure CraftThatLeather;
begin
if not LoggedIn then Exit;
end;
function GetSkillStartEnd(Skill: string; Option: boolean): integer;
begin
if not LoggedIn then Exit;
if (Option = True) then
begin
GameTab(2);
StartSkill := GetSkillLevel(Skill);
end else
begin
GameTab(2);
EndSkill := GetSkillLevel(Skill);
end;
end;
procedure proggy;
begin
WriteLn('//////////////////////////////////////////////////////////////');
WriteLn('// Thanks for using my HideTanner and Leathercrafter. //');
WriteLn('// post Proggy,s and bugs. //');
WriteLn('//////////////////////////////////////////////////////////////');
WriteLn('// Ran for ' + (timerunning) + ' ');
WriteLn('// Did ' + inttostr(load) + ' load(s) out of ' + inttostr(Players[CurrentPlayer].Integers[0]) + ' loads set on this player ');
WriteLn('// You started with crafting level : ' + inttostr(startskill) + '');
WriteLn('// You ended with crafting level : ' + inttostr(startskill) + '');
WriteLn('//////////////////////////////////////////////////////////////');
end;
function ToTanRoom: boolean;
var x, y, tried, Room: integer;
var WhichAngle: extended;
begin
if not LoggedIn then Exit;
MakeCompass('N')
HighestAngle;
Room := DTMFromString('78DA632C606260D06440013D49EE0CFF81342' +
'310FF0702C65AA01A155435137B131924A16A4000ACC688809A56' +
'A01A4B026AD602D5181350930D54938DAAA6C1D71C450D0034651' +
'223');
repeat
tried := tried + 1
if (FindDTMRotated(Room, x, y, MMX1, MMY1, MMX2, MMY2, -pi * 2, pi * 2, 0.2, WhichAngle)) then
begin
wait(1000 + random(500));
Mouse(x, y, 3, 3, True);
flag;
break;
end;
until (tried = 5)
freeDTM(room);
end;
procedure bankclick;
begin
if not LoggedIn then Exit;
GetCactusColor;
RadialRoadWalk(CactusColor, 150, 270, 65, -30, +10);
Flag;
end;
procedure ToBank;
begin
if not loggedin then exit;
setrun(true);
LoadRoadDDtms;
if (FindDTM(AlKharidDTM, x, y, MMX1, MMY1, MMX2, MMY2)) then
begin
MouseFlag(x - 14, y + 10, 1, 1);
Writeln('//Walking to bank 1.');
bankclick;
end;
FreeDTM(AlKharidDTM);
end;
function FindHideText: Boolean;
var
LoopInteger: Integer;
begin
if not LoggedIn then Exit;
loaddtms;
LoopInteger := 0;
repeat
Wait(50 + Random(50));
LoopInteger := LoopInteger + 1
if (FindDTM(HideText, x, y, MSX1, MSY1, MSX2, MSY2)) then
begin
Mouse(x, y - 10, 0, 0, False);
Result := True;
break;
end;
until (LoopInteger >= 15)
if (LoopInteger >= 15) then
begin
Logout;
Result := False;
Exit;
end;
FreeDTM(HideText);
end;
procedure GetHides;
var
LoopInteger: Integer;
begin
if not LoggedIn then Exit;
loaddtms;
MakeCompass('N')
HighestAngle;
GetSkillStartEnd('crafting', True);
Wait(1 + random(2));
OpenBankFast('akb');
Wait(10 + random(5));
FixBank;
Deposit(2, 28, 2);
LoopInteger := 0;
repeat
Wait(50 + Random(50));
LoopInteger := LoopInteger + 1;
if (FindDTM(CowHide, x, y, MSX1, MSY1, MSX2, MSY2)) then
begin
Mouse(x, y, 5, 5, false);
if (ChooseOption('ll')) then
begin
WriteLn('//Taking Hides from Bank.');
CloseBank;
findtalk;
Wait(500 + Random(100));
Load := load + 1
break;
end;
end;
until (LoopInteger >= 10)
if (LoopInteger >= 10) then
begin
Logout;
exit;
end;
FreeDTM(CowHide);
end;
procedure GetCoinsAndHides;
var
LoopInteger: Integer;
begin
if not LoggedIn then Exit;
LoadDTMs;
MakeCompass('N')
HighestAngle;
Cash := ((Players[CurrentPlayer].Integers[1]) * 81);
Wait(1 + random(2));
OpenBankFast('akb');
Wait(10 + random(5));
FixBank;
LoopInteger := 0;
Coin := DTMFromString('78DA637CC5C0C0709001057C3B21CBF01F483' +
'302F17F2060BC0B64EC6140038C482490BE03244E1250F31348EC' +
'2742CD19FC6A0078830F4B');
repeat
LoopInteger := LoopInteger + 1
if (FindDTM(Coin, x, y, MSX1, MSY1, MSX2, MSY2)) then
begin
Wait(100 + Random(50));
Mouse(x, y, 0, 0, False);
Wait(100 + Random(50));
end;
if (ChooseOption('X')) then
begin
Wait(1000 + random(100));
WriteLn('//taking money from bank');
TypeSend(inttostr(cash));
break;
end;
Wait(1000 + random(500));
until (LoopInteger >= 10)
if (LoopInteger >= 10) then
begin
Logout;
Exit;
end;
LoopInteger := 0;
repeat
Wait(50 + Random(50));
LoopInteger := LoopInteger + 1;
if (FindDTM(CowHide, x, y, MSX1, MSY1, MSX2, MSY2)) then
begin
Mouse(x, y, 5, 5, false);
if (ChooseOption('ll')) then
begin
WriteLn('//Taking Hides from Bank.');
CloseBank;
findtalk;
break;
Wait(500 + Random(100))
end;
end;
until (LoopInteger >= 10)
if (LoopInteger >= 10) then
begin
Logout;
exit;
end;
FreeDTM(Coin);
FreeDTM(Cowhide);
end;
function WalkingOne: boolean;
begin
if not LoggedIn then Exit;
WriteLn('//To Hide Tanner Walking 1');
SetRun(True);
GetCactusColor;
RadialRoadWalk(CactusColor, 50, 120, 60, 1, -35);
Flag;
ToTanRoom;
if ToTanRoom then
begin
WriteLn('//Clicked TanRoom');
result := true
end;
end;
function WalkingTwo: boolean;
begin
if not LoggedIn then Exit;
WriteLn('//To Hide Tanner Walking 2');
SetRun(True);
if FindColorTolerance(x, y, RockColor, MMX1, MMY1, MMX2, MMY2, 25) then
begin
Mouse(x + 20, y - 15, 0, 0, true);
flag;
wait(1000);
ToTanRoom;
end;
if ToTanRoom then
begin
WriteLn('//Clicked TanRoom');
result := true
end;
end;
function WalkingThree: boolean;
begin
if not LoggedIn then Exit;
WriteLn('//To Hide Tanner Walking 3');
SetRun(True);
GetCactusColor;
RadialRoadWalk(CactusColor, 50, 120, 60, 2, -30);
Flag;
ToTanRoom;
if ToTanRoom then
begin
WriteLn('//Clicked TanRoom');
result := true
end;
end;
procedure ToHideTanner;
begin
if not LoggedIn then Exit;
case Random(3) of
0: WalkingOne;
1: WalkingTwo;
2: WalkingThree;
end;
end;
procedure TalkToEllis;
var
LoopInteger: Integer;
begin
if not LoggedIn then Exit;
LoopInteger := 0;
repeat
FindTalk;
LoopInteger := LoopInteger + 1
Wait(50 + Random(50));
if (FindColorTolerance(x, y, 5208536, MSX1, MSY1, MSX2, MSY2, 10)) then
begin
Mouse(x, y, 6, 6, false);
Wait(100 + Random(300));
if ChooseOption('ade') then
WriteLn('//Trading To Ellis');
Wait(3000 + Random(1000));
end;
until ((FindHideText) or (LoopInteger >= 50))
if (LoopInteger >= 50) then
begin
Logout;
exit;
end else
if ChooseOption('ll') then
closebank;
end;
procedure SetupClient;
begin
ActivateClient;
wait(1);
DeclarePlayers;
wait(1);
LoginPlayer;
end;
{====================]
Main-Loop
[====================}
begin
SetUpSRL;
SetUpClient;
repeat
GetCoinsAndHides;
repeat
ToHideTanner;
TalkToEllis;
ToBank;
Gethides;
proggy;
until ((Load >= Players[CurrentPlayer].Integers[0]) or (not (LoggedIn)))
Loads := 0;
if (Load >= Players[CurrentPlayer].Integers[0]) then
begin
CraftThatLeather;
logout;
NextPlayer(True);
end else
begin
logout;
NextPlayer(False);
end;
until (false);
end.