I wasn't planning on making this thread until I had more of it done, but it's my 2000th post, so I wanted to post more than 'you forgot setupsrl' hehe.
At the moment (March 17) we (Avaphi and I) don't have as much done as I would like to have had before making an alpha release, so consider this a preview. I am also posting this now because this you will be able to add to this project, and this way you can be thinking/working on your additions as soon as possible.
Anyway, a few of you know about WebWalker, but for those who don't, here is a short explanation. WebWalker will be a web of 'stations' spread out across the map, with walking paths joining them together.
Each station will have a detector function, which will return true when you are around that station. The paths will be walker functions, that are shorter and easier to write than city to city walkers. They can contain their own internal failsafe checkpoints, and of course have the station detector for the destination, so you will know when you get there.
This web design will allow you to wander around until the script recognizes that you are at a station, and then you will be able to walk to any other station. When this fails, there is always teleport to lumby, which of course will be a station. This design also allows (when there are enough stations and paths) for more than one route from point A to point B. Also, this design allows for expansion, as more stations and paths are added, the better it is.
For now, please keep this members only. Contributing to this project is members only, because most people that can write a walker can get into members. Using WebWalker may or may not be members only, I will decide that when there is enough done that it can be used.
If you are interested in contributing, then read on.
Like SRL, you will able to add what you want to your copy, but I will only post versions with working functions. I will think about a way for you to submit contributions so that they can be voted on or something.
The main functions will be
function RoutePicker (StartStation, EndStation:integer):array of integer;
function WalkRoute(Route:array of integer) : boolean;
function WhereAmI: integer;
Then each path will have its own function (returning a boolean if successful), and each station will have its own station detection function. The above 3 functions will combine them.
Each station has a unique number, which I will assign to it once you have submitted it. They will also have an x,y relative to lumbridge tele point, measured in pixels on a jpeg.This can be approximate, RoutePicker just needs it to know it's going in the right direction. They will also each have a unique name, and I'll write function NameToNumber(Name:string):integer to make using RoutePicker easier. BTW, you don't have to use RoutePicker, you can manually give WalkRoute your own list of stations.
IMPORTANT: Each station detector function will start with a FindSymbol. If want to go to a place with out a symbol, you will need to go the nearest station with WebWalker, and then go the rest of the way on your own. You can write detectors for places without symbols, but these will be checkpoints/failsafes within paths. This is because WhereAmI will work by detecting whether there is a symbol on the minimap, any symbol. Then it will determine which symbol, and look through the appropriate station detectors, which will be arrange in a case by symbol.
When writing station detectors, start with a symbol, and then get more specific, such as there are 2 doors nearby. Use stacked ifs with result:=false breaks. So as soon as it finds a condition that is not true, it will result false, and only result true if it all conditions result true. This step design will allow station detectors to be combined efficiently.
For example, imagine there were only 3 churn symbols
Station 1 has churn symbol, water symbol, and 2 doors
Station 2 has churn symbol, water symbol, and no doors
Station 3 has churn symbol, no water symbol
All others have no churn symbols
First the churn symbol would be determined, so WhereAmI would look at the branch with those 3. Then, it would see the water symbol and go down another level in the 'tree'. Then it would count the doors. If this is confusing, basically what I am saying is check one condition after another, going from simple to complicated to narrow it down.
(Hint: when writing detectors that start with a symbol that there only a few of (churn is a good example, tree is a bad example) all you have to do is eliminate the others.)
When writing paths, just make sure its a boolean function that returns false if it gets lost, and only returns true if the station detector of the destination returns true. Even though these paths will be shorter than city to city walkers, you should still use as many failsafes and checkpoints a possible.
Keep in mind that I will not add stations until they have at least one path to it from another known station. This means it will start from lumby and spread out. Also keep in mind that paths are one way, that is the path from station 1 to station 2 is a separate function to the one from station 2 to station 1.
BTW, it would be nice if everything was autocolor. I'm working on ladder atm, door is done, road and dirt road is done, pretty sure water works.
I will announce when the framework is finished, so don't feel rushed to complete paths and station detectors. As I said, I just wanted to give you notice so that you could think about it.
Please feel free to ask any questions, as I probably haven't explained things fully.
[/2000th post

]