SRL Archive - MSI Suggestions

Walking Organization


Coh3n

2010-12-16 15:00:59

Hello! :)

You may have seen the other thread I moved from the SL section yesterday, and it kind of veered off of what I really wanted as it started talking about an entire new walking system. This is strictly about organizing and condensing Walking_Color.simba as it is one gigantic mess of unused and repeated code.

Our walking system is nicely organized, and it works quite well. It's the walking code specifically that is terribly laid out, which I blame myself. I don't want to bring anyone down that has worked on color walking, or remove their code, but I believe it may be necessary. Camaro', you have written color walking for several scripts, and I can honestly say I'm very impressed at how well it works. I'm not sure if I've seen color working work that well before. Whether you think so or not, you've really taken advantage of the phrase "keep it simple, stupid" because that is exactly what your code is, simple. You don't over-complicate it, and obviously it works quite well.

That being said, Camaro's code is basically the same thing repeated over and over again, which is completely unnecessary and I apologize for letting it get so bad. Here's an example of the most recent commit:

{******************************************************************************}
{ function MSI_WC_PSPoints(Index: Integer): TPoint; }
{ By: Camaro' }
{ Date: 05 November 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
FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color_PS_Path, MMX1, MMY1, MMX2, MMy2, 20);
SortTPAFrom(TPA, Point(662, 30));
for I := 0 to High(TPA) do
begin
X := TPA[I].x;
Y := TPA[I].y;

if not RS_onMinimap(X + 8, Y - 3) then
Continue;
Result := Point(X + 8, Y - 3);
Break;
end;
end;

WALK_WC_PS_WILLOW_2:
begin
FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color_Willow_MM ,MMX1, MMY1, MMX2, MMy2, 20);
SortTPAFrom(TPA, Point(639, 72));
for I := 0 to High(TPA) do
begin
X := TPA[I].x;
Y := TPA[I].y;

if not RS_onMinimap(X, Y) then
Continue;
Result := Point(X + 4, Y + 4);
Break;
end;
end;

WALK_WC_PS_WILLOW_BANK_1:
begin
FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color_PS_PATH, MMX1, MMY1, MMX2, MMy2, 20);
SortTPAFrom(TPA, Point(585, 115));
for I := 0 to High(TPA) do
begin
X := TPA[I].x;
Y := TPA[I].y;

if not RS_onMinimap(X, Y) then
Continue;
Result := Point(X, Y);
Break;
end;
end;


WALK_WC_PS_WILLOW_BANK_2:
begin
FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color_PS_PATH, MMX1, MMY1, MMX2, MMy2, 20);
SortTPAFrom(TPA, Point(628, 140));
for I := 0 to High(TPA) do
begin
X := TPA[I].x;
Y := TPA[I].y;

if not RS_onMinimap(X, Y) then
Continue;
Result := Point(X - 5, Y - 5);
Break;
end;
end;
else
MSI_SubDebug('MSI_WC_PSPoints: Invalid walk point!');
end;
end;
I tested it myself, and I don't think it could work any better. Thing is, it could very easily be made into one function that takes a type as a parameter. What I am proposing is we rewrite TWalkInfo to work with the function that can be made from the latter code and use that as our color walking system.

This will get rid of the surplus of functions that aren't really used in Walking_Color and replace them with only a few of the necessary ones.

So basically, it's a complete rewrite of Walking_Color.simba that works extremely well and is very, very simple.

Thoughts?

E: If no one opposes this, I'll write up an outline of how I think the new Walking_Color.simba should look.

NCDS

2010-12-16 15:36:14

I agree 100%

Sex

2010-12-16 16:00:48

I don't even know how this is or anything…I haven't coded in ages but:

function MSI_WC_Point(Color : integer; Point, OnMMOS, ResOS : TPoint): TPoint;
var
TPA : TPointArray;
i, x, y : integer;
begin
result := Point(-1, -1);
FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color, MMX1, MMY1, MMX2,MMY2, 20);
SortTPAFrom(TPA, Point(Point.x, Point.y));
for i := 0 to High(TPA) do
begin
x := TPA[i].x;
y := TPA[i].y;
if not RS_onMinimap(X + OnMMOS.x, Y + OnMMOS.y) then
Continue;
Result := Point(X + ResOS.x, Y + ResOS.y);
Break;
end;
end;

function MSI_WC_PSPoints(Index: Integer): TPoint;
begin

case Index of
WALK_WC_PS_WILLOW_1: result := MSI_WC_Point(Color_PS_PATH, Point(662, 30), Point(8, -3), Point(8, -3));
WALK_WC_PS_WILLOW_2: result := MSI_WC_Point(COLOR_WILLOW_MM, Point(639, 72), Point(0, 0), Point(4, 4));
WALK_WC_PS_WILLOW_BANK_1: result := MSI_WC_Point(COLOR_PS_PATH, Point(585, 115), Point(585, 115), Point(0, 0), Point(0, 0));
WALK_WC_PS_WILLOW_BANK_2: result := MSI_WC_Point(COLOR_PS_PATH, Point(628, 140), Point(0, 0), Point(-5, -5));
else
MSI_SubDebug('MSI_WC_PSPoints: Invalid walk point!');
end;
end;

Coh3n

2010-12-16 18:33:33

Sex, that's basically what I was looking for, except using a type rather than parameters. I'll write up a quick outline.

const
WALK_PS_WILLOWS_1 = 10;
WALK_PS_WILLOWS_2 = 11;

WALK_ARRAY_LENGTH = 11;

type
TWalkPoint = record
Name : string;
Color : Integer;
Tolerance : Integer;
SortFrom : TPoint;
OnMMOffset : TPoint;
ResOffset : TPoint;
Failsafe : array of function(Color, sRadial, eRadial, r, modX, modY, Tol: Integer): Boolean;
end;

TWalkPointArray = array of TWalkInfo;

var
MSI_WalkPoints: array[0..WALK_ARRAY_LENGTH] of TWalkInfo;

procedure MSI_LoadWalkPoint(Index: Integer);
begin
case Index of
WALK_PS_WILLOW_1:
with MSI_WalkPoints[Index] do
begin
end;

WALK_PS_WILLOW_1:
with MSI_WalkPoints[Index] do
begin
end;
end;
end;

