Camaro'
2010-12-10 16:22:23
Color Walking Tutorial for MSI
Last Updated: December 10th, 2010
Last Updated: December 10th, 2010
[INDENT]
This tutorial is a tutorial on how to write color walking procedures for MSI.
Walking In Runescape
[INDENT]
There are currently two types of ways to walk in runescape(with simba :))
- Reflection
[INDENT]
Reflection walking is a much simpler way to walk along runescape, MSI does use this, but when runescape updates, this method no longer is usable for a period of time. This is why we use color walking also. That way, if runescape updates we can still auto :)
[/INDENT]
[/INDENT]
- Color
[INDENT]Color walking is not as easy as reflection walking, but it is still pretty simple. Color walking uses the SRL include to find colors on the minimap to detect where to walk. This tutorial is going to teach you how to color walk with MSI.[/INDENT]
[/INDENT]
[/INDENT]
[/INDENT]
[INDENT]
MSI Color Walking
[INDENT]
After you finish this tutorial, you should test your code a million times to make sure it works perfectly. So to do this, go to Setup.simba and comment the line that includes reflection, then when you load up MSI, it will automatically color walk for you :)
There is a series of steps you should follow to color walk in MSI.
- Globals.simba
[INDENT]
[INDENT]
First, lets open up globals.simba.
WALK_WC_GE_YEW_BANK_1
CTRL + F and find out where that line is. You should see that there is a lot of names similar to this next to it. Each variable there (WALK_WC_GE_YEW_BANK_1) is one click on the minimap. For example, that line will click the first click from GE Yews to the GE. Now its time to figure out how to add yours
Tips:
- All Capitals
- Follow the correct format
- Must have a variable for each one of your MM clicks.
- Separate Each word with " _ " (without quotes)
It must start with
WALKThen comes the abbreviated skill WCNext is the abbreviated location GEIf your location (GE) has more then one type of area to bot(Trees, Yews), you need to declare where it is forYEWIf you are walking on the way to the bank, you need BANKFinally, the step of the walking it is on (Hard to explain) 1So for example, if you are doing port sarim willow to deposit box…
WALK_WC_PS_WILLOW_1
WALK_WC_PS_WILLOW_2
WALK_WC_PS_WILLOW_BANK_1
WALK_WC_PS_WILLOW_BANK_2
This should be it for globals.simba, before you close out of it, just take a glance of the color constants used.
[/INDENT]
[/INDENT]
- Scripts.simba
[INDENT]
Simply go to the script record you are adding color walking too, and find this
Reflection := [
TPointArray([Point(3253, 3421), Point(3265, 3428),
Point(3275, 3429), Point(3280, 3439),
Point(3276, 3450)])
];
now after it add this
ColorTo := [
WALK_WC_PS_WILLOW_1,
WALK_WC_PS_WILLOW_2
];
ColorFrom := [
WALK_WC_PS_WILLOW_BANK_1,
WALK_WC_PS_WILLOW_BANK_2
];
All this is doing, is simply telling MSI that this script has color walking paths. You may close scripts.simba.
[/INDENT]
[/INDENT]
[/INDENT]
[/INDENT]
[INDENT]
[INDENT]
- Walking_Color.simba
[INDENT]
OK, open up walking_color.simba and look around for a bit.
Your walking function should return a TPoint.
Here is a base function of your walking function.
{******************************************************************************}
{ function MSI_WC_PSPoints(Index: Integer): TPoint; }
{ By: You }
{ Date: 10 December 2010 }
{ Description: Returns a point on the minimap depending on the specified }
{ location by 'index' }
{******************************************************************************}
function MSI_WC_PSPoints(Index: Integer): TPoint;
var
TPA: TPointArray;
I , X, Y :Integer;
begin
Result := Point(-1, -1);
case Index of
WALK_WC_PS_WILLOW_1:
begin
//Return a TPoint of the first click to the willows.
end;
WALK_WC_PS_WILLOW_2:
begin
//Return a TPoint of the second click to the willows.
end;
WALK_WC_PS_WILLOW_BANK_1:
begin
//Return a TPoint of the first click to the deposit box.
end;
WALK_WC_PS_WILLOW_BANK_2:
begin
//Return a TPoint of the second click to the deposit box.
end;
else
MSI_SubDebug('MSI_PS_GEPoints: Invalid walk point!');
end;
end;
This function will get called whenever you are color walking in port sarim.
Most MSI Walking use TPA's, you can use what ever you want, just make sure it returns a TPoint.
Now, to make this function actually work, you have to go to the function
MSI_CreateWalkIndex
This function tells MSI where to walk ;)
Just add your constants in as follows
FirstClick..LastClick:
Result := YourWalkingFunction(index);
In our case, it is going to be
WALK_WC_PS_WILLOW_1..WALK_WC_PS_WILLOW_BANK_2:
Result := MSI_WC_PSPoints(index);
Now, this is not needed, but it is STRONGLY recommended that you do so. Create some fail safes, just in case your function fails, it will use the failsafe. Do so here
MSI_CreateWalkFailsafeJust follow the format, and for each one of your constants add a fail safe alternative.
[/INDENT]
[/INDENT]
[/INDENT]
[/INDENT]
[INDENT]
Common Errors
[INDENT]
This section is for any errors that comes up and how to fix them.
- Error 1
[INDENT]Error 1 explanation and fix.
[/INDENT]
[/INDENT]
- Error 2
[INDENT]Error 2 explaination, and fix.[/INDENT]
[/INDENT]
[/INDENT]
[/INDENT]