SCAR Code:
{start in bank top banker have iron and coal visible
reccomended for at least 2 players}
program alkharadsmelter;
{.include srl/srl.scar}
{.include srl/srl/skill/smithing.scar}
var
i, load, loads, done, x, wit, smith, y, coal, coalbnk, steelbar, iron:integer;
const
MySrlId=('');
MySrlPassword=('');
worldnumber=105;//world number
LampLevel= 'smithing'; //Set the skill you want a lamp to do.
loadstodoperlogin=6;//6 reccomended
scriptname='al kharad smelter';//don't touch
version='1.00';//don't touch
procedure declareplayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';//user
Players[0].Pass := '';//pass
Players[0].Nick := '';//3-4 letters of name in order except first
Players[0].pin := '0000';//pin
Players[0].Active := True;//use this player?
{Players[1].Name := 'username';//user
Players[1].Pass := 'password';//pass
Players[1].Nick := 'sern';//3-4 letters of name in order except first
Players[1].pin := '0000'//pin
Players[1].Active := True;//use this player?
Players[2].Name := 'username';//user
Players[2].Pass := 'password';//pass
Players[2].Nick := 'sern';//3-4 letters of name in order except first
Players[2].pin := '0000'//pin
Players[2].Active := True;//use this player?}
End;
procedure proggy;
begin
writeln(scriptname+'v'+version)
writeln('~~~~~~~~~~~~~~~~~~~~~~~~~~~') ;
writeln('current player'+players[currentplayer].name);
writeln('script ran for '+timerunning);
end;
procedure loadbitmap;
begin
wit := BitmapFromString(134, 132, 'beNrt1DEOgCAMBVBv' +
'5wVcvf8xdGOA2iCLou/FoVYiSb+4LIl9W0tR6vZp1QwXh+uTNyS3R' +
'yPctDTDXSZVjaJn7Fdzbvv92SUB5f0/JzJQD2RaffnVdevAzjL2Bx' +
'O5qgcS6TlTL09k7H9+dwhhIp1b/yoRAAAAAAAAAAAAAAAAAAAAAAA' +
'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL7vBM+giRc=' +
'');
coalbnk := BitmapFromString(84, 64, 'beNrt0c0KAVEAhuHjIiwsRDLN' +
'ggVmyPhJRDIlpUSIkBKllFJWsnLZvjo1Gzdg6n06TV9n954xplXOL' +
'YaVVejvJ/XjtHFddvTVNibheZ6+mUyyVMpW/bxOoZDWTcMv2qN9W3' +
'efh8H7HH6uYxM3Xd9R+HZcU+9l3r5veqdZU/lRu+OkovYgcLWjfA2' +
'91WPXj2n7oO7acCVHP1H7t13h9mjr3r6AHa/TKI7tAAAAAAAAAAAA' +
'AAAAAAAAAAAAAAAAAP7RF8AdMGA=');
smith := BitmapFromString(134, 132, 'beNrt10EKgCAQQNG5XRdo2/2PU' +
'aEgQ9FWJ3gPF7rt02QRx77d62ze+76CiXKFfsx7RVYVGSFGDkWqFT' +
'G1lhfJ80qRau9IzqGIqaXIY165/br9osgvviP56H+kyO33a3lKAAA' +
'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' +
'AAAAAMAMF9WTxs8=');
end;
procedure srlid2;
var
V: TVariantArray;
begin
SRLid:= MySRLId;
SRLpassword:= MySRLPassword;
begin
if (SRLID = '') or (SRLPassword = '') then
begin
ClearDebug;
if (MySRLPassword = '') and not(MySRLID = '') then writeln('Nice try, trying to trick it with just a ID ');
writeln('To set up a SRL stats ID go here: http://www.stats.srl-forums.com');
ThreadSafeCall('NoID', V);
TerminateScript;
end;
end;
end;
procedure NoID;
begin
Disguise('No more leeching');
ShowMessage('Please register at SRL-stats to use this script' +Chr(13)+
'To set up a SRL stats ID go here: '+Chr(13)+' http://www.stats.srl-forums.com'+Chr(13)+
+Chr(13)+' -sandos');
end;
Procedure Randoms;
begin
if (not(loggedin)) then exit;
If(FindFight)then
RunAway('N', True,1,15000);
FindNormalRandoms;
FindLamp((LampLevel));
end;
procedure antiban;
begin
if (not(loggedin)) then exit;
randoms;
wait(15000+random(4000));
hoverskill('smithing', false);
gametab(4);
end;
procedure loadtms;
begin
coal := DTMFromString('78DA63E4676260C862644006B6369A0C22401' +
'A24FA1F081839806AE250D54064612490FE07646513500332A79C' +
'801A31A09A42026AA4816A3208A89102AA49C0AF060091EF0926');
iron := DTMFromString('78DA638C62626050626440063EFACA601A26C' +
'AE80954A389AA06260B57130C54234E404D12508D24116AB408A8' +
'8900AA31C0AF0600E58903A9');
steelbar := DTMFromString('78DA63D46064607065400113DBDBC1342394C' +
'FA80F643930A001465435BA40960F0135D240961F013512409627' +
'01352A40962D01356A4056107E3500287204B3');
end;
procedure BEGGINING;
var
I,II:integer;
s:string;
begin
Disguise('Sig Call');
ChangeReportWidth(255);
Status('Signature call; Watch the report box!');
for I := 0 to 57 do
begin
clearreport;
for II := 0 to 5 do
Addtoreport(s+'||');
wait(30);
if I < 29 then s := s + ' ' else delete(s, Length(s), 1);
end;
for I := 1 to 29 do
begin
ClearReport;
AddtoReport(Left('---- _ _ ---- ', I));
AddtoReport(Left('----, | \ | |___o ---- ', I));
AddtoReport(Left('|| _ | .\| | \ || ', I));
AddtoReport(Left('---- / _ | |\ .|| \ \---- ', I));
AddtoReport(Left(' || (_| | | \ ||_/ / ||', I));
AddtoReport(Left('---- \__,_|_| \|___/ ---- ', I));
AddtoReport(Left('---- o ---- ',I));
wait(50);
end;
AddtoReport(ScriptName+' v'+Version);
end;
procedure open;
begin
if (not(loggedin)) then
begin
logout;
Players[CurrentPlayer].Active := False;
exit;
end;
begin
openbankfast('akb');
end;
end;
procedure enterpin;
begin
if (not(loggedin)) then exit;
begin
if pinscreen then inpin(players[currentplayer].pin);
end;
end;
procedure withdrawiron;
begin
if (not(loggedin)) then exit;
begin
makecompass('n');
if (findcolortolerance(x, y, 1910591, msx1, msy1, msx2, msy2, 10)) then
begin
mouse(x,y,3,3,false);
wait(50);
if (findbitmaptolerancein(wit, x, y, msx1, msy1, msx2, msy2, 20)) then
mouse(x,y,3,3,true);
wait(500);
typesend('9');
end else
begin;
closebank;
logout;
Players[CurrentPlayer].Active := False;
exit;
end;
end;
end;
procedure withdrawcoal;
begin
if (not(loggedin)) then exit;
if (findbitmaptolerancein(coalbnk, x, y, msx1, msy1, msx2, msy2, 20)) then
begin
mouse(x,y,3,3,false);
wait(50);
if (findbitmaptolerancein(wit, x, y, msx1, msy1, msx2, msy2, 20)) then
mouse(x,y,3,3,true);
wait(500);
typesend('18');
closebank;
end else
begin;
closebank;
logout;
Players[CurrentPlayer].Active := False;
exit;
end;
end;
function FindFurnaceColor: Integer;
var
i, Red, Green, Blue, GC, FurnaceColor: Integer;
P: TPointArray;
begin
GC := 6847874;
FFlag(0);
FindColorsSpiralTolerance(MMCX, MMCY, P, GC, MMX1, MMY1, MMX2, MMY2, 40);
for i:=0 to High(p)-1 do
begin
if rs_OnMinimap(P[i].x,P[i].y) then
begin
FurnaceColor := GetColor(P[i].x,P[i].y);
ColorToRGB(FurnaceColor, Red, Green, Blue);
if InRange(Red - Blue, 84, 61) then
if InRange(Red - Green, 64, 36) then
if InRange(Green - Blue, 29, 11) then
if GetColor(P[i].x + 2, P[i].y + 2) = FurnaceColor then
if GetColor(P[i].x + 1, P[i].y + 1) = FurnaceColor then
if GetColor(P[i].x, P[i].y + 2) = FurnaceColor then
if GetColor(P[i].x + 2, P[i].y) = FurnaceColor then
if GetColor(P[i].x, P[i].y + 1) = FurnaceColor then
if GetColor(P[i].x + 1, P[i].y) = FurnaceColor then
if GetColor(P[i].x + 2, P[i].y + 1) = FurnaceColor then
if GetColor(P[i].x + 1, P[i].y + 2) = FurnaceColor then
begin
Result := furnaceColor;
Writeln(' furnace Color = '+IntToStr(Result));
exit;
end;
end;
end;
WriteLn('Color could NOT be Found!');
Result := 0;
end;
function FindbankColor: Integer;
var
i, Red, Green, Blue, GC, BankColor: Integer;
P: TPointArray;
begin
GC := 6847874;
FFlag(0);
FindColorsSpiralTolerance(MMCX, MMCY, P, GC, MMX1, MMY1, MMX2, MMY2, 40);
for i:=0 to High(p)-1 do
begin
if rs_OnMinimap(P[i].x,P[i].y) then
begin
BankColor := GetColor(P[i].x,P[i].y);
ColorToRGB(BankColor, Red, Green, Blue);
if InRange(Red - Blue, 24, 30) then
if InRange(Red - Green, 4, 14) then
if InRange(Green - Blue, 15, 23) then
if GetColor(P[i].x + 2, P[i].y + 2) = BankColor then
if GetColor(P[i].x + 1, P[i].y + 1) = BankColor then
if GetColor(P[i].x, P[i].y + 2) = BankColor then
if GetColor(P[i].x + 2, P[i].y) = BankColor then
if GetColor(P[i].x, P[i].y + 1) = BankColor then
if GetColor(P[i].x + 1, P[i].y) = BankColor then
if GetColor(P[i].x + 2, P[i].y + 1) = BankColor then
if GetColor(P[i].x + 1, P[i].y + 2) = BankColor then
begin
Result := bankColor;
Writeln(' bank Color = '+IntToStr(Result));
exit;
end;
end;
end;
WriteLn('Color could NOT be Found!');
Result := 0;
end;
procedure walktofurnace;
begin
wait(200);
if (not(loggedin)) then exit;
wait(500+random(200));
makecompass('w');
if RadialWalk(1234345, 90, 127, 68, -1, 0) then
begin
wait(20000+(random(5000)));
end else
if (findfurnace(x,y)) then
exit;
begin
repeat
findsymbol(x, y, 'kebab shop');
mouse(x,y,3,3,true);
wait(20000);
I:=i+1;
until (findfurnace(x,y)) or (I>100);
end;
end;
procedure smelting;
begin
if (not(loggedin)) then exit;
begin
if findfurnace(x,y) then
begin
mouse(x,y,0,0,false)
chooseoption('melt');
wait(200);
if (findcolortolerance(x,y,7303032,msx1,msy1,msx2,msy2,20)) then
mouse(x,y,3,3,false);
if (findbitmaptolerancein(smith,x,y,275,641,615,547,20)) then
wait(200);
mouse(x,y,3,3,true);
wait(300)
typesend('9');
wait(5000);
randoms;
wait(5000);
randoms;
wait(5000);
randoms;
antiban;
wait(5000);
randoms;
wait(5000);
randoms;
wait(5000);
end else
logout;
exit;
end;
end;
procedure walktobank;
begin
if (not(loggedin)) then exit;
begin
wait(500+random(200));
begin
makecompass('w');
RadialWalk(1234345, 287, 274, 65, -1, 0);
wait(20000);
if not (findcolortolerance(x,y,5341854,msx1,msy1,msx2,msy2,15)) then
findsymbol(x,y,'bank');
mouse(x,y,1,1,true);
end;
end;
end;
begin
declareplayers;
beggining;
wait(1500);
addtoreport('start time:'+thetime);
srlid2;
setupsrl;
wait(2000);
srlrandomsreport;
loadtms;
loadbitmap;
disguise(scriptname+'v'+version);
status('loaded bitmaps getting ready to start');
activateclient;
wait(1000);
if (not(loggedin)) then
loginplayer;
repeat
randoms;
repeat
open;
enterpin;
wait(100+random(200));
withdrawiron;
withdrawcoal;
randoms;
walktofurnace;
randoms;
smelting;
randoms;
walktobank;
load:=done+1;
until (not(loggedin)) or (load>loadstodoperlogin);
nextplayer(true);
until (AllPlayersInactive);
proggy;
end.