KinkyWambat
2014-08-10 20:22:43
Hello Everyone,
I am new to this forum but am very excited to get started. My only previous experience with programming was a university course in C++.
I would like to create a yew chopper for Edgeville as my first script.
I have an error on the line highlighted in red, I am aware this is a very silly question but help is appreciated!!
I am still unaware of the proper use of the functions highlighted in red on the bottom as well. :)
Thanks in advance,
~Connor
Below is my current code:
program scriptTemplate;
{$DEFINE SMART} // Always have this to load smart
{$I SRL-6/SRL.simba} // To load the SRL include files
{$I SPS/lib/SPS-RS3.Simba} // To load the SPS include files
//——————Procedure Declarations ———————————–
procedure declarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := 'royaleconnor@gmail.com';
password := 'password';
isActive := true;
isMember := false;
end
currentPlayer := 0;
end;
// —————– Code to chop logs here ———————————–
procedure ChopLogs()
Begin
if not isLoggedIn() then
exit;
//Code to chop logs here
end;
procedure WalkBank()
Begin
if not isLoggedIn() then
exit;
//————– Code to walk to bank using SPS map ———————–
var
PathToBank: TPointArray;
begin
PathToBank := [Point(122, 167), Point(121, 118), Point(150, 108)]
if SPS.walkPath(PathToBank) then
minimap.waitPlayerMoving()
else
writeLn('We failed to walk to the bank');
end;
end;
procedure InteractBanker()
begin
if not isLoggedIn() then
exit;
end;
//———————-Code to Find / interact with banker——————-
end;
procedure WalkTree()
PathToTree: TPointArray;
begin
if not isLoggedIn() then
exit;
// ———————–Walk back to tree ———————————-
PathToTree := [Point(150, 108), Point(121, 118), Point(122, 167)]
if SPS.walkPath(PathToTree) then
minimap.waitPlayerMoving()
else
writeLn('We failed to walk to the tree');
end;
// ———————-Start Procedures——(Main Loop) ——————-
// Set up
begin
clearDebug(); // Clear the debug box
smartEnableDrawing := true; // So we can draw on SMART
setupSRL(); // Load the SRL include files
// declarePlayers(); // Set up your username/pass
SPS.setup('YewChopper', RUNESCAPE_OTHER); // Setup our map
if not isLoggedIn() then
begin
players[currentPlayer].login();
exitSquealOfFortune();
minimap.setAngle(MM_DIRECTION_NORTH);
mainScreen.setAngle(MS_ANGLE_HIGH);
end;
function isLoggedIn(): boolean;
function SPS.walkPath(path: TPointArray): boolean;
function minimap.waitPlayerMoving(waitFlagGone: boolean): boolean;
function sps.setup(map name: string, folder): Boolean;
WalkBank()
WalkTree()
end.
I am new to this forum but am very excited to get started. My only previous experience with programming was a university course in C++.
I would like to create a yew chopper for Edgeville as my first script.
I have an error on the line highlighted in red, I am aware this is a very silly question but help is appreciated!!
I am still unaware of the proper use of the functions highlighted in red on the bottom as well. :)
Thanks in advance,
~Connor
Below is my current code:
program scriptTemplate;
{$DEFINE SMART} // Always have this to load smart
{$I SRL-6/SRL.simba} // To load the SRL include files
{$I SPS/lib/SPS-RS3.Simba} // To load the SPS include files
//——————Procedure Declarations ———————————–
procedure declarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := 'royaleconnor@gmail.com';
password := 'password';
isActive := true;
isMember := false;
end
currentPlayer := 0;
end;
// —————– Code to chop logs here ———————————–
procedure ChopLogs()
Begin
if not isLoggedIn() then
exit;
//Code to chop logs here
end;
procedure WalkBank()
Begin
if not isLoggedIn() then
exit;
//————– Code to walk to bank using SPS map ———————–
var
PathToBank: TPointArray;
begin
PathToBank := [Point(122, 167), Point(121, 118), Point(150, 108)]
if SPS.walkPath(PathToBank) then
minimap.waitPlayerMoving()
else
writeLn('We failed to walk to the bank');
end;
end;
procedure InteractBanker()
begin
if not isLoggedIn() then
exit;
end;
//———————-Code to Find / interact with banker——————-
end;
procedure WalkTree()
PathToTree: TPointArray;
begin
if not isLoggedIn() then
exit;
// ———————–Walk back to tree ———————————-
PathToTree := [Point(150, 108), Point(121, 118), Point(122, 167)]
if SPS.walkPath(PathToTree) then
minimap.waitPlayerMoving()
else
writeLn('We failed to walk to the tree');
end;
// ———————-Start Procedures——(Main Loop) ——————-
// Set up
begin
clearDebug(); // Clear the debug box
smartEnableDrawing := true; // So we can draw on SMART
setupSRL(); // Load the SRL include files
// declarePlayers(); // Set up your username/pass
SPS.setup('YewChopper', RUNESCAPE_OTHER); // Setup our map
if not isLoggedIn() then
begin
players[currentPlayer].login();
exitSquealOfFortune();
minimap.setAngle(MM_DIRECTION_NORTH);
mainScreen.setAngle(MS_ANGLE_HIGH);
end;
function isLoggedIn(): boolean;
function SPS.walkPath(path: TPointArray): boolean;
function minimap.waitPlayerMoving(waitFlagGone: boolean): boolean;
function sps.setup(map name: string, folder): Boolean;
WalkBank()
WalkTree()
end.