SRL Archive - Research & Development Lounge

New path maker for SPS[beta]


CynicRus

2012-08-28 08:52:21

Hi all. I present to you path maker for Simba. Final release!
Features:

  1. Multipath (max path = 8)
  2. Working with sps surface map or custom map for sps
  3. Generate walking code
Hint: if you select a point in the point list, and move the mouse with pressed shift - you can move selected the point to new position:)
Screenshot's:



Example generated code:

program Walker;
//code generated with Custom path generator for SPS by Cynic
{$DEFINE SMART}
{$i SRL/srl.simba}
{$i sps/sps.simba}



var
//place your variables here
Status: string;



procedure DeclarePlayers;
begin
HowManyPlayers:=1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:=0;
with Players[0] do
begin
Name:='';
Pass:='';
BoxRewards:='';
LampSkill:=SKILL_ATTACK;
Pin:='';
Active:=true;
end;
end;



procedure CatherbyToSeers;
var
CatherbyToSeersPath: TPointArray;
begin
CatherbyToSeersPath:=[Point(3135,2898),Point(3119,2896),Point(3113,2900),Point(3100,2901),Point(3091,2907),Point(3074,2910),Point(3057,2914),Point(3029,2922),Point(3006,2916),Point(2985,2890),Point(2967,2880),Point(2956,2869),Point(2941,2852),Point(2929,2840),Point(2918,2815),Point(2900,2806),Point(2890,2791),Point(2892,2773),Point(2871,2756),Point(2863,2740),Point(2849,2734),Point(2836,2734),Point(2811,2730),Point(2789,2723),Point(2769,2711),Point(2754,2708),Point(2740,2706),Point(2737,2691),Point(2737,2682)];
if SPS_WalkPath(CatherbyToSeersPath) then
Status := 'CatherbyToSeers';
else begin
Status :='Failed CatherbyToSeers';
WriteLn(status + '#Time Running:' +TimeRunning);
Logout;
TerminateScript;
end;
WriteLn(status + '#Time Running:' +TimeRunning);
end;
end;



procedure SeersToMagicTree;
var
SeersToMagicTreePath: TPointArray;
begin
SeersToMagicTreePath:=[Point(2737,2681),Point(2739,2692),Point(2740,2700),Point(2740,2707),Point(2740,2715),Point(2738,2723),Point(2738,2736),Point(2740,2763),Point(2737,2783),Point(2724,2792)];
if SPS_WalkPath(SeersToMagicTreePath) then
Status := 'SeersToMagicTree';
else begin
Status :='Failed SeersToMagicTree';
WriteLn(status + '#Time Running:' +TimeRunning);
Logout;
TerminateScript;
end;
WriteLn(status + '#Time Running:' +TimeRunning);
end;
end;



procedure MagicTreeToForrest;
var
MagicTreeToForrestPath: TPointArray;
begin
MagicTreeToForrestPath:=[Point(2722,2793),Point(2728,2796),Point(2737,2803),Point(2747,2815),Point(2768,2820),Point(2785,2823),Point(2818,2825),Point(2828,2825),Point(2846,2826),Point(2860,2827),Point(2872,2827),Point(2890,2836),Point(2912,2851),Point(2915,2876),Point(2911,2895),Point(2901,2914),Point(2880,2923),Point(2868,2929)];
if SPS_WalkPath(MagicTreeToForrestPath) then
Status := 'MagicTreeToForrest';
else begin
Status :='Failed MagicTreeToForrest';
WriteLn(status + '#Time Running:' +TimeRunning);
Logout;
TerminateScript;
end;
WriteLn(status + '#Time Running:' +TimeRunning);
end;
end;



procedure ForrestToCamelot;
var
ForrestToCamelotPath: TPointArray;
begin
ForrestToCamelotPath:=[Point(2869,2931),Point(2846,2930),Point(2823,2928),Point(2799,2922),Point(2780,2915),Point(2771,2906),Point(2769,2881),Point(2769,2859),Point(2773,2843),Point(2782,2835),Point(2804,2826),Point(2823,2815),Point(2839,2806),Point(2848,2798),Point(2862,2789),Point(2864,2770),Point(2868,2751),Point(2871,2729),Point(2866,2721)];
if SPS_WalkPath(ForrestToCamelotPath) then
Status := 'ForrestToCamelot';
else begin
Status :='Failed ForrestToCamelot';
WriteLn(status + '#Time Running:' +TimeRunning);
Logout;
TerminateScript;
end;
WriteLn(status + '#Time Running:' +TimeRunning);
end;
end;



