Blazeron
03-02-2012, 10:15 PM
program SPSTut;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}
Type
LocationVar = Record
DTMs: Array[0..1] of Integer;
end;
Var
myPath:TPointArray;
myPathBack:TPointArray;
x, y, Loads, Levels, TotalLevels: Integer;
BreakTime, Breaks: Integer;
Exp: Integer;
StatVar: String;
Leveled, Updated: Boolean;
aFound: Extended;
LocVars: LocationVar;
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Pin :='';
Players[0].Member :=False;
Players[0].Active:=True;
end;
procedure FrDTM;
begin
FreeDTM(LocVars.DTMs[0]);
FreeDTM(LocVars.DTMs[1]);
end;
procedure SetLocVars;
begin
with LocVars do
begin
case Players[CurrentPlayer].Strings[1] of
'veb':
begin
//[0] = Burn, [1] = Bank
DTMs[1] := DTMFromString('m6wAAAHic42ZgYGhjYmBoBeJuIJ4JxMuAeD IQdwBxHhAnAnE6E0RdPlB9MhDHQHEJEDdAcSMQFwBxIBDbA3Fl ZRlDSVEBQ0d7C4O9jSqDu68KQ2N9LUNpSRGDvb0qQ4CHOVguK9 aGgR+onljMRAJGAgD8OxeR');
end;
'vwb':
begin
//[0] = Burn, [1] = Bank
DTMs[1] := DTMFromString('mggAAAHicY2NgYNjIxMAwEYh3AfFcIO4F4k 1AbAeUMwLiNCDOAuIYKL+nzofB2ESeITfVjcHRWYNhwoRWsBg/UA4bBhrFwIgFQwAAMm4MtQ==');
end;
'feb':
begin
//[0] = Burn, [1] = Bank
DTMs[1] := DTMFromString('mlwAAAHicY2dgYFjPxMCwBoiXAvFcIF4AxK uBeBsQ5wDlfYA4HIiTgLgOiBuAuAiITxzYydBVX8QQ6K4ApkE4 PFCZYem8GQz8QHlcGGgsAyMODAUA25sSFg==');
end;
end;
end;
end;
procedure ToBank;
begin
begin
Mouse(669, 84, 3, 3, True);
Fflag(6);
end;
case Players[CurrentPlayer].Strings[1] of
'veb':
begin
if FindDTMRotated(LocVars.DTMs[1], x, y, MMX1, MMY1, MMX2, MMY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 3, 3, True);
end else
begin
Mouse(648, 120, 1, 1, True);
end;
end;
'vwb':
begin
if FindDTMRotated(LocVars.DTMs[1], x, y, MMX1, MMY1, MMX2, MMY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 3, 3, True);
end;
end;
end;
end;
procedure Walking;
begin
SPS_Setup(RUNESCAPE_SURFACE,['11_7','11_6','10_6','10_7','12_7','12_6']);//SPS Areas
ToBank;
myPath := [Point(4848, 2970), Point(4849, 2937), Point(4871, 2937), Point(4889, 2937), Point(4908, 2937), Point(4938, 2937), Point(4960, 2936), Point(4973, 2922), Point(4986, 2904), Point(4978, 2881), Point(4981, 2859), Point(4987, 2832), Point(4992, 2810), Point(5011, 2794), Point(5017, 2768), Point(5030, 2749), Point(5038, 2733), Point(5041, 2712), Point(5049, 2689)];
myPathBack := [Point(5052, 2689), Point(5039, 2734), Point(5019, 2780), Point(4991, 2816), Point(4977, 2862), Point(4974, 2916), Point(4942, 2935), Point(4881, 2939), Point(4847, 2971)];
SPS_WalkPath(myPath);
SPS_WalkPath(myPathBack);
end;
begin;
SetupSRL;
DeclarePlayers;
LoginPlayer;
repeat
if LoggedIn then
begin
ToBank;
Walking;
end;
end.
Its currently saying Identifier expected on line 132 (the last line)
yes this is my whole code atm all it does it open the bank and walk to the sawmill and back :spongebob:
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}
Type
LocationVar = Record
DTMs: Array[0..1] of Integer;
end;
Var
myPath:TPointArray;
myPathBack:TPointArray;
x, y, Loads, Levels, TotalLevels: Integer;
BreakTime, Breaks: Integer;
Exp: Integer;
StatVar: String;
Leveled, Updated: Boolean;
aFound: Extended;
LocVars: LocationVar;
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Pin :='';
Players[0].Member :=False;
Players[0].Active:=True;
end;
procedure FrDTM;
begin
FreeDTM(LocVars.DTMs[0]);
FreeDTM(LocVars.DTMs[1]);
end;
procedure SetLocVars;
begin
with LocVars do
begin
case Players[CurrentPlayer].Strings[1] of
'veb':
begin
//[0] = Burn, [1] = Bank
DTMs[1] := DTMFromString('m6wAAAHic42ZgYGhjYmBoBeJuIJ4JxMuAeD IQdwBxHhAnAnE6E0RdPlB9MhDHQHEJEDdAcSMQFwBxIBDbA3Fl ZRlDSVEBQ0d7C4O9jSqDu68KQ2N9LUNpSRGDvb0qQ4CHOVguK9 aGgR+onljMRAJGAgD8OxeR');
end;
'vwb':
begin
//[0] = Burn, [1] = Bank
DTMs[1] := DTMFromString('mggAAAHicY2NgYNjIxMAwEYh3AfFcIO4F4k 1AbAeUMwLiNCDOAuIYKL+nzofB2ESeITfVjcHRWYNhwoRWsBg/UA4bBhrFwIgFQwAAMm4MtQ==');
end;
'feb':
begin
//[0] = Burn, [1] = Bank
DTMs[1] := DTMFromString('mlwAAAHicY2dgYFjPxMCwBoiXAvFcIF4AxK uBeBsQ5wDlfYA4HIiTgLgOiBuAuAiITxzYydBVX8QQ6K4ApkE4 PFCZYem8GQz8QHlcGGgsAyMODAUA25sSFg==');
end;
end;
end;
end;
procedure ToBank;
begin
begin
Mouse(669, 84, 3, 3, True);
Fflag(6);
end;
case Players[CurrentPlayer].Strings[1] of
'veb':
begin
if FindDTMRotated(LocVars.DTMs[1], x, y, MMX1, MMY1, MMX2, MMY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 3, 3, True);
end else
begin
Mouse(648, 120, 1, 1, True);
end;
end;
'vwb':
begin
if FindDTMRotated(LocVars.DTMs[1], x, y, MMX1, MMY1, MMX2, MMY2, -Pi, Pi, Pi/30, aFound) then
begin
Mouse(x, y, 3, 3, True);
end;
end;
end;
end;
procedure Walking;
begin
SPS_Setup(RUNESCAPE_SURFACE,['11_7','11_6','10_6','10_7','12_7','12_6']);//SPS Areas
ToBank;
myPath := [Point(4848, 2970), Point(4849, 2937), Point(4871, 2937), Point(4889, 2937), Point(4908, 2937), Point(4938, 2937), Point(4960, 2936), Point(4973, 2922), Point(4986, 2904), Point(4978, 2881), Point(4981, 2859), Point(4987, 2832), Point(4992, 2810), Point(5011, 2794), Point(5017, 2768), Point(5030, 2749), Point(5038, 2733), Point(5041, 2712), Point(5049, 2689)];
myPathBack := [Point(5052, 2689), Point(5039, 2734), Point(5019, 2780), Point(4991, 2816), Point(4977, 2862), Point(4974, 2916), Point(4942, 2935), Point(4881, 2939), Point(4847, 2971)];
SPS_WalkPath(myPath);
SPS_WalkPath(myPathBack);
end;
begin;
SetupSRL;
DeclarePlayers;
LoginPlayer;
repeat
if LoggedIn then
begin
ToBank;
Walking;
end;
end.
Its currently saying Identifier expected on line 132 (the last line)
yes this is my whole code atm all it does it open the bank and walk to the sawmill and back :spongebob: