SRL Archive - OSR Help

Need help making bot walk


brradbenedict

2013-03-07 19:16:32

Okay, I'm somewhat new to scripting and can't really figure out how to get the SPS to work and make my bot walk.
so far I have this code
program NatureCrafting;
{$DEFINE SMART8}
{$i srl/srl.Simba}
{$I P07Include.Simba}
{$i sps/p07sps.simba}

var
ToAltar: TPointArray;
Status: string;

procedure paths;
begin
ToAltar := [Point(80, 97), Point(82, 100), Point(88, 106), Point(93, 109),
Point(100, 115), Point(105, 123), Point(108, 130),
Point(110, 139), Point(115, 148), Point(119, 153),
Point(128, 160), Point(132, 165), Point(132, 174),
Point(136, 180), Point(142, 186), Point(146, 189),
Point(151, 195), Point(154, 202), Point(159, 210),
Point(163, 216), Point(168, 225), Point(173, 232),
Point(188, 237), Point(193, 239), Point(199, 242),
Point(204, 246), Point(211, 252), Point(216, 256),
Point(220, 262), Point(231, 266), Point(240, 272),
Point(246, 276), Point(251, 281), Point(260, 286),
Point(269, 292), Point(274, 298), Point(280, 306),
Point(286, 310), Point(294, 317), Point(301, 323),
Point(306, 329), Point(312, 336), Point(320, 342),
Point(326, 346), Point(332, 350), Point(338, 355),
Point(346, 359), Point(351, 369), Point(356, 377),
Point(364, 384), Point(372, 390), Point(378, 396),
Point(384, 403), Point(391, 412), Point(401, 418),
Point(407, 425), Point(415, 434), Point(425, 443),
Point(429, 446), Point(434, 452), Point(442, 455),
Point(450, 463), Point(455, 468), Point(461, 473),
Point(467, 477), Point(471, 485), Point(475, 492),
Point(480, 500), Point(483, 509), Point(491, 518),
Point(501, 521)];
end;

procedure TestPath;
begin
if SPS_WalkPath(ToAltar) then
Status := 'walking to the Altar'
else
begin
Status := 'failed walking to the Altar';
Writeln(Status + ' + time running: ' + TimeRunning);
end;
Writeln(Status + ' + time running: ' + TimeRunning);
end;

begin
SRL_SixHourFix := True;
SMART_FixSpeed := True;
SetupSRL;
SPS_Setup(RuneScape_Other, ['nat_run']);
Paths;
ClickNorth(SRL_ANGLE_HIGH);
TestPath;
repeat
until (False);
end.
(Credit to whoever made that guide on how make custom maps)

Anyways, whenever I run it it loads the client then I log in and it just spins my map around a few times and I get
SPS_GatherMinimap ERROR: Exception: Access violation SPS_GatherMinimap ERROR: Exception: Access violation SPS_GatherMinimap ERROR: Exception: Access violation SPS_GatherMinimap ERROR: Exception: Access violation]
a million times until i stop running it.

