I'd highly suggest looking at the include files, they are all documented and sorted out. Here's a simple base just ripped out of my PSWC, this should work on its own but you will need to mod it to make it work for your needs.
program ok;
{$DEFINE SMART}
{$i SRL/SRL.scar}
{$i Reflection/Reflection.simba}
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
CurrentPlayer := 0;
NumberOfPlayers(HowManyPlayers);
with Players[0] do
begin
Name := 'Username';
Pass := 'Password';
Nick := 'nick';
Member := False;
Active := True;
end;
end;
const
SERVER = 61; // Enter "0" to pick a random server.
SIGNED = True; // Use the signed RS-client? Leave at True unless you know what you're doing.
MEMBERS = False; // Set to True if using a RS-Members account. False if F2P.
function BodenItems: boolean;
var
Items: TGroundItemArray;
TempMS: TPoint;
iiad: Integer;
begin
Result := False;
if not LoggedIn then
Exit;
Items := R_GetGroundItemsEx([5070, 5071, 5072, 5073, 5074, 5075, 5076, 5077, 5078, 7413, 11966,1515,1359],3);
if GetArrayLength(Items) > 0 then
begin
for iiad := 0 to High(Items) do
case items[iiad].ID of
5070, 5071, 5072, 5073, 5074, 5075, 5076, 5077, 5078, 7413, 11966:
begin
TempMS := R_TileToMSEx(Items[iiad].Tile, 0.5, 0.5, 100);
Mouse(TempMS.X, TempMS.Y, 5, 5, false);
if R_WaitOption('Bird', 500) then
begin
WriteLn('Got birds nest!');
Result := True;
R_FFlag(0);
Wait(500+Random(2000));
end
else
WriteLn('Failed to grab nest. sadfrog.');
end;
1515:
begin
TempMS := R_TileToMSEx(Items[iiad].Tile, 0.5, 0.5, 100);
Mouse(TempMS.X, TempMS.Y, 5, 5, false);
if R_WaitOption('Take Yew', 500) then
begin
WriteLn('Got yew logs off ground!');
Result := True;
R_FFlag(0);
Wait(100+Random(1000));
end
else
WriteLn('Failed to grab yew logs off ground. sadfrog.');
end;
1359:
begin
TempMS := R_TileToMSEx(Items[iiad].Tile, 0.5, 0.5, 100);
Mouse(TempMS.X, TempMS.Y, 5, 5, false);
if R_WaitOption('Take Rune', 500) then
begin
WriteLn('Got Rune hatchet off ground!');
Result := True;
R_FFlag(0);
Wait(100+Random(1000));
end
else
WriteLn('Failed to grab Rune hatchet off ground. sadfrog.');
end;
end;
end;
SetArrayLength(Items,0);
end;
procedure SetUpScript;
begin
ClearDebug;
Smart_Server := SERVER;
Smart_Signed := SIGNED;
Smart_Members:= MEMBERS;
SetUpReflection;
Reincarnate := True;
DeclarePlayers;
LampSkill := 'woodcutting';
ActivateClient;
Wait(1000 + Random(2000));
end;
procedure MainLoop;
begin
CurrentPlayer := RandomPlayerIndex;
LogInPlayer;
repeat
repeat
BodenItems;
if (not LoggedIn) then
begin
WriteLn('Not logged in?');
Wait(500+Random(1000));
if (not LoggedIn) then Break else Wait(1);
end;
if LobbyScreen then
begin
WriteLn('At lobby screen?');
Wait(500+Random(1000));
if (LobbyScreen) then Break else Wait(1);
end;
until(False);
if LobbyScreen then
LeaveLobby;
WriteLn('Detected as logged out, NPlayer');
NextPlayer(Players[CurrentPlayer].Active);
until False;
end;
begin
SetUpScript;
MainLoop;
end.