Log in

View Full Version : First Script Help !



fretje12
02-17-2012, 02:36 AM
Hello this is my first script on 5 years lol !
when i click run i got a smart error, heres the script so you can put it on simba and click run and see the error.



program Draynorcutter;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}

var

WalkToBank:TPointarray;
WalkToTree:TPointarray;



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

Players[0].Name := ''; //Your Runescape username here.
Players[0].Pass := ''; //Your Runescape password here.
Players[0].Active := True; //Set to True if you want to use this player. Set to False to disable this player.
Players[0].Pin := 'Your_Bank_PIN'; //Put your Bank PIN here. Leave alone if you don't have a Bank PIN.
end;
Procedure AntiBan;
begin
if(not(LoggedIn)) then Exit;
Case Random(250) of

0:
begin
WriteLn('AntiBan Enabled - Randomized Human Action');
RandomRClick;
end;

10:
begin
WriteLn('AntiBan Enabled - Randomized Human Action');
HoverSkill('Woodcutting', false);
wait(1634+Random(2169));
end;

30:
begin
WriteLn('AntiBan Enabled - Randomized Human Action');
PickUpMouse;
end;

40:
begin
WriteLn('AntiBan Enabled - Randomized Human Action');
MakeCompass('N');
wait(100+random(433));
MakeCompass('S');
wait(50+random(124));
MakeCompass('N');
FindNormalRandoms;
end;

50:
begin
WriteLn('AntiBan Enabled - Randomized Human Action');
ExamineInv;
end;

end;
end;
Procedure ChopTree;
Var x, y: integer;
Begin
if FindObj (x, y, 'Willow', 3227713, 10) then
Begin
repeat
FindNormalRandoms;
ToggleXpBar(True);
Begin
WriteLn('Tree Found Clicking it.');
Mouse(x, y, 0, 0, True);
ChooseOption('willow');
end;
repeat
Wait(500)
Until Not isuptext ('willow') Or (invfull);
Until(InvFull);
end;
end;
Procedure WalkBank;

begin
if(not(LoggedIn))then
exit;
FindNormalRandoms;
AntiBan;
SPS_Setup (RUNESCAPE_SURFACE, ['10_9']);
WriteLn('Your inventory is full. Walking to Bank.');
MakeCompass ('N');
SetAngle (SRL_ANGLE_HIGH);
WalkToBank := [Point(4165, 3703), Point(4162, 3662), Point(4165, 3647), Point(4190, 3647), Point(4188, 3668)];
SPS_WalkPath (WalkToBank);
WriteLn('Made it to the bank.');
end;
Procedure BankLog;

begin
if(not(LoggedIn))then
exit;
FindNormalRandoms;
AntiBan;
MakeCompass('N')
SetAngle (SRL_ANGLE_HIGH);
WriteLn('Searching Bank')
if FindBank ('db') then
WriteLn ('Found Bank.');
if OpenBank ('db', False, True) then
WriteLn ('Banking Log.');
Deposit(2, 28, True);
CloseBank;
AntiBan;
WriteLn('Finished banking');
end;

Procedure WalkTree;

begin
if(not(LoggedIn))then
exit;
FindNormalRandoms;

SPS_Setup (RUNESCAPE_SURFACE, ['10_9']);
WriteLn ('Returning to Tree.');
MakeCompass('N');
SetAngle (SRL_ANGLE_HIGH);
WalkToTree := [Point(4188, 3666), Point(4188, 3647), Point(4167, 3647), Point(4163, 3665), Point(4162, 3699)];
SPS_WalkPath (WalkToTree);
WriteLn('Made it to Tree.');
end;
begin

DeclarePlayers;
LoginPlayer;

repeat
ChopTree;
WalkBank;
BankLog;
WalkTree;
until AllPlayersInactive;
end.



http://i.imgur.com/HCuTf.png

Rezozo
02-17-2012, 02:39 AM
Just by looking at it, for some reason, I see no problems. Give me a couple minutes, haven't programmed in some time!

fretje12
02-17-2012, 03:01 AM
Just by looking at it, for some reason, I see no problems. Give me a couple minutes, haven't programmed in some time!

i say that to, but i got a smart error i dont know why :/

fretje12
02-17-2012, 03:39 AM
Fixed - thanks to justin who help me whit the error

Rezozo
02-18-2012, 03:21 PM
Fixed - thanks to justin who help me whit the error

Nice, Props to him.