ducels
2007-12-11 00:03:52
<!– BEGIN TEMPLATE: formanswers –>
ducels - SRL Member Application Form
ducels
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
minimal amounts of css, php, html, vb, and scar
Other Communitys
sythe
How Long have You Played Runescape
4 years
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
Three years ago I started autoing at Kaitnieks. I was a leech, so no one will remember me.
I went through accounts being banned and my main due to Aryan, and in the end ended up here.
My first script got one of my pures banned back in March. I decided to come back and tried a bit more seriously at scripting after a few days of reading tutorials. The attached script is the result.
So, as for experience, minimal. I'm anxious to quit being a leecher, so I've decided to apply for SRL-Members. I realize my post count is low, so I've been trying to post constructive things as much as possible.
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
Ok, edited.
——————————————————
<!– END TEMPLATE: formanswers –>
ducels - SRL Member Application Form
ducels
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
minimal amounts of css, php, html, vb, and scar
Other Communitys
sythe
How Long have You Played Runescape
4 years
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
Three years ago I started autoing at Kaitnieks. I was a leech, so no one will remember me.
I went through accounts being banned and my main due to Aryan, and in the end ended up here.
My first script got one of my pures banned back in March. I decided to come back and tried a bit more seriously at scripting after a few days of reading tutorials. The attached script is the result.
So, as for experience, minimal. I'm anxious to quit being a leecher, so I've decided to apply for SRL-Members. I realize my post count is low, so I've been trying to post constructive things as much as possible.
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
program LumbySmelter;
{.include SRL/SRL.scar}
var xz, yz, banx1, bany1, banx2, bany2, sBars, smith, CopperOreDtm, TinOreDtm,
BronzeBarDtm, FurnaceBronzeDtm, IronOreDtm, IronBarDtm, CoalDtm,
SteelBarDtm, MithOreDtm, MithBarDtm, GoldOreDtm, GoldBarDtm, AddyOreDtm,
LumbyRoadColor, pLoads, tLoads, AddyBarDtm, ore1amnt, ore2amnt, antiban,
cbartype, coretype, coretype2, LumbyTreesDtm : Integer;
smeltime, sleeptime : LongInt;
TPA : TPointArray;
const hmp = 2; //How many players are you using?
const ddbg = False; //Ducels Debug on or off?
const loads = 2; //How many loads per account before switching?
const oneplayerwait = 15000; //if using one player, how long do you want to log out between loads?
//in milliseconds. 1 second = 1000 milli, 1 minute = 60,000 milli
procedure DeclarePlayers;
begin
NumberOfPlayers(hmp);
CurrentPlayer := 0;
SRLId := ''; //Your SRL ID. MUST BE A STRING
SRLPassword := ''; //Your SRL password. MUST BE A STRING
Players[0].Name :='Username'; //player name
Players[0].Pass :='Password'; //player password
Players[0].Nick :='sern'; //read the top for how to set a nick
Players[0].Active :=True; //use this player?
Players[0].Strings[0] := 'iron'; //what bar type? valid types: bronze, iron
//steel, gold, mith, addy
Players[1].Name :='Username';
Players[1].Pass :='Password';
Players[1].Nick :='sern';
Players[1].Active :=True;
Players[1].Strings[0] := 'iron';
end;
//======================================================================\\
procedure DeclareGlobals;
begin
LumbyTreesDtm := DTMFromString('78DA632C636260486740015D135419FE03694' +
'620FE0F048CC5403551A86A5443D9188CA06A4080B1940835E544' +
'A8A9C254E3902C8CAAA6960873AA895003F27B0411EE21A4A606A' +
'82692809A3A22D43460AAD1CBE0C174732C117E8FC1AF060051F7' +
'1B6E');
CopperOreDtm := DTMFromString('78DA639CC0C0C0E0CF8002EED45B32FC07D28' +
'C40FC1F08187B810C2F5435DB32F51944A06A4080B11B48F831A0' +
'01465435FD40220055C5F51A7354359380840F0173A6018960541' +
'5172ACC50D5B462DAD590E189AAA6074844E0570300326C14D4');
TinOreDtm := DTMFromString('78DA63DCC7C0C0E0C780027A9A9A18FE03694' +
'620FE0F048CBB810C4F54355EAE2E0C22503520C0B80BD31C902C' +
'8A9AFD4022105545576303AA9A8340C217554D5D5929AA9A63402' +
'208554D536525AA9A4D98E624055860BA3902554D4522AABF0040' +
'AE16CA');
IronOreDtm := DTMFromString('78DA637CCBC0C0E0CB80027C0D5418FE03694' +
'620FE0F048C6F800C2F54350EEA720C22503520C0F80A48F8A0AA' +
'3153944455F31248F833A001465435EF814400A67B50D47C06124' +
'1A86AAC55A451D53CC634A721C313D3CDE1A86A6AD33C50D40000' +
'A571147C');
CoalDtm := DTMFromString('78DA63DCCFC0C0B0990105D8D96A31FC07D28' +
'C40FC1F0818F701191B50D5989AAA30F043D5800023C89CAD98E6' +
'A0A83904243632A001465435BB81C426541506068AA86A8E0289E' +
'D04DCB319D35FA5F1CEA86A760189DDA86A2A125D50D40000C72F' +
'161C');
GoldOreDtm := DTMFromString('78DA637CC7C0C0B08901055C5B2FCDF01F483' +
'302F17F20607C0D64AC4355B3BE5F8C4104AA0604185F629A0392' +
'455103B26B3B0135EF31CDB9BC561A55CD174C734E2E914255F30' +
'8D39CFC287B54352F80C41E543545318E286A00D3471AC4');
MithOreDtm := DTMFromString('78DA6394656460D8C480027CFD0A19FE0369A' +
'00CC37F20609402B2D6A1AAB17788651081AA01014649206B0B03' +
'1A6044552303646D4355E1E99583AA4601D33DAE6E6998E6AC475' +
'5E3EC928CAA4619C8DA8EAAC6DD2313558D20A65DF951F6A86AC4' +
'81AC3DA86A8A621C51D4000096A814CC');
AddyOreDtm := DTMFromString('78DA63F4666460D8CC8002FC93FD19FE0369A' +
'00CC37F2060F404B2D6A2AAB1F1B6611081AA0101460F4C731C83' +
'1C51D5F80059DB19D00023AA9A004C7330D480DCBC1E55855B841' +
'BAA9A20206B1BAA1A8F684F54350E987695C63BA3AA7103B276A3' +
'AA298A41F51700FCB21532');
BronzeBarDtm := DTMFromString('78DA637CCFC8C01008C44820DA4D8BE13F900' +
'689FE0702C6AF409637A61A11A81A1060FC0E6405A1AA89F7D441' +
'55F309C80A27A0E62D901581AA46498A1F55CD0B4C7330D43CC37' +
'48FBE8A28AA9A5740962FAA1A6F2B655435EF802C1FFC6A00C72A' +
'168B');
IronBarDtm := DTMFromString('78DA63AC60646058C78002827C7C18FE0369A' +
'00CC37F2060AC07B2D6A2AA49898D651081AA0101C646206B23A6' +
'39286A6A81AC6DA86AD2E2E351D51401593B51D56869A8A3AA290' +
'0B2B610B00B64CE065435664646286A00318413C4');
SteelBarDtm := DTMFromString('78DA635CC6C8C0B08E01055414E433FC07D24' +
'01986FF40C0B816C85A8FAA6652473B033F540D0830AE01B2B662' +
'9A83A2663190B513558DADA525AA9A054498B310C8DA84AAC6DFC' +
'B0B450D00D69A14A6');
GoldBarDtm := DTMFromString('78DA638C65606060646440069B268A33FC070' +
'903F17F20604CC1547363A30C8306540D0830A60209364C7350D4' +
'2403092E5435F7B6A29903720F1FAA9A186F1E5435E1408283805' +
'D11408205554D59023F8A1A00F38111BC');
MithBarDtm := DTMFromString('78DA63EC616060B8CA8002EC1D6219FE03694' +
'620FE0F048CD330D5F8FA15328840D58000E314207113D31C1435' +
'9381C41D5435FE0125A86A3A81C47D54358A8A06A86ADA80C46D0' +
'276B563BA474BCB0E450D00E3FC150A');
AddyBarDtm := DTMFromString('78DA63DCC3C0C0708D010538063932FC07D28' +
'C40FC1F08180F60AA094C0B641081AA0101C68340E216A639186A' +
'EEA1AA09CE084655B31B48DC4755A3A0A980AA662B90B84DC02E9' +
'09A1BA86AB4CDB451D4000085551622');
FurnaceBronzeDtm := DTMFromString('78DA63B466606098CDC8800CA2DDB418FE036' +
'990E87F206004A9E94755E36DA5CC20025503028C464062220135' +
'DA406226AA1A7D15514C358B51D52849F1A3AAB100124B51D5C47' +
'BEAA0AA710012F308A871C5740F56732661860FB21A00B60D132C' +
'');
end;
//======================================================================\\
procedure SetUpBarType;
begin
Case Players[CurrentPlayer].Strings[0] of
'bronze' :
begin
cbartype := BronzeBarDtm;
coretype := CopperOreDtm;
coretype2 := TinOreDtm;
ore1amnt := 14;
ore2amnt := 14;
end;
'iron' :
begin
cbartype := IronBarDtm;
coretype := IronOreDtm;
coretype2 := 0;
ore1amnt := 28;
ore2amnt := 0;
end;
'ironforge' :
begin
cbartype := IronBarDtm;
coretype := IronOreDtm;
coretype := 0;
ore1amnt := 28;
ore2amnt := 0;
//ring of forging soon to come, nothing atm though.
end;
'steel' :
begin
cbartype := SteelBarDtm;
coretype := IronOreDtm;
coretype2 := CoalDtm;
ore1amnt := 9;
ore2amnt := 18;
end;
'mith' :
begin
cbartype := MithBarDtm;
coretype := MithOreDtm;
coretype2 := CoalDtm;
ore1amnt := 5;
ore2amnt := 20;
end;
'addy' :
begin
cbartype := AddyBarDtm;
coretype := AddyOreDtm;
coretype2 := CoalDtm;
ore1amnt := 4;
ore2amnt := 24;
end;
'rune' :
begin
Writeln('Rune currently not supported. Next player...');
If LoggedIn Then LogOut;
Exit;
end;
end;
end;
//======================================================================\\
function ClickBetweenLadders(direction : String) : Boolean;
var
i, addx, addy, apoints, midx, midy, ladder : Integer;
TPALadder : TPointArray;
begin
SetupSRL;
ladder := FindLadderColor;
if ladder = 0 Then Exit;
Case direction of
'to' : FindColorsSpiralTolerance(641, 130, TPALadder, ladder, 643, 8, mmx2, mmy2, 0);
'back' : FindColorsSpiralTolerance(641, 130, TPALadder, ladder, mmx1, mmy1, mmx2, mmy2, 0);
end;
for i := 0 to High(TPALadder) do
begin
addx := addx + TPALadder[i].x;
addy := addy + TPALadder[i].y;
end;
apoints := High(TPALadder) + 1;
if apoints - 1 = 0 then
begin
Result := False;
Writeln('No ladder points found.');
Exit;
end;
Writeln(IntToStr(addx)+', '+IntToStr(addy));
midx := addx / apoints;
midy := addy / apoints;
Case direction of
'to' : Mouse(midx + 20, midy - 12, 4, 3, true);
'back' : Mouse(midx - 10, midy, 4, 0, true);
end;
GetMousePos(xz, yz);
Writeln('ClickBetweenLadders at ' + IntToStr(xz) + ', ' + IntToStr(yz) + '.');
Result := True;
wait(100);
end;
//======================================================================\\
function IsEnterAmount : Boolean;
var
enteramnt : Integer;
begin
enteramnt := DTMFromString('78DA63BCCEC0C0308191011DB0023148F43F1' +
'030DEC1547361EF6C300D13657C84DD1C1435CF8950F38E08355F' +
'885003621152C341841A61C26A002EF710D1');
If FindDTM(enteramnt, xz, yz, 7, 345, 493, 458) then
Result := True;
If FindDTM(enteramnt, xz, yz, 7, 345, 493, 458) = false then
Result := False;
end;
//======================================================================\\
function AtBankFloor : Boolean;
var
mark : LongInt;
begin
MakeCompass('n');
MarkTime(mark);
repeat
if (GetColor(644, 155) = 65536) and (GetColor(577, 85) = 65536) then
begin
SymbolAccuracy := 0.4;
If (FindSymbolIn(xz, yz, 'bank', mmx1, mmy1, mmx2, mmy2)) or
(FindSymbolIn(xz, yz, 'guide', mmx1, mmy1, mmx2, mmy2)) then
begin
Result := True;
SymbolAccuracy := 0.8;
Writeln('We are on the bank floor');
Exit;
end else Result := False;
end else
begin
Result := False;
wait(50);
end;
until(TimeFromMark(mark) > 12000);
end;
//======================================================================\\
function AtSecondFloor : Boolean;
var
mark : LongInt;
begin
MakeCompass('n');
MarkTime(mark);
repeat
if (GetColor(644, 155) = 65536) and (GetColor(577, 85) = 65536) then
begin
SymbolAccuracy := 0.7;
if (FindSymbolIn(xz, yz, 'spin', mmx1, mmy1, mmx2, mmy2)) or
(FindSymbolIn(xz, yz, 'quest', mmx1, mmy1, mmx2, mmy2)) then
begin
Result := True;
SymbolAccuracy := 0.8;
Writeln('We are on the second floor');
Exit;
end else Result := False;
end else
begin
Result := False;
wait(50);
end;
until(TimeFromMark(mark) > 12000);
end;
//======================================================================\\
function AtGroundFloor : Boolean;
var
mark : LongInt;
begin
MakeCompass('n');
MarkTime(mark);
repeat
if (not(GetColor(644, 155) = 65536)) and (not(GetColor(577, 85) = 65536)) then
begin
SymbolAccuracy := 0.4;
if (FindSymbolIn(xz, yz, 'water', mmx1, mmy1, mmx2, mmy2)) or
(FindSymbolIn(xz, yz, 'cook', mmx2, mmy1, mmx2, mmy2)) then
begin
Result := True;
SymbolAccuracy := 0.8;
Writeln('We are on the ground floor');
Exit;
end else Result := False;
end else
begin
Result := False;
wait(50);
end;
until(TimeFromMark(mark) > 12000);
end;
//======================================================================\\
function IsAmount : Boolean;
var
k : Integer;
begin
repeat
if IsEnterAmount = True then //Is Enter Amount box up?
begin
k := 26;
Result := True;
end else
begin
k := k + 1;
wait(100 + random(50));
end;
until(k >= 10);
if k = 10 then
begin
Result := False;
Writeln('Could not find ''Enter Amount'' text after 10 attempts.');
end;
end;
//======================================================================\\
function Finished : Boolean;
begin
if FindDTM(coretype, xz, yz, 560, 210, 731, 459) Then
begin
If ddbg then Writeln('Not finished.');
Result := False;
wait(100);
Exit;
end;
Result := True;
end;
//======================================================================\\
function AlmostFinished : Boolean;
var
ores : Integer;
begin
GameTab(4);
ores := CountItemsDtm('inv', coretype);
if ores <= 3 then
begin
Result := True;
Exit;
end else Result := False;
end;
//======================================================================\\
function DAntiBan : Boolean;
var
k : Integer;
fs1 : Boolean;
begin
Case random(7) Of
0 : begin
if AlmostFinished then Exit;
if (antiban = 2) or (antiban = 0) or (antiban <> 1) then
begin
MouseBack(257, 157, 8, 8, 50, 90, 2);
If FindNormalRandoms then
begin
Result := True;
Writeln('Random found and interrupted smelting. Starting again...');
Exit;
end;
If FTWait(16 + random(10)) then
begin
Result := True;
Writeln('Random found and interrupted smelting. Starting again...');
Exit;
end;
If ddbg Then Writeln('--AntiBan 0');
antiban := 1;
Result := False;
end else
begin
If FTWait(8 + random(3)) then
begin
Result := True;
Writeln('Random found and interrupted smelting. Starting again...');
Exit;
end;
if FindNormalRandoms then
begin
Result := True;
Writeln('Random found and interrupted smelting. Starting again...');
Exit;
end;
Result := False;
end;
end;
1 : begin
if AlmostFinished then Exit;
if antiban <> 2 then
begin
PickUpMouse;
If FindNormalRandoms then
begin
Result := True;
Writeln('Random found and interrupted smelting. Starting again...');
Exit;
end;
SleepAndMoveMouse(2000 + random(4000));
If ddbg Then Writeln('--AntiBan 1');
antiban := 2;
Result := False;
end else
begin
If FTWait(random(2)) then
begin
Result := True;
Writeln('Random found and interrupted smelting. Starting again...');
Exit;
end;
If FindNormalRandoms then
begin
Result := True;
Writeln('Random found and interrupted smelting. Starting again...');
Exit;
end;
Result := False;
end;
end;
2 : begin
if AlmostFinished then Exit;
if (antiban = 2) or (antiban = 0) or (antiban <> 3) then
begin
GameTab(random(13) + 1);
If FTWait(8) then
begin
Result := True;
Writeln('Random found and interrupted smelting. Starting again...');
Exit;
end;
if FindNormalRandoms then
begin
Result := True;
Writeln('Random found and interrupted smelting. Starting again...');
Exit;
end;
If ddbg Then Writeln('--AntiBan 2');
antiban := 3;
Result := False;
end else
begin
if FTWait(8 + random(3)) then
begin
Result := True;
Writeln('Random found and interrupted smelting. Starting again...');
Exit;
end;
if FindNormalRandoms then
begin
Result := True;
Writeln('Random found and interrupted smelting. Starting again...');
Exit;
end;
Result := False;
end;
end;
3 : begin
if AlmostFinished then Exit;
if (antiban = 2) or (antiban = 0) or (antiban <> 4) then
begin
if FindNormalRandoms then
begin
Result := True;
Writeln('Random found and interrupted smelting. Starting again...');
Exit;
end;
repeat
MMouse(random(msx2), random(msy2), 3, 3);
k := k + 1;
if IsUpText('ptio') then
begin
GetMousePos(xz, yz);
MouseBack(xz, yz, 0, 0, 50, 70, 2);
fs1 := True;
end else wait(1000);
until(k > 5) or (fs1 = true) or (Finished);
if FindNormalRandoms then
begin
Result := True;
Writeln('Random found and interrupted smelting. Starting again...');
Exit;
end;
if ddbg then Writeln('--AntiBan 3');
antiban := 4;
Result := False;
end else
begin
if FTWait(8 + random(3)) then
begin
Result := True;
Writeln('Random found and interrupted smelting. Starting again...');
Exit;
end;
if FindNormalRandoms then
begin
Result := True;
Writeln('Random found and interrupted smelting. Starting again...');
Exit;
end;
Result := False;
end;
end;
4 : begin
if AlmostFinished then Exit;
if (antiban = 2) or (antiban = 0) or (antiban <> 5) then
begin
GameTab(2);
MMouse(685, 245, 10, 10);
if FindNonInventoryRandoms then
begin
Result := True;
Writeln('Random found and interrupted smelting. Starting again...');
Exit;
end;
if FTWait(16 + random(6)) then
begin
Result := True;
Writeln('Random found and interrupted smelting. Starting again...');
Exit;
end;
GameTab(4);
if FindInventoryRandoms then
begin
Result := True;
Writeln('Random found and interrupted smelting. Starting again...');
Exit;
end;
if ddbg then Writeln('--AntiBan 4');
antiban := 5;
Result := False;
end else
begin
if FTWait(8 + random(3)) then
begin
Result := True;
Writeln('Random found and interrupted smelting. Starting again...');
Exit;
end;
if FindNormalRandoms then
begin
Result := True;
Writeln('Random found and interrupted smelting. Starting again...');
Exit;
end;
Result := False;
end;
end;
5, 6, 7 : begin
if AlmostFinished then Exit;
if FindNormalRandoms then
begin
Result := True;
Writeln('Random found and interrupted smelting. Starting again...');
Exit;
end;
SleepAndMoveMouse(3000 + random(4000));
if FindNormalRandoms then
begin
Result := True;
Writeln('Random found and interrupted smelting. Starting again...');
Exit;
end;
if ddbg then Writeln('--AntiBan 5, 6, 7');
antiban := 0;
Result := False;
end;
end;
end;
//======================================================================\\
procedure OreFromBank;
var
q : Integer;
fs1, fs2, fs3, fs4, fs5 : Boolean;
begin
If not LoggedIn Then Exit;
if not BankScreen Then
begin
Status('Getting ores from bank.');
OpenBankFast('lb'); //Begin open bank
Flag;
wait(50 + random(50));
If BankScreen = False then
begin
repeat
OpenBankFast('lb');
q := q + 1;
Flag;
wait(100);
If BankScreen = False then
q := q + 1;
If BankScreen = True then
fs1 := True;
wait(100 + random(100));
until(q = 10) or (fs1 = True);
if q = 10 then
begin //fs
Writeln('Could not find bank or bank screen after 10 attempts. Next player...');
LogOut;
Exit;
end;
end;
end;
q := 0;
wait(200 + Random(300));
DepositAll;
repeat
If FindDtm(coretype, xz, yz, banx1, bany1, banx2, bany2) = false then
begin
If ddbg Then Writeln('debug: Ore DTM 1 not found. Attempt #' + IntToStr(q + 1) + '.');
q := q + 1;
wait(50);
end else
fs2 := True;
until(q = 10) or (fs2 = True);
if fs2 = False then
begin
Writeln('Ore DTM 1 not found on first bank page after 10 attempts. Next player...');
LogOut;
Exit;
end;
q := 0;
if coretype2 <> 0 Then
begin
repeat
If FindDtm(coretype2, xz, yz, banx1, bany1, banx2, bany2) = false then
begin
If ddbg Then Writeln('debug: Ore DTM 2 not found. Attempt #' + IntToStr(q + 1) + '.');
q := q + 1;
wait(50);
end else
fs3 := True;
until(q = 10) or (fs3 = True);
if fs2 = False then //fs
begin
Writeln('Ore DTM 2 not found on first bank page after 10 attempts. Next player...');
LogOut;
Exit;
end;
end;
q := 0; //reset q
If FindDTM(coretype, xz, yz, banx1, bany1, banx2, bany2) then
begin
If ddbg Then Writeln('debug: Found ore 1 in your bank');
If ddbg Then Writeln('debug: x = ' + IntToStr(xz) + ', y = ' + IntToStr(yz) + '.');
end;
wait(100 + random(100));
repeat
Mouse(xz, yz, 4, 4, false);
If ddbg Then Writeln('debug: Right clicked the ore DTM 1 in your bank. Attempt '+IntToStr(q+1)+'.');
Wait(100 + random(100));
if ChooseOption('Withdraw X') = false then
begin
q := q + 1;
end else
fs4 := True;
until (q = 5) or (fs4 = True);
if fs4 = false then
begin
writeln('Couldn''t "Withdraw X" after 5 attempts. Next player...');
LogOut;
Exit;
end;
If ddbg Then Writeln('debug: Withdraw X Found.');
q := 0;
wait(100 + random(100));
If IsAmount = False Then Exit;
wait(100 + random(100));
TypeSend(IntToStr(ore1amnt));
If ddbg then Writeln('Withdrew Ore 1!');
Wait(100 + random(100));
q := 0;
If coretype2 <> 0 Then
begin
If FindDTM(coretype2, xz, yz, banx1, bany1, banx2, bany2) then
begin
If ddbg Then Writeln('debug: Found ore DTM 2 in your bank');
If ddbg Then Writeln('debug: x = ' + IntToStr(xz) + ', y = ' + IntToStr(yz) + '.');
end;
wait(100 + random(100));
repeat
Mouse(xz, yz, 4, 4, false);
If ddbg Then Writeln('debug: Right clicked the ore DTM 2 in your bank. Attempt '+IntToStr(q+1)+'.');
Wait(100 + random(100));
if ChooseOption('Withdraw X') = false then
begin
q := q + 1;
wait(50);
end else
fs5 := True;
until (q = 5) or (fs5 = true);
if fs5 = False then
begin
writeln('Couldn''t "Withdraw X" after 5 attempts. Next player...');
LogOut;
Exit;
end;
wait(100 + random(100));
If IsAmount = False Then Exit;
wait(100 + random(100));
TypeSend(IntToStr(ore2amnt));
Writeln('Withdrew Ore 2!');
Wait(100 + random(100));
end;
If CloseBank Then
begin
If ddbg then Writeln('Closed the bank.');
If ddbg then Writeln('');
end;
end;
//======================================================================\\
function LumbyStairWalk(Direction : String) : Boolean;
var
q : Integer;
LTPA : TPointArray;
mark : LongInt;
begin
if not LoggedIn then Exit;
Case Direction Of
'click' : begin
MarkTime(mark);
repeat
FindColorsSpiralTolerance(169, 226, LTPA, 669521, 6, 115, 332, 337, 5);
for q := 0 to High(LTPA) do
begin
MMouse(LTPA[q].x, LTPA[q].y, 3, 3);
Wait(75 + Random(50));
If IsUpText('Climb') Then
begin
Mouse(LTPA[q].x + random(10), LTPA[q].y - 3 - random(7), 0, 0, True);
If ddbg then Writeln('LSW: Clicked stairs.');
Result := True;
Exit;
end;
end;
until(TimeFromMark(mark) > 20000);
end;
'down' : begin
MarkTime(mark);
repeat
FindColorsSpiralTolerance(223, 250, LTPA, 737631, 162, 163, 284, 337, 5);
for q := 0 to High(LTPA) do
begin
MMouse(LTPA[q].x, LTPA[q].y, 3, 3);
Wait(75 + Random(50));
If IsUpText('Climb') Then
begin
Mouse(LTPA[q].x, LTPA[q].y, 3, 3, False);
wait(75 + random(50));
ChooseOption('Climb-down');
If ddbg then Writeln('LSW: Clicked stairs.');
Result := True;
Exit;
end;
end;
until(TimeFromMark(mark) > 20000);
end;
'up' : begin
MarkTime(mark);
repeat
FindColorsSpiralTolerance(223, 250, LTPA, 737631, 162, 163, 284, 337, 5);
for q := 0 to High(LTPA) do
begin
MMouse(LTPA[q].x, LTPA[q].y, 3, 3);
Wait(75 + Random(50));
If IsUpText('Climb') Then
begin
Mouse(LTPA[q].x, LTPA[q].y, 3, 3, False);
wait(75 + random(50));
ChooseOption('Climb-up');
if ddbg then Writeln('LSW: Clicked stairs.');
Result := True;
Exit;
end;
end;
until(TimeFromMark(mark) > 20000);
end;
'clickup' : begin
MarkTime(mark);
repeat
FindColorsSpiralTolerance(156, 270, LTPA, 737631, 5, 207, 307, 332, 5);
for q := 0 to High(LTPA) do
begin
MMouse(LTPA[q].x, LTPA[q].y, 3, 3);
Wait(75 + Random(50));
If IsUpText('Climb') Then
begin
Mouse(LTPA[q].x, LTPA[q].y, 0, 0, True);
if ddbg then Writeln('LSW: Clicked stairs.');
Result := True;
Exit;
end;
end;
until(TimeFromMark(mark) > 20000);
end;
end;
end;
//======================================================================\\
procedure DownTheStairs;
var
downmark : LongInt;
begin
If not LoggedIn then Exit;
LumbyRoadColor := FindRoadColor;
SetRun(True);
wait(200 + random(100));
GameTab(4);
FindNormalRandoms;
wait(100 + random(100));
Status('Walking to and going down stairs.');
If RadialWalk(LumbyRoadColor, 185, 205, 50, 1, 1) = False Then
begin
Writeln('DownTheStairs RadialWalk problem. Next player...');
LogOut;
Exit;
end;
Flag;
wait(500 + random(200));
MarkTime(downmark);
If LumbyStairWalk('click') = False Then
begin
Writeln('LSW: Next player...');
LogOut;
Exit;
end;
wait(1000);
If not AtSecondFloor then
begin
Writeln('Not at second floor. Trying again...');
If LumbyStairWalk('click') = False Then
begin
Writeln('LSW: Next player...');
LogOut;
Exit;
end;
If not AtSecondFloor then
begin
Writeln('Second attempt failed. Next player...');
LogOut;
Exit;
end;
end;
Writeln(IntToStr(TimeFromMark(downmark)) + ' milliseconds');
wait(100 + random(100));
Status('Down the stairs again...');
MarkTime(downmark);
If LumbyStairWalk('down') = False Then
begin
Writeln('LSW: Next player...');
LogOut;
Exit;
end;
wait(1000);
If not AtGroundFloor then
begin
Writeln('Not at ground floor. Next player...');
LogOut;
Exit;
end;
Writeln(IntToStr(TimeFromMark(downmark)) + ' milliseconds');
Status('On ground floor of lumbridge castle');
FTWait(2);
wait(random(200));
end;
//======================================================================\\
procedure ToTheFurnace;
var
q : Integer;
fs1 : Boolean;
begin
If not LoggedIn Then Exit;
LumbyRoadColor := FindRoadColor;
Status('Walking to the furnace');
wait(100 + random(100));
GameTab(4);
FTWait(1);
FindNormalRandoms;
If RadialWalk(LumbyRoadColor, 40, 55, 88, 0, 0) = False Then
begin
Writeln('RadialWalk problem #1 in ToTheFurnace. Next player...');
LogOut;
Exit;
end;
Flag;
FindNormalRandoms;
If not ClickBetweenLadders('to') then
begin
Writeln('ClickBetweenLadders failed. Next player...');
LogOut;
Exit;
end;
Flag;
if RadialRoadWalk(LumbyRoadColor, 320, 359, 58, 1, 1) = False Then
begin
Writeln('RadialWalk problem #2 in ToTheFurnace. Next player...');
LogOut;
Exit;
end;
Flag;
FindNormalRandoms;
If RadialRoadWalk(LumbyRoadColor, 330, 10, 58, 1, 1) = False Then
begin
Writeln('RadialWalk problem #3 in ToTheFurnace. Next player...');
LogOut;
Exit;
end;
Flag;
FindNormalRandoms;
If RadialRoadWalk(LumbyRoadColor, 320, 350, 50, 1, 1) = False Then
begin
Writeln('RadialWalk problem #4 in ToTheFurnace. Next player...');
LogOut;
Exit;
end;
Flag;
FindNormalRandoms;
SymbolAccuracy := 0.5;
repeat
If FindSymbol(xz, yz, 'furnace') = False Then
begin
q := q + 1;
Writeln('Couldn''t find furnace symbol. Attempt #' + IntToStr(q) + '.');
end else
begin
Writeln('Furnace found.');
fs1 := True;
end;
until(q = 10) or (fs1 = true);
if q = 10 Then
begin
Writeln('Couldn''t find furnace symbol after 10 attempts. Next player...');
LogOut;
Exit;
end;
Mouse(xz - 10 + random(15), yz - 10 + random(15), 2, 2, true);
Writeln('Clicked furnace symbol.');
Flag;
SymbolAccuracy := 0.8;
end;
//======================================================================\\
function OpenFurnace3 : Boolean; //Modified version of SRL's OpenFurnace2
var //My names are very unique as you can see.
i : Integer;
begin
if (not (LoggedIn)) then
Exit;
FindColorsSpiralTolerance(247, 166, TPA, 1914018, MSX1, MSY1, MSX2, MSY2, 20);
for i := 0 to High(TPA) do
begin
MMouse(TPA[i].x, TPA[i].y, 2, 2);
if (IsUpText('mel')) then
begin
Mouse(TPA[i].x + Random(15), TPA[i].y, 2, 2, True);
wait(50);
Flag;
Result := True;
Exit;
end else wait(200);
end;
Result := False;
end;
//======================================================================\\
function WhichBarToSmelt(Bartype : String) : Boolean;
var
bronze, iron, steel, mith, addy, gold : Integer;
begin
bronze := 2374733;
iron := 5000274;
steel := 7303288;
mith := 6111295;
addy := 4280897;
gold := 1544626;
Case Bartype of
'bronze' :
begin
If FindColorTolerance(xz, yz, bronze, 28, 391, 76, 442, 10) then
begin
Mouse(xz, yz, 5, 5, false);
wait(50 + random(50));
ChooseOption('Smelt X');
Result := True;
end else
begin
Writeln('Bronze bar not found at smelting menu.');
Result := False;
end;
end;
'iron' :
begin
If FindColorTolerance(xz, yz, iron, 134, 391, 177, 442, 10) then
begin
Mouse(xz, yz, 5, 5, false);
wait(50 + random(50));
ChooseOption('Smelt X');
Result := True;
end else
begin
Writeln('Iron bar not found at smelting menu.');
Result := False;
end;
end;
'steel' :
begin
If FindColorTolerance(xz, yz, steel, 237, 391, 283, 442, 10) then
begin
Mouse(xz, yz, 5, 5, false);
wait(50 + random(50));
ChooseOption('Smelt X');
Result := True;
end else
begin
Writeln('Steel bar not found at smelting menu.');
Result := False;
end;
end;
'mith' :
begin
If FindColorTolerance(xz, yz, mith, 337, 391, 388, 442, 10) then
begin
Mouse(xz, yz, 5, 5, false);
wait(50 + random(50));
ChooseOption('Smelt X');
Result := True;
end else
begin
Writeln('Mith bar not found at smelting menu.');
Result := False;
end;
end;
'addy' :
begin
If FindColorTolerance(xz, yz, addy, 392, 391, 440, 442, 10) then
begin
Mouse(xz, yz, 5, 5, false);
wait(50 + random(50));
ChooseOption('Smelt X');
Result := True;
end else
begin
Writeln('Addy bar not found at smelting menu.');
Result := False;
end;
end;
'gold' :
begin
If FindColorTolerance(xz, yz, gold, 287, 391, 335, 442, 10) then
begin
Mouse(xz, yz, 5, 5, false);
wait(50 + random(50));
ChooseOption('Smelt X');
Result := True;
end else
begin
Writeln('Gold bar not found at smelting menu.');
Result := False;
end;
end;
end;
end;
//======================================================================\\
procedure OpenAndSmelt;
label
RandomInterrupt;
label
Misclick;
var
ores : Integer;
randomed, misclickbool : Boolean;
begin
misclickbool := false;
if not LoggedIn then Exit;
FindNormalRandoms;
Status('Opening the furnace.');
RandomInterrupt:
GameTab(4);
FTWait(1);
ores := CountItemsDtm('inv', coretype);
If not OpenFurnace3 then
begin
Writeln('Furnace not found. Next player...');
LogOut;
Exit;
end;
If not LoggedIn then Exit;
Flag;
FTWait(1);
Status('Smelting.');
Misclick:
WhichBarToSmelt(Players[CurrentPlayer].strings[0]);
If IsAmount = False Then
begin
if misclickbool = true then
begin
LogOut;
Exit;
end;
if (misclickbool = false) and (CountItemsDtm('inv', coretype) <> 0) then
begin
Writeln('Maybe me misclicked?');
Misclickbool := true;
Goto Misclick;
end;
end;
wait(50 + random(50));
TypeSend(IntToStr(ores));
MarkTime(smeltime);
repeat
If DAntiBan then Randomed := True;
If ClickContinue(true, true) then
begin
ClickContinue(true, true);
GameTab(4);
wait(100);
ores := CountItemsDtm('inv', coretype);
If not OpenFurnace3 then
begin
Writeln('Couldn''t restart smelting. Next player...');
LogOut;
Exit;
end;
wait(1000);
If not WhichBarToSmelt(Players[CurrentPlayer].strings[0]) then
begin
Writeln('Couldn''t restart smelting. Error2. Next player...');
LogOut;
Exit;
end;
IsAmount;
TypeSend(IntToStr(ores));
end;
until(Finished) or (TimeFromMark(smeltime) > 100000) or (Randomed = True);
If Randomed = True Then Goto RandomInterrupt;
If not LoggedIn Then Exit;
Case Random(4) of
0 :
begin
FTWait(1);
smith := GetSkillAmount('smithing');
FTWait(2 + Random(1));
end;
end;
GameTab(4);
end;
//======================================================================\\
function NotCookSymbol(xz, yz : Integer) : Boolean;
var
ix, iy, x, y, i, q, tempx, tempy : Integer;
begin
SymbolAccuracy := 0.5;
If FindSymbolIn(x, y, 'cook', mmx1, mmy1, mmx2, mmy2) then
begin
ix := ix;
iy := iy;
tempx := x - 8;
tempy := y - 4;
for i := 0 to 15 do
begin
if tempx = ix then
begin
for q := 0 to 7 do
begin
if tempy = iy then
begin
Writeln('Its a cooking symbol point.');
Result := False;
Exit;
end;
tempy := tempy + 1;
end;
end;
tempx := tempx + 1;
end;
end else
begin
Writeln('Cooking symbol not found. Good to go!');
end;
Result := True;
end;
//======================================================================\\
procedure BackToLumby;
var
q, i : Integer;
fs1 : Boolean;
begin
If Not LoggedIn Then Exit;
LumbyRoadColor := FindRoadColor;
Status('Walking back to lumbridge castle');
wait(50 + random(50));
If RadialRoadWalk(LumbyRoadColor, 160, 230, 55, 4, 4) = False Then
begin
Writeln('debug: RadialWalk problem #1 in BackToLumby. Next player...');
LogOut;
Exit;
end;
If ddbg Then Writeln('RadialWalk #1 in BackToLumby Successful');
SetRun(true);
wait(50 + random(50));
GameTab(4);
Flag;
FindNormalRandoms;
If RadialWalk(LumbyRoadColor, 110, 160, 49, 1, 1) = False Then //was 48
begin
Writeln('debug: RadialWalk problem #2 in BackToLumby. Looking for guide symbol...');
SymbolAccuracy := 0.5;
repeat
If FindSymbolIn(xz, yz, 'guide', 645, 110, 717, 161) = False Then
begin
q := q + 1
Writeln('debug: Couldn''t find guide symbol. Attempt #' + IntToStr(q) + '.');
end else
begin
Writeln('debug: Guide symbol found blocking RadialWalk.');
fs1 := True;
end;
until(q = 10) or (fs1 = true);
if q = 10 Then
begin
Writeln('debug: Couldn''t find guide symbol after 10 attempts. Next player...');
LogOut;
Exit;
end;
Mouse(xz, yz, 2, 2, true);
Writeln('debug: Clicked guide symbol.');
Flag;
SymbolAccuracy := 0.8;
end else
begin
If ddbg Then Writeln('RadialWalk #2 in BackToLumby Successful');
Flag;
FindNormalRandoms;
end;
If RadialRoadWalk(LumbyRoadColor, 170, 185, 60, 0, 3) = False Then //was 59 -2
begin
Writeln('debug: RadialWalk problem #3 in BackToLumby. Next player...');
LogOut;
Exit;
end;
If ddbg Then Writeln('RadialWalk #3 in BackToLumby Successful');
Flag;
FindNormalRandoms;
If not ClickBetweenLadders('back') then
begin
Writeln('ClickBetweenLadders 2 Failed. Next player...');
LogOut;
Exit;
end;
Flag;
If RadialRoadWalk(LumbyRoadColor, 265, 280, 38, -6, 12 + random(5)) = False Then //was 0
begin
Writeln('debug: RadialWalk problem #4 in BackToLumby. Next player...');
LogOut;
Exit;
end;
If ddbg Then Writeln('RadialWalk #4 in BackToLumby Successful');
Flag;
FindNormalRandoms;
FindColorsSpiralTolerance(596, 115, TPA, FindLadderColor, 575, 96, 616, 134, 0);
for i := 0 to High(TPA) do
begin
If NotCookSymbol(TPA[i].x, TPA[i].y) Then
begin
Mouse(TPA[i].x + 4 + random(3), TPA[i].y - 8 - random(2), 0, 0, true);
i := High(TPA);
Writeln('Clicked a non-cooking symbol point.');
end else wait(50);
end;
Flag;
Writeln('We are in Lumbridge Castle again.');
end;
//======================================================================\\
procedure UpTheStairs;
var
upmark : LongInt;
begin
If not LoggedIn Then Exit;
Flag;
wait(100 + random(200));
Status('Walking upstairs.');
MarkTime(upmark);
If LumbyStairWalk('clickup') = False Then
begin
Writeln('LSW: Next player...');
LogOut;
Exit;
end;
wait(1000);
If not AtSecondFloor then
begin
Writeln('Not at second floor. Next player...');
LogOut;
Exit;
end;
Writeln(IntToStr(TimeFromMark(upmark)) + ' milliseconds');
wait(100 + random(100));
MarkTime(upmark);
If LumbyStairWalk('up') = False Then
begin
Writeln('LSW: Next player...');
LogOut;
Exit;
end;
wait(1000);
If not AtBankFloor then
begin
Writeln('Not at bank floor. Next player...');
LogOut;
Exit;
end;
Writeln(IntToStr(TimeFromMark(upmark)) + ' milliseconds');
wait(100 + random(100));
wait(random(200));
end;
//======================================================================\\
procedure StatusReport;
var
i : Integer;
active : String;
begin
Writeln('');
Writeln('');
Writeln('/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\');
Writeln('| Ducels'' Lumby Auto Smither v0.40 ');
Writeln('| Ran for '+ TimeRunning + ' so far.');
Writeln('| Smelted a total of ' + IntToStr(sBars) + ' so far.');
Writeln('|');
for i := 0 to hmp - 1 do
begin
If Players[i].Active = True then active := 'T';
If Players[i].Active = False then active := 'F';
Writeln('| ' + IntToStr(i) + ': ' + Players[i].Name + '. ' + active + '. Smithing = ' + IntToStr(Players[i].level[16])+
+ '. Smelted ' + IntToStr(Players[i].Integers[1]) + ' bars.');
end;
Writeln('\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/');
Writeln('');
Writeln('');
end;
//======================================================================\\
function EveryoneFalse : Boolean;
var
i : Integer;
begin
for i:= 0 to hmp - 1 do
begin
if Players[i].Active = True then
begin
Result := False;
Exit;
end;
end;
Result := True;
end;
//======================================================================\\
procedure ItsBankTime;
var
q : Integer;
fs1 : Boolean;
begin
If not LoggedIn Then Exit;
Status('Walking to the bank');
LumbyRoadColor := FindRoadColor;
FindNormalRandoms;
If RadialWalk(LumbyRoadColor, 3, 13, 50, 1, 1) = False Then
begin
Writeln('debug: RadialWalk into the bank failed. Next player...');
LogOut;
Exit;
end;
Flag;
wait(100 + random(100));
OpenBankFast('lb');
Status('Banking!');
Flag;
wait(50 + random(50));
If BankScreen = False then
begin
repeat
OpenBankFast('lb');
q := q + 1;
Flag;
wait(100);
If BankScreen = False then
q := q + 1 ;
If BankScreen = True then
fs1 := True;
wait(100 + random(100));
until(q = 10) or (fs1 = True)
if q = 10 then
begin //fs
Writeln('debug: Could not find bank or bank screen after 10 attempts. Next player...');
LogOut;
Exit;
end;
end;
Players[CurrentPlayer].Integers[1] := Players[CurrentPlayer].Integers[1] + CountItemsDtm('inv', cbartype);
sBars := sBars + CountItemsDtm('inv', cbartype);
ReportVars[0] := ReportVars[0] + CountItemsDtm('inv', cbartype);
SendSRLReport;
pLoads := pLoads + 1;
tLoads := tLoads + 1;
DepositAll;
If pLoads <> loads then StatusReport;
end;
//======================================================================\\
procedure StatsSetup;
begin
If not LoggedIn then Exit;
GetAllLevels;
wait(100 + random(50));
GetCombatLevel;
wait(100 + random(50));
end;
//======================================================================\\
procedure ScriptSetup;
begin
ClearDebug;
SetupSRL;
ScriptID := '520';
DeclarePlayers;
ActivateClient;
DeclareGlobals;
If (SRLId = '') or (SRLPassword = '') then
begin
If (SRLId = '') and (SRLPassword = '') then
begin
Writeln('');
Writeln('');
Writeln('Please sign up for SRL Stats at [url]http://www.stats.srl-forums.com/[/url] and press register.');
Writeln('');
Writeln('');
Writeln('Starting script now...');
end else
begin
Writeln('');
Writeln('');
Writeln('SRL ID/Password filled out incorrectly. Please fix them.');
TerminateScript;
end;
end;
banx1 := 71;
bany1 := 63;
banx2 := 466;
bany2 := 296;
end;
//===========================The Main Loop==============================\\
begin
ScriptSetup;
LoginPlayer;
wait(100);
HighestAngle;
StatsSetup;
repeat
repeat
SetUpBarType;
MakeCompass('n');
HighestAngle;
OreFromBank;
DownTheStairs;
ToTheFurnace;
OpenAndSmelt;
BackToLumby;
UpTheStairs;
ItsBankTime;
SRLRandomsReport;
until(not(LoggedIn)) or (pLoads >= loads);
if (LoggedIn) and (pLoads >= loads) then
begin
Writeln('');
Writeln(Players[CurrentPlayer].Name + ' is done.');
Writeln('');
CloseBank;
GetAllLevels;
StatusReport;
LogOut;
If hmp = 1 Then
begin
MarkTime(sleeptime);
repeat
wait(1000);
until(TimeFromMark(sleeptime) > oneplayerwait);
end;
NextPlayer(true);
pLoads := 0;
StatsSetup;
end else
begin
Writeln('');
Writeln(Players[CurrentPlayer].Name + ' is lost.');
Writeln('');
Players[CurrentPlayer].Active := False;
If EveryoneFalse Then Break;
NextPlayer(false);
StatsSetup;
end;
until(EveryoneFalse);
Writeln('EveryoneFalse = True.');
Writeln('No more active players.');
Writeln('');
Writeln('Ending script...');
end.Ok, edited.
——————————————————
<!– END TEMPLATE: formanswers –>