SRL Archive - RS3 Script Requests

Tinder Box Buyer


BuckWild

2011-11-27 20:04:13

So I have an old account here from back in 07 but between 07 and the creation of this account I was a complete leecher. I made this account in order to have a fresh start and what not.

Anyways…
I saw a request for a tinder box buyer and I thought it'd be a nice script to start out with. Banking, walking, npc intervention, I figured it'd cover the basics of what I'd need to know. I took snip its from other scripts and used a guide for the layout.

I know of obvious things like antiban is not implemented and other little things. Despite this I feel that it should *work*. When I went to start it it just sat there so this is where I'm looking for help.

My Questions/Comments
1. Firstly, why won't it run, even the first procedure?
2. My dtm doesn't have numerous values with + in between them like I found in tuts, is this ok?
3. Is there a way I can test certain procedures without the others? So I could run a certain part without having to have the complete script worked out and complete?

That's all for now, I'm focusing on the larger issues before divulging into other small-ish bugs. I'll update this section accordingly.

Ignore the notes, these were just for when I was laying it out and what not.


program BuckWildBoxBuyer;
{$DEFINE SMART}
{$i srl/srl.scar}
{$i sps/sps.simba}
{
1. Bank
+ A. Walk to bank
+ B. Find Banker
Open bank
Deposit All
2. Buy
+ A. Walk to Ignatius
+ B. See Ig
Find Ig
Trade Ig
Buy Box Ig
3. Anti-Randoms
4. Proggy
Time Ran
Boxes Bought
GP Made
GP / Hour
}


const
{-----Breaking Settings-----}
TakeBreaks = True; // Take breaks?
HowOften = 90; // How often to break in minutes
HowOftenRandom = 30; // Added randomness to how often you break
HowLong = 20; // How long to break for
HowLongRandom = 8; // Added randomness in break length
{---------------------------}
{---SMART Setup Constants---}
WORLD = 2;// Set a world, if you'd like.
MEMBERS = False;// Change accordingly.
SIGNED = True; // True if running a single account, false otherwise.
{---------------------------}
{--------Script Info--------}
Author = 'Username';
Name = 'Base';
Version = '1.00';
{---------------------------}

Var
BreakOften, BreakLength, BreakTimes: Integer;

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := '___'; // Username
Players[0].Pass := '___'; // Password
Players[0].Nick := '___'; // 3-4 lowercase letters from username
Players[0].Active := True; // Set to true if you want to use this player
Players[0].Pin := '0000'; // Leave blank if the player doesn't have a bank pin
end;
procedure Bank;
begin
OpenBank('clt', True, True);
if (bankscreen) then
Deposit(2,28,True);
CloseBank;
end;
procedure WalktoBank;
var
toBank : TPointArray;
begin
SPS_Debug := true;
SPS_Setup(RUNESCAPE_SURFACE, ['6_6','6_7'])
toBank := [ Point(2753, 2889), Point(2742, 2828), Point(2731, 2762), Point(2741, 2730), Point(2735, 2675)];
SPS_WalkPath(toBank);
wait(6000);
SPS_GetMyPos();
end;
Procedure WalktoIgnatius;
var
toIgnat : TPointArray;
begin
SPS_Debug := true;
SPS_Setup(RUNESCAPE_SURFACE, ['6_7','6_6'])
toIgnat := [ Point(2740, 2729), Point(2731, 2761), Point(2742, 2827), Point(2754, 2888), Point(2721, 2923)];
SPS_WalkPath(toIgnat);
SPS_GetMyPos();

end;
procedure BuyBoxes;
var
Box, x, y: Integer;
begin
Box := DTMFromString('mlwAAAHicY2dgYNAEYiMgVgJiSSA2gdIGUDkQbQrEWkCsAcRqQKwMxOYGHECSCSvmYsANGPFgKAAAQLcC0A==')
if FindObjCustom(x, y, ['Igna','nati','Vulc'], [2015438,7840211,3366562], 10)then
begin
Writeln('Found Ignatius');
Mouse(x, y, 0, 0, false);
end;
if ChooseOption('rade')then
begin
Writeln('Trading with Mr. Vulcan');
end;
if FindDTM(Box, x, y, 0, 0, 700, 700)then
begin
Writeln('Buying Boxes');
Mouse(x, y, 0, 0, false);
end;
if ChooseOption('50')then
begin
Writeln('Bought 27 Boxes');
end;
end;
procedure AntiBan;
begin
case Random(6) of
0: HoverSkill('Random', False);
1: begin
RandomMovement;
HoverSkill('Random', False);
end;
2: BoredHuman;
3: BoredHuman;
4: ExamineInv;
5: begin
RandomAngle(1);
HoverSkill('Random', False);
ExamineInv;
end;
end;
end;

procedure BreakCheck;
begin
if not LoggedIn then
begin
Players[CurrentPlayer].Active := False;
Exit;
end;
BreakOften := ((HowOften*60000)-(HowOftenRandom*60000)+Random(HowOftenRandom*120000));
if GetTimeRunning >= BreakOften*BreakTimes then
begin
BreakLength := ((HowLong*60000)-(HowLongRandom*60000)+Random(HowLongRandom*120000));
Logout;
Wait(BreakLength);
LoginPlayer;
end;
end;

procedure ProgressReport;
begin
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
WriteLn(Name + 'by' + Author + 'V' + Version);
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
end;

begin
Smart_Server := WORLD;
Smart_Members := MEMBERS;
Smart_Signed := SIGNED;
Smart_SuperDetail := False; // These four lines, setup and run Smart, using the constants you made earlier.
SetupSRL; // This is used to setup SRL's base features, and is almost always necessary.

DeclarePlayers; // This runs your DeclarePlayers procedure, setting them up to run
LoginPlayer; // This logs in your first player.
repeat // This is the start of a loop, it will repeat until the conditions set after the until below are met.
BreakCheck; // Runs the breaks

until AllPlayersInactive; // This means that, once all characters have failed, the script will stop.
end.
procedure Repeating;
begin
repeat
WalkToIgnatius;
BuyBoxes;
WalkToBank;
Bank;
end;
Procedure Start;
Begin

If(Not(LoggedIn))then
LogInPlayer;
Writeln('Starting...');
Wait(RandomRange(1000, 1500));
FindNormalRandoms;
SetAngle(true)
end;
begin
Smart_Server := 54;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
ClearDebug;
SetupSRL;
DeclarePlayers;
LoginPlayer;
start;
Repeating;
end.