procedure CamelotToCatherbyBank;
var
CamelotToCatherbyBankPath: TPointArray;
begin
CamelotToCatherbyBankPath:=[Point(2869,2719),Point(2882,2724),Point(2887,2729),Point(2891,2738),Point(2903,2749),Point(2936,2768),Point(2948,2775),Point(2952,2800),Point(2956,2819),Point(2969,2832),Point(2978,2847),Point(2998,2849),Point(3019,2848),Point(3031,2857),Point(3045,2862),Point(3050,2879),Point(3050,2898),Point(3057,2907),Point(3070,2907),Point(3071,2893)];
if SPS_WalkPath(CamelotToCatherbyBankPath) then
Status := 'CamelotToCatherbyBank';
else begin
Status :='Failed CamelotToCatherbyBank';
WriteLn(status + '#Time Running:' +TimeRunning);
Logout;
TerminateScript;
end;
WriteLn(status + '#Time Running:' +TimeRunning);
end;
end;



procedure CatherbyBankToForrest;
var
CatherbyBankToForrestPath: TPointArray;
begin
CatherbyBankToForrestPath:=[Point(3072,2892),Point(3072,2897),Point(3072,2907),Point(3059,2912),Point(3041,2918),Point(3018,2921),Point(2997,2906),Point(2983,2903),Point(2966,2907),Point(2947,2911),Point(2914,2918),Point(2894,2925),Point(2876,2929),Point(2856,2925)];
if SPS_WalkPath(CatherbyBankToForrestPath) then
Status := 'CatherbyBankToForrest';
else begin
Status :='Failed CatherbyBankToForrest';
WriteLn(status + '#Time Running:' +TimeRunning);
Logout;
TerminateScript;
end;
WriteLn(status + '#Time Running:' +TimeRunning);
end;
end;



procedure ForrestToSeersAnvil;
var
ForrestToSeersAnvilPath: TPointArray;
begin
ForrestToSeersAnvilPath:=[Point(2852,2920),Point(2823,2920),Point(2792,2913),Point(2760,2900),Point(2751,2870),Point(2746,2840),Point(2733,2812),Point(2719,2802),Point(2710,2766),Point(2717,2734),Point(2717,2715),Point(2711,2706),Point(2688,2707),Point(2674,2709),Point(2674,2696),Point(2674,2682),Point(2677,2673)];
if SPS_WalkPath(ForrestToSeersAnvilPath) then
Status := 'ForrestToSeersAnvil';
else begin
Status :='Failed ForrestToSeersAnvil';
WriteLn(status + '#Time Running:' +TimeRunning);
Logout;
TerminateScript;
end;
WriteLn(status + '#Time Running:' +TimeRunning);
end;
end;
procedure SetupWalker;

begin
SRL_SIXHOURFIX := TRUE;
SMART_FIXSPEED := TRUE;
SetupSRL;
DeclarePlayers;
LoginPlayer;
Wait(802+ Random(160));
ClickNorth(SRL_ANGLE_HIGH);
SPS_Setup(RUNESCAPE_SURFACE,['7_7','7_6','6_7','8_7','7_8','6_6','8_8','8_6','6_8','5_6','7_6','6_7','5_5','7_5','5_7','5_7','6_8','5_8','7_5','6_5'];
end;
Written in lazarus, source aviable on GIT:
https://github.com/CynicRus/sps_path
Thanks for you advice:)

Oxygen

2012-08-28 09:03:35

Wow, nice work! I'll try this one out soon
~First!~

Gala

2012-08-28 09:15:53

Nice work!
Is there a way to just have the generated path as output?

Solar

2012-08-28 09:18:51

Looks good. I'll try this out later on. Thanks.

CynicRus

2012-08-28 09:19:40

At the moment there is no way as generated only path. But you can copy/paste that from generated output i think.

P1ng

2012-08-28 09:51:46

Looks nice, currently going to give it a test :)

Only suggestion I have so far is perhaps making it able to jump to different towns.
Making it easier to find where you want the map to be. Other than that it all looks pretty good so far :)

Nice work again Cynic

CynicRus

2012-08-28 09:55:26

From: P1ng
Looks nice, currently going to give it a test :)

Only suggestion I have so far is perhaps making it able to jump to different towns.
Making it easier to find where you want the map to be. Other than that it all looks pretty good so far :)

Nice work again Cynic


Thank-) Ax, I plan to make jump to defferent town. I think - i can make that on this week.

Flight

2012-08-28 11:47:12

That's really great work, a very handy program indeed. Thank you for this, CynicRus. :)

BGXD

2012-08-28 12:29:29

nice !

Silentcore

2012-08-28 12:40:10

Nice work, keep it up.

CynicRus