I feel like it has something to do with the custom map im using but im not sure :(
any help is appreciated thanks in advance.

The Mayor

2013-03-07 19:18:56

Post your code again, it's not readable.

i luffs yeww

2013-03-07 19:21:44


program NatureCrafting;
{$DEFINE SMART8}
{$i srl/srl.Simba}
{$I P07Include.Simba}
{$i sps/p07sps.simba}

var
ToAltar: TPointArray;
Status: string;

procedure paths;
begin
ToAltar := [Point(80, 97), Point(82, 100), Point(88, 106), Point(93, 109),
Point(100, 115), Point(105, 123), Point(108, 130),
Point(110, 139), Point(115, 148), Point(119, 153),
Point(128, 160), Point(132, 165), Point(132, 174),
Point(136, 180), Point(142, 186), Point(146, 189),
Point(151, 195), Point(154, 202), Point(159, 210),
Point(163, 216), Point(168, 225), Point(173, 232),
Point(188, 237), Point(193, 239), Point(199, 242),
Point(204, 246), Point(211, 252), Point(216, 256),
Point(220, 262), Point(231, 266), Point(240, 272),
Point(246, 276), Point(251, 281), Point(260, 286),
Point(269, 292), Point(274, 298), Point(280, 306),
Point(286, 310), Point(294, 317), Point(301, 323),
Point(306, 329), Point(312, 336), Point(320, 342),
Point(326, 346), Point(332, 350), Point(338, 355),
Point(346, 359), Point(351, 369), Point(356, 377),
Point(364, 384), Point(372, 390), Point(378, 396),
Point(384, 403), Point(391, 412), Point(401, 418),
Point(407, 425), Point(415, 434), Point(425, 443),
Point(429, 446), Point(434, 452), Point(442, 455),
Point(450, 463), Point(455, 468), Point(461, 473),
Point(467, 477), Point(471, 485), Point(475, 492),
Point(480, 500), Point(483, 509), Point(491, 518),
Point(501, 521)];
end;

procedure TestPath;
begin
if SPS_WalkPath(ToAltar) then
Status := 'walking to the Altar'
else
begin
Status := 'failed walking to the Altar';
Writeln(Status + ' + time running: ' + TimeRunning);
end;
Writeln(Status + ' + time running: ' + TimeRunning);
end;

begin
SRL_SixHourFix := True;
SMART_FixSpeed := True;
SetupSRL;
SPS_Setup(RuneScape_Other, ['nat_run']);
Paths;
ClickNorth(SRL_ANGLE_HIGH);
TestPath;
repeat
until (False);
end.

Fixed the casing too, because I'm bored. I've never used SPS, but your path looks odd to me, so does the SPS_Setup call, but I'm not sure. Also, what's with the infinite loop at the very end that does nothing? :x

King

2013-03-07 19:40:14

@i luffs yeww

He used cynicrus's pathmaker, thats why it looked funny :P

cradlefatal

2013-03-07 22:52:13

nvm its 07 runescape don't know anything bout that

Smidqe

2013-03-08 01:22:55

From: brradbenedict
Okay, I'm somewhat new to scripting and can't really figure out how to get the SPS to work and make my bot walk.
so far I have this code
program NatureCrafting; {$DEFINE SMART8} {$i srl/srl.Simba} {$I P07Include.Simba} {$i sps/p07sps.simba} var toAltar: tpointarray; status: string; procedure paths; begin toAltar := [Point(80, 97), Point(82, 100), Point(88, 106), Point(93, 109), Point(100, 115), Point(105, 123), Point(108, 130), Point(110, 139), Point(115, 148), Point(119, 153), Point(128, 160), Point(132, 165), Point(132, 174), Point(136, 180), Point(142, 186), Point(146, 189), Point(151, 195), Point(154, 202), Point(159, 210), Point(163, 216), Point(168, 225), Point(173, 232), Point(188, 237), Point(193, 239), Point(199, 242), Point(204, 246), Point(211, 252), Point(216, 256), Point(220, 262), Point(231, 266), Point(240, 272), Point(246, 276), Point(251, 281), Point(260, 286), Point(269, 292), Point(274, 298), Point(280, 306), Point(286, 310), Point(294, 317), Point(301, 323), Point(306, 329), Point(312, 336), Point(320, 342), Point(326, 346), Point(332, 350), Point(338, 355), Point(346, 359), Point(351, 369), Point(356, 377), Point(364, 384), Point(372, 390), Point(378, 396), Point(384, 403), Point(391, 412), Point(401, 418), Point(407, 425), Point(415, 434), Point(425, 443), Point(429, 446), Point(434, 452), Point(442, 455), Point(450, 463), Point(455, 468), Point(461, 473), Point(467, 477), Point(471, 485), Point(475, 492), Point(480, 500), Point(483, 509), Point(491, 518), Point(501, 521)]; end; procedure testpath; begin if sps_walkpath(toAltar) then status := 'walking to the Altar' else begin status :='failed walking to the Altar'; writeln(status + ' + time running:' +timerunning); end; writeln(status + ' + time running:' +timerunning); end; begin srl_sixhourfix := true; smart_fixspeed := true; SetupSRL; sps_setup(runescape_other,['nat_run']); paths; clicknorth(srl_angle_high); testpath; repeat until(false) end.]
(Credit to whoever made that guide on how make custom maps)

Anyways, whenever I run it it loads the client then I log in and it just spins my map around a few times and I get
SPS_GatherMinimap ERROR: Exception: Access violation SPS_GatherMinimap ERROR: Exception: Access violation SPS_GatherMinimap ERROR: Exception: Access violation SPS_GatherMinimap ERROR: Exception: Access violation]
a million times until i stop running it.

I feel like it has something to do with the custom map im using but im not sure :(
any help is appreciated thanks in advance.


Are you running Simba as admin? I remember that used to cause these access violation errors on previous versions of SPS, not sure about this current one.

brradbenedict

2013-03-08 12:13:36

@Smidqe
I tried and I'm still getting the same error.

@i luffs yeww
Thanks for fixing that code and yeah I used a path creator


This is my custom map I made .
[ATTACH=CONFIG]19779[/ATTACH]
This might be the problem but I'm not sure.

Element17

2013-03-08 12:26:21

Thought I saw somewhere SPS doesn't work for 07 yet?

Kevin

2013-03-08 12:52:52

I was under the impression we were still fixing some 07 SPS bugs because the MM isn't alligned very well in 07scape. @The Killer may know. Also, I kinda just wanted to tag him.

Edit: I was wrong, sps was fixed for 07, I just haven't touched 07 scripting.

brradbenedict

2013-03-08 13:22:21

I was using this
http://villavu.com/forum/showthread.php?t=97449