SRL Archive - RS3 Help

SPS Path Generator


Ryuzaki

2014-09-03 21:25:50

Ahoy!

So, I'll get straight to the point, I'm in the process of scripting a cannonball smither, yew tree chopper, and, my favorite, a script that will burn logs after they are chopped! However, I've run into a problem!

Basically, I can't get SPS Path Generator to work! I take a picture of the map, using Snip, crop the photo to get rid of all the white when opened in a document, then open it in the generator! I set up the path, but when I run the script it seems to make me run in random directions!

For example, when standing between the 2 yew trees near the edgeville bank, I setup a path to run to the bank, and back to the trees. However, when I try play it, it either runs to the right of the bank, or below the SW portal!

I'll include a picture of the path I used just to make things a bit easier!

Was I supposed to save this png to my Runescape_Other folder? Because the only thing in there is the actual picture, without all the red one it!

Also, I did remember to search for it in my script! It compiles perfectly as well!
SPS.setup('YewChopper', RUNESCAPE_OTHER);

I'm lost as to whats going on!

Also, while I'm here, I've got a quick question! What is AntiBan? and how can I put it into my scripts? Is it something I'll have to do customize myself, or is there a basic format for it?

Thank you so very much for reading! Any help at all would be appreciated! :)

Lipcot

2014-09-03 21:56:46

You should post your moving procedures, maybe you are doing them wrong! But this is what i can reccomend you:

  • You have to check if it gets your position correctly, check on the debug if it always says the same coordinates (-1 -1 or something else).if you are standing on the same point it must be always the same, sth like y= 101 x=250 (for example).
  • If your sps is TOO small, it wont work well.. i reccomend extending the map and doing a bigger one.
  • You could add some failsafes , like looking for the "yew tree" minimap icon, or the bank icon or sth like that.

Antiban is, as the word say, "to not get banned". Its often a procedure you add in the script that makes random stuff to simulate you are a human. This is an example:

procedure antiban();
begin

case randomRange(1,102) of
1..40: begin
writeLn('Simulating Checking Social Networks');
mouseOffClient(OFF_CLIENT_RANDOM);
wait(randomRange(40000, 50000));
pickUpMouse();
end;
41..61: begin
writeLn('Simulating Bored Human');
boredHuman();
wait(randomRange(5000, 10000));
pickUpMouse();
end;
62..102: begin
writeLn('Simulating Small afk');
sleepAndMoveMouse(500 + random(500));
wait(randomRange(8000, 12000));
pickUpMouse();
end;
end;
end;

this, makes a random action each time you call it, so in your "cutYew" procedure you could add:

if random(500) = 4 then
antiban();

so, more or less every 500 yews you cut, the antiban gets done, this is supposed to reduce your chances of being banned. This is just an example of a kind of long antiban, you should also add small antibans that get called more often during the clicking in your script like:

        if random(20) = 5 then
sleepAndMoveMouse(randomRange(750, 2000));

if random(50) = 5 then
randomCameraAngle(MS_ANGLE_HIGH);

I hope i have been able to help you, Undorak7.

The Spark

2014-09-03 22:22:58

From: Ryuzaki
snip


Use sps.debugPlayerPos in your script, and look at the green dot(appears when you play the script) which corresponds to your SPS map, if it matches your position your sps map is good, if it doesn't your sps map is whack and you gotta make a new one.

Just by looking at your sps map, I'm willing to bet that it's too small.

NKN

2014-09-03 23:02:17

Alrighty my tried and true SPS advice.

1) Make sure your map is larger than just the area you're walking, atleast by a little bit. I aim to make my maps 400x400px minimum

2) Check out sps.setup overloads. You can mess with the accuracy, the tolerance, and the minimum match percentage. Fine tuning these helps for me.

3) I always enable SPSAnyAngle as it just seems to make things easier.

4) Check out the DebugPos function, it'll display where it thinks you are on the map for quick fixes.

Ryuzaki

2014-09-04 00:00:17

Alright, I've attempted to extend the map, and still not luck! However I'm very interested in what SparkyOwnage and NKN said about DebugPos, how do I go about adding that into my script? (New user, lol!)

As for Undorak, thanks so much! I'll definitely have to add some sort of antiban to my script! Also, here are the points after enlarging the map! [Point(178, 310), Point(175, 344), Point(237, 348), Point(236, 227), Point(177, 223), Point(178, 185), Point(227, 179)]

Thanks so much guys! :D

Turpinator

2014-09-04 00:27:15

while true do sps.debugMyPos;

the dotted line in the middle of your path is too long also. you can make each spot 3 tiles away, it wont make a difference on a short walk like that.

The Mayor

2014-09-04 02:01:40

Put that map in the recycling bin, empty it, and make another one directly from the in-game minimap.

Ryuzaki

2014-09-05 18:33:18

Alrighty, heres the progress!

I've attempted to use debugMyPos;, however Simba reacted by telling me that that function doesn't exist! So, I attempted deleted the map, and remaking it, as TheMayor said! Again, no luck. At this point it's just spamming "SPS.getPlayerPos(): result = {X = 126, Y = 74}" "SPS.walkPath(); result = False"

Here's what I'm working with, do you see any stupid errors I've made?

procedure RunToBank();
var
pathToBank: TPointArray;
begin
if not isLoggedIn() then
exit;

pathToBank := [Point(179, 301), Point(179, 347), Point(235, 351), Point(233, 285), Point(216, 239), Point(199, 195), Point(235, 167)]

if SPS.walkPath(pathToBank) then
minimap.waitPlayerMoving()

end;

Any ideas?

Oh, also, I've shortened the path, so it's not dotted anymore!

NKN

2014-09-05 19:30:53

Did you do sps.setup

and its sps.debugmypos

Ryuzaki

2014-09-05 20:00:01

From: NKN
Did you do sps.setup

and its sps.debugmypos


SPS.setup('YEW_MAP', RUNESCAPE_OTHER);

And yes, I'm aware of the command! However when I entered it in, I got this -

Exception in Script: Unknown declaration "debugmypos" at line 69, column 20

NKN

2014-09-05 22:28:53

sps.debugPlayerPos()


My bad.

The Mayor

2014-09-05 22:36:25

Press play, load SMART. Login manually and the press play again. It should write your position to debug.

With the script still running, disable SMART and manually run around a bit to see the debug of your position change.



program new;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/LIB/SPS-RS3.simba}

var
Edgeville: TSPSArea;

begin
smartPlugins := ['d3d9.dll'];
setupSRL();

Edgeville.setup('YEW_MAP', RUNESCAPE_OTHER);

repeat
writeLn(Edgeville.getPlayerPos());
until false;

end.

Ryuzaki

2014-09-07 15:31:41

From: The Mayor
Press play, load SMART. Login manually and the press play again. It should write your position to debug.

With the script still running, disable SMART and manually run around a bit to see the debug of your position change.


program new;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/LIB/SPS-RS3.simba}

var
Edgeville: TSPSArea;

begin
smartPlugins := ['d3d9.dll'];
setupSRL();

Edgeville.setup('YEW_MAP', RUNESCAPE_OTHER);

repeat
writeLn(Edgeville.getPlayerPos());
until false;

end.


Should I list the coordinates, and paste them into my original script?