2012-08-28 13:50:18

Jump menu added. Load world map, right mouse click, enjoy:P Available only if world map loaded.

Solar

2012-08-28 13:54:32

Sweet! I am actually able to incorporate walking into a script now.

CynicRus

2012-08-28 14:18:22

Hint: if you select point in point list, and move mouse with pressed shift - you can move selected point to new position.

CynicRus

2012-08-29 02:51:32

*Update*
Add menu code:
Standart: Just generate only path and areas
Progressive: Generate walker script by paths.
Example:

YanilleBankToOgresPath:=[Point(2280,4299),Point(2268,4294),Point(2258,4290),Point(2246,4284),Point(2226,4275),Point(2199,4277),Point(2169,4276),Point(2148,4298),Point(2138,4307),Point(2112,4307),Point(2086,4307),Point(2071,4306),Point(2047,4302),Point(2028,4302),Point(2007,4302),Point(1993,4301),Point(1981,4301),Point(1957,4301),Point(1931,4294),Point(1916,4276),Point(1892,4272),Point(1877,4270),Point(1869,4281)];
OgresToArdougnePath:=[Point(1863,4280),Point(1880,4249),Point(1911,4220),Point(1946,4206),Point(1973,4196),Point(1913,4153),Point(1867,4150),Point(1826,4147),Point(1809,4125),Point(1810,4090),Point(1806,4054),Point(1804,4034),Point(1801,4007),Point(1811,3957),Point(1822,3922),Point(1841,3887),Point(1862,3865),Point(1893,3844),Point(1949,3835),Point(1979,3826),Point(2019,3826),Point(2053,3806),Point(2134,3799),Point(2191,3763),Point(2210,3742),Point(2220,3708),Point(2244,3678),Point(2224,3658),Point(2207,3644),Point(2235,3619),Point(2258,3596),Point(2281,3588),Point(2270,3570),Point(2260,3555),Point(2268,3539),Point(2262,3522),Point(2252,3508),Point(2253,3489),Point(2263,3460),Point(2259,3409),Point(2262,3365),Point(2266,3334),Point(2267,3314),Point(2275,3302),Point(2285,3297),Point(2298,3299),Point(2304,3311),Point(2304,3324)];
SPS_Setup(RUNESCAPE_SURFACE,[,'3_10','3_11','3_9','4_10','4_11','4_9','5_11','5_9','6_10','6_11','6_9','5_10'];

VastlySuperior

2012-08-29 05:14:06

You make some very good contributions here CynicRus, if you could find a way to make a custom map with the worldmap to update the outdated maps this will truly be an awesome addition for walking

CynicRus

2012-08-29 06:44:16

From: VastlySuperior
You make some very good contributions here CynicRus, if you could find a way to make a custom map with the worldmap to update the outdated maps this will truly be an awesome addition for walking

Unfortunately at the moment I do not know this method. Perhaps, in theory, it is possible to detect the difference in colors between the mini-map and the map of the world, and using this formula, converse the colors of the map of the world into the minimap. But I'm not a mathematician, to make such calculations. Sorry-(

VastlySuperior

2012-08-29 07:22:15

From: CynicRus
Unfortunately at the moment I do not know this method. Perhaps, in theory, it is possible to detect the difference in colors between the mini-map and the map of the world, and using this formula, converse the colors of the map of the world into the minimap. But I'm not a mathematician, to make such calculations. Sorry-(


Does not matter, you are still awesome!:spot:

CynicRus

2012-08-29 08:49:31

*UPDATE*
Are added to obtain the coordinates in the selected area. Just press to triangle button when you create path.

Generated output in attachment:

CynicRus

2012-09-03 03:26:10

Now i fix a code generator, now the code generator make a work code.

CynicRus

2012-11-01 05:51:01

Final&stable version has been released now.

WT-Fakawi

2012-11-01 06:14:32

granted Aristocrate for outstanding coding.

xtrapsp

2012-11-01 06:26:07

From: WT-Fakawi
granted Aristocrate for outstanding coding.


Congrats!!!!!! :) You deserve it

NKN

2012-11-01 07:11:57

From: WT-Fakawi
granted Aristocrate for outstanding coding.


From: xtrapsp
Congrats!!!!!! :) You deserve it

I third this motion. :)
Great work

Ashaman88

2012-11-01 07:18:35

Nice job will check this out soon!

CynicRus

2012-11-01 07:31:20

Thanks for the great words of my and my stuff!

CynicRus

2012-11-04 07:22:18

Bug with the code generator has been fixed now. Exe updated.

CynicRus

2012-11-11 04:44:14

Announcement: This program is currently in development, will soon release version 2.