tls
12-07-2011, 05:37 AM
Modded drags reflection path maker to use sps. All you have to do is set the SPSAreas and then run it. When SPS v2.0 comes out you won't have to do that.
{
The SPS Include Path Maker - v0.1 ALPHA
-by Drags111
This is a simple and easy to use Path Maker that
will record the tiles you choose and print them
out when you are done. Just run this script,
login to your character, and start recording! It's
that easy. Please let me know if you find any
errors!
}
program PathMaker;
{$Define SMART}
{$i srl\srl.scar}
{$i sps\sps.simba}
{$i srl\srl\misc\paintsmart.scar}
var
SPSAreas: TStringArray;
procedure Areas;
begin
SPSAreas := ['10_6'];
end;
const
{---SMART Setup Constants---}
WORLD = 35;
MEMBERS = false;
SIGNED = true;
{---------------------------}
var
pathMakerForm : TForm;
TabControl1 : TPageControl;
Label1 : TLabel;
TileList : TListBox;
DeleteButton, PrintButton: TButton;
RecordButton : TButton;
PathTab: TTabSheet;
TileCount: integer;
procedure CreatePath(List: TListBox);
var
Temp: string;
i: integer;
begin
Writeln('Creating path....');
writeln('function LoadPath : TPointArray;');
Writeln('begin');
writeln(' SetLength(Result, '+ToStr(TileCount)+');');
writeln(' Result := [');
for i := 1 to TileCount-1 do
begin
Temp := Temp + List.Items[i-1]+', ';
if((i mod 3) = 0)then
begin
Writeln(' '+Temp);
Temp := '';
end;
end;
Temp := Temp +List.Items[TileCount-1];
writeln(' '+Temp);
writeln(' ];');
writeln('end;');
end;
procedure OnClick(Sender : TObject);
var
MyTile: TPoint;
ToAdd: String;
begin
SmartSetupEx(Smart_Server, Smart_Members, Smart_Signed, Smart_SuperDetail);
case sender of
RecordButton: begin
MyTile := SPS_GetMyPos;
ToAdd := 'Point('+ToStr(MyTile.x)+', '+ToStr(MyTile.y)+')';
TileList.Items.Append(ToAdd);
Inc(TileCount);
end;
DeleteButton: begin
TileList.Items.Delete(TileList.ItemIndex);
Dec(TileCount);
end;
PrintButton:begin
CreatePath(TileList);
end;
end;
end;
procedure OpenForm;
begin
pathMakerForm := CreateForm;
with pathMakerForm do
begin
Left := 423;
Top := 185;
Width := 381;
Height := 342;
BorderIcons := [biSystemMenu, biMinimize];
Caption := 'SPS Path Maker';
Color := clBtnFace;
Font.Color := clWindowText;
Font.Height := -11;
Font.Name := 'MS Sans Serif';
PixelsPerInch := 96;
BorderStyle := bsSingle;
end;
TabControl1 := TPageControl.Create(pathMakerForm);
with TabControl1 do
begin
Parent := pathMakerForm;
Left := 24;
Top := 16;
Width := 333;
Height := 305;
end;
PathTab := TTabSheet.Create(pathMakerForm);
with PathTab do
begin
PageControl := TabControl1;
Caption := 'Path Maker';
end;
{PathTab}
Label1 := TLabel.Create(TabControl1);
with Label1 do
begin
Parent := PathTab;
Left := 16;
Top := 12;
Width := 50;
Height := 18;
Caption := '[Tiles]';
Font.Color := clMaroon;
Font.Height := -15;
Font.Name := 'Tahoma';
Font.Style := [fsBold];
ParentFont := False;
end;
TileList := TListBox.Create(TabControl1);
with TileList do
begin
Parent := PathTab;
Left := 16;
Top := 36;
Width := 293;
Height := 201;
Font.Color := clBlack;
Font.Height := -15;
Font.Name := 'Tahoma';
Font.Style := [];
ItemHeight := 18;
ParentFont := False;
TabOrder := 0;
end;
DeleteButton := TButton.Create(TabControl1);
with DeleteButton do
begin
Parent := PathTab;
Left := 220;
Top := 244;
Width := 91;
Height := 25;
OnClick := @OnClick;
Caption := 'Delete Selected';
TabOrder := 1;
end;
RecordButton := TButton.Create(TabControl1);
with RecordButton do
begin
Parent := PathTab;
Left := 140;
Top := 244;
Width := 75;
Height := 25;
Caption := 'Record!';
OnClick := @OnClick;
TabOrder := 2;
end;
PrintButton := TButton.Create(TabControl1);
with PrintButton do
begin
Parent := PathTab;
Left := 60;
Top := 244;
Width := 75;
Height := 25;
Caption := 'Print!';
OnClick := @OnClick;
TabOrder := 2;
end;
pathMakerForm.ShowModal;
pathMakerForm.Free;
end;
var
v : TVariantArray;
begin
Smart_Members := MEMBERS;
Smart_Server := WORLD;
Smart_Signed := SIGNED;
Areas;
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE, SPSAreas);
Writeln(SPS_GetMyPos);
ThreadSafeCall('OpenForm',v);
end.
{
The SPS Include Path Maker - v0.1 ALPHA
-by Drags111
This is a simple and easy to use Path Maker that
will record the tiles you choose and print them
out when you are done. Just run this script,
login to your character, and start recording! It's
that easy. Please let me know if you find any
errors!
}
program PathMaker;
{$Define SMART}
{$i srl\srl.scar}
{$i sps\sps.simba}
{$i srl\srl\misc\paintsmart.scar}
var
SPSAreas: TStringArray;
procedure Areas;
begin
SPSAreas := ['10_6'];
end;
const
{---SMART Setup Constants---}
WORLD = 35;
MEMBERS = false;
SIGNED = true;
{---------------------------}
var
pathMakerForm : TForm;
TabControl1 : TPageControl;
Label1 : TLabel;
TileList : TListBox;
DeleteButton, PrintButton: TButton;
RecordButton : TButton;
PathTab: TTabSheet;
TileCount: integer;
procedure CreatePath(List: TListBox);
var
Temp: string;
i: integer;
begin
Writeln('Creating path....');
writeln('function LoadPath : TPointArray;');
Writeln('begin');
writeln(' SetLength(Result, '+ToStr(TileCount)+');');
writeln(' Result := [');
for i := 1 to TileCount-1 do
begin
Temp := Temp + List.Items[i-1]+', ';
if((i mod 3) = 0)then
begin
Writeln(' '+Temp);
Temp := '';
end;
end;
Temp := Temp +List.Items[TileCount-1];
writeln(' '+Temp);
writeln(' ];');
writeln('end;');
end;
procedure OnClick(Sender : TObject);
var
MyTile: TPoint;
ToAdd: String;
begin
SmartSetupEx(Smart_Server, Smart_Members, Smart_Signed, Smart_SuperDetail);
case sender of
RecordButton: begin
MyTile := SPS_GetMyPos;
ToAdd := 'Point('+ToStr(MyTile.x)+', '+ToStr(MyTile.y)+')';
TileList.Items.Append(ToAdd);
Inc(TileCount);
end;
DeleteButton: begin
TileList.Items.Delete(TileList.ItemIndex);
Dec(TileCount);
end;
PrintButton:begin
CreatePath(TileList);
end;
end;
end;
procedure OpenForm;
begin
pathMakerForm := CreateForm;
with pathMakerForm do
begin
Left := 423;
Top := 185;
Width := 381;
Height := 342;
BorderIcons := [biSystemMenu, biMinimize];
Caption := 'SPS Path Maker';
Color := clBtnFace;
Font.Color := clWindowText;
Font.Height := -11;
Font.Name := 'MS Sans Serif';
PixelsPerInch := 96;
BorderStyle := bsSingle;
end;
TabControl1 := TPageControl.Create(pathMakerForm);
with TabControl1 do
begin
Parent := pathMakerForm;
Left := 24;
Top := 16;
Width := 333;
Height := 305;
end;
PathTab := TTabSheet.Create(pathMakerForm);
with PathTab do
begin
PageControl := TabControl1;
Caption := 'Path Maker';
end;
{PathTab}
Label1 := TLabel.Create(TabControl1);
with Label1 do
begin
Parent := PathTab;
Left := 16;
Top := 12;
Width := 50;
Height := 18;
Caption := '[Tiles]';
Font.Color := clMaroon;
Font.Height := -15;
Font.Name := 'Tahoma';
Font.Style := [fsBold];
ParentFont := False;
end;
TileList := TListBox.Create(TabControl1);
with TileList do
begin
Parent := PathTab;
Left := 16;
Top := 36;
Width := 293;
Height := 201;
Font.Color := clBlack;
Font.Height := -15;
Font.Name := 'Tahoma';
Font.Style := [];
ItemHeight := 18;
ParentFont := False;
TabOrder := 0;
end;
DeleteButton := TButton.Create(TabControl1);
with DeleteButton do
begin
Parent := PathTab;
Left := 220;
Top := 244;
Width := 91;
Height := 25;
OnClick := @OnClick;
Caption := 'Delete Selected';
TabOrder := 1;
end;
RecordButton := TButton.Create(TabControl1);
with RecordButton do
begin
Parent := PathTab;
Left := 140;
Top := 244;
Width := 75;
Height := 25;
Caption := 'Record!';
OnClick := @OnClick;
TabOrder := 2;
end;
PrintButton := TButton.Create(TabControl1);
with PrintButton do
begin
Parent := PathTab;
Left := 60;
Top := 244;
Width := 75;
Height := 25;
Caption := 'Print!';
OnClick := @OnClick;
TabOrder := 2;
end;
pathMakerForm.ShowModal;
pathMakerForm.Free;
end;
var
v : TVariantArray;
begin
Smart_Members := MEMBERS;
Smart_Server := WORLD;
Smart_Signed := SIGNED;
Areas;
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE, SPSAreas);
Writeln(SPS_GetMyPos);
ThreadSafeCall('OpenForm',v);
end.