SRL Archive - SRL Member Goodies

webwalker


Markus

2011-06-03 01:07:21

instructions: unrar, put test2.web in c:\, project1.dll in your simba plugins
login with smart, or enter your details at lines 135/136
stand anywhere between lumby/varrock, or in varrock itself.
script will walk you to varrock east bank :)

Seems to crash with too many nodes, idk yet why but will look into that later.
Far from ready for public consumption, but this took me just 2.5 day and lots of time outside!

Credits: plugin is 90% Ray (everything that does something) from his Graph Maker thread.
http://villavu.com/forum/showthread.php?t=36548&highlight=dijkstra
Used webber for getting nodes
http://villavu.com/forum/showthread.php?t=63367

Now, RUN IT! :D

weequ

2011-06-03 03:30:18

Awsome. I will test it later when I have more time.

YoHoJo

2011-06-03 03:37:20

Amazing! SRL is in dire need of a web walker!
Question: Why just varrock/lumbrige, is it just part of the entire protect/ a test?

Markus

2011-06-03 04:09:55

It seems to crash when I add too
many nodes, so I just did this to test the basics (and to prove it can be done in just two short days!)

ReadySteadyGo

2011-06-03 04:55:19

Forgot to link you to this. http://villavu.com/forum/showthread.php?t=63439 This uses an array for all the nodes and an array for the edges, is it necessary to use a format that needs parsing?

Webber needs fixing if you have time. The "export code" function is badly done and for some reason the TSynEdit I use has a character limit so it is not possible to use huge webs with it atm.

Shuttleu

2011-06-03 05:55:03

heh, enjoy the bbq

~shut

Gu3st...

2011-06-03 06:18:17

No one run his script! He ripped from bobzilla without permission!
//ripped this from bobzilla without permission

Jokes aside; This is wonderful, markus :) keep it up!

marpis

2011-06-03 07:01:02

Take SPS worldmap, color all walkable areas in blue and use a script like this to get the walkable nodes from it :) just a scetch.

const
WALKABLE_COLOR = clBlue;
MAP_PATH = AppPath + 'SRL/SRL/SPS/WalkingMap.bmp';

procedure GetWalkableAreas;
var
BMP: integer;
x, y: integer;
width, height: integer;
WalkablePoints: TPointArray;
N: integer;
begin
BMP := LoadBitmap(MAP_PATH); // Load map where we have coloured all walkable areas
GetBitmapSize(BMP, width, height);

for x := 0 to (width - 1) do
for y := 0 to (height - 1) do
begin
// say we only want every 30th point in both x/y to cut down amount of nodes
if (x mod 30) <> 0 then Continue;
if (y mod 30) <> 0 then Continue;

if FastGetPixel(BMP, x, y) = WALKABLE_COLOR then
begin
Inc(N);
SetLength(WalkablePoints, N);
WalkablePoints[N-1] := Point(x, y);
// maybe a point->tile conversion here?
WalkablePoints[N-1] := SPS_PointToTile(WalkablePoints[N-1]);
end;
end;

// print or save the point array here
end;

Gu3st...

2011-06-12 13:42:43

Any progress? :)