SRL Archive - Help

Walking


spin3x

2012-05-30 14:17:24

Guys can anyone tell me the base for walking or post the link of a thread which will help me. I've used the search button, but I cant seem to find something simple for me.

Ive got the Object DTM's


['25:77:1:3:7:39:75:5:24:66:27:94:51:102:60:85:58:58', '55:112:1:3:7:64:133:6:77:114:77:146:56:149:45:137:45:118:45:105', '72:128:1:3:7:88:104:4:98:93:98:123:58:114:77:91']

x[Warrior]x3500

2012-05-30 14:19:40

well there are many different ways for walking:
-SPS
-ObjDTM
-DDTM
-TPA/ATPA
-RRW
-etc.

just look in tutorial island for your desired method of walking

CephaXz

2012-05-30 14:21:14

SPS:
http://villavu.com/forum/showthread.php?t=71461

Object DTM:
http://villavu.com/forum/showthread.php?t=78905
http://villavu.com/forum/showthread.php?t=72067

They can be easily searched.

spin3x

2012-05-30 14:26:10

Do these work on rsps's? Or does it not matter?

Shatterhand

2012-05-30 14:28:31

From: spin3x
Do these work on rsps's? Or does it not matter?

SPS doesnt work. RadialWalking should works. Object DTM not sure. Best way to do is making own DTMs.

spin3x

2012-05-30 14:42:30

So I have this code

program SPSTut;
{$i srl/srl.simba}
{$i sps/sps.simba}
Var
myPath:TPointArray;

Procedure WalkingToFungus;
begin
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE,['14_6']);//SPS Areas
myPath := [Point(129, 430), Point(126, 411), Point(128, 393), Point(139, 384), Point(147, 378), Point(145, 362), Point(153, 353), Point(166, 342), Point(178, 333), Point(193, 323), Point(206, 319), Point(213, 321), Point(213, 332), Point(213, 346), Point(213, 352)];;//Path
SPS_WalkPath(myPath);
end;

begin
WalkingToFungus
end.program new;
begin
end.

But when I start it it doesnt do anything? Can you tell me whats wrong

x[Warrior]x3500

2012-05-30 14:50:25

From: spin3x
So I have this code

program SPSTut;
{$i srl/srl.simba}
{$i sps/sps.simba}
Var
myPath:TPointArray;

Procedure WalkingToFungus;
begin
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE,['14_6']);//SPS Areas
myPath := [Point(129, 430), Point(126, 411), Point(128, 393), Point(139, 384), Point(147, 378), Point(145, 362), Point(153, 353), Point(166, 342), Point(178, 333), Point(193, 323), Point(206, 319), Point(213, 321), Point(213, 332), Point(213, 346), Point(213, 352)];;//Path
SPS_WalkPath(myPath);
end;

begin
WalkingToFungus
end.program new;
begin
end.

But when I start it it doesnt do anything? Can you tell me whats wrong


define smart. and get rid of the second program at the end.

spin3x

2012-05-30 16:39:15

When I did that, I got another error :(

 program Fungus;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}
Var
MyPath:TPointArray;
begin
SPS_Setup(RUNESCAPE_SURFACE,['14_6']);
myPath := [Point(215, 352), Point(211, 311), Point(186, 319), Point(167, 333), Point(143, 345), Point(117, 355), Point(121, 374), Point(122, 392), Point(123, 406), Point(128, 423)];//Path
SPS_WalkPath(myPath);
end.

Error: I get a new tab opened
{$DEFINE SRL_SMART}
{$DEFINE SMART}
{.loadlib libsmart}

function IsKeyDown(C:Byte): Boolean;
begin
Result := SmartIsKeyDown(C);
end;

procedure MoveMouse(x, y: Integer);
begin
SmartMoveMouse(x, y);
end;

procedure HoldMouse(x, y: Integer; button : integer);
begin
if button = mouse_left then
SmartHoldMousePlus(x,y,1)
else if button = mouse_middle then
SmartHoldMousePlus(x,y,2)
else if button = mouse_right then
SmartHoldMousePlus(x,y,3)
else
raiseexception(ercustomerror,'Unknown mouse button in SmartHoldMousePlus');
end;

