SCAR Code:
program TheWorld16AirRunner; //By JackLKrawl
{Credits Especially to King of Knives and Tarajunky, and to all those who helped
the many times I was having trouble}
const
LoadsToDo=0; // <- How many loads you want to do
Friend=64768; // <- Ignore this
Trader='JackLKrawl'; // <- Change to the kid you're trading, or it will trade me
var
LoadsDone: integer; x, y: integer; REss, PEss, NREss, NPEss, Gold: integer;
a, b, BankFE: integer; Altar: integer; I, Tree, Tree1, Ruins, Talisman: integer;
C, Z: integer; az: integer; D, O, Q: integer;
{.Include SRL/SRL.scar}
{.Include SRL/SRL/misc/Trade.scar}
procedure DeclarePlayers;
begin
HowManyPlayers := 5;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := 'jacklkrawl'; // This is just an example, so a lol at anyone who attempted
Players[0].Pass := 'kastadaneru'; //to hijack my account, and sorry to those of you with the honesty to PM me about this.
Players[0].Nick := 'klk'; //I should have put this message in to begin with.
Players[0].Active := True;
Players[0].Integers[0] := 5 //Loads for this character to do
Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';
Players[1].Active := False;
Players[1].Integers[0] := 5 //Loads for this character to do
Players[2].Name := '';
Players[2].Pass := '';
Players[2].Nick := '';
Players[2].Active := False;
Players[2].Integers[0] := 5 //Loads for this character to do
Players[3].Name := '';
Players[3].Pass := '';
Players[3].Nick := '';
Players[3].Active := False;
Players[3].Integers[0] := 5 //Loads for this character to do
Players[4].Name := '';
Players[4].Pass := '';
Players[4].Nick := '';
Players[4].Active := False;
Players[4].Integers[0] := 5 //Loads for this character to do
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
end;
procedure TypeSend2(Text: string);//Original by Mutant Squirrle
var //Difference
i: Integer; //A grand rip-off!
Shift: Boolean; //Actually, it uses a delete before "sending"
begin //So it appears that the typist has keyboard
for i := 1 to Length(Text) do //issues.
begin
Shift := (Text[i] = ':') or (Text[i] = '!') or (Text[i] = '+') or
(Text[i] = '?') or (Text[i] = '<') or (Text[i] = '>') or
(Text[i] = '@') or (Text[i] = '#') or (Text[i] = '$') or
(Text[i] = '&') or (Text[i] = '%') or (Text[i] = '*');
if (Shift) then
begin
KeyDown(VK_Shift);
Wait(5 + Random(20));
end;
TypeByte(GetKeyCode(Text[i]));
if (Shift) then
begin
KeyUp(VK_Shift);
Wait(5 + Random(20));
end;
Wait(50 + Random(120));
end;
Wait(200 + Random(500));
TypeByte(14);
TypeByte(13);
end;
function FindFaladorGrass: Integer; //Ripped from Tarajunky's autocolor water...
var //Will make my own in the next version.
GC, a, l, TestColor, Red, Green, Blue, FaladorGrass : integer;
var
P:array of Tpoint;
begin
GC := 2662783;
Flag;
FindColorsSpiralTolerance(MMCX, MMCY, P, GC, MMX1, MMY1, MMX2, MMY2, 50);
l:=GetArrayLength(P);
for a:= 0 to l-1 do
begin
if rs_OnMinimap(P[a].x,P[a].y) then
begin
TestColor := GetColor(P[a].x,P[a].y);
if SimilarColors(TestColor,GC,50) then
begin
red := (TestColor mod 256);
green := ((TestColor / 256) mod 256);
blue := ((TestColor / 256) / 256);
if Green - Red <= 35 then if Green - Red >= 30 then
if Green - Blue <= 125 then if Green - blue >= 110 then
if Red - Blue <= 95 then if Red - Blue >= 77 then
if GetColor(P[a].x + 2, P[a].y + 2) = TestColor then
if GetColor(P[a].x + 1, P[a].y + 1) = TestColor then
if GetColor(P[a].x, P[a].y + 2) = TestColor then
if GetColor(P[a].x + 2, P[a].y) = TestColor then
if GetColor(P[a].x, P[a].y + 1) = TestColor then
if GetColor(P[a].x + 1, P[a].y) = TestColor then
if GetColor(P[a].x + 2, P[a].y + 1) = TestColor then
if GetColor(P[a].x + 1, P[a].y + 2) = TestColor then
begin
Result := TestColor;
FaladorGrass := TestColor;
WriteLn('FaladorGrass = ' + IntToStr(TestColor));
Exit;
end;
end;
end;
end;
WriteLn('Could not find the Falador Grass!');
Result := 0;
end;
function FindFastRandoms: Boolean; //by WT-Fawaki
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: RC;
end;
Wait(1);
end;
end;
{Function GetAuthorOfText(Msg: String): String; //By King of Knives
var //THIS WILL BE ADDED IN NEXT
a,b: Integer; //VERSION
begin
if FindText(a,b,Msg,SmallChars,MCx1,MCy1,MCx2,MCy2) then
begin
Result:= Trim(GetTextAtEx(11,b,150,SmallChars,False,false,0,1,0,13,false,Tr_AllChars))
Delete(Result,Length(Result),1)
end;
end; }
procedure AntiRandoms;
begin
If(not(loggedin))then
begin
exit;
end else
begin
FindFastRandoms;
FindNormalRandoms;
end;
end;
procedure AntiBans;
begin
antirandoms;
Case Random(5) of
0: RandomMovement; //by Krazy_Meerkat
1: PickUpMouse; //by Dark_Sniper
2: AlmostLogout; //by Yakman
3: RandomRClick; //by Phantombmx
4: RandomMovement; //by Krazy_Meerkat
end;
end;
procedure Login;
begin
If(not(loggedin)) then
nextplayer(true)
loginplayer
end;
procedure BankToOutside;
begin
BankFE := DTMFromString('78DA6354676060506000036608C5F0E6CD1B8' +
'6FF409A1188FF0301A30C90A1C98002FEFC61624881AA01014605' +
'FC6AC0588508351A44A8D125428D21613500C726182D');
MakeCompass('n');
HighestAngle;
if DTMRotated(BankFE,x,y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x,y,1,1,true);
RadialRoadWalk(FindFallyRoadColor, 220, 200, 58, 0, 0);
Flag;
RadialRoadWalk(FindFallyRoadColor, 195, 170, 50, 0, 0);
Flag;
RadialRoadWalk(FindFallyRoadColor, 213, 180, 55, 0, 0);
Flag;
RadialRoadWalk(FindRoadColor, 150, 90, 30, 0, 0);
Flag;
RadialRoadWalk(FindFaladorGrass, 150, 90, 55, 0, 0);
exit;
end;
if not(DTMRotated(BankFE,x,y, MMX1, MMY1, MMX2, MMY2)) then
writeln('Bad DTM/Not in Falador East Bank');
break;
end;
end;
Procedure EnterAltar;
begin
Altar := DTMFromString('78DA6354666060D0604001F6B6360C5C409A1' +
'188FF0301231B90C18FAAC6DC580FAE0604182D80842DAA1A6303' +
'5D54353A404206558D9A921CAA1A29206188AAC6D0D208450D00F' +
'2C20883');
Talisman := DTMFromString('78DA637464626078C4800226B4B531F002694' +
'620FE0F048CE64035EF18D000231209A49D816A6E1050E30B5473' +
'9B801A07A09A4F04D47802D5DC21A0C605A8E6167E350056FF0DC' +
'8');
if (DTMRotated(Altar, x, y, MSX1, MSY1, MSX2, MSY2)) then
begin
MMouse(x,y,1,1);
if isuptext('ysterious') and isuptext('nter') then
begin
GetMousePos(x,y);
Mouse(x,y,1,1,true);
exit;
end;
if DTMRotated(Talisman, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x,y,1,1,false);
If FindChatText('uins') then
begin
DTMRotated(Talisman, x, y, MSX1, MSY1, MSX2, MSY2);
Mouse(x,y,1,1,true);
wait(200+random(300));
DTMRotated(Altar, x, y, MSX1, MSY1, MSX2, MSY2);
Mouse(x,y,1,1,true);
exit;
end;
end else;
Writeln(Players[CurrentPlayer].Name + ' is now logging out due to failure in EnterAltar');
Logout;
NextPlayer(True);
LoginPlayer;
end;
end;
procedure FindTrader;
begin
if FindColorTolerance(x, y, Friend, MMX1, MMY1, MMX2, MMY2, 15) then
begin
Mouse(x,y,1,1,true);
Flag;
Mouse(242, 162, 1, 1, false);
end;
end;
procedure TradeTrader;
begin
NPEss := DTMFromString('78DA6314616060E0654001FBB66C619003D28' +
'C40FC1F081879800C190634C0884402695620214F408D0290E020' +
'A0461A4888E157030001F80715');
NREss := DTMFromString('78DA63B4656060E0634001D545450C72409A1' +
'188FF0301A3099021C5800618914820AD0724E409A8F10012EC44' +
'A821648E359010435511E2EB8BA20600F6200865');
PEss := DTMFromString('78DA63CC646060E067400173274D629003D28' +
'C40FC1F0818C3810C110634C0884402E92C20C146404D31901022' +
'C21C45FC6A006B85084D');
REss := DTMFromString('78DA639CC2C0C0C0CB8002CAF3F318E480342' +
'310FF0702C66620439A010D30229140BA1D48701050331B48F011' +
'5033154828E05703007D9F08A9');
Mouse(x,y,3,3,false);
Chooseoption('Trade with '+Trader);
Antibans;
repeat
wait(75+random(50));
C:=C+1
If DTMRotated(x,y,NREss, MSX1, MSY1, MSX2, MSY2) then
begin
DTMRotated(x,y,REss, MIX1, MIY1, MIX2, MIY2);
Mouse(x,y,2,2,false);
ChooseOption('ll');
exit;
end;
If DTMRotated(x,y,NPEss, MSX1, MSY1, MSX2, MSY2) then
begin
DTMRotated(x,y,PEss,MIX1, MIY1, MIX2, MIY2);
Mouse(x,y,2,2,false);
ChooseOption('ll');
exit;
end;
until (C = 500) or (FindChatText('declined trade.'));
end;
procedure AcceptorDeclineVerification;
begin
NPEss := DTMFromString('78DA631464606010614001F565650CBF80342' +
'310FF07024661204396010D302291409A1548B012A1469E801A39' +
'20C18E5F0D000DB00718');
NREss := DTMFromString('78DA63B4666060106140019141410CBF80342' +
'310FF0702463B204386010D30229140DA0948481150E301241408' +
'A8D107129CF8D50000358F07A7');
REss := DTMFromString('78DA63EC636060106140019141410CBF80342' +
'310FF0702C66940063B031A604422817433909021A06616116A40' +
'E6F0E0570300D2DD0925');
PEss := DTMFromString('78DA634C656060106640012D55550CBF80342' +
'310FF0702C60820438A010D302291403A1748701050930D241408' +
'A88901129CF8D50000C6AD08CC');
Gold := DTMFromString('78DA6314636060E0604001E7578831C801694' +
'620FE0F048C6C400627031A60442281B43290E021A0461C48F013' +
'502301249808A8E121C21C2E20C1825B0D2B10030066840686');
Antibans;
repeat
C:=C+1
wait(100+random(200));
if DTMRotated(x,y,gold,MSX1, MSY1, MSX2, MSY2) then
begin
O:=O+1;
Q:=Q+1;
Accept;
case random(18) of
0:typesend('thankyou');
1:typesend('thanks');
2:typesend('tyvm');
3:typesend('thnakyou');
4:typesend('tyvm =]');
5:typesend('thx');
6:wait(random(300));
7:wait(random(300));
8:begin
Typesend(inttostr(Players[currentplayer].integers[0]-az) + ' loads left =/');
writeln(inttostr(Players[currentplayer].integers[0]-az) + ' loads left on this char til switching.');
end;
9:typesend('thanks man');
10:typesend('thanks a lot');
11:typesend('yay, lets walk some..more');
12:wait(random(500));
13:wait(random(600));
14:typesend2('thanksd');
16:typesend2('thankyouu');
17:typesend2('be back again in a secx');
end;
break;
end;
if not(DTMRotated(x,y,gold,MSX1, MSY1, MSX2, MSY2)) then
begin
O:=O+1;
Decline;
D:=D+1;
repeat
FindTrader;
TradeTrader;
AcceptorDeclineVerification;
Z:=Z+1;
until Z=3;
exit;
end;
if C = 5 then
begin
O:=O+1;
D:=D+1;
Decline;
repeat
FindTrader;
TradeTrader;
AcceptorDeclineVerification;
Z:=Z+1;
until Z=3;
exit;
end;
until C=15;
end;
procedure AltarToBank;
begin
MakeCompass('n');
HighestAngle;
Antibans;
Mouse(601,127,1,1,true);//Yeah yeah, what this does is click so you will be
wait(100+random(100)); //Within range of the portal.
repeat // -----By King of Knives
if FindObj(a,b,'ortal',10733771,15) then
begin
Mouse(a,b,0,0,true)
FFlag(0);
Break;
Wait(5000+random(5000))
end;
Wait(10+random(10))
Inc(I)
until(I >= 2500) //------By King of Knives
RadialRoadWalk(FindRoadColor, 158, 144, 42, 0, 0);
wait(3500+random(500));
RadialRoadWalk(FindRoadColor, 46, 53, 70, 0, 0);
RadialRoadWalk(FindRoadColor, 346, 355, 64, 0, 0);
RadialRoadWalk(FindRoadColor, 355, 368, 65, 0, 0);
RadialRoadWalk(FindFallyRoadColor, 352, 360, 65, 2, 0);
RadialRoadWalk(FindFallyRoadColor, 349, 360, 65, 0, 0);
BankFE := DTMFromString('78DA6354676060506000036608C5F0E6CD1B8' +
'6FF409A1188FF0301A30C90A1C98002FEFC61624881AA01014605' +
'FC6AC0588508351A44A8D125428D21613500C726182D');
if DTMRotated(BankFE,x,y, MMX1, MMY1, MMX2, MMY2) then
begin
writeln('You are now entering the bank!');
Mouse(x,y,1,1,true);
LoadsDone:=LoadsDone+1;
OpenBankFast('feb');
if FindDTM(x,y,REss, MIX1, MIY1, MIX2, MIY2) then //For Left-Overs
begin //In case something odd happens.
Mouse(x,y,1,1,false);
ChooseOption('Store All');
end;
if FindDTM(x,y,PEss, MIX1, MIY1, MIX2, MIY2) then //For Left-Overs
begin //In case something odd happens.
Mouse(x,y,1,1,false);
ChooseOption('Store All');
end;
if FindDTM(x,y,NREss,MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x,y,1,1,false);
ChooseOption('Store All');
end;
if FindDTM(x,y,NPEss,MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x,y,1,1,false);
ChooseOption('Store All');
end;
if FindDTM(x,y,REss, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x,y,1,1,false);
ChooseOption('Withdraw X');
Typesend('25');
end else;
if FindDTM(x,y,PEss, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x,y,1,1,false);
ChooseOption('Withdraw X');
Typesend('25');
end;
end;
end;
Procedure Proggy;
begin
writeln('Did ' + inttostr(LoadsDone)+' out of ' +inttostr(LoadsToDo));
writeln('Ran for ' + TimeRunning);
writeln('Accepted '+inttostr(Q) + ' Times');
writeln('Traded ' +inttostr(O) + ' Times');
writeln('Declined '+inttostr(D) + ' Times');
end;
Procedure TimeToSwitchPlayers;
begin
if (az = Players[currentplayer].Integers[0]) then
begin
az:=0;
Logout;
NextPlayer(True);
end;
end;
begin
SetupSRL;
FindRS;
ActivateClient;
DeclarePlayers;
LoginPlayer;
az:=0;
repeat
BankToOutside;
EnterAltar;
FindTrader;
TradeTrader;
AcceptorDeclineVerification;
AltarToBank;
az:=az+1;
TimeToSwitchPlayers;
Proggy;
until (LoadsDone=LoadsToDo);
end.
I tried to use this, except it doesn't love me very much.