traveler
2010-11-06 22:49:16
How Long have You Played Runescape?
5 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
Java, C++, php
Are you a member of any other communities?
no
Tell us about yourself…
Please show us one (or multiple) of your scripts.
5 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
Java, C++, php
Are you a member of any other communities?
no
Tell us about yourself…
From: traveler
My name is Matthew. Just an average guy. Loves anythings to do with computers. I am A+ certified, was going to become Network+ certified, but decided against it. Currently in college, going for computer engineering. Use to play soccer competitively, but quit after high school. Thats basically it.
Please show us one (or multiple) of your scripts.
program smelter;
{$i srl/srl/misc/smart.scar}
{$i srl/srl.scar}
{$i srl/srl/skill/smithing.scar}
//*******************************\\
// Trav's Al Kharid Smither \\
//*******************************\\
// Setup \\
// Fill in lines 58-69 \\
// Start in bank \\
// Hit The Start Button \\
//*******************************\\
// To-Do List \\
// 1.Anything you want to see? \\
//*******************************\\
type
SmithOptions = record
BarsTotal,Ore1Ammount,BarsToDo,LoadsTotal,Time:Integer;
Exp:Extended;
Bar,Ore1,Ore2:string;
Debug:Boolean;
end;
const
//stats consts
Stats_Link = 'http://scriptmanager.freehostia.com/submit.php';
SRL_BARS = 1;
SRL_EXP = 2;
SRL_LVL = 3;
SRL_BRONZE = 4;
SRL_IRON = 5;
SRL_STEEL = 6;
SRL_MITHRIL = 7;
SRL_SILVER = 8;
SRL_GOLD = 9;
SRL_ADDY = 10;
SRL_RUNE = 11;
SRL_CBALL = 12;
Script_Version = '1.5';
var
Options: array[0..9] of SmithOptions;
Loads,TimeMark:Integer;
StatsTime,Bars,Random1,I:Integer;
version,Stats_UserID, Stats_Password, Stats_ScriptID: string;
Stats_LastTime: Integer;
Stats_CustomVars: array [1..20] of Integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Stats_UserID := ''; //stats user id
Stats_Password := ''; //stats password
Players[0].Name := ''; //your username, duh
Players[0].Pass := ''; //your password
Players[0].Nick := ''; //3-4 letters of ur username, not including first letter
Players[0].Active := True; //Is he going to smith?
Players[0].Pin := ''; //Got a bank pin number?
Options[0].Bar := 'cball'; //supports bronze, iron, silver, steel, mithril, gold, addy, rune, or cball
Options[0].BarsToDo := 8000; //Ammount of Bars to do
Options[0].Debug := True; //Dont touch and give me all the errors
end;
procedure Debug(s:String);
begin
if(Options[CurrentPlayer].Debug = True) then
writeln(s);
end;
function OreBitmaps(s:String):Integer;
begin
case Lowercase(s) of
'iron':
begin
Result := BitmapFromString(24, 6, 'meJxl0GsLgjAYBeCx7xGIlCGVrKI' +
'LZWmSJtKNLoghIkFERBDR//8JHXlxiMpBJtsezitj2cMZM0x/4Own' +
'QTTbJdbp7kSv+fFmHlKeH1C0kaqbza6jGS6CBW3RrkR69nbonaebG' +
'Hfty2N1fa/TH6iq0xI+BRrPETojFkGpDBAEa+kAabQt3IWg9wOEKF' +
'kMbyBUBgWW4dNLvhQUk2eA0FAlhxfmAjL2Qyrjxh9CsECKtasOz0e' +
'mA5iIyuC3SAHBZ9GhSIqcmtKpq+IPGJs71w==');
Exit;
end;
'coal':
begin
Result := BitmapFromString(21, 5, 'meJxT0LNSNrJXt3DTsfPTcwoyco8' +
'084m3DErTdwlhYgABICkiLS0uJyelpCSjqgpHTGApJQMbVRNHLRtv' +
'XYcAQ9dwE+9YoF4gArLh2iF64drlNTTghgD1QqwGWmfsGW0RkAJBQ' +
'GfAtSPrRdYOlALq1bTyhFht7pcE0QtkABFEO9wENO0QxwOdDbEa6G' +
'W4RiACcpG1QxCadj4hYQDs4jFQ');
Exit;
end;
'copper':
begin
Result := BitmapFromString(23, 5, 'meJxjYmBQ1LNSMbbXsHTXsffTdwo' +
'28og0802wCkozcAllYgABIKkb3G8UM88seY1V9k6bgoO2hUcsMrYw' +
'gaUgCpQMbVVNnbRtfXQdAgzdwk2944AmABGQDVdjGDXbJHG5edpG6' +
'9w9dkVHgYYAGUBzzFLWQowCmgBxBtBqE88Yi4AUCAI6CW6IcfxioD' +
'OAuoB6gSbADYGYAERAEzStPSHOMPdPgpgAZAARxBCIOabJqyzSN8G' +
'9AzQEol3Lrx1IAj0CcQYwKODagQjIRTYEgiyzttvk77ctPGSVswvI' +
'VXbIU3OrAAAW8FR+');
Exit;
end;
'tin':
begin
Result := BitmapFromString(23, 7, 'meJxlkFsLgkAQhWX/Rw9FQfeysos' +
'hRYQlZklmVoiIiIhE//+xU0PDYsthGXdnP88ZRfksoSiV9qTa11tL' +
'q7s6DjbeaH/Hjlr8GkzT8q/3MIzjOL3dQjqXF05AaGibjnHorV3VD' +
'DQ7Gm59cBhi20dAoihJkizLCtDEH6E+XjUXO7YxdWL9nIHDEMdxCZ' +
'KmeZ4/i+IFmvheUUNNNUo2QIBQc493CR6PCFlgAwQIBTjAUgMIZAO' +
'/nljh3E1JsMQQEDiLDOEGEDBSsjE7JURAAQkpNU2V4wAix0EQsoFR' +
'8HMInzKEVILouvEG0ttjmg==');
Exit;
end;
'gold':
begin
Result := BitmapFromString(19, 8, 'meJxjYmBQ1LNSMbbXsHTXsffTdwo' +
'28og0802wCkozcAllYgABICmS2ylWNVOidbnUhC3SU3fJTN8LFFQy' +
'tFU1ddK29dF1CDB0Czf1jgPqAiIgG65RrHyaeMMCyc41UhO3yczYL' +
'z1tD1AQqAtiHdAKE88Yi4AUCAJaDdcoXjcPaJ1kz3qQxul7IRqBuj' +
'StPSHWmfsnQXQBGUAE0QjRK9G0GGQj2KkQjUBHQqwDeg2uBYiAXGS' +
'NECTVu1F68k6IRqBdwDABeg1ZCxxB1EPCDap34jaIRojXsKqHhADQ' +
'SUBdyGEFQZDwR9MCUQCMJqD3IbrgYQUBADY0ZLU=');
Exit;
end;
'mithril':
begin
Result := BitmapFromString(23, 6, 'meJxtkGsKwjAQhJceRRAUtdpX+qI' +
'opajFWoulFEFERLz/ERwZGoI0zI9NsvNlsiK/ZYlMnGwa5IusWu0a' +
'Z98Hp0dy/UCoraGnsO3SderAb6OwTxMIRaOUDA0gzOLDcltvis4v7' +
'1HzptzjTUNIgKuL41EICPO0ZIzw8iIBBUQI2yrPg8tMIsYtPsIY6v' +
'zUdghbE0LByzB/EGRY5y1GYdq16MUr6GFNiBgLhxzFqJcTQ1QQzDn' +
'rhF+Za0WZ');
Exit;
end;
'addy','adamantite':
begin
Result := BitmapFromString(21, 5, 'meJxdj40KwjAMhMVHcQgrKnPFWbt' +
'SOspwFv+GIiKIiIjv/wieHJRiOcqlyZeko9KOKz+xu1nTl+trtX3U' +
'pw8EPxz8Dm5ZS+WU9tp2tgkOgjGtwQvYXHdTd5i3l0W4r/o3JTe3i' +
'JNF/R+OLFhhAker44ssDEQ87ZDiTGFtjl7unxGEEKY4FRcgnokMcw' +
't/xpdTMIoU+qOGnjjbiiL/AiM+PdM=');
Exit;
end;
'rune':
begin
Result := BitmapFromString(22, 5, 'meJxdT4sKgkAQFD8lCIwKu0i7HpZ' +
'clifmo0REEImI/v8Tmho4pGNYZtmd2TnbskYiGHtqGlznYSkujZf2' +
'2/sbALet70NNIpnrfV2otjr3jQZA0FZZiCnkziaeHfNFVK+STpYvY' +
'qlb4wA5lpvb6c/B/k0hn+wSBlgXT8pBADrQpEwPzNDVMR0oB5CfAf' +
'zsYbQA2qEDgRhDB084qLjuqgrfH2oNKMQJ7JDzI+SBdD+i/EOZ');
end;
'steel':
begin
Result := BitmapFromString(27, 20, 'meJzF00sKgDAMRdHQtegaFFfTgc' +
'vooDhw3YqBEjRNXz/g485KzqxEyhyR97tRCIfMPSdcv5bi17FajOd' +
'YTYJJW9atWUug1GS1GoM5TQZqDtNUUNUI075gTrs3TTNny6AmwaKM' +
'aCqYkxHNBl8yopH41Ihc1GplXAPlBs2WezRVHqL9vgsLJFZT');
Exit;
end;
'silver':
begin
Result := BitmapFromString(25, 5, 'meJzTtvXRcww0dIsw9YkzcA3Vdw5' +
'mYoCC7LS06tLStoaG3vb2id1dQAZcCsiAaLEKSrcJy7YOyQSK6Nj7' +
'AbUbe0SZ+SYAxYGmwdXnZ2VBjAKaM23ChBkTJwLNZAKbAweWgalAo' +
'yAicCcBzQEiIBuusrKkuKm2tqulZXJPz6zJk4FGARlA0zqampCdB2' +
'cDnWHiFQM0HIKAzoNLNVRXQ3wHNAFoDtwoJpgJaC4EOsPCPwliDpA' +
'BRMg2ttTVdbe2wj0INAqiHRiMEJSbkQFXDwAb014H');
Exit;
end;
end;
Result := 0;
end;
function BarBitmaps(s:String):Integer;
begin
case Lowercase(s) of
'steel':
begin
Result := BitmapFromString(18, 15, 'meJyV0cEJwCAMheHgKtIZhC7jpW' +
'MI0kP3bjAQgjQv6eO/yXeJvV/dNMb9mbzO+XCF6C/ZVJKIau2U8oS' +
'g8ghQgHgKE6sUhoTWDa3KEF6tB2d/LSSqtAwBChBPYcIrK6tCslkp' +
'sxffwMvZ');
Exit;
end;
'iron':
begin
Result := BitmapFromString(16, 17, 'meJyV0dsJgDAMheHQIeoAxTUqjl' +
'AquP8mBoRD1NwM/+N3ntK3vT8b41DrHxniOc9fWPoMhk9irrWVS+J' +
'CZHkVk+EtrHoHw2Pi45cPMV+ti3yZj2+PQmx5C6vewXxFTEKMCQrv' +
'An5zmjU=');
Exit;
end;
'bronze':
begin
Result := BitmapFromString(15, 14, 'meJyT1rWR1rVRtgnAiqTBsip2QR' +
'BEvEog4pdUIlIlEwMDVsVYVTJgU4xLJaZiPCohiuHq8atEVkxQJRB' +
'A1BCjEgi4BMUhiKBKrIpxqcRUjEclmmL8KoGACQkRBAC0IExO');
Exit;
end;
'mithril':
begin
Result := BitmapFromString(15, 18, 'meJyN0r0JgDAQhuHDEdJKJrDTCT' +
'RlthD3n8GDgyPc/8dbPkkRMq9zqt7nxjYAbJ0nOTpCxZJL7xTyG6M' +
'uGVck4aLEjt6LEl/DxKYEC3tS40ASZh/LFadS/I1Y4vbWqFSa2JMa' +
'B1LgWOJ+VPWXpw==');
Exit;
end;
'gold':
begin
Result := BitmapFromString(15, 15, 'meJwTb1osDkNyKy5jRRBZ+bU3iV' +
'cJV0yMSohiIlUCEa9XLJEqmRgYsCrGqpIBm2JcKjEV41EJUQxXj18' +
'lsmKCKoFAHCkG8asEAk4jewgiqBKrYlwqMRXjUYmmGL9KIAAAEKbf' +
'aA==');
Exit;
end;
'silver':
begin
Result := BitmapFromString(17, 16, 'meJyV0cEJwCAQRFGxIUkXQmpKLn' +
'biRcglLWYwsCzRHTfL3Hz/ZDmPMuyqdbpRevzd2l//STxeJ06P7Tm' +
'/c/oYAkmmPtiJ5a2EeJ1IxT0OrzpZetyWEqZ/h3tJZEtPEstbCfG4' +
'2KcT7nEPnBpGDQ==');
Exit;
end;
'addy','adamantite':
begin
Result := BitmapFromString(19, 20, 'meJzd0jEKwCAMhWHxDEJXFw+R1d' +
'F2Ld7/Jg2IYk3Al479eVv4tlAm6it3Udeu3r0C1VVPFW6VChElIah' +
'AuFUqRJSEoFogrriY4gc1oFW56XNMigtH4FmVhKBaIK5maFKc7/tx' +
'D8SQg04=');
Exit;
end;
'rune':
begin
Result := BitmapFromString(13, 14, 'meJwL8LbLSAzAigK87YAoJzUEiI' +
'hRg0sZmhqsyjDVMDEwEKOGAVUZLjXIyvCogSvDrwaijKAaICBGDRD' +
'Iy0gQVIOmDJcaZGV41MCV4VcDBAA+CHlH');
Exit;
end;
'cball','cannonball':
begin
Result := BitmapFromString(20, 19, 'meJyl0VEKgzAQBNCSIyhYSJFisU' +
'il4v1v1ykDQ9hNVkvDfETXl01izrdxvCPT9EDm+bksr3V9B8EH6fI' +
'd2dkYtuyZpsw/lq0Jf7VsHdtt26thVZYhV+K+Om951eUKwXm91eYD' +
'bu45sIb7/2tsi2OCkmzryFUueGjNCpijGlvPGZZkh+F6yPmIEpQgR' +
'tf1hssqXnGkGi+Dl16VPNU2TxVAswL5SfUBGGiA+A==');
Exit;
end;
end;
Result := 0;
end;
procedure AntiBan;
begin
case (random(20)) of
1: begin
MMouse(Random(500),Random(500),0,0);
wait(500+random(500));
MMouse(Random(500),Random(500),0,0);
wait(50+random(500));
end;
2: begin
MMouse(-100+random(50),-50-random(50),5,5);
wait(3000+random(5000));
end;
3: begin
PickUpMouse;
wait(1000+random(500));
end;
4: begin
GameTab(21+Random(10));
wait(100+random(2000));
GameTab(25);
end;
end;
if(FindNormalRandoms) then
begin
Random1 :=1;
end;
if(LevelUp) then
begin
Random1 := 1;
Inc(Stats_CustomVars[SRL_LVL]);
end;
end;
procedure SetupPlayers;
begin
for I := 0 to HowManyPlayers-1 do
begin
Options[I].Exp := 0;
if(LowerCase(Options[I].Bar) = 'steel') then
begin
Options[I].Ore1 := 'iron';
Options[I].Ore2 := 'coal';
Options[I].Ore1Ammount := 9;
end;
if(LowerCase(Options[I].Bar) = 'bronze') then
begin
Options[I].Ore1 := 'tin';
Options[I].Ore2 := 'copper';
Options[I].Ore1Ammount := 14;
end;
if(LowerCase(Options[I].Bar) = 'iron') then
begin
Options[I].Ore1 := 'iron';
Options[I].Ore2 := '';
Options[I].Ore1Ammount := 27;
end;
if(LowerCase(Options[I].Bar) = 'silver') then
begin
Options[I].Ore1 := 'silver';
Options[I].Ore2 := '';
Options[I].Ore1Ammount := 27;
end;
if(LowerCase(Options[I].Bar) = 'mithril') then
begin
Options[I].Ore1 := 'mithril';
Options[I].Ore2 := 'coal';
Options[I].Ore1Ammount := 5;
end;
if(LowerCase(Options[I].Bar) = 'addy') or (LowerCase(Options[I].Bar) = 'adamantite') then
begin
Options[I].Ore1 := 'addy';
Options[I].Ore2 := 'coal';
Options[I].Ore1Ammount := 4;
end;
if(LowerCase(Options[I].Bar) = 'rune') then
begin
Options[I].Ore1 := 'mithril';
Options[I].Ore2 := 'coal';
Options[I].Ore1Ammount := 3;
end;
if(LowerCase(Options[I].Bar) = 'cball') or (LowerCase(Options[I].Bar) = 'cannonball') then
begin
Options[I].Ore1 := 'steel';
Options[I].Ore2 := '';
Options[I].Ore1Ammount := 27;
end;
end;
end;
function FindBanker(out x,y:Integer):boolean;
var
CTS, I:Integer;
TPA : TPointArray;
ATPA : T2DPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.25,0.23);
FindColorsSpiralTolerance(MSCX,MSCY,TPA,804179,MSX1,MSY1,MSX2,MSY2,7);
ColorToleranceSpeed(CTS);
ATPA := TPAtoATPAEx(TPA,20,20);
SortATPAFromFirstPoint(ATPA,Point(MSX1,MSCY));
//SortATPASize(ATPA,True);
//DebugATPABounds(ATPA);
//DrawDotsMulti(True,ATPA);
For I := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 2, 2);
If(WaitUpText('anker',300)) then
begin
Result := True;
Debug('Found Banker');
GetMousePos(x, y);
Exit;
end;
end;
Result := False;
end;
procedure NewBank;
var
acc:Extended;
cballholder,bx,by:Integer;
begin
if(not Loggedin) then
exit;
SetAngle(true);
if(Options[CurrentPlayer].BarsToDo <= Options[CurrentPlayer].BarsTotal) then
begin
Debug('Player done, switching players');
CloseBank;
Logout;
Players[CurrentPlayer].Active := False;
Exit;
end;
Debug('Finding and Opening Bank');
if(not BankScreen) and (not PinScreen) then
begin
repeat
if(FindBanker(bx,by)) then
begin
mouse(bx,by,2,2,false);
waitOption('ank Banker',300);
wait(1500+random(1000));
end
else
begin
OpenBankNPC;
end;
until(BankScreen);
end;
if(PinScreen) then
begin
InPin(Players[CurrentPlayer].Pin);
end;
if(LowerCase(Options[CurrentPlayer].Bar) = 'cannonball') or (LowerCase(Options[CurrentPlayer].Bar) = 'cball') then
begin
repeat
Deposit(2,28,True);
if(InvCount = 0) then
begin
cballholder := BitmapFromString(20, 20, 'meJyVk39LwlAUhkffQ/pTksQYDG' +
'MkwxhmmJmYZTLGGNH3/wg99NLLYUuqy0HuPfc87z0/Zp7PbmZFUdy' +
'W5d1q9bjZ7Lbb/Xxe2rleP8kpa5r35fJhNLo8S5Ism+bfOMhicU8w' +
'e/xiicSze361ETMYnMNCGbc4+/F4gtOCSkmGE5BFJEeUuY2mpzs4O' +
'fCbpplYHbH9y5tFcBJMwhE/HmsS5mo4vBBLpLqBcXU4VM4EY08Azq' +
'pqMI4ICmSpD66U5yiWV9QlKdd1i/EumqRh1qMhBn1Nh18lg6yuYLm' +
'NxbLcCl5RDzu9VQnSIcZg8jUjIuN0pte5nMZ5V8V6Oq7Xc0EWm1yl' +
'HRxTsTgjG+eruYBQlHE1X8VyjCxjVZ9VFCIerprMlT/FCLJIBk0Uo' +
'oi/EH3M6lif5X9BH/oKUUQ4mw7LsW0/UGCCiKi0vgLWAY3bpOA0VK' +
'kUfmRP6SgNF/Ire0rnX+Bf1ic6qfgU');
FindDeformedBitmapToleranceIn(cballholder,bx,by,24,80,500,290,10,0,false,acc);
mouse(bx,by,2,2,true);
wait(1500+random(100));
FreeBitmap(cballholder);
end;
until(InvCount = 1)
end
else
begin
DepositAll;
end;
end;
procedure WithdrawOres;
var
acc:extended;
count,x,y,ore1,ore2:Integer;
begin
if(not Loggedin) then
exit;
if(Not BankScreen) or (Pinscreen) then
NewBank;
ore1 := OreBitmaps(Options[CurrentPlayer].Ore1);
ore2 := OreBitmaps(Options[CurrentPlayer].Ore2);
count := InvCount;
repeat
if(FindDeformedBitmapToleranceIn(ore1,x,y,24,80,500,290,10,0,false,acc)) then
begin
mouse(x+RandomRange(10,15),y,2,2,false);
if(Options[CurrentPlayer].Ore1Ammount = 27) then
begin
ChooseOption('ll');
FreeBitmap(ore1);
if(Options[CurrentPlayer].Ore2 <> '') then
FreeBitmap(ore2);
Exit;
end
else
begin
if(not ChooseOption(IntToStr(Options[CurrentPlayer].Ore1Ammount))) then
begin
mouse(x+RandomRange(10,15),y,2,2,false);
ChooseOption('X');
wait(1500+random(500));
TypeSend(IntToStr(Options[CurrentPlayer].Ore1Ammount));
end;
wait(900+random(1000));
end;
end
else
begin
writeln('Out of Ore1');
CloseBank;
Logout;
Players[CurrentPLayer].Active := False;
FreeBitmap(ore1);
if(Options[CurrentPlayer].Ore2 <> '') then
FreeBitmap(ore2);
Exit;
end;
until(InvCount >count)
count := InvCount;
repeat
if(FindDeformedBitmapToleranceIn(ore2,x,y,24,80,500,290,10,0,false,acc)) then
begin
mouse(x,y,2,2,false);
if(InvCount>Options[CurrentPlayer].Ore1Ammount) then
begin
NewBank;
WithdrawOres;
FreeBitmap(ore1);
if(Options[CurrentPlayer].Ore2 <> '') then
FreeBitmap(ore2);
Exit;
end;
ChooseOption('ll');
wait(900+random(500));
end
else
begin
writeln('Out of Ore2');
CloseBank;
Logout;
Players[CurrentPLayer].Active := False;
Exit;
end;
until(InvCount > count);
FreeBitmap(ore1);
if(Options[CurrentPlayer].Ore2 <> '') then
FreeBitmap(ore2);
wait(500+random(1000));
end;
procedure WalkToFurnace;
var
ore1,x,y:Integer;
begin
if(not LoggedIn) then
Exit;
Debug('Walking to Furnace');
RoadColor := 6526360
if(not RadialWalkTolerance(RoadColor,0,45,70,3,3,10)) then
begin
Debug('waiting a few seconds before trying radial walk again');
wait(2000+random(2000));
if (not RadialWalkTolerance(RoadColor,0,45,70,3,3,10)) then
begin
GetNewRoadColor(MMX1,MMY1,MMX2,MMY2,10);
if(RadialWalkTolerance(RoadColor,0,45,70,3,3,10)) then
begin
Debug('Using new road color to furance');
end
else
begin
Debug('Found not walk to furnace, player is lost.');
Logout;
Players[CurrentPlayer].Active := False;
Exit;
end;
end;
end;
FFlag(0);
if(LowerCase(Options[CurrentPlayer].Bar) = 'cannonball') or (LowerCase(Options[CurrentPlayer].Bar) = 'cball') then
begin
ore1 := OreBitmaps(Options[CurrentPlayer].Ore1);
Bars := CountItems('bmp',ore1,[50]);
Debug(InttoStr(Bars)+' Steel bars found');
FreeBitmap(ore1);
end;
if(FindSymbol(x,y,'furnace')) then
begin
Debug('Found Symbol');
mouse(x,y,2,2,true);
FFlag(0);
wait(500+random(1000));
end
else if(FindColor(x,y,1669374,MMX1,MMY1,MMX2,MMY2)) then
begin
Debug('Found Symbol''s Color');
Mouse(x,y,2,2,true);
FFlag(0);
wait(500+random(1000));
end
else
begin
Debug('waiting a few seconds and looking for furnace again');
wait(2000+random(2000));
if(FindColor(x,y,1669374,MMX1,MMY1,MMX2,MMY2)) then
begin
Debug('Found Symbol''s Color');
Mouse(x,y,2,2,true);
FFlag(0);
wait(500+random(1000));
end
else
begin
Debug('Error Finding Furnace, Quiting');
Logout;
Players[CurrentPlayer].Active := False;
Exit;
end;
end;
end;
procedure WalkTobank;
var
x,y:Integer;
begin
if(not(loggedIn)) then
exit;
FindNormalRandoms;
Debug('Walking To bank');
if (not RadialWalkTolerance(RoadColor,140,200,50,3,3,10)) then
begin
//GetNewRoadColor(MMX1,MMY1,MMX2,MMY2,50);
wait(500+random(1000));
if(RadialWalkTolerance(RoadColor,140,200,50,3,3,10)) then
Debug('Got new road color for walking to bank');
end;
FFlag(0);
Debug('Half Way');
wait(500+random(500));
RoadColor := 6786233;
if(not RadialWalkTolerance(RoadColor,200,250,50,3,3,10)) then
begin
Debug('Radial Walk One Failed');
wait(500+random(2000));
//GetNewRoadColor(MMX1,MMY1,MMX2,MMY2,90);
if(RadialWalkTolerance(RoadColor,200,250,50,3,3,10)) then
begin
writeln('Second RadialWalk Worked!');
exit;
end
else
begin
wait(500+random(2000));
if(FindSymbol(x,y,'bank')) then
begin
Debug('Found Symbol');
mouse(x,y,2,2,true);
FFlag(5);
end
else if(not RadialWalkTolerance(RoadColor,200,250,50,3,3,10)) then
begin
Debug('Tried Radial Walk Once more and failed. Player is lost.');
Logout;
Players[CurrentPlayer].Active := False;
Exit;
end;
end;
end;
FFlag(4);
wait(500+random(1000));
end;
procedure SmeltOres;
var
acc:extended;
timer,x,y,ore1,ore2,bar:Integer;
begin
if(Not LoggedIn) then
exit;
ore1 := OreBitmaps(Options[CurrentPlayer].Ore1);
ore2 := OreBitmaps(Options[CurrentPlayer].Ore2);
bar := BarBitmaps(Options[CurrentPlayer].Bar);
wait(500+random(500));
Timer := GetSystemTime + RandomRange(40000,65000);
if(LowerCase(Options[CurrentPlayer].Bar) = 'iron') or (LowerCase(Options[CurrentPlayer].Bar) = 'silver') then
Timer := GetSystemTime + RandomRange(250000,270000);
if(LowerCase(Options[CurrentPlayer].Bar) <> 'cannonball') and (LowerCase(Options[CurrentPlayer].Bar) <> 'cball') then
begin
repeat
if(FindFurnace(x,y)) then
begin
mouse(x,y,2,2,true);
FFlag(0);
wait(500+random(100));
end
else
begin
Debug('Error Finding Furnace, trying to walk to furnace');
if(FindSymbol(x,y,'furnace')) then
begin
Debug('Found Symbol');
mouse(x,y,2,2,true);
FFlag(5);
wait(500+random(1000));
if(FindFurnace(x,y)) then
begin
mouse(x,y,2,2,true);
FFlag(0);
wait(500+random(100));
end;
end
else if(FindColor(x,y,1669374,MMX1,MMY1,MMX2,MMY2)) then
begin
Debug('Found Symbol''s Color');
Mouse(x,y,2,2,true);
FFlag(0);
wait(500+random(1000));
if(FindFurnace(x,y)) then
begin
mouse(x,y,2,2,true);
FFlag(0);
wait(500+random(100));
end;
end
else
begin
Debug('Error Finding Furnace, Quiting');
Logout;
Players[CurrentPlayer].Active := False;
Exit;
end;
end;
until(FindDeformedBitmapToleranceIn(bar,x,y,MCX1,MCY1,MCX2,MCY2,10,0,false,acc))
end
else if(LowerCase(Options[CurrentPlayer].Bar) = 'cannonball') or (LowerCase(Options[CurrentPlayer].Bar) = 'cball') then
begin
FindDeformedBitmapToleranceIn(ore1,x,y,MIX1,MIY1,MIX2,MIY2,10,0,false,acc);
mouse(x,y,2,2,true);
wait(100+random(200));
Timer := GetSystemTime + RandomRange(250000,270000);
if(FindFurnace(x,y)) then
begin
mouse(x,y,2,2,true);
repeat
wait(500+random(3000));
until(FindDeformedBitmapToleranceIn(bar,x,y,MCX1,MCY1,MCX2,MCY2,10,0,false,acc));
end
else
begin
Debug('Error Finding Furnace, trying to walk to furnace');
if(FindSymbol(x,y,'furnace')) then
begin
Debug('Found Symbol');
mouse(x,y,2,2,true);
FFlag(0);
wait(500+random(1000));
if(FindFurnace(x,y)) then
begin
FindDeformedBitmapToleranceIn(ore1,x,y,MIX1,MIY1,MIX2,MIY2,10,0,false,acc);
mouse(x,y,2,2,true);mouse(x,y,2,2,true);
repeat
wait(500+random(3000));
until(FindDeformedBitmapToleranceIn(bar,x,y,MCX1,MCY1,MCX2,MCY2,10,0,false,acc));
end;
end
else if(FindColor(x,y,1669374,MMX1,MMY1,MMX2,MMY2)) then
begin
Debug('Found Symbol''s Color');
Mouse(x,y,2,2,true);
FFlag(0);
wait(500+random(1000));
if(FindFurnace(x,y)) then
begin
FindDeformedBitmapToleranceIn(ore1,x,y,MIX1,MIY1,MIX2,MIY2,10,0,false,acc);
mouse(x,y,2,2,true);mouse(x,y,2,2,true);
mouse(x,y,2,2,true);
repeat
wait(500+random(3000));
until(FindDeformedBitmapToleranceIn(bar,x,y,MCX1,MCY1,MCX2,MCY2,10,0,false,acc));
end;
end
else
begin
Debug('Error Finding Furnace, Quiting');
Logout;
Players[CurrentPlayer].Active := False;
Exit;
end;
end;
end;
mouse(x,y,0,0,true);
wait(500+random(500));
repeat
Antiban;
wait(500+random(500));
if(Random1=1) then
begin
Random1:=0;
Exit;
end;
if(GetSystemTime > Timer) then
Exit;
until(not FindDeformedBitmapToleranceIn(ore1,x,y,MIX1,MIY1,MIX2,MIY2,10,0,false,acc));
FreeBitmap(ore1);
if(Options[CurrentPlayer].Ore2 <> '') then
FreeBitmap(ore2);
FreeBitmap(bar);
end;
procedure ProgressReport;
var
Exp:Extended;
Count,ore1,ore2:Integer;
test,exp64:Int64;
begin
if(not LoggedIn) then
Exit;
ore1 := OreBitmaps(Options[CurrentPlayer].Ore1);
if(TimeMark=0) then
begin
MarkTime(TimeMark);
end
else
begin
Options[CurrentPlayer].Time := Options[CurrentPlayer].Time+TimeFromMark(TimeMark);
MarkTime(TimeMark);
end;
if(Options[CurrentPlayer].Ore2 <> '') then
ore2 := OreBitmaps(Options[CurrentPlayer].Ore2);
if(LowerCase(Options[CurrentPlayer].Bar) <> 'cannonball') and (LowerCase(Options[CurrentPlayer].Bar) <> 'cball') then
begin
Bars := InvCount;
if(CountItems('bmp',ore1,[10]) > 0) then
Bars := Bars-CountItems('bmp',ore1,[5]);
if(Options[CurrentPlayer].Ore2 <> '') then
begin
if(CountItems('bmp',ore2,[10]) > 0) then
Bars := Bars-CountItems('bmp',ore2,[10]);
end;
end;
case Lowercase(Options[CurrentPlayer].Bar) of
'steel':
begin
Exp := 17.5;
Stats_CustomVars[SRL_STEEL] := Stats_CustomVars[SRL_STEEL] + Bars;
end;
'bronze':
begin
Exp := 6.2;
Stats_CustomVars[SRL_BRONZE] := Stats_CustomVars[SRL_BRONZE] + Bars;
end;
'iron':
begin
Exp := 12.5;
Stats_CustomVars[SRL_IRON] := Stats_CustomVars[SRL_IRON] + Bars;
end;
'gold':
begin
Exp := 22.5;
Stats_CustomVars[SRL_GOLD] := Stats_CustomVars[SRL_GOLD] + Bars;
end;
'silver':
begin
Exp := 13.7;
Stats_CustomVars[SRL_SILVER] := Stats_CustomVars[SRL_SILVER] + Bars;
end;
'mithril':
begin
Exp := 30;
Stats_CustomVars[SRL_MITHRIL] := Stats_CustomVars[SRL_MITHRIL] + Bars;
end;
'addy','adamantite':
begin
Exp := 37.5;
Stats_CustomVars[SRL_ADDY] := Stats_CustomVars[SRL_ADDY] + Bars;
end;
'rune':
begin
Exp := 50;
Stats_CustomVars[SRL_RUNE] := Stats_CustomVars[SRL_RUNE] + Bars;
end;
'cball','cannonball':
begin
Exp := 25.6;
Stats_CustomVars[SRL_CBALL] := Stats_CustomVars[SRL_CBALL] + (Bars*4);
end;
end;
Stats_CustomVars[SRL_BARS]:= Stats_CustomVars[SRL_BARS]+Bars;
Stats_CustomVars[SRL_EXP] := Stats_CustomVars[SRL_EXP]+(Bars*Round(Exp));
Inc(Options[CurrentPlayer].LoadsTotal);
Options[CurrentPlayer].Exp := Options[CurrentPlayer].Exp+Bars*Exp;
Options[CurrentPlayer].BarsTotal := Options[CurrentPlayer].BarsTotal+Bars;
if(version <> Script_Version) then
begin
Writeln('/*\/*\/*\Script OUTDATED! PLEASE UPDATE ASAP!!/*\/*\/*\');
end;
Writeln('***********************************************');
Writeln('*********Traveler''s Al Kharid Smither**********')
Writeln('***********************************************');
Writeln('*Total Time Runing: '+Padr(MsToTime(GetTimeRunning, Time_Short),26)+'*');
WriteLn('***********************************************');
for I := 0 to HowManyPlayers-1 do
begin
Writeln('*Progress Report For: '+Padr(Players[I].Name,24)+'*');
Writeln('*---------------------------------------------*');
Writeln('*Time Runing: '+Padr(MsToTime(Options[I].Time,Time_Short),32)+'*');
Writeln('*Bars Made: '+Padr(IntToStr(Options[I].BarsTotal),34)+'*');
test := Round((Options[I].BarsTotal*60)/(Options[I].Time/60000.0));
//test := Round((Options[I].BarsTotal*3600000)/Options[I].Time);
Writeln('*Bars Per Hour: '+Padr(IntToStr(test),30)+'*');
Writeln('*Loads: '+Padr(IntToStr(Options[I].LoadsTotal),38)+'*');
Writeln('*Exp Gained: '+Padr(IntToStr(Round(Options[I].Exp)),33)+'*');
exp64 := Round((Options[I].Exp*3600000)/Options[I].Time);
Writeln('*Exp Per Hour: '+Padr(IntToStr(exp64),31)+'*');
Writeln('*---------------------------------------------*');
end;
FreeBitmap(ore1);
if(Options[CurrentPlayer].Ore2 <> '') then
FreeBitmap(ore2);
end;
procedure Stats_CheckOutput(s: string);
var
i: Integer;
sa: TStringArray;
begin
sa := Explode(#10, s);
for i := 0 to High(sa) do
if (Trim(sa[i]) <> '') then
if StartsWith('ERROR(1)', sa[i]) then
begin
WriteLn('STATS: "' + sa[i] + '"');
Stats_UserID := '';
Stats_Password := '';
end
else if StartsWith('ERROR(2)', sa[i]) then
begin
WriteLn('STATS: "' + sa[i] + '"');
Stats_ScriptID := '';
end
else
WriteLn('STATS: "' + sa[i] + '"');
end;
function Stats_GetScriptInfo(out Version, News, Link: string; out OutDated: Boolean; out LastUpdate_HoursAgo: Integer): Boolean;
var
Client: Integer;
s: string;
sa: TStringArray;
begin
Result := False;
if (Stats_ScriptID = '') then
Exit;
Client := InitializeHTTPClient(False, False);
ClearPostData(Client);
AddPostVariable(Client, 'do', 'getinfo');
AddPostVariable (Client, 'sID', Stats_ScriptID);
s := PostHTTPPageEx(Client, Stats_Link);
sa := Explode(#10'GLUE'#10, s);
if (Length(sa) = 5) then
begin
Result := True;
Version := sa[0];
News := sa[1];
Link := sa[2];
OutDated := sa[3] = '1';
LastUpdate_HoursAgo := StrToIntDef(sa[4], -1);
end
else
Stats_CheckOutput(s);
FreeHTTPClient(Client );
end;
var
Stats_GlobalVars: array[1..24] of Integer;
procedure Stats_SendReport;
var
i, Client, Time: Integer;
s: string;
begin
if (Stats_UserID = '') and (Stats_Password = '') and (Stats_ScriptID = '') then
Exit;
Client := InitializeHTTPClient(False, False);
ClearPostData(Client);
AddPostVariable(Client, 'do', 'submit');
Time := (GetTimeRunning - Stats_LastTime) div 1000 div 60;
if (Time < 5) then
Time := 0
else
Stats_LastTime := GetTimeRunning;
AddPostVariable(Client, 'sTime', IntToStr(Time));
if (Stats_UserID <> '') and (Stats_Password <> '') then
begin
AddPostVariable(Client, 'uID', Stats_UserID);
AddPostVariable(Client, 'uPass', Stats_Password);
end
else
begin
AddPostVariable(Client, 'uID', '-1');
AddPostVariable(Client, 'uPass', '');
end;
if (Stats_ScriptID <> '') then
begin
AddPostVariable (Client, 'sID', Stats_ScriptID);
for i := Low(Stats_CustomVars) to High(Stats_CustomVars) do
begin
AddPostVariable(Client, 'rndCustom' + IntToStr(i), IntToStr(Stats_CustomVars[i]));
Stats_CustomVars[i] := 0;
end;
end
else
begin
AddPostVariable (Client, 'sID', '-1');
end;
for i := Low(Stats_GlobalVars) to High(Stats_GlobalVars) do
begin
case i of
1: s := IntToStr(SRL_Logs - Stats_GlobalVars[i]);
2: s := IntToStr(Banks - Stats_GlobalVars[i]);
3: s := IntToStr(RandSolved[rand_Death] - Stats_GlobalVars[i]);
else if ((i - 3) < Length(RandSolved) - 1 {for Death}) then
s := IntToStr(RandSolved[i - 3] - Stats_GlobalVars[i]);
end;
AddPostVariable(Client, 'rndGlobal' + IntToStr(i), s);
Stats_GlobalVars[i] := Stats_GlobalVars[i] + StrToInt(s);
end;
s := PostHTTPPageEx(Client, Stats_Link);
Stats_CheckOutput(s);
FreeHTTPClient(Client);
if (SRL_Procs[srl_OnSendStats] <> nil) then
SRL_Procs[srl_OnSendStats]();
end;
procedure Stats_SendAccountInfo;
var
i, Client: Integer;
Accounts: TStringArray;
begin
if (Stats_UserID = '') and (Stats_Password = '') then
Exit;
Client := InitializeHTTPClient(False, False);
ClearPostData(Client);
AddPostVariable(Client, 'do', 'setaccounts');
AddPostVariable(Client, 'uID', Stats_UserID);
AddPostVariable(Client, 'uPass', Stats_Password);
if (Stats_ScriptID <> '') then
AddPostVariable (Client, 'sID', Stats_ScriptID)
else
AddPostVariable (Client, 'sID', '-1');
SetLength(Accounts, HowManyPlayers);
for i := 0 to HowManyPlayers - 1 do
Accounts[i] := Implode('.|€stat€|.', [Players[i].Name, Players[i].Loc, IntToStr(Integer(Players[i].Active))]);
AddPostVariable(Client, 'accInfo', Implode(#10'ACC'#10, Accounts));
Stats_CheckOutput(PostHTTPPageEx(Client, Stats_Link));
FreeHTTPClient(Client);
end;
procedure Stats_ManageAccounts;
var
i, ii, Client: Integer;
s: string;
Accounts, Stats: TStringArray;
begin
if (Stats_UserID = '') and (Stats_Password = '') then
Exit;
Client := InitializeHTTPClient(False, False);
ClearPostData(Client);
AddPostVariable(Client, 'do', 'getaccounts');
AddPostVariable(Client, 'uID', Stats_UserID);
AddPostVariable(Client, 'uPass', Stats_Password);
AddPostVariable (Client, 'sID', '-1');
s := PostHTTPPageEx(Client, Stats_Link);
Accounts := Explode(#10'ACC'#10, s);
for i := 0 to High(Accounts) do
begin
Stats := Explode('.|€stat€|.', Accounts[i]);
if (Length(Stats) = 3) then
begin
for ii := 0 to HowManyPlayers - 1 do
if (LowerCase(Players[ii].Name) = LowerCase(Stats[0])) then
begin
Players[ii].Loc := Stats[1];
Players[ii].Active := Stats[2] = '1';
Break;
end;
end
else
begin
Stats_CheckOutput(s);
Break;
end;
end;
FreeHTTPClient(Client);
stats_SendAccountInfo;
end;
procedure DoStats;
begin
if(StatsTime<GetSystemTime) then
begin
StatsTime := GetSystemTime + 300000;
Stats_SendReport;
Stats_ManageAccounts;
Debug('Stats Sent');
end;
end;
procedure DoChecks;
var
run,hours:Integer;
s,news,link:String;
outDated:Boolean;
begin
Debug('Doing Checks');
FindNormalRandoms;
MakeCompass('N');
SetAngle(true);
run := GetMMLevels('run', s)
if(run > 80+random(20)) then
SetRun(True);
if(run < 15+Random(15)) then
begin
RestUntil(80+random(20));
SetRun(true);
end;
if(TimeMark=0) then
begin
MarkTime(TimeMark);
end
else
begin
Options[CurrentPlayer].Time := Options[CurrentPlayer].Time+TimeFromMark(TimeMark);
MarkTime(TimeMark);
end;
Stats_GetScriptInfo(version,news,link,outDated,hours);
if(version <> Script_Version) then
begin
Writeln(' \*/\*/\*/\*/\*/\*/\*/\*/\*/\*/\*/\*/\*/\*/ ');
Writeln('**************SCRIPT OUTDATED***************');
Writeln('***PLEASE UPDATE SCRIPT TO ENSURE SAFETY!***');
Writeln(' \*/\*/\*/\*/\*/\*/\*/\*/\*/\*/\*/\*/\*/\*/ ');
end;
end;
begin
Stats_ScriptID := '75';
StatsTime := 0;
Smart_Server := 39;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;
ClearDebug;
SetupSRL;
SetupAutoColors;
DeclarePlayers;
SetupPlayers;
Stats_CustomVars[SRL_LVL]:=0;
for I := 0 to HowManyPlayers-1 do
begin
Options[I].Exp := 0;
Options[I].BarsTotal := 0;
Options[I].LoadsTotal := 0;
Options[I].Time := 1;
end;
repeat
Loads := -1;
TimeMark := 0;
random1 := 0;
repeat
if(not LoggedIn) then
begin
DoStats;
StatsTime := 0;
LoginPlayer;
end;
NewBank;
WithdrawOres;
DoChecks;
WalkToFurnace;
SmeltOres;
DoChecks;
WalkToBank;
ProgressReport;
DoStats;
until (not LoggedIn);
Nextplayer(Players[CurrentPlayer].Active);
until AllPlayersInactive;
end.