SCAR Code:
program New;
{.include SRL\SRL.scar}
// Thanks to Nielsie95 for helping me get the road colors =D
const
GPColor = 2149883; //The color of the coins in your bank
BankSymbolColor = 5691881; // The color of the bank symbol on the MiniMap(this is a failsafe)
var mage, Bankx, Banky, bankofrs, Eyes, Loads, Gp: integer;
var Lost: Boolean;
procedure DeclarePlayers;
begin
HowManyPlayers := 3;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := ''; //3 - 4 letters of YOUR username, example: zima
Players[0].Active := True;
Players[0].Integer1 := 100; //Amount of loads
Players[0].String1 := 'Mining'; //What skill to pick for lamp
Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := ''; //3 - 4 letters of YOUR username, example: zima
Players[1].Active := True;
Players[1].Integer1 := 100; //Amount of loads
Players[1].String1 := 'Mining'; //What skill to pick for lamp
Players[2].Name := '';
Players[2].Pass := '';
Players[2].Nick := ''; //3 - 4 letters of YOUR username, example: zima
Players[2].Active := True;
Players[2].Integer1 := 100; //Amount of loads
Players[2].String1 := 'Mining'; //What skill to pick for lamp
end;
procedure LoadBmps;
begin
mage := BitmapFromString(159, 19, 'z78DAED9B4D72C2300C85AF4' +
'49B4C07F694FB1FA933D0058C23E59365D972208B2C52D7C87AEF' +
'593F71D6F3F2BB2C6BDCFDB29E9675F0BDB4EA67B92EDFE23DDA2' +
'7FD3DD367451F3EF4F4CC5191BAFFFAED76397FDD1EF714186563' +
'ECFB2857B2675E3EBC8D724FF76B185219624D06FDCE1267F3F3A' +
'160787977ED4E09308A53EE8697F43187D0AFCE16DD1BD344DB38' +
'E506C7A6C7F5828543B984BD0D182E70EC6161B472FFE72763F2E' +
'8B74AC5125BCA2B69754F343BAD720DD926B090B01731BCCA5748' +
'B36EE596B1A6FC6B52E51A3DBCC38A9ED1B64E3BEFA9DC2A0B072' +
'897A3D354B9FABDA7722B73984699463AE556F101E5FF432B7DC2' +
'B71223B1C6C1F37BC688B564152E864A4DE53079625DB567FC0B7' +
'67C9EAAFDCA5517D7AD97DB86D12FF7F092FF88874DFD40FC23D6' +
'B9A0D2218ADBA8861C63EA7AC8AE4A0D441FC92764BD561FA25D0' +
'E6341B21D8294F45BFA93704EAACAAD5328C9513D7EB02AD7AC14' +
'EB3CD66CD95F8FF35DB763878A67D7D1CF5D6C11F2404F4ED2809' +
'3C22EADEFDE6D15DA2A376BA05C6B761DAD5C151D52D592FD3C42' +
'B924464CA35C3C32B37239BEC7502EC9B85A2997D40B9EB73FD6D' +
'E4B63F4BB28F4A3DCA32A97C450F25FE4570C638A3EE14E9C72F4' +
'A6FC752E1F63ED45FBB3EBBA4E17B7E1799E56CADDC108205B8E8' +
'FC34EAF973D7E207D48D4B520FF55F4C3C9CCE23CB8E344A2AD79' +
'BDEAFB625DE9FA18AB2524BBD67BCB3A7644BF27706DD8507A43B' +
'013E57502CA7CBCCED51D1FAAD8110E10CF101CBBBE6BAB9BC7A3' +
'DC566FD6929D659DE6A48771EDE2BAFC6FED0FCD870DAB2256547' +
'59AF1B9C34F32A8C9BED178B6109C7FEEAADC8E7C403D87B19A1D' +
'CA879727BA25712B32465B5EF56C2015770EB60B82D65E846BA54' +
'3F9B0A3DC56D176723EA4F8F2D7784A1C553D01DF55EDD8D6050B' +
'4F7DDA2C5E74E18358398ED56C323EA450AEE76BCAB813EFD6D3B' +
'0B37CE5FAE1C3B47CF803664A111E');
bankofrs := BitmapFromString(156, 18, 'z78DAED9B4D72C3200C8' +
'5AFE4D69E4EB26F7DFF237526D990A112EFE90FD271165E10EC08' +
'E97D028173DC8F6D3F8EE7F5B6FFEC3B7DFDDABFF74FF12ADDD5F' +
'E6EF6D56639320ACFB5D203B17EBBF4B08C1ECEF37EFB38F5EBF3' +
'F92F2D8511416C73298A8C0BFDEB0B9038F0A18DD949841A35F0E' +
'E79FB71EFF6F8B463DFBA4FFF6D8D3E25AB0691C263E1E0B4D20F' +
'E93EF4CCAD25F9AA1F05416B9A1E4AFD002890D067B2C606F6244' +
'784E6347B36B1F9506D5F9FD0D6F37DCBA28406F9C4C869F95C20' +
'DA531291599C0E6693584E3D356C891220ABD6243483535B8D03D' +
'C15555BBDE4D2C6DBE2EF761161EB5FD7EACBE119293A2F1E3031' +
'DE3F41B2471A69A536206FE31AD07B02B9DAD5BF84533DAB13359' +
'1BFB6127C3EE82FF850A70FCA18E48C8C788698FB602224C6D9F9' +
'B75E1B221DAA06FAACCEEE7EA4F44FE374B0BF14B5D672AC7B915' +
'918F7A4D49F2554B49CA4206A4D22F9DF1FD3746DA867106C4DE4' +
'514B587B1AA73675E9991CB24A8D8587BBC1B84C6B1E3FA783BD9' +
'484DA368AAF446DA8B91AE734402D703B94E1A7722AAE3D6C5691' +
'9C8AED6E4EE9FA3494537F06C6D7A561EDEA1A065987EB4FF0731' +
'AA50A62A4E4FE522CA79E1D86BC7DA41AEDB1B47A6AC6947319B2' +
'AA657D65D3061E7D681F09B6C4B812C0476ADA07D6499754F4477' +
'B73EFA67E90B380C113846C89FF2E3B2EC94B6CAD3AB00D98858D' +
'9105DAFB6FF19E90A2586D08FDF5DA139FC5104BE8F9111F29C26' +
'9DB27EAC4C77F96E43F0BEB4FC4F2DE174D3E71F3734A8FF4D203' +
'F98E41801EFCEF9964BFDD1DF5EE7406A1B86D258486717AE9218' +
'F539B1EDE252ED2BDFEF7492AFF7991406B30A1971E3238F5EBA1' +
'322EB1CF5FE1BF54364EF3287E2F4EFF9D1EC46AD4AF079BC7DAA' +
'7CD8A0B9251B3555DC9E90AE3BAF4304B0FFE7F17CECDD273679F' +
'A8FA488A8E8DE84A4E2F3D94E8E117491104CD');
end;
procedure AntiRandoms;
begin
FindNormalRandoms;
FindLamp(Players[CurrentPlayer].String1);
end;
procedure StartBank;
begin
Bankx := 105 + random(5);
Banky := 175 + random(5);
repeat
MMouse(Bankx, Banky, 5, 5);
Banky := Banky + 10;
Wait(100);
if (Banky > 363) then
begin
Bankx := Bankx + 50;
Banky := 175;
end;
until (IsUpText('Bank booth') = True);
Mouse(Bankx, Banky, 1, 1, False);
Wait(1000 + Random(500));
ClickOption('Use-quickly', 1);
repeat
Wait(500);
until (FindBitmap(bankofrs, x, y));
FindColorTolerance(x, y, GPColor, 69, 63, 465, 294, 10);
Mouse(x, y, 1, 1, False);
wait(100 + random(100));
ClickOption('Withdraw X', 1);
wait(1000 + random(200));
TypeSend('1000');
Wait(200 + random(500));
CloseBank;
end;
procedure Walk2Shop;
begin
PerfectNorth;
Setrun(True);
if (not (RadialRoadWalk(FindFallyRoadColor, 270, 180, 50, 1, 1))) then
begin
Mouse(MMCX - 20, MMCY + 40, 5, 5, True);
Flag;
end;
AntiRandoms;
Flag;
if (not (RadialRoadWalk(FindFallyRoadColor, 200, 160, 50, 1, 1))) then
begin
Mouse(MMCX, MMCY + 50, 5, 5, True);
Flag;
end;
AntiRandoms;
Flag;
if (not (RadialRoadWalk(FindFallyRoadColor, 200, 160, 50, 1, 1))) then
begin
Mouse(MMCX + 10, MMCY + 50, 5, 5, True);
Flag;
end;
AntiRandoms;
Flag;
FindRoadColor;
if (not (RadialRoadWalk(RoadColor, 90, 200, 50, 1, 1))) then
begin
Mouse(MMCX, MMCY + 50, 5, 5, True);
Flag;
end;
AntiRandoms;
Flag;
if (not (RadialRoadWalk(RoadColor, 120, 200, 50, 1, 1))) then
begin
Mouse(MMCX, MMCY + 50, 5, 5, True);
Flag;
end;
AntiRandoms;
Flag;
if (not (RadialRoadWalk(RoadColor, 120, 200, 50, 1, 1))) then
begin
Mouse(MMCX + 20, MMCY + 50, 5, 5, True);
Flag;
end;
AntiRandoms;
Flag;
if (not (RadialRoadWalk(RoadColor, 120, 200, 50, 1, 1))) then
begin
Mouse(MMCX + 20, MMCY + 50, 5, 5, True);
Flag;
FindSymbol(x, y, 'magic shop');
Mouse(x, y, 1, 1, True);
Flag;
repeat
FindColorTolerance(x, y, 3801403, 0, 0, 492, 324, 5);
MMouse(x, y, 1, 1);
Wait(100 + random(100));
until (IsUpText('Betty') = True);
Mouse(x, y, 1, 1, False);
Wait(100 + random(200));
ClickOption('Trade', 1);
repeat
Wait(500);
x := x + 1;
if (x = 20) then
begin
repeat
FindColorTolerance(x, y, 3801403, 0, 0, 492, 324, 5);
MMouse(x, y, 1, 1);
Wait(100 + random(100));
until (IsUpText('Betty') = True);
Mouse(x, y, 1, 1, False);
Wait(100 + random(200));
ClickOption('Trade', 1);
end;
until (FindBitmap(mage, x, y) = True);
exit;
end;
AntiRandoms;
Flag;
RadialRoadWalk(RoadColor, 90, 180, 50, 1, 1);
Flag;
AntiRandoms;
RadialRoadWalk(RoadColor, 220, 180, 50, 1, 1);
Flag;
AntiRandoms;
RadialRoadWalk(RoadColor, 270, 180, 50, 1, 1);
Flag;
AntiRandoms;
FindSymbol(x, y, 'magic shop');
Mouse(x, y, 1, 1, True);
Flag;
repeat
FindColorTolerance(x, y, 3801403, 0, 0, 492, 324, 5);
MMouse(x, y, 1, 1);
Wait(100 + random(100));
until (IsUpText('Betty') = True);
Mouse(x, y, 1, 1, False);
Wait(100 + random(200));
ClickOption('Trade', 1);
repeat
Wait(500);
x := x + 1;
if (x = 20) then
begin
repeat
FindColorTolerance(x, y, 3801403, 0, 0, 492, 324, 5);
MMouse(x, y, 1, 1);
Wait(100 + random(100));
until (IsUpText('Betty') = True);
Mouse(x, y, 1, 1, False);
Wait(100 + random(200));
ClickOption('Trade', 1);
end;
until (FindBitmap(mage, x, y) = True);
end;
procedure Buy;
begin
FindColorTolerance(x, y, 11737620, 0, 0, 515, 334, 10);
Mouse(x, y, 1, 1, False);
ClickOption('Buy 10', 1);
Wait(100 + random(200));
Mouse(x, y, 1, 1, False);
ClickOption('Buy 10', 1);
Wait(100 + random(200));
Mouse(x, y, 1, 1, False);
ClickOption('Buy 10', 1);
Wait(100 + random(200));
Mouse(485, 40, 1, 1, True);
end;
procedure Walk2Bank;
begin
FindRoadColor;
if (not (RadialRoadWalk(RoadColor, 0, 90, 50, 1, 1))) then
begin
Mouse(MMCX + 30, MMCY - 50, 5, 5, True);
Flag;
end;
AntiRandoms;
Flag;
if (not (RadialRoadWalk(RoadColor, 300, 390, 50, 1, 1))) then
begin
Mouse(MMCX - 40, MMCY - 50, 5, 5, True);
Flag;
end;
AntiRandoms;
Flag;
if (not (RadialRoadWalk(RoadColor, 270, 390, 50, 1, 1))) then
begin
Mouse(MMCX - 50, MMCY, 5, 5, True);
Flag;
end;
AntiRandoms;
Flag;
if (not (RadialRoadWalk(RoadColor, 300, 390, 50, 1, 1))) then
begin
Mouse(MMCX, MMCY - 50, 5, 5, True);
Flag;
end;
AntiRandoms;
Flag;
if (not (RadialRoadWalk(RoadColor, 300, 390, 50, 1, 1))) then
begin
Mouse(MMCX, MMCY - 50, 5, 5, True);
Flag;
end;
AntiRandoms;
Flag;
RadialRoadWalk(RoadColor, 300, 390, 50, 1, 1);
Flag;
AntiRandoms;
RadialRoadWalk(RoadColor, 300, 390, 50, 1, 1);
Flag;
AntiRandoms;
if (not (RadialRoadWalk(FindFallyRoadColor, 330, 370, 50, 1, 1))) then
begin
Mouse(MMCX, MMCY - 50, 5, 5, True);
Flag;
end;
AntiRandoms;
Flag;
if (not (RadialRoadWalk(FindFallyRoadColor, 330, 370, 50, 1, 1))) then
begin
Mouse(MMCX, MMCY - 50, 5, 5, True);
Flag;
end;
AntiRandoms;
Flag;
if (not (RadialRoadWalk(FindFallyRoadColor, 330, 370, 50, 1, 1))) then
begin
Mouse(MMCX, MMCY - 50, 5, 5, True);
Flag;
end;
AntiRandoms;
Flag;
if (not (FindSymbol(x, y, 'bank'))) then
begin
if (not (FindColorTolerance(x, y, 5691881, MMX1, MMY1, MMX2, MMY2, 10))) then
begin
Lost := True;
Exit;
end;
end;
Mouse(x, y, 1, 1, True);
Flag;
end;
procedure EndBank;
begin
Bankx := 105 + random(5);
Banky := 175 + random(5);
repeat
MMouse(Bankx, Banky, 5, 5);
Banky := Banky + 10;
Wait(100);
if (Banky > 363) then
begin
Bankx := Bankx + 50;
Banky := 175;
end;
until (IsUpText('Bank booth') = True);
Mouse(Bankx, Banky, 1, 1, False);
Wait(1000 + Random(500));
ClickOption('Use-quickly', 1);
repeat
Wait(500);
until (FindBitmap(bankofrs, x, y));
FindColorTolerance(x, y, 11737620, 559, 209, 625, 230, 10);
Mouse(x, y, 5, 5, False);
PopUp('Store All');
Wait(200 + random(500));
FindColorTolerance(x, y, GPColor, 559, 209, 625, 230, 10);
Mouse(x, y, 5, 5, False);
PopUp('Store All');
Wait(200 + random(500));
CloseBank;
end;
procedure ProggyReport;
begin
Eyes := Loads * 28;
Gp := Eyes * 3;
Writeln('----------Crapkillers Eye of Newt Buyer----------');
Writeln('Worked for ' + TimeRunning);
Writeln('Bought ' + IntToStr(Loads) + ' Loads of Eyes');
Writeln('Bought About ' + IntToStr(Eyes) + ' Eye of Newts');
Writeln('Spent about ' + IntToStr(Gp) + ' Coins');
Writeln('-------------------------------------------------');
SRLRandomsReport;
end;
begin
SetupSRL;
DeclarePlayers;
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
LoginPlayer;
Lost := False;
ActivateClient;
Wait(3000);
PerfectNorth;
LoadBmps;
repeat
repeat
PerfectNorth;
AntiRandoms;
StartBank;
Walk2Shop;
if (Lost = True) then Break;
Buy;
Walk2Bank;
if (Lost = True) then Break;
EndBank;
Loads := Loads + 1;
ProggyReport;
until (Loads = Players[CurrentPlayer].Integer1);
if (Lost = True) then
begin
Writeln(Players[CurrentPlayer].Name + ' is lost, switching to next player...');
NextPlayer(False);
end;
if (Lost = False) then
begin
Writeln(Players[CurrentPlayer].Name + ' has finished his/her loads, switching players...');
if (Players[CurrentPlayer].Active = True) then NextPlayer(True);
if (Players[CurrentPlayer].Active = False) then NextPlayer(False);
end;
until (False);
end.