A boolean seems easier to use/understand/check for the Switch thing. :) I was bored so I read through it (I standardize/edit some when I do that :p) and all I changed was a few begin..ends that weren't needed. And your proggy. And the Switch for walking.
{
__________________________________________________________
/ Coo Too's Contribution To \
( Global Warming )
)==========================================================(
( This script burns any logs outside of varrock west bank )
\__________________________________________________________/
/ Instructions \
|============================================================|
( 1.Put the logs you wish to burn in your first bank slot )
) 2.Put a tinderbox in your first inventory slot (
( 3.Make sure your player is in varrock west bank )
) 4.Make sure you have the right amount of logs for the (
( amount of loads you chose to do )
) 5.Post any progress reports or bugs (
( )
\__________________________________________________________/
}
program coo_toos_contribution_to_global_warming;
{.include SRL/SRL/Misc/SMART.scar}
{.include srl/srl.scar}
{.include SRL/SRL/Skill/Firemaking.scar}
const
Loads = 10; //number of loads to do
LampS = 'Firemaking';
Firewait = 1000; //increase to wait longer between fires, decrease to wait less between fires
SmartWorld = 171;
SmartMembers = False;
SmartSigned = True;
SmartSuperDetail = False;
var
i: Integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; //user name
Players[0].Pass := ''; //password
Players[0].Nick := ''; //3-4 letters representing the player
Players[0].Pin := '0000'; // Bank Pin
Players[0].Active := True;
end;
procedure Setup_SMART;
begin
Smart_Server := SmartWorld;
Smart_Members := SmartMembers;
Smart_Signed := SmartSigned;
Smart_SuperDetail := SmartSuperDetail;
end;
procedure Setup_Player;
begin
DeclarePlayers;
if(not(LoggedIn))then
LoginPlayer;
Wait(500 + Random(1000));
end;
procedure signature;
begin
Writeln(' ___ _____ _');
Writeln(' / __|___ ___ |_ _|___ ___( )___');
Writeln(' | (__/ _ | _ \ | | / _ | _ \/(_-<');
Writeln(' \___\___|___/ |_| \___|___/ /__/');
Writeln(' ___ _ _ _ _ _ _ ');
Writeln(' / __|___ _ _| |_ _ _(_) |__ _ _| |_(_)___ _ _ | |_ ___ ');
Writeln(' | (__/ _ \ ` \ _| `_| | `_ \ || | _| / _ \ ` \ | _/ _ \');
Writeln(' \___\___/_||_\__|_| |_|_.__/\_,_|\__|_\___/_||_| \__\___/ ');
Writeln(' ___ _ _ _ __ __ _ ');
Writeln(' / __| |___| |__ __ _| | \ \ / /__ _ _ _ _ __ (_)_ _ __ _');
Writeln(' | (_ | / _ \ `_ | _` | | \ \/\/ // _` | `_| ` \| | ` \/ _` |');
Writeln(' \___|_\___/_.__|__,_|_| \_/\_/ \__,_|_| |_|_|_|_|_||_\__, |');
Writeln(' |___/');
Wait(2000);
end;
procedure Anti_Randoms;
begin
FindNormalRandoms;
LampSkill := LampS;
UseRewardBox;
FindLamp(LampSkill);
end;
procedure Open_Bank;
var
PinTries, Tries, Success: Integer;
begin
if(not(LoggedIn))then
TerminateScript;
Writeln('Trying to open bank');
if(not(InvFull))then
begin
repeat
OpenBankFast(Bank_VW);
Wait(500 + Random(500));
if(not(BankScreen)or(Pinscreen))then
Inc(Tries);
if(Bankscreen or Pinscreen)then
IncEx(Success, 5);
if(Tries > 10)then
begin
Writeln('Failed to bank... terminating script.');
LogOut;
TerminateScript;
end;
until(success > 2);
Writeln('Successfully opened bank');
if(PinScreen)then
begin
PinTries := 0;
repeat
InPin(Players[0].Pin);
Wait(100 + Random(300));
if(not(BankScreen))then
Inc(PinTries);
if(PinTries > 2)then
begin
Writeln('Failed to enter pin correctly 3 times... terminating script.');
LogOut;
TerminateScript;
end;
until(BankScreen);
end;
if(BankScreen)then
begin
Withdraw(0, 0, 27);
Wait(100 + Random(300));
CloseBank;
Wait(100 + Random(300));
Writeln('Successfully withdrew logs');
end;
end;
end;
procedure Walking_Out;
var
Switch: Boolean;
begin
Writeln('Walking out of bank');
if(not(Switch))then
begin
RadialWalkTolerance(8751497, 113, 180, 70, 0, 0, 10);
Flag;
end else
begin
RadialWalkTolerance(8751497, 180, 113, 70, 0, 0, 10);
Flag;
end;
Switch := (not(Switch));
end;
procedure Making_Fire;
var
s: Integer;
begin
s := 2;
repeat
if(not(LoggedIn))then
TerminateScript;
Writeln('Lighting a fire');
Wait(Firewait + Random(500));
InvMouse(s, 1);
Wait(100 + Random(100));
InvMouse(1, 1);
Anti_Randoms;
Wait(500 + Random(500));
if(CantLightCheck)then
begin
Writeln('Cant light fire here, moving north one square.');
Wait(500 + Random(1000));
Mouse(258, 142, 5, 5, true);
Wait(Firewait + Random(500));
Writeln('Lighting a fire');
InvMouse(s, 1);
Wait(100 + Random(100));
InvMouse(1, 1);
Anti_Randoms;
end;
Inc(s);
until(s = 29);
end;
procedure Walking_In;
begin
Writeln('Walking to bank');
Wait(1500 + Random(500));
RadialWalkTolerance(8751497, 50, 130, 50, 2, 2, 10);
Flag;
RadialWalkTolerance(5405831, 345, 380, 40, -2, -2, 15);
Flag;
end;
procedure Progress_Report;
begin
Writeln(' //===============================\\');
Writeln('|| Thank you for using this script ||');
Writeln(Padr('|| Loads: ' + IntToStr(i), 35) + '||');
Writeln(' \\===============================//');
end;
begin
Signature;
Setup_SMART;
SetupSRL;
Setup_Player;
SetAngle(True);
MakeCompass('n');
repeat
Open_Bank;
Walking_Out;
Making_Fire;
Walking_In;
Inc(i);
Progress_Report;
until(i = Loads);
Progress_Report;
Logout;
end.