procedure ReleaseMouse(x, y: Integer; button : integer);
begin
if button = mouse_left then
SmartReleaseMousePlus(x,y,1)
else if button = mouse_middle then
SmartReleaseMousePlus(x,y,2)
else if button = mouse_right then
SmartReleaseMousePlus(x,y,3)
else
raiseexception(ercustomerror,'Unknown mouse button in SmartReleaseMousePlus');
end;

procedure KeyUp(key: Byte);
begin
If Key = 13 Then
Key := 10;
SmartReleaseKey(key);
end;

procedure KeyDown(key: Byte);
begin
If Key = 13 Then
Key := 10;
SmartHoldKey(key);
end;

procedure SendKeys(S: String; keywait{$IFNDEF SIMBAMAJOR980}, keymodwait{$ENDIF}: integer);
begin
SmartSendKeys(S);
end;

function FindAndSetTarget(TitlePrefix: String; SetAsTarget: Boolean): Boolean;
var
T : TSysProcArr;
I : Integer;
begin
T := GetProcesses;
for I := High(T) downto 0 do
if Pos(TitlePrefix, T[I].Title) <> 0 then
begin
Result := True;
if SetAsTarget then SetTarget(T[I]);
Exit;
end;
end;

procedure GetRealMousePos(var X, Y : Integer);
var
KMTarget, ITarget : Integer;
begin
KMTarget := GetKeyMouseTarget;
ITarget := GetImageTarget;
FindAndSetTarget('Public SMART', True);
GetTClient.IOManager.GetMousePos(X, Y);
FreeTarget(GetImageTarget);
SetKeyMouseTarget(KMTarget);
SetImageTarget(ITarget);

// These are not universial offsets, but works somewhat for some Windows themes.
X := X - 8;
Y := Y - 25;
end;

procedure GetMousePos(var x, y: Integer);
begin
SmartGetMousePos(x, y);
end;

function IsRealMouseInBox(B : TBox): Boolean;
var
P : TPoint;
begin
GetRealMousePos(P.X, P.Y);
Result := PointInBox(P, B);
end;

function GetColor(x, y: Integer): Integer;
begin
result:= SmartGetColor(x, y);
end;

procedure SmartSetTarget;
begin
SetTargetArray(SmartImageArray, 765,503);
end;

function FindWindow(Title: String): Boolean;
begin
result:= true;
end;

procedure ActivateClient;
begin
end;

function FindWindowBySize(Width, Height: Integer): Boolean;
begin
result:= true;
end;

{procedure SmartSaveSettings(v: TVariantArray);
var
i: Integer;
ts: TStringArray;
begin
ts := ['server', 'members', 'signed', 'sd', 'DC', IncludePath + 'SRL/SRL/misc/smartINI.ini'];
for i := 0 to 4 do
WriteINI('SMART', ts[i], v[i], ts[5]);
end; }

procedure SmartSetupEx(Server: integer; members, signed, superdetail: boolean);
var
prefix: string;
begin
prefix := ReadINI('World' + IntToStr(Server), 'Prefix', IncludePath + 'SRL/SRL/misc/worlds.ini');
if(prefix = '')then
begin
writeln('Invalid world number or corrupted world list. Please review your settings');
TerminateScript;
end;
SmartSetup('http://'+prefix+'.runescape.com/', 'plugin.js?param=o0,a' + IntToStr((Integer(not(Signed)) + 1) * Integer(not((SuperDetail and Signed)))) + ',m' + IntToStr(Integer(Members)), 765, 503, 's');
//SmartSaveSettings([Server, Members, Signed, SuperDetail, SmartGetDC]);
end;

{function SmartLastSettings: TStringArray;
var
i: Integer;
ts: TStringArray;
begin
ts := ['server', 'members', 'signed', 'sd', 'DC', IncludePath + 'SRL/SRL/Misc/smartINI.ini'];
SetLength(Result, 5);
for i := 0 to 4 do
Result[i] := ReadINI('SMART', ts[i], ts[5]);
end; }
and then an error on that tab saying
Compiled successfully in 374 ms.
Error: Exception: Access violation at line 101

Srry if Im asking too much.

spin3x

2012-05-30 17:34:09

Bump

Rich

2012-05-30 17:36:35

Do a search of your error; it's commonly asked by people who ignore the existence of the search button. Also there's no need to bump your post in under a hour…

Syntax

2012-05-30 20:17:51

Not too sure about that error, i'm quite new with scripting and such. Might want to post it under sps section