procedure MSI_LoadAllWalkPoints();
var
i: Integer;
begin
for i := 0 to High(MSI_WalkPoints) do
MSI_LoadWalkPoint(i);
end;

function MSI_GetMMPoint(WalkPoint: Integer): TPoint;
begin
// Here would be the TPA function returning the TPoint on the minimap
// To use the type, just call MSI_WalkPoints[WalkPoint].Tolerance, etc.
end;

function MSI_WalkToPoint(WalkPoint: Integer): Boolean;
begin
// Already exists as MSI_WalkToColorIndex, so it would be the same
// except this one would call the failsafe functions also
end;

// MSI_LoadColorPath and MSI_ColorWalk would remain the same; slight edits may be necessary
This way is consistent with the rest of the include, and best of all, it's simple and organized.

@Zyt3x I'd also like to look a little more into your color world walker as I have tested it before, and it does work really well. The only downside is that depending on where you are, it may take a very weird path to the destination, or may not get there at all.

However, I still think it could be used to switch scripts if the player isn't using reflection. Perhaps it could be added as another extra? ;)

Gu3st...

2010-12-16 18:54:24

From: Coh3n
@Zyt3x I'd also like to look a little more into your color world walker as I have tested it before, and it does work really well. The only downside is that depending on where you are, it may take a very weird path to the destination, or may not get there at all.

However, I still think it could be used to switch scripts if the player isn't using reflection. Perhaps it could be added as another extra? ;)
The way it works is by walking in a direct line from point A to point B, which is (imho) a 'dangerous' way of walking.
It is dangerous in the way that it will get stuck many times in areas where there are many buildings or a wall blocking your path (Walking in Falador is one example).

However, there is one way to fix this problem; make the script walk to a certain point before walking to point B.

Example: User stands in the middle of Falador and has to walk to Varrock. Now the script would choose NE as an angle to walk in, but since theres a wall surrounding the city, it would get stuck near the wall. I made it instead of walking towards NE, it would first walk to the outside of Falador (To the statue just north of falador), and then walk towards Varrock, which is now to the east. It would know that it had to walk north by comparing the current location (point A) to problematic areas and then walk in the desired direction


It will be inside Extra for sure, and I'll make it both color and reflection actually :)
Color: Get point A by opening the world map.
Reflection: Use GetMe.Tile to get point A.

I'll hopefully get this done by Saturday. I wont (unfortunately) have time to work on it on Friday (tomorrow) :(

Coh3n

2010-12-16 19:22:27

From: Zyt3x
The way it works is by walking in a direct line from point A to point B, which is (imho) a 'dangerous' way of walking.
It is dangerous in the way that it will get stuck many times in areas where there are many buildings or a wall blocking your path (Walking in Falador is one example).

However, there is one way to fix this problem; make the script walk to a certain point before walking to point B.

Example: User stands in the middle of Falador and has to walk to Varrock. Now the script would choose NE as an angle to walk in, but since theres a wall surrounding the city, it would get stuck near the wall. I made it instead of walking towards NE, it would first walk to the outside of Falador (To the statue just north of falador), and then walk towards Varrock, which is now to the east. It would know that it had to walk north by comparing the current location (point A) to problematic areas and then walk in the desired direction


It will be inside Extra for sure, and I'll make it both color and reflection actually :)
Color: Get point A by opening the world map.
Reflection: Use GetMe.Tile to get point A.

I'll hopefully get this done by Saturday. I wont (unfortunately) have time to work on it on Friday (tomorrow) :(

That's an example of another simple, but very effective system. ;)

Sex

2010-12-17 01:17:40

Nodes..

Sir R. M8gic1an

2010-12-17 01:27:31

Lol, omg, that code makes so much sense!

We're looking for the colors around our coords.

We are click walking and we are searching for the colors supposed to be around our click!

~RM

Sex

2010-12-17 02:46:40

Wtf?

Camaro'

2010-12-17 06:45:32

From: Sir R. Magician
Lol, omg, that code makes so much sense!

We're looking for the colors around our coords.

We are click walking and we are searching for the colors supposed to be around our click!

~RM


Yea, I have been using this since I started MSI. It can make color walking walk very long distances, NCDS said he got a 3 hour proggy in Lumbridge west swamp miner for 100% color walking :p.


I love the idea, I guess I'll start on it today? Oh and can you explain these?

SortFrom : TPoint;//I know this is the one that gets used in SortTPAFrom
OnMMOffset : TPoint; // Why do you need two points that are exactly the same in all my walking functions
ResOffset : TPoint;

Sir R. M8gic1an

2010-12-17 10:50:02



function WalkTo(ThisPoint: TPoint, Color: Integer, Tol: integer): boolean;
begin

FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color, MMX1, MMY1, MMX2, MMy2, Tol);
SortTPAFrom(TPA, ThisPoint);
for I := 0 to High(TPA) do
begin
X := TPA[I].x;
Y := TPA[I].y;

if not RS_onMinimap(X + 8, Y - 3) then
Continue;

Result := Point(X + 8, Y - 3);

Break;
end;
end;

Made it into a function…

~RM

Camaro'

2010-12-17 14:55:11

Fixed the offsets, and some compiling errors. I think, I didn't compile this code or yours :).


function WalkTo(SortPoint, OffsetPt: TPoint; Color, Tol: Integer): boolean;
begin

FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color, MMX1, MMY1, MMX2, MMy2, Tol);
SortTPAFrom(TPA, SortPoint);
for I := 0 to High(TPA) do
begin
X := TPA[I].x;
Y := TPA[I].y;

if not RS_onMinimap(X + OffsetPt.X, Y + OffsetPt.Y) then
Continue;

Result := Point(X + OffsetPt.X, Y + OffsetPt.Y);

Break;
end;
end;

Coh3n

2010-12-17 15:31:45

[QUOTE=Camaro';759813]Yea, I have been using this since I started MSI. It can make color walking walk very long distances, NCDS said he got a 3 hour proggy in Lumbridge west swamp miner for 100% color walking :p.


I love the idea, I guess I'll start on it today? Oh and can you explain these?

SortFrom : TPoint;//I know this is the one that gets used in SortTPAFrom
OnMMOffset : TPoint; // Why do you need two points that are exactly the same in all my walking functions
ResOffset : TPoint;

I didn't realize they were always the same. If you only need one, just call it Offsets. :p

From: Sir R. Magician


function WalkTo(ThisPoint: TPoint, Color: Integer, Tol: integer): boolean;
begin

FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color, MMX1, MMY1, MMX2, MMy2, Tol);
SortTPAFrom(TPA, ThisPoint);
for I := 0 to High(TPA) do
begin
X := TPA[I].x;
Y := TPA[I].y;

if not RS_onMinimap(X + 8, Y - 3) then
Continue;

Result := Point(X + 8, Y - 3);

Break;
end;
end;

Made it into a function…

~RM

Sex already did earlier on the page. ;)

Camaro'

2010-12-17 15:37:12

They should be the same, If there not, I think someone should make them the same. It checks if PT x, y is on the minimap, what would be the use of doing that if its going to tell the script to click at another coord :p. If there are any different then it is my mistake. I fixed up RM's function in my last post, I think that would work quite well.

Edit: By tonight, I'll have walking color revamped, with updated varrock walking(including varrock east), and port sarim yew (cant promise the yews, was having a really hard time Iirc last time I tried).

Coh3n

2010-12-17 15:38:54

[QUOTE=Camaro';759882]They should be the same, If there not, I think someone should make them the same. It checks if PT x, y is on the minimap, what would be the use of doing that if its going to tell the script to click at another coord :p. If there are any different then it is my mistake. I fixed up RM's function in my last post, I think that would work quite well.
Sounds good to me. :)

Sex

2010-12-17 16:30:23

At first I was going to use the same TPoint, however take a look at the WALK_WC_PS_WILLOW_2. It has no offset for OnMM but it does for the result.

Camaro'

2010-12-17 16:43:18

I know, I explained that to coh3n, I think.

All functions for this method of walking should use the exact same offset, I don't remember why I didn't, but who cares. It makes no sense to not use the same offset :p. There is a few in LSW walking also.

Coh3n

2010-12-17 17:32:38

[QUOTE=Camaro';759900]I know, I explained that to coh3n, I think.

[B]All functions[/B] for this method of walking should use the exact same offset, I don't remember why I didn't, but who cares. It makes no sense to not use the same offset :p. There is a few in LSW walking also.
There must have been a reason? Test with and without and see if there's a difference.

Camaro'

2010-12-17 17:48:04

I'm 100% both should have the same offsets.

On another note:

I rewrote LSW(Haven't tested):

Heres what I have, does not compile as of now. Please sweeten her up someone. I would of gone more, but I'm starting to get confused :p

Some conventions may be wrong. Iono :confused:

Edit: Oh no… I hope I did the LoadPoints function correct :p


{==============================================================================\
| MSI Group Scripting Include |
| Walking_Color.scar |
|==============================================================================|
| For all the walking functions that are color based. |
| |
| * function MSI_LoadWalkInfo(); * by Coh3n |
| * procedure MSI_LoadAllWalkInfo; * by Coh3n |
| * procedure MSI_Flag(); * by Coh3n |
| * procedure MSI_SortColors(); * by Blumblebee |
| * function MSI_RemovePointsInBox(): TPointArray; * by Markus |
| * function MSI_CreateColorBox(): TBox; * by Blumblebee |
| * function MSI_FindColorInBox(): Boolean; * by Blumblebee |
| * function MSI_InLWSMine: Boolean; * by Camaro' |
| * function MSI_SwitchGETrees: Boolean; * by Lordsaturn |
| * function MSI_WalkToColorIndex(): Boolean; * by Coh3n |
| * function MSI_CreateWalkFailsafe(): Boolean; * by Blumblebee & NCDS |
| * function MSI_LoadColorPath(): TIntegerArray; * by Coh3n |
| * function MSI_ColorWalk(): Boolean; * by Coh3n |
| * function MSI_IsWorldMapUp: Boolean; * by Zyt3x |
| * function MSI_CloseWorldMap: Boolean; * by Zyt3x |
| * function MSI_OpenWorldMan: Boolean; * by Zyt3x |
\_____________________________________________________________________________}


type
TWalkPoint = record
Name : string;
Color : Integer;
Tolerance : Integer;
SortFrom : TPoint;
Offsets : TPoint;
BlindPT : TPoint;
Failsafe : array of function(Color, sRadial, eRadial, r, modX, modY, Tol: Integer): Boolean;
end;

TWalkPointArray = array of TWalkInfo;

var
MSI_WalkPoints: array[0..WALK_ARRAY_LENGTH] of TWalkInfo;


procedure MSI_LoadWalkPoint(Index: Integer);
begin
case Index of
{ Grand Exchange =================================== ]
[=================================================== }
WALK_WC_GE_YEW_1:
with MSI_WalkPoints[Index] do
begin
Name := 'Grand Exchange Yews';
Color := Color_GE_Floor;
Tolerance := 20;
SortFrom := Point(697, 81);
Offsets := Point(-5, RandomRange(-3, 3));
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;

WALK_WC_GE_YEW_2:
with MSI_WalkPoints[Index] do
begin
Name := 'Grand Exchange Yews';
Color := Color_GE_Floor;
Tolerance := 20;
SortFrom := Point(683, 47);
Offsets := Point(2, 2);
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;

WALK_WC_GE_YEW_3:
with MSI_WalkPoints[Index] do
begin
Name := 'Grand Exchange Yews';
Color := Color_GE_Floor;
Tolerance := 20;
SortFrom := Point(672, 64);
Offsets := Point(0, -6);
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;

WALK_WC_GE_YEW_BANK_1:
with MSI_WalkPoints[Index] do
begin
//if not (MSI_Players[CurrentPlayer].Scripts[CurrentScript].LeftTree) then
//if (MSI_SwitchGETrees) then
Name := 'Grand Exchange Yews';
Color := Color_GE_Floor;
Tolerance := 20;
SortFrom := Point(579, 134);
Offsets := Point(0, 0);
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;

WALK_WC_GE_YEW_BANK_2:
with MSI_WalkPoints[Index] do
begin
Name := 'Grand Exchange Yews';
Color := Color_GE_Floor;
Tolerance := 20;
SortFrom := Point(575, 98);
Offsets := Point(-3, 0);
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;

WALK_WC_GE_YEW_BANK_3:
with MSI_WalkPoints[Index] do
begin
Name := 'Grand Exchange Yews';
Color := 329453;
Tolerance := 20;
SortFrom := Point(564, 86);
Offsets := Point(5, 0);
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;

{ Lumbridge West =================================== ]
[=================================================== }

WALK_MINE_LSW_1:
with MSI_WalkPoints[Index] do
begin
Name := 'Lumbridge West Swamp';
Color := COLOR_ROAD_DRAYNOR;
Tolerance := 25;
SortFrom := Point(685, 116);
Offsets := Point(RandomRange(-3, 3), RandomRange(-3, 3));
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;

WALK_MINE_LSW_2:
with MSI_WalkPoints[Index] do
begin
Name := 'Lumbridge West Swamp';
Color := COLOR_ROAD_DRAYNOR;
Tolerance := 25;
SortFrom := Point(660, 139);
Offsets := Point(RandomRange(-3, 3), RandomRange(-3, 3));
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;
WALK_MINE_LSW_3:
with MSI_WalkPoints[Index] do
begin
Name := 'Lumbridge West Swamp';
BlindPT := Point(671, 136);
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;

WALK_MINE_LSW_4:
with MSI_WalkPoints[Index] do
begin
Name := 'Lumbridge West Swamp';
Color := Color_Water;
Tolerance := 25;
SortFrom := Point(679, 128);
Offsets := Point(4, -2);
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;

WALK_MINE_LSW_5:
with MSI_WalkPoints[Index] do
begin
Name := 'Lumbridge West Swamp';
Color := Color_Water;
Tolerance := 25;
SortFrom := Point(637, 153);
Offsets := Point(6, -1);
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;
WALK_MINE_LSW_6:
with MSI_WalkPoints[Index] do
begin
Name := 'Lumbridge West Swamp';
Color := Color_Water;
Tolerance := 25;
SortFrom := Point(640, 151);
Offsets := Point(6, -1);
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;

WALK_MINE_LSW_7:
with MSI_WalkPoints[Index] do
begin
Name := 'Lumbridge West Swamp';
Color := Color_Water;
Tolerance := 25;
SortFrom := Point(641, 151);
Offsets := Point(6, -1);
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;

WALK_MINE_LSW_8:
with MSI_WalkPoints[Index] do
begin
Name := 'Lumbridge West Swamp';
Color := Color_Water;
Tolerance := 25;
SortFrom := Point(633, 151);
Offsets := Point(8, -3);
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;

WALK_MINE_LSW_BANK_1:
with MSI_WalkPoints[Index] do
begin
Name := 'Lumbridge West Swamp';
Color := Color_Water;
Tolerance := 25;
SortFrom := Point(624, 21);
Offsets := Point(7, 0);
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;

WALK_MINE_LSW_BANK_2:
with MSI_WalkPoints[Index] do
begin
Name := 'Lumbridge West Swamp';
Color := Color_Water;
Tolerance := 25;
SortFrom := Point(616, 20);
Offsets := Point(6, 0);
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;

WALK_MINE_LSW_BANK_3:
with MSI_WalkPoints[Index] do
begin
Name := 'Lumbridge West Swamp';
Color := Color_Water;
Tolerance := 25;
SortFrom := Point(620, 21);
Offsets := Point(6, 0);
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;

WALK_MINE_LSW_BANK_4:
with MSI_WalkPoints[Index] do
begin
Name := 'Lumbridge West Swamp';
Color := Color_Water;
Tolerance := 25;
SortFrom := Point(577, 44);
Offsets := Point(2, -5);
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;

WALK_MINE_LSW_BANK_5:
with MSI_WalkPoints[Index] do
begin
Name := 'Lumbridge West Swamp';
Color := COLOR_ROAD_DRAYNOR;
Tolerance := 25;
SortFrom := Point(588, 29);
Offsets := Point(3, 1);
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;

WALK_MINE_LSW_BANK_6:
with MSI_WalkPoints[Index] do
begin
Name := 'Lumbridge West Swamp';
Color := COLOR_ROAD_DRAYNOR;
Tolerance := 25;
SortFrom := Point(596, 30);
Offsets := Point(1, -3);
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;

WALK_MINE_LSW_BANK_7:
with MSI_WalkPoints[Index] do
begin
Name := 'Lumbridge West Swamp';
Color := COLOR_DB_BANK_FLOOR;
Tolerance := 20;
SortFrom := Point(578, 59);
Offsets := Point(2, 0);
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;

{ Draynor ========================================== ]
[=================================================== }

WALK_FISH_DB_1:
with MSI_WalkPoints[Index] do
begin
Name := 'Draynor Fish';
Color := Color_Water;
Tolerance := 25;
SortFrom := Point(612, 140);
Offsets := Point(4, 0);
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;

WALK_FISH_DB_BANK_1:
with MSI_WalkPoints[Index] do
begin
Name := 'Draynor Fish';
Color := Color_NPC;
Tolerance := 20;
SortFrom := Point(649, 24);
Offsets := Point(5, 4);
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;

WALK_WC_DB_WILLOWS_1:
begin
Name := 'Draynor Willows';
BlindPT := Point(RandomRange(595, 613), RandomRange(113, 130));
end;

WALK_WC_DB_WILLOWS_BANK_1:
begin
Name := 'Draynor Willows';
BlindPT := Point(RandomRange(645, 656), RandomRange(44, 53));
end;

{ Port Sarim ======================================= ]
[=================================================== }
WALK_PS_WILLOW_1:
with MSI_WalkPoints[Index] do
begin
Name := 'Port sarim willows';
Color := Color_PS_Path;
Tolerance := 20;
SortFrom := Point(662, 30);
Offsets := Point(8, -3);
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;

WALK_PS_WILLOW_2:
with MSI_WalkPoints[Index] do
begin
Name := 'Port sarim willows';
Color := Color_Willow_MM;
Tolerance := 20;
SortFrom := Point(639, 72);
Offsets := Point(4, 4);
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;

WALK_WC_PS_WILLOW_BANK_1:
with MSI_WalkPoints[Index] do
begin
Name := 'Port sarim willows';
Color := Color_PS_PATH;
Tolerance := 20;
SortFrom := Point(585, 115);
Offsets := Point(0, 0);
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;

WALK_WC_PS_WILLOW_BANK_2:
with MSI_WalkPoints[Index] do
begin
Name := 'Port sarim willows';
Color := Color_PS_PATH;
Tolerance := 20;
SortFrom := Point(628, 140);
Offsets := Point(-5, -5);
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;

WALK_WC_PS_YEW_1:
with MSI_WalkPoints[Index] do
begin
Name := 'Port sarim yews';
Color := Color_PS_Path;
Tolerance := 20;
SortFrom := Point(662, 30);
Offsets := Point(8, -3);
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;

WALK_WC_PS_YEW_2:
with MSI_WalkPoints[Index] do
begin
Name := 'Port sarim yews';
Color := Color_Tree_Trunk;
Tolerance := 20;
SortFrom := Point(599, 19);
Offsets := Point(RandomRange(-5, 5), 5);
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;

WALK_WC_PS_YEW_3:
with MSI_WalkPoints[Index] do
begin
Name := 'Port sarim yews';
Color := Color_Tree_Symbol;
Tolerance := 20;
SortFrom := Point(MMCX, MMCY);
Offsets := Point(2, 0);
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;

WALK_WC_PS_YEW_BANK_1:
with MSI_WalkPoints[Index] do
begin
Name := 'Port sarim yews';
Color := Color_Red_Door;
Tolerance := 20;
SortFrom := Point(625, 131);
Offsets := Point(0, -2);
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;

WALK_WC_PS_YEW_BANK_2:
with MSI_WalkPoints[Index] do
begin
Name := 'Port sarim yews';
Color := Color_PS_Path;
Tolerance := 20;
SortFrom := Point(628, 151);
Offsets := Point(-4, 4);
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;

WALK_WC_PS_YEW_BANK_3:
with MSI_WalkPoints[Index] do
begin
Name := 'Port sarim yews';
Color := Color_PS_Path;
Tolerance := 20;
SortFrom := Point(616, 129);
Offsets := Point(-3, 0);
//Failsafe := @NoFailsafe(0, 0, 0, 0, 0, 0, 0);
end;


end;
end;

{******************************************************************************}
{ procedure MSI_LoadAllWalkPoints(); }
{ By: Coh3n }
{ Date: 17 December 2010 }
{ Description: Loads all walking points. }
{******************************************************************************}
procedure MSI_LoadAllWalkPoints();
var
i: Integer;
begin
for i := 0 to High(MSI_WalkPoints) do
MSI_LoadWalkPoint(i);
end;

{******************************************************************************}
{ function MSI_GetMMPoint(WalkPoint: Integer): TPoint; }
{ By: Camaro' }
{ Date: 17 December 2010 }
{ Description: Loads and gets a TPoint of where to walk. }
{******************************************************************************}

function MSI_GetMMPoint(WalkPoint: Integer): TPoint;
begin
MSI_LoadWalkPoint(WalkPoint);
if (MSI_WalkPoints[WalkPoint].BlindPT.X > 1) then
begin
Result := MSI_WalkPoints[WalkPoint].BlindPT;
Exit;
end;
FindColorsSpiralTolerance(MMCX, MMCY, TPA, MSI_WalkPoints[WalkPoint].Color, MMX1, MMY1, MMX2, MMy2, MSI_WalkPoints[WalkPoint].Tolerance);
SortTPAFrom(TPA, MSI_WalkPoints[WalkPoint].SortFrom);
for I := 0 to High(TPA) do
begin
X := TPA[I].x;
Y := TPA[I].y;

if not RS_onMinimap(X + MSI_WalkPoints[WalkPoint].Offsets.X, Y + MSI_WalkPoints[WalkPoint].Offsets.Y) then
Continue;

Result := Point(X + MSI_WalkPoints[WalkPoint].Offsets.X, Y + MSI_WalkPoints[WalkPoint].Offsets.Y);

Break;
end;
end;

{******************************************************************************}
{ function MSI_WalkToColorPoint(WalkPoint: Integer): Boolean; }
{ By: The MSI Team }
{ Date: 17 December 2010 }
{ Description: Walked to a point specified by 'WalkPoint' on the minimap }
{******************************************************************************}
function MSI_WalkToColorPoint(WalkPoint: Integer): Boolean;
var
p: TPoint;
begin
p := MSI_GetMMPoint(index);

if (p.x = -1) then//Fit in failsafe here
Exit;

if (rs_OnMinimap(p.x, p.y)) then
begin
Mouse(p.x, p.y, 3, 3, True);
MSI_Flag;
Result := True;
end else
MSI_SubDebug('MSI_WalkToColorIndex: Failed to walk to, index: ' +
IntToStr(index) + '; not on the minimap');
end;



{******************************************************************************}
{ procedure MSI_Flag; }
{ By: Coh3n Edited by NCDS }
{ Date: 27 September 2010 }
{ Description: Waits while the flag is on the minimap. Will still work when }
{ walking around obstacles }
{******************************************************************************}
procedure MSI_Flag;
var
t: Integer;
begin
repeat
if (FindNPCChatText('erous', Nothing)) then // Only if total level < 60
begin
ClickContinue(True, True);
t := GetSystemTime + 5000;
while (GetSystemTime < t) do
begin
Wait(500 + Random(300));
if (FindNPCChatText('eave', ClickLeft)) then
Break;
end;
end;

Wait(RandomRange(200, 500));
t := (GetSystemTime + 12000);

if ((not FlagPresent) and (IsMoving)) then
begin
MSI_Antiban(RandomRange(300, 1000), ANTI_BAN_CHANCE);
Continue;
end;

MSI_FindRandoms;
MSI_AntiBan(RandomRange(200, 800), ANTI_BAN_CHANCE);

MSI_SubDebug('Flag distance: '+IntToStr(FlagDistance));

while (FlagDistance = -1) and (t < GetSystemTime) do
Wait(10);

if (FlagDistance <= TOLERANCE_FLAG) or (not IsMoving) then
Exit;
until((not (FlagPresent)) and (not (IsMoving))) or (t < GetSystemTime);
end;

{******************************************************************************}
{ function RemovePointsInBox(points: TPointArray; box: TBox): TPointArray; }
{ By: Markus }
{ Date: 05 November 2010 (Added) }
{ Description: Removes all points in tpa 'points' in a box specified by 'box' }
{ }
{******************************************************************************}
function MSI_RemovePointsInBox(points: TPointArray; box: TBox): TPointArray;
var
i, L, rescnt: Integer;
begin
L := GetArrayLength(points)-1
for i := 0 to L do
begin
if not PointInBox(points[i], box) then
begin
rescnt := rescnt + 1;
SetArrayLength(Result, rescnt);
Result[rescnt - 1] := points[i];
end;
end;
end;

{******************************************************************************}
{ function MSI_CreateColorBox(Color: Integer): TBox; }
{ By: Blumblebee }
{ Date: 10 June 2010 }
{ Description: Returns a box around the colors found }
{******************************************************************************}
function MSI_CreateColorBox(Color: Integer): TBox;
var
TPA: tPointArray;
begin
FindColors(TPA, Color, MMx1, MMy1, MMx2, MMy2);
if Length(TPA) <= 0 then Exit;
Result := GetTPABounds(TPA);
end;

{******************************************************************************}
{ function MSI_FindColorInBox(Color: Integer; Box: TBox): Boolean; }
{ By: Blumblebee }
{ Date: 10 June 2010 }
{ Description: Returns true if the color is found in a box }
{******************************************************************************}
function MSI_FindColorInBox(Color: Integer; Box: TBox): Boolean;
var
TPA: tPointArray;
i: Integer;
begin
FindColorsTolerance(TPA, Color, Box.x1-5, Box.y1-5, Box.x2+5, Box.y2+5, 15);
if Length(TPA) <= 0 then Exit;
SortTPAFrom(TPA, Point(687, 50));
for i := 0 to High(TPA) do
begin
if not rs_OnMiniMap(TPA[i].x, TPA[i].y) then continue;
Mouse(TPA[i].x, TPA[i].y, 5, 5, True);
Wait(750+random(450));
if FlagPresent then
begin
FFlag(10);
Result := True;
Exit;
end;
end;
end;

{******************************************************************************}
{ function MSI_InLWSMine: Boolean; }
{ By: Camaro' }
{ Date: October 30th 2010 }
{ Description: Determines if you are in the Lumbridge West Swamp Mine }
{******************************************************************************}
function MSI_InLWSMine: Boolean;
var
TPA1, TPA2, TPA: TPointArray;
X, Y, I, A: Integer;
ATPA : T2DPointArray;
TB: TBox;
begin
FindColorsTolerance(TPA1, 2640509, MMX1, MMY1, MMX2, MMY2, 20);
FindColorsTolerance(TPA2, 1588046, MMX1, MMY1, MMX2, MMY2, 20);
TPA := CombineTPA(TPA1, TPA2);
if (Length(TPA) < 1) then
begin
Result := False;
Writeln('Failed detecting the mine');
Exit;
end;
ATPA := TPAToATPAEx(TPA, 25, 25);
SortATPAFrom(ATPA, Point(MSCX, MSCY));
A := High(ATPA);
for I := 0 to A do
begin
MiddleTPAEx(ATPA[I], X, Y);
TB := GetTPABounds(ATPA[I]);
if (TB.X2 - TB.X1 >= 18) and (TB.Y2 - TB.Y1 >= 18) then
begin
if (Distance(X, Y, MMCX, MMCY) < 25) then
begin
Result := True;
Exit;
end;
end;
end;
end;

{******************************************************************************}
{ function MSI_SwitchGETrees: Boolean; }
{ By: LordSaturn }
{ Date: 05 November 2010 }
{ Description: Switchs Trees at the Grand Exchange location }
{******************************************************************************}
function MSI_SwitchGETrees: Boolean;
var
c, d1, d2, mn: integer;
Pt: TPoint;
P: TPointArray;
s, s2: string;
begin
if not LoggedIn then Exit;
while not Result do
begin
Inc(c);
FindSymbols(P, 'tree');
P := MSI_RemovePointsInBox(P, inttobox(MMX1, MMCY+20, MMX2, MMY2));
if Length(P) <> 3 then Exit;
SortTPAFrom(P, Point(MMX1, MMY1));
d1 := Distance(MMCX, MMCY, P[0].x, P[0].y);
d2 := Distance(MMCX, MMCY, P[2].x, P[2].y);
mn := Min(d1, d2);
case mn of
d1: s := 'd1';
d2: s := 'd2';
end;
if c = 2 then
begin
Result := s2 <> s;
case MSI_Players[CurrentPlayer].Scripts[CurrentScript].LeftTree of
True: MSI_Players[CurrentPlayer].Scripts[CurrentScript].LeftTree := False;
False: MSI_Players[CurrentPlayer].Scripts[CurrentScript].LeftTree := True;
end;
Exit;
end;
s2 := s;
if mn = d2 then
begin
Pt := MiddleTPA([P[0], P[1]]);
IncEx(Pt.y, 8);
end else
Pt := Point(P[2].x-8, P[2].y+2);
Mouse(Pt.x, Pt.y, 2, 2, True);

MSI_Flag;
end;
end;


{******************************************************************************}
{ function MSI_CreateWalkFailsafe(index: Integer): Boolean; }
{ By: The MSI Team }
{ Date: 10 June 2010 }
{ Description: Uses radial walking if MSI_WalkToColorIndex fails }
{******************************************************************************}
function MSI_CreateWalkFailsafe(index: Integer): Boolean;
begin
try
MSI_AddHeader('MSI_CreateWalkFailsafe');

if not MSI_WalkToColorPoint(index) then
begin
case index of
WALK_WC_VE_TREE_1:
if not RadialWalkAutoColor(srl_VarrockRoadColor, 45, 90, 55, 4, 4) then
if not RadialWalkAutoColor(srl_RockColor, 45, 90, 70, 4, 4) then
begin
MSI_Debug('Failed to WALK_WC_VE_TREE_1');
Exit;
end;

WALK_WC_VE_TREE_2:
if not RadialWalkAutoColor(srl_VarrockRoadColor, 75, 105, 65, 4, 4) then
if not RadialWalkAutoColor(srl_VarrockRoadColor, 65, 115, 65, 4, 4) then
begin
MSI_Debug('Failed to WALK_WC_VE_TREE_2');
Exit;
end;

WALK_WC_VE_TREE_3:
if not RadialWalkAutoColor(srl_VarrockRoadColor, 0, 35, 65, 2, 1) then
if not RadialWalkAutoColor(srl_VarrockRoadColor, 345, 35, 60, 2, 2) then
if not RadialWalkAutoColor(srl_VarrockRoadColor, 0, 45, 65, 5, 5) then
if not RadialWalkAutoColor(srl_VarrockRoadColor, 60, 110, 70, 5, 5) then
begin
MSI_Debug('Failed to WALK_WC_VE_TREE_3');
Exit;
end;

WALK_WC_VE_TREE_4:
if not RadialWalkAutoColor(srl_TreeColor, 310, 350, 6, 2, 1) then
if not RadialWalkAutoColor(srl_TreeColor, 60, 100, 60, 2, 1) then //for if the player ends up in the museum
begin
MSI_Debug('Failed to WALK_WC_VE_TREE_3');
Exit;
end;

WALK_WC_VE_BANK_1:
if not RadialWalkAutoColor(srl_RockColor, 350, 50, 65, 5, 5) then
begin
MouseBox(631, 114, 667, 130, 1); // random co-ord clicking
Wait(RandomRange(1000, 2000));
MSI_Flag;
end else
begin
MSI_Debug('Failed to WALK_WC_VE_BANK_1');
Exit;
end;

WALK_WC_VE_BANK_2:
if not RadialWalkAutoColor(srl_VarrockRoadColor, 180, 200, 65, 4, 4) then
if not RadialWalkAutoColor(srl_VarrockRoadColor, 170, 220, 65, 4, 4) then
begin
MSI_Debug('Failed to WALK_WC_VE_BANK_2');
Exit;
end;

WALK_WC_VE_BANK_3:
if not RadialWalkAutoColor(srl_VarrockRoadColor, 255, 280, 70, 4, 4) then
if not RadialWalkAutoColor(srl_VarrockRoadColor, 245, 290, 70, 4, 4) then
begin
MSI_Debug('Failed to WALK_WC_VE_BANK_3');
Exit;
end;

WALK_WC_VE_BANK_4:
Exit; // add a DTM of Bankers here.

end;
end;

result := true;

finally
MSI_CloseHeader('MSI_CreateWalkFailsafe: ' + BoolToStr(result));
end;
end;

{******************************************************************************}
{ function MSI_LoadColorPath(sLoc, eLoc: Integer): TIntegerArray; }
{ By: Coh3n }
{ Date: 04 August 2010 }
{ Description: Loads the specified color walking path }
{******************************************************************************}
function MSI_LoadColorPath(sLoc, eLoc: Integer): TIntegerArray;
var
Script: TScript;
begin
Script := MSI_Scripts[MSI_Players[CurrentPlayer].Scripts[CurrentScript].Name];

if (sLoc = Script.PathInfo.StartLoc) then
Result := Script.PathInfo.ColorTo
else
if (sLoc = Script.PathInfo.EndLoc) then
Result := Script.PathInfo.ColorFrom;
end;

{******************************************************************************}
{ function MSI_ColorWalk(startLoc, endLoc: Integer): Boolean; }
{ By: Coh3n }
{ Date: 10 June 2010 }
{ Description: Walks from startLoc to endLoc }
{******************************************************************************}
function MSI_ColorWalk(startLoc, endLoc: Integer): Boolean;
var
i: Integer;
thePath: TIntegerArray;
begin
if (not LoggedIn) then
Exit;

try MSI_AddHeader('MSI_ColorWalk');
thePath := MSI_LoadColorPath(startLoc, endLoc);
for i := 0 to High(thePath) do
begin
if (not MSI_CreateWalkFailsafe(thePath[i])) then
begin
MSI_Players[CurrentPlayer].ReportInfo.FalseReason := 'Failed to walk to ' + MSI_Locations[endLoc].Name + ', index: ' + IntToStr(thePath[i]);
MSI_Players[CurrentPlayer].Location := LOC_LOST;
Exit;
end;
MSI_FindRandoms;

Result := (i = High(thePath));
end;

if (Result) then
begin
MSI_Players[CurrentPlayer].Location := endLoc;
Wait(RandomRange(750, 1500));
end;

finally
MSI_CloseHeader('MSI_ColorWalk: ' + BoolToStr(Result));
end;
end;

{******************************************************************************}
{ function MSI_IsWorldmapUp : Boolean; }
{ By: Zyt3x }
{ Date: 05 October 2010 }
{ Description: Returns true if the worldmap is showing. }
{******************************************************************************}
function MSI_IsWorldMapUp : Boolean;
var
tmp : string;
begin
Result := False;
if GetMMLevels('hp', tmp) = -1 then
Result := GetColor(268, 482) = 10066329;
// Grey pixel in the "." in "Search the map by typing here." text.
end;

{******************************************************************************}
{ function MSI_CloseWorldmap : Boolean; }
{ By: Zyt3x }
{ Date: 05 October 2010 }
{ Description: Returns true if the worldmap has been closed }
{******************************************************************************}
function MSI_CloseWorldMap : Boolean;
var
timeout : Integer;
begin
Result := not MSI_IsWorldmapUp;
if Result then Exit;
MouseBox(740, 10, 755, 25, 1);//clickLeft);
timeout := GetSystemTime + 20000;
while (GetSystemTime < timeout) do
begin
if not MSI_IsWorldmapUp then Break;
Wait(500+Random(500));
MSI_AntiBan(RandomRange(0, 3000), ANTI_BAN_CHANCE);
end;
Result := (not MSI_IsWorldmapUp);
end;

{******************************************************************************}
{ function MSI_IsWorldmapUp : Boolean; }
{ By: Zyt3x }
{ Date: 05 October 2010 }
{ Description: Returns true if the worldmap has been opened. }
{******************************************************************************}
function MSI_OpenWorldMap : Boolean;
var
timeout : Integer;
begin
Result := MSI_IsWorldmapUp;
if Result then Exit;
MouseBox(526, 124, 559, 157, 1);//clickLeft);
Wait(1500);
timeout := GetSystemTime + 20000;
while (GetSystemTime < timeout) do
begin
if GetColor(229, 195) <> 0 then Break;
Wait(500+Random(500));
MSI_AntiBan(RandomRange(0, 3000), ANTI_BAN_CHANCE);
end;
Result := MSI_IsWorldmapUp;
end;

Coh3n

2010-12-17 18:03:48

Just took a quick look through it. Looks pretty good. You can scrap ANY function that you don't use (i.e. FindColorInBox, CreateWalkFailsafe, etc.). SwitchTrees can be split into two walk points so a separate function probably wont be needed. ;)

On another note: I'd also like to do something about InLSWMine as we don't want that for a ton of different scripts. LSW Mine can be made into a ColorArea record, and placed in relocate.simba. We may have to edit MSI_AtLocation a little to work with color also, but that's not hard at all. You may also need to replace MSI_RelocateColor with your InMine function (and make it work with the new type, basically the same thing that was done with your TPA Walking function).

Actually, your InLSWMine should be converted to a function with a type (exactly like your walking function). In Relocate.simba, we have 'ColorAreas' that would be used to relocate (or check location) in color if anyone had developed it. We may as well use your systems for both and they both seem to work well. :)

Camaro'

2010-12-17 18:19:32

From: Coh3n
Just took a quick look through it. Looks pretty good. You can scrap ANY function that you don't use (i.e. FindColorInBox, CreateWalkFailsafe, etc.). SwitchTrees can be split into two walk points so a separate function probably wont be needed. ;)

On another note: I'd also like to do something about InLSWMine as we don't want that for a ton of different scripts. LSW Mine can be made into a ColorArea record, and placed in relocate.simba. We may have to edit MSI_AtLocation a little to work with color also, but that's not hard at all. You may also need to replace MSI_RelocateColor with your InMine function (and make it work with the new type, basically the same thing that was done with your TPA Walking function).

Actually, your InLSWMine should be converted to a function with a type (exactly like your walking function). In Relocate.simba, we have 'ColorAreas' that would be used to relocate (or check location) in color if anyone had developed it. We may as well use your systems for both and they both seem to work well. :)


Thanks for the reply. I am actually going to remove that function, cause its not needed, nor was it working too well. If I ever need to add another location I'll take a look at the above.

Coh3n

2010-12-17 18:20:11

[QUOTE=Camaro';759927]Thanks for the reply. I am actually going to remove that function, cause its not needed, nor was it working too well. If I ever need to add another location I'll take a look at the above.
Okay sounds good. :)

KingKong

2010-12-18 00:05:49

I don't really know if this is relevant to the topic but look at the pic below:

This is new feature thats implemented that allows easier walking to locations that cannot be seen on the mainscreen or minimap. When the marker is set it shows a blue arrow on the minimap pointing to the marker. Maybe this would allow easier walking to places somehow?

Camaro'

2010-12-18 01:08:19

http://villavu.com/forum/showthread.php?t=58516

Read the last post too.

KingKong

2010-12-18 01:09:59

I don't have the rights

Sex

2010-12-18 01:16:50

[QUOTE=Camaro';731854]On runescape if you open the world map you can set a marker, like it guilds you to where you set it to. When your far away it has a blue arrow pointing to where to go, which could be used by scripts for walking, like if it is a straight path.

And also, when you get to the marker, it doesn't go away, so you can set it once and leave it on for the whole script, and also, the marker goes on the main screen too. So lets say you need to find a ladder, you can find the color of the arrow, and just like make a TPA around the arrow to really narrow down the search for the ladder. It blinks just like the old tutorial island.

Main screen view / when you are there


Minimap walking


To set a marker you open the world map, and double click where ever you want it. ( you may have to go into that settings drop down menu or whatever.)


http://www.youtube.com/watch?v=-lyzYBmrwF8

KingKong

2010-12-18 01:19:29

That's roughly the same kind of idea i was thinking about, but i didn't know it was already posted since I had no access to Members part.

Coh3n

2010-12-18 01:52:20

Sex, how did you get that?

Camaro'

2010-12-18 18:33:18

From: Coh3n
Sex, how did you get that?


His other account Da Owner was unbanned I believe. Sorry, I didn't realize it was members. :p

Coh3n

2010-12-18 19:46:58

[QUOTE=Camaro';760166]His other account Da Owner was unbanned I believe. Sorry, I didn't realize it was members. :p
And it's against the rules to have two accounts. One or the other should be deleted.

Sex

2010-12-19 01:37:38

From: Coh3n
And it's against the rules to have two accounts. One or the other should be deleted.

Correct, and Wizzup said Da 0wner was to be banned but it was not.

Coh3n

2010-12-19 01:50:48

From: Sex
Correct, and Wizzup said Da 0wner was to be banned but it was not.

Done.

marpis

2010-12-19 05:48:13

BTW


FindColorsSpiralTolerance(MMCX, MMCY, TPA, MSI_WalkPoints[WalkPoint].Color, MMX1, MMY1, MMX2, MMy2, MSI_WalkPoints[WalkPoint].Tolerance);
SortTPAFrom(TPA, MSI_WalkPoints[WalkPoint].SortFrom);
is the same as

FindColorsSpiralTolerance(MSI_WalkPoints[WalkPoint].SortFrom.X, MSI_WalkPoints[WalkPoint].SortFrom.Y, TPA, MSI_WalkPoints[WalkPoint].Color, MMX1, MMY1, MMX2, MMy2, MSI_WalkPoints[WalkPoint].Tolerance);
just faster. :)

Camaro'

2010-12-19 21:09:29

From: marpis
BTW


FindColorsSpiralTolerance(MMCX, MMCY, TPA, MSI_WalkPoints[WalkPoint].Color, MMX1, MMY1, MMX2, MMy2, MSI_WalkPoints[WalkPoint].Tolerance);
SortTPAFrom(TPA, MSI_WalkPoints[WalkPoint].SortFrom);
is the same as

FindColorsSpiralTolerance(MSI_WalkPoints[WalkPoint].SortFrom.X, MSI_WalkPoints[WalkPoint].SortFrom.Y, TPA, MSI_WalkPoints[WalkPoint].Color, MMX1, MMY1, MMX2, MMy2, MSI_WalkPoints[WalkPoint].Tolerance);
just faster. :)



Yea but thats harder to read, In my eyes at least.

NCDS

2010-12-19 21:35:28

[QUOTE=Camaro';760475]Yea but thats harder to read, In my eyes at least.[/QUOTE]

it's the same thing really, just using a TPoint instead of 2 different constants.

Camaro'

2010-12-19 21:54:55

Oh, I know. I just find it easier when things are spread out. Doesn't matter :p

Coh3n

2011-01-08 12:57:57

Discussion continued here.