SRL Archive - MSI Suggestions

Color Development


Coh3n

2010-09-11 02:33:06

I'm hoping for this to get it's own subforum as I feel it's much larger than simply a thread in the Core section. I want this forum to be for the discussions and development of all color walking paths and relocation areas. As I understand it, there are people out there who enjoy the challenge. Your work is always appreciated! :)

Paths that need developing:

// Walking Paths

//Woodcutting
SCRIPT_GE_YEWS = 13;
SCRIPT_RM_YEWS = 15;
SCRIPT_PS_WILLOWS = 16;
SCRIPT_PS_YEWS = 17;

// Mining
SCRIPT_VE_MINER = 31;
SCRIPT_VW_MINER = 32;
SCRIPT_LSW_MINER = 33;
SCRIPT_RM_MINER = 34;
SCRIPT_BBV_MINER = 35;

// Fishing
SCRIPT_DB_FISHER = 51;
Location areas that need developing:

// Location Points (Areas)

// Varrock
// East
LOC_VE_TREES = 10;
LOC_VE_OAKS = 11;
LOC_VE_BANK = 12;
LOC_VE_MINE = 13;

// West
LOC_VW_BANK = 14;
LOC_VW_MINE = 15;

// Grand Exchange
LOC_GE_BANK = 20;
LOC_GE_YEWS = 21;

// Draynor
LOC_DB_BANK = 30;
LOC_DB_WILLOWS = 31;
LOC_DB_FISH = 32;

// Rimmington
LOC_RM_YEWS = 40;
LOC_RM_MINE = 41;

// Falador
LOC_FE_BANK = 50;

// Port Sarim
LOC_PS_WILLOWS = 60;
LOC_PS_YEWS = 61;
LOC_PS_DBOX = 62;

// Lumbridge
LOC_LSW_MINE = 70;
LOC_LSE_MINE = 71;

// Edgeville
LOC_EV_BANK = 80;

// Barbarian Village
LOC_BBV_MINE = 90;
Here are some things you should know.
  • For the color walking, we've been using TPAs. However, you are welcome to use whichever method you choose as long as it each point in the path returns a TPoint (otherwise out system won't work!). Thanks to 3Garrett3, we have a very simple way of making walking points: just create another record! Once you've done this, you can call MSI_WalkTPA with that record and it should walk to that point. :)
  • When (if) this get's it's own subforum, I would like anyone that wishes to start the development of a path to make a new thread. If you're just making a MMColorArea, then post the record (after you've tested of course!).
  • Most importantly, ask questions if you're unsure! If you think they're dumb and noobie, they're not. No one is going to think less of you for simply asking questions.
For now, everything that concerns this topic will be posted in this thread. :) Also, check out the How-to Guide for MSI Scripting if you haven't already.

Cheers,
The MSI Team

Bobzilla69

2010-10-12 10:25:18

Hey,

i am wondering if you guys are going to use color walking at all?

so far its all reflection, i know its more reliable.

you have all the stuff for color walking, if your not going to add color walking, how could i?

i want to experiment around with it.

thanks for any help

Cstrike

2010-10-12 10:28:20

Oh yeah, if you made some working color walking for some parts I'm sure they'd greatly appreciate it. If reflection breaks, we've all got to resort to color.
Of course clear it with the script leaders/high ups before making it ;) in case you make it and they say "no need to do so"

Bobzilla69

2010-10-12 10:30:38

From: cstrike
Oh yeah, if you made some working color walking for some parts I'm sure they'd greatly appreciate it. If reflection breaks, we've all got to resort to color.
Of course clear it with the script leaders/high ups before making it ;) in case you make it and they say "no need to do so"


thats what i was thinking, one update can break it for a few days (depending on hook updating)

i am getting good at color walking so it might be a way i can help :)

yeh i will ask first, hence this thread.

Wizzup?

2010-10-12 10:35:52

E: I don't have a pet but this must have been a pet's doing.

Cstrike

2010-10-12 10:44:33

From: bobzilla69
thats what i was thinking, one update can break it for a few days (depending on hook updating)

i am getting good at color walking so it might be a way i can help :)

yeh i will ask first, hence this thread.


Guess what just got broken due to an update just right now? ;)

Bobzilla69

2010-10-12 10:47:37

From: cstrike
Guess what just got broken due to an update just right now? ;)


really, LOL, ok not really that funny but yeh. i was just going to start collecting colors to test out how the walking would work.

Gu3st...

2010-10-12 11:59:40

From: Wizzup?
1q+-+
Say whaaat?


To answer your question; yes. We will develop more color walking in the future, but feel free to contribute! :)

Bobzilla69

2010-10-12 12:20:10

From: Zyt3x
Say whaaat?


To answer your question; yes. We will develop more color walking in the future, but feel free to contribute! :)


will do.

i have started to make the walking for SCRIPT_VW_MINER but i am not sure if i am doing it right.

currently to test it i am using

if FindColorsPie(TPA, MyFindColor('dirtroad'), 15, 100, 180, 50, 80, mmcx, mmcy, mmx2, mmy2, mmcx, mmcy) then //dungeon symbol color
begin
MiddleOfTPA:= MiddleTPA(TPA);
Mouse(MiddleOfTPA.x - 45 , MiddleOfTPA.y + 10, 5, 5, true);
if (DebugTheTPA) then
DebugTPA(TPA, '');
Flag;
Write('Walking to Mine Part 2 Complete');
end;

and my own auto color procedure, i have stored the aca files so you guys can use if you needed them.

i dont know of any tutorials on how to make walkign for msi but would appreciate any direction to how you guys would prefer it.

i have so far got the walking to mine done, just needs testing to make sure it doesnt break

NCDS

2010-10-12 17:15:18

Check ColorWalking.Simba in MSI. You can use the paths made for the VE WCer as a reference.

Bobzilla69

2010-10-13 16:26:51

just wanted some quick info about the walking_color.simba

{******************************************************************************}
{ function MSI_WC_VEPoints(index: integer): TPoint; }
{ By: The MSI Team }
{ Date: 10 June 2010 }
{ Description: Returns a point on the minimap depending on the specified }
{ location by 'index' }
{******************************************************************************}
function MSI_WC_VEPoints(index: integer): TPoint;
var
i, Tol: Integer;
aTPA: t2DPointArray;
TPA: tPointArray;
p: tPoint;
RockColor, TreeColor, BC: Integer;
t: LongInt;
begin
try MSI_AddHeader('MSI_WC_VEPoints');

Result := Point(-1, -1);
case index of
//road
WALK_WC_VE_TREE_1, WALK_WC_VE_OAKS_1:
begin
if countColor(RoadColor, MMx1, MMy1, MMx2, MMy2) <= 5 then
RoadColor := MSI_AutoColor(srl_VarrockRoadColor, COLOR_ROAD_VARROCK);
Tol := 2;
for i := 0 to 2 do
begin
FindColorsTolerance(TPA, RoadColor, MMCx, MMy1, MMx2, MMCy, Tol);
if Length(TPA) > 10 then
Break;
if i = 2 then
begin
MSI_Debug('Failed to locate road - 1.');
Exit;
end;
Tol := i * 2;
end;
SortTPAFrom(TPA, Point(MMX2, MMY1));
try
t := High(TPA) - randomRange(3, 6);
except
t := High(TPA);
end;
Result := Point(TPA[t].x, TPA[t].y);
end;
(only quoting first bit of it)

i understand that is is the main walking function being used, no real problem here.

but what is
{******************************************************************************}
{ function MSI_CreateWalkIndex(index: Integer): TPoint; }
{ By: The MSI Team }
{ Date: 10 June 2010 }
{ Description: Returns a point on the minimap depending on the specified }
{ location by 'index' }
{******************************************************************************}
function MSI_CreateWalkIndex(index: Integer): TPoint;
begin
case index of
WALK_WC_VE_TREE_1..WALK_WC_VE_OAKS_2:
Result := MSI_WC_VEPoints(index);

WALK_WC_DB_WILLOWS_1, WALK_WC_DB_WILLOWS_BANK_1:
Result := MSI_WC_DBPoints(index);
end;
end;
used for? i cant work out what its suppose to be for.

can anyone shed some light onto this for me?

NCDS

2010-10-13 17:03:08

Basically, it's just how the color walking is executed when it's called.

Bobzilla69

2010-10-14 04:07:32

ok, shouldnt all the path points be listed then?

i know that for the DB_willows only one click would work, but the other walking paths have more than one.

is that why it is written
WALK_WC_VE_TREE_1..WALK_WC_VE_OAKS_2:
with the .. representing all the paths?

NCDS

2010-10-14 12:22:43

From: bobzilla69
ok, shouldnt all the path points be listed then?

i know that for the DB_willows only one click would work, but the other walking paths have more than one.

is that why it is written
WALK_WC_VE_TREE_1..WALK_WC_VE_OAKS_2:
with the .. representing all the paths?


yes sir :)

Sir R. M8gic1an

2010-10-14 12:31:20

You are more than welcome for anything you contribute! :)

~RM

Bobzilla69

2010-10-14 14:15:22

so far things are going well with the walking.

only thing is i have included my own autocolor function as i feel it works better, i have the aca files for it as well.

A small demo so far ,not fully working i am fine tunning it still it has part of the walking to mine for VW_Miner script and failsafes.

simple to install just copy and replace your current MSI files, make backups of yours first, with these to test or read through, i have commented what i added.

Walking_Color will have the main walking and my auto color so if you just want to read its all you need.

what you guys think? is it looking ok?

nickrules

2010-10-14 22:38:53

If anyone wants to download, without downloading 6 files, I zipped it….

Is this compatible with the current path system?

Bobzilla69

2010-10-15 03:36:04

From: nickrules
If anyone wants to download, without downloading 6 files, I zipped it….

Is this compatible with the current path system?


yes it is, just replace with my files, its not completed so its not recommend to be used with the live system.
its here so MSI devs can look over it and suggest improvements and say if its going well.

also didnt zip it so that if they wanted to look at the walking they simply open Walking_Color.

NCDS

2010-10-15 08:30:44

From: bobzilla69
yes it is, just replace with my files, its not completed so its not recommend to be used with the live system.
its here so MSI devs can look over it and suggest improvements and say if its going well.

also didnt zip it so that if they wanted to look at the walking they simply open Walking_Color.


You should just post the code in
 
tags ;)

Bobzilla69

2010-10-15 09:16:51

yes, i should but there is alot of code, also you will need changes i made with files to try it out if you want (even thought its not fully working yet).

will be working on this again in a few days got other work i am doing.

here is code for those you want it quick.

main walking to mine (to bank not done yet)
function MSI_MN_VWPoints(Index: Integer): TPoint;
var
i, Tol: Integer;
aTPA: t2DPointArray;
TPA: tPointArray;
p: tPoint;
RockColor, DirtRoadColor, Rock: Integer;
t: LongInt;
begin
try MSI_AddHeader('MSI_MN_VWPoints');

Result := Point(-1, -1);
case index of
//road
WALK_VW_MINE_1:
begin
RoadColor := MyFindColor('road');
Tol := 5;
for i := 0 to 2 do
begin
FindColorsTolerance(TPA, RoadColor, MMx1, MMcy, MMcx, MMy2, Tol);
//DebugTPA(TPA, '');
if Length(TPA) > 10 then
Break;
if i = 2 then
begin
MSI_Debug('Failed to locate road - 1.');
Exit;
end;
Tol := i * 2;
end;
SortTPAFrom(TPA, Point(MMcx, MMcy));
//DebugTPA(TPA, '');
{for i:= 0 to high(tpa) do
begin
writeln('tpa is at : '+inttostr(i));
writeln('tpa x is at : '+inttostr(tpa[i].x));
writeln('tpa y is at : '+inttostr(tpa[i].y));
end;
writeln('middle TPA is : '+inttostr((High(TPA)/2)));
Wait(3500); }
try
t := (High(TPA)/2) + randomRange(10, 15);
except
t := (High(TPA)/2);
end;
Result := Point(TPA[t].x - 12, TPA[t].y);
end;

//dirt road
WALK_VW_MINE_2:
begin
Tol := 5;
for i := 0 to 2 do
begin
DirtRoadColor := MyFindColor('dirtroad');
FindColorsTolerance(TPA, DirtRoadColor, MMCx - 15, MMCY, MMx2, MMy2, Tol);
//DebugTPA(TPA, '');
if Length(TPA) > 10 then
Break;
if i = 2 then
begin
MSI_Debug('Failed to locate road - 2.');
Exit;
end;
Tol := i * 2;
end;
SortTPAFrom(TPA, Point(MMx2, MMCy));
//DebugTPA(TPA, '');
{for i:= 0 to high(tpa) do
begin
writeln('tpa is at : '+inttostr(i));
writeln('tpa x is at : '+inttostr(tpa[i].x));
writeln('tpa y is at : '+inttostr(tpa[i].y));
end;
writeln('middle TPA is : '+inttostr((High(TPA)/2)));
Wait(3500); }

i := ((High(TPA)/2) + RandomRange(15, 20));
Result := Point(TPA[i].x - 40, TPA[i].y + 20);
end;

//dirt road
WALK_VW_MINE_3:
begin
Tol := 5;
for i := 0 to 2 do
begin
DirtRoadColor := MyFindColor('dirtroad');
FindColorsTolerance(TPA, DirtRoadColor, MMCx, MMCY, MMx2, MMy2, Tol);
//DebugTPA(TPA, '');
if Length(TPA) > 10 then
Break;
if i = 2 then
begin
MSI_Debug('Failed to locate road - 3.');
Exit;
end;
Tol := i * 2;
end;
SortTPAFrom(TPA, Point(MMx2, MMcy));
//DebugTPA(TPA, '');
{for i:= 0 to high(tpa) do
begin
writeln('tpa is at : '+inttostr(i));
writeln('tpa x is at : '+inttostr(tpa[i].x));
writeln('tpa y is at : '+inttostr(tpa[i].y));
end;
writeln('middle TPA is : '+inttostr((High(TPA)/2)));
Wait(3500); }

i := (High(TPA) - RandomRange(5, 10));
Result := Point(TPA[i].x - 12 , TPA[i].y - 5);
end;
//dirt road
WALK_VW_MINE_4:
begin
Tol := 5;
for i := 0 to 2 do
begin
DirtRoadColor := MyFindColor('dirtroad');
FindColorsTolerance(TPA, DirtRoadColor, MMCx , MMCY , MMx2, MMy2, Tol);
//DebugTPA(TPA, '');
if Length(TPA) > 10 then
Break;
if i = 2 then
begin
MSI_Debug('Failed to locate road - 4.');
Exit;
end;
Tol := i * 2;
end;
SortTPAFrom(TPA, Point(MMcx, MMcy));
//DebugTPA(TPA, '');
{for i:= 0 to high(tpa) do
begin
writeln('tpa is at : '+inttostr(i));
writeln('tpa x is at : '+inttostr(tpa[i].x));
writeln('tpa y is at : '+inttostr(tpa[i].y));
end;
writeln('middle TPA is : '+inttostr((High(TPA)/2)));
Wait(3500); }

i := (High(TPA) - RandomRange(10, 20));
Result := Point(TPA[i].x - 25, TPA[i].y + 10);
end;
//mine rocks
WALK_VW_MINE_5:
begin
Tol := 5;
for i := 0 to 2 do
begin
Rock := MyFindColor('mmrock');
FindColorsTolerance(TPA, Rock, MMx1, MMCY, MMx2, MMy2, Tol);
//DebugTPA(TPA, '');
if Length(TPA) > 10 then
Break;
if i = 2 then
begin
MSI_Debug('Failed to locate road - 5.');
Exit;
end;
Tol := i * 2;
end;
SortTPAFrom(TPA, Point(MMx2, MMcy));
//DebugTPA(TPA, '');
{for i:= 0 to high(tpa) do
begin
writeln('tpa is at : '+inttostr(i));
writeln('tpa x is at : '+inttostr(tpa[i].x));
writeln('tpa y is at : '+inttostr(tpa[i].y));
end;
writeln('middle TPA is : '+inttostr((High(TPA)/2)));
Wait(3500); }

i := (High(TPA) - RandomRange(3, 8));
Result := Point(TPA[i].x, TPA[i].y);
end;
end;

finally
MSI_CloseHeader('MSI_MN_VWPoints');
end;

end;

fail-safe walking
WALK_VW_MINE_1:
repeat
if FindColorsPie(TPA, AutoColor(srl_VarrockRoadColor), 15, 200, 260, 5, 80, mmx1, mmy1, mmcx, mmy2, mmcx, mmcy) then //dungeon symbol color
begin
writeln('failsafe used');
MiddleOfTPA:= MiddleTPA(TPA);
Mouse(MiddleOfTPA.x , MiddleOfTPA.y , 5, 5, true);
if (DebugTheTPA) then
DebugTPA(TPA, '');
Flag;
end;
inc(Loop);
until((FindColorsPie(TPA, 12632256, 5, 200, 280, 5, 80, mmx1, mmy1, mmcx, mmcy, mmcx, mmcy))or (Loop > 3));

//walkign step 2
WALK_VW_MINE_2:
if FindColorsPie(TPA, AutoColor(srl_LightDirtRoadColor), 15, 100, 180, 50, 80, mmcx, mmcy, mmx2, mmy2, mmcx, mmcy) then //dungeon symbol color
begin
writeln('failsafe used');
MiddleOfTPA:= MiddleTPA(TPA);
Mouse(MiddleOfTPA.x - 45 , MiddleOfTPA.y + 10, 5, 5, true);
if (DebugTheTPA) then
DebugTPA(TPA, '');
Flag;
end else
begin
MSI_Debug('Walking to Mine Part 2 Failed');
exit;
end;

WALK_VW_MINE_3:
//walkign step 3
if FindColorsPie(TPA, AutoColor(srl_LightDirtRoadColor), 15, 120, 180, 50, 80, mmcx, mmcy, mmx2, mmy2, mmcx, mmcy) then //dungeon symbol color
begin
writeln('failsafe used');
MiddleOfTPA:= MiddleTPA(TPA);
Mouse(MiddleOfTPA.x - 40 , MiddleOfTPA.y + 18, 5, 5, true);
if (DebugTheTPA) then
DebugTPA(TPA, '');
Flag;
end else
begin
MSI_Debug('Walking to Mine Part 3 Failed');
exit;
end;

WALK_VW_MINE_4:
//walkign step 4
if FindColorsPie(TPA, AutoColor(srl_LightDirtRoadColor), 15, 120, 180, 50, 80, mmcx, mmcy, mmx2, mmy2, mmcx, mmcy) then //dungeon symbol color
begin
writeln('failsafe used');
MiddleOfTPA:= MiddleTPA(TPA);
Mouse(MiddleOfTPA.x - 20 , MiddleOfTPA.y + 8, 5, 5, true);
if (DebugTheTPA) then
DebugTPA(TPA, '');
Flag;
end else
begin
MSI_Debug('Walking to Mine Part 4 Failed');
exit;
end;
//last step
WALK_VW_MINE_5:
if FindColorsPie(TPA, AutoColor(srl_MineRockColor), 15, 140, 220, 10, 60, mmx1, mmcy, mmx2, mmy2, mmcx, mmcy) then //dungeon symbol color
begin
writeln('failsafe used');
MiddleOfTPA:= MiddleTPA(TPA);
Mouse(MiddleOfTPA.x , MiddleOfTPA.y , 5, 5, true);
if (DebugTheTPA) then
DebugTPA(TPA, '');
Flag;
end else
begin
MSI_Debug('Walking Failed step 5');
Exit;
end;

Coh3n

2010-10-15 18:57:44

I've merged this thread with the Color Development one I made a while back. Bob, you may find some information in the first post useful. ;) I'm glad someone's working on the color walking. :)

Bobzilla69

2010-10-16 04:26:28

happy to help, like you said some people like the color walkings challenge.

Coh3n

2010-10-16 13:15:50

Looking at your failsafe routines. They're all pretty similar, why not make another function, MSI_WalkTPAPie() (or something better), with the necessary parameters? That way you avoid repeating a lot of code.

Bobzilla69

2010-10-16 14:25:10

From: Coh3n
Looking at your failsafe routines. They're all pretty similar, why not make another function, MSI_WalkTPAPie() (or something better), with the necessary parameters? That way you avoid repeating a lot of code.


ok yeh good idea. will have a look at doing this stuff next week, kinda busy with other things at the moment

Bobzilla69

2010-10-19 10:25:22

hey,

i need some help with an error i am getting. i have made the path for VW Mine (just need to finish fail safe) but when i run the script to test it i occasionally get this error

[00:07:33]: [ Erb ] -- Player's Location = Varrock west mine
[00:07:33]: [ Erb ] -- MSI_PerfomWalk
[00:07:33]: [ Erb ] ---- MSI_ColorWalk
[00:07:33]: [ Erb ] ------ MSI_CreateWalkFailsafe
[00:07:33]: [ Erb ] -------- MSI_MN_VWPoints
[00:07:33]: [ Erb ] ---------- Failed to locate road - 1.
Error: Out Of Range at line 68

the line thats out of range is in the RunMe.simba file, its where multiplayer is commented out.
if i run it again after error its fine.

any ideas

Coh3n

2010-10-19 15:04:41

From: bobzilla69
hey,

i need some help with an error i am getting. i have made the path for VW Mine (just need to finish fail safe) but when i run the script to test it i occasionally get this error

[00:07:33]: [ Erb ] -- Player's Location = Varrock west mine
[00:07:33]: [ Erb ] -- MSI_PerfomWalk
[00:07:33]: [ Erb ] ---- MSI_ColorWalk
[00:07:33]: [ Erb ] ------ MSI_CreateWalkFailsafe
[00:07:33]: [ Erb ] -------- MSI_MN_VWPoints
[00:07:33]: [ Erb ] ---------- Failed to locate road - 1.
Error: Out Of Range at line 68

the line thats out of range is in the RunMe.simba file, its where multiplayer is commented out.
if i run it again after error its fine.

any ideas

I have no idea. :unsure:

Does your color path have the same amount of points as the reflection path? I remember they had to be the same, but I thought that was changed. Other than that, the only thing I can tell you is to check the arrays you use in the points and your player setup.

The line Simba says has the error is almost never right; frustrating, I know.

Bobzilla69

2010-10-19 15:12:51

From: Coh3n
I have no idea. :unsure:

Does your color path have the same amount of points as the reflection path? I remember they had to be the same, but I thought that was changed. Other than that, the only thing I can tell you is to check the arrays you use in the points and your player setup.

The line Simba says has the error is almost never right; frustrating, I know.


well the things is i have no idea why its going to the RunMe.simba when the code its running is in Walk_Color.simba but anyways.

i dont have the same amount of points as reflection, the error doesnt always happen, i can at times walk to mine and back to bank without the error.

its annoying like you said.

i have to just quickly do my fail safes for walking to bank then VW color walking needs testing, still aint tried MSI_AutoColor instead of my autocolor

Coh3n

2010-10-19 15:43:04

From: bobzilla69
well the things is i have no idea why its going to the RunMe.simba when the code its running is in Walk_Color.simba but anyways.

i dont have the same amount of points as reflection, the error doesnt always happen, i can at times walk to mine and back to bank without the error.

its annoying like you said.

i have to just quickly do my fail safes for walking to bank then VW color walking needs testing, still aint tried MSI_AutoColor instead of my autocolor

Hmm in that case it tells me that it could be in your functions. Do you always get that error when the walking to the point fails?

Bobzilla69

2010-10-19 15:45:55

From: Coh3n
Hmm in that case it tells me that it could be in your functions. Do you always get that error when the walking to the point fails?


no i dont.

its seem random to me, it doesnt even try the fail safe just crashes, and if i restart the script as soon as it crashes it runs fine

Coh3n

2010-10-19 15:48:34

From: bobzilla69
no i dont.

its seem random to me, it doesnt even try the fail safe just crashes, and if i restart the script as soon as it crashes it runs fine

Can you post the functions you call? Maybe we can figure it out.

Bobzilla69

2010-10-19 15:49:55

if you give me a sec i can quickly do the failsafes then i will send you all files

Coh3n

2010-10-19 15:51:37

From: bobzilla69
if you give me a sec i can quickly do the failsafes then i will send you all files

No need to do that, just post the functions in Simba tags. That way someone else can help also. :)

Bobzilla69

2010-10-19 15:58:41

Ok i have done it all now for VW Mine. (Still needs testing to insure it work flawlessly)

these are the full files (19/10/2010) areas where my code is is between the
//////////// MY CHANGES HERE ///////////////////////////

now for the files

Walking_Color.Simba
{==============================================================================\
| 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_FindMMLocation(): Boolean; * by marpis |
| * function MSI_AutoColorMM(): Integer; * by Blumblebee |
| * function MSI_AutoColor(): Integer; * by Coh3n |
| * function MSI_WalkTPA(): TPoint; * by 3Garrett3 |
| * function MSI_CreateWalkTPA(): TPointArray * by Blumblebee |
| * function MSI_WalkTPAPoint(): Boolean; * by Blumblebee |
| * function MSI_CreateColorBox(): TBox; * by Blumblebee |
| * function MSI_FindColorInBox(): Boolean; * by Blumblebee |
| * function MSI_WC_VEPoints(): TPoint; * by The MSI Team |
| * function MSI_CreateWalkIndex(): TPoint; * by The MSI Team |
| * 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 |
\_____________________________________________________________________________}
//////////// MY CHANGES HERE ///////////////////////////
Function MyFindColor(What: string): integer; //on minimap(true) or main screen (false)
var
I, J, TheColor, Red, Green, Blue, color,
bL, bH, gL, gH, rL, rH, colTol: integer;
colorArray: TPointArray;
begin
case lowercase(What) of
'road': begin
color := 8817549;
bL := 129;
bH := 139;
gL := 134;
gH := 143;
rL := 136;
rH := 145;
colTol:= 7;
end;
'dirtroad': begin
color := 6720152;
bL := 97;
bH := 106;
gL := 133;
gH := 142;
rL := 147;
rH := 156;
colTol:= 7;
end;
'deadtree': begin
color := 1322306;
bL := 16;
bH := 23;
gL := 41;
gH := 49;
rL := 62;
rH := 70;
colTol:= 6;
end;
'mmrock': begin
color := 3167368;
bL := 44;
bH := 51;
gL := 79;
gH := 88;
rL := 131;
rH := 140;
colTol:= 7;
end;
end;
Result := 0;

FindColorsTolerance(colorArray, color, MMX1, MMY1, MMX2, MMY2, colTol)

J := High(colorArray);
for I := 0 to J do
if (rs_OnMinimap(colorArray[I].x, colorArray[I].y)) then
begin
TheColor := GetColor(colorArray[i].x, colorArray[i].y);
ColorToRGB(TheColor, Red, Green, Blue);
if (InRange(Blue, bL, bH) and InRange(Green, gL, gH) and InRange(Red, rL, rH)) then
begin
Result := TheColor;
//WriteLn(What + ' Colour Found: ' + IntToStr(TheColor));
Exit;
end;
end;
end;
//////////// MY CHANGES HERE ///////////////////////////
{******************************************************************************}
{ function MSI_LoadWalkInfo(WalkInfo: Integer): Boolean; }
{ By: The MSI Team }
{ Date: 11 September 2010 }
{ Description: Loads all the color walking info; should only be called in }
{ MSI_LoadAllWalkInfo }
{******************************************************************************}
function MSI_LoadWalkInfo(WalkInfo: Integer): Boolean;
begin
case WalkInfo of
WALK_VE_MINE_1:
begin
end;

WALK_VE_MINE_2:
begin
end;

end;

Result := (MSI_ColorAreas[WalkInfo].Name <> '');
end;

{******************************************************************************}
{ procedure MSI_LoadAllWalkInfo; }
{ By: Coh3n }
{ Date: 11 September 2010 }
{ Description: Loads all the color walking info used in MSI scripts; should }
{ only be called once in SetupMSI }
{******************************************************************************}
procedure MSI_LoadAllWalkInfo;
var
i: Integer;
begin
for i := 0 to High(MSI_WalkInfo) do
MSI_LoadWalkInfo(i);
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);

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

{******************************************************************************}
{ procedure MSI_SortColors(var Colors: tIntegerArray; col: Integer); }
{ By: Blumblebee }
{ Date: 10 June 2010 }
{ Description: Sorts an array of colors }
{******************************************************************************}
procedure MSI_SortColors(var Colors: tIntegerArray; col: Integer);
var
tempB: tIntegerArray;
Tol: ShortInt;
I: Integer;L: LongInt;
begin
tempB := Colors;
SetArrayLength(Colors, 0);
Tol := 0;
while Length(Colors) < (Length(tempB)/2) do
for i := 0 to High(tempB) do
begin
if SimilarColors(tempB[i], col, Tol) then
begin
L := GetArrayLength(Colors);
SetArrayLength(Colors, L+1);
Colors[L] := tempB[i];
end;
if Tol > 10 then Break;
Inc(Tol);
end;
end;

{******************************************************************************}
{ function MSI_AutoColorMM(const color: Integer): Integer; }
{ By: Blumblebee }
{ Date: 10 June 2010 }
{ Description: Autocolors the color 'color' on the minimap }
{******************************************************************************}
function MSI_AutoColorMM(const color: Integer): Integer;
var
TPA: tPointArray;
List: tIntegerArray;
I: Integer;
begin
for i := 0 to 20 do
begin
FindColorsTolerance(TPA, color, MMx1, MMy1, MMx2, MMy2, 5+i);
if Length(TPA) > 0 then Break;
end;
if Length(TPA) <= 0 then Exit;
List := getColors(TPA);
MSI_SortColors(List, color);
if Length(List) <= 0 then Exit;
result := List[0];
end;

{******************************************************************************}
{ function MSI_AutoColor(constSRL, constMSI: Integer): Integer; }
{ By: Coh3n }
{ Date: 10 June 2010 }
{ Description: Returns the correct color on the minimap. the parameters are }
{ for the different constants pertaining to SRL and MSI. }
{ ex. MSI_AutoColor(srl_VarrockRoadCOlor, COLOR_ROAD_VARROCK); }
{******************************************************************************}
function MSI_AutoColor(constSRL, constMSI: Integer): Integer;
var
acRecord: TAutoColorInfo;
begin
if (not LoadAutoColor(constSRL, acRecord)) then
result := MSI_AutoColorMM(constMSI)
else
result := acRecord.color;
end;

{******************************************************************************}
{ Function MSI_WalkTPA(WalkInfo: tWalkInfo): TPoint; }
{ By: 3Garrett3 }
{ Date: 11 September 2010 }
{ Description: Returns a TPoint of where to walk to based on a TWalkInfo }
{ record }
{******************************************************************************}
Function MSI_WalkTPA(Where: Integer): TPoint;
Var
TPA: TPointArray;
TDPA: T2DPointArray;
I, H, X, Y, CTS: Integer;
WalkInfo: TWalkInfo;
Begin
If Not LoggedIn Then Exit;
Result := Point(-1, -1);

MSI_AddHeader('MSI_WalkTPA');

WalkInfo := MSI_WalkInfo[Where];

cts := GetColorToleranceSpeed;
If WalkInfo.CTS2 Then
Begin
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(WalkInfo.HueMod, WalkInfo.SatMod);
End Else
ColorToleranceSpeed(1);

FindColorsTolerance(TPA, WalkInfo.Color, MMX1, MMY1, MMX2, MMY2, WalkInfo.Tolerance);

If Length(TPA) = 0 Then
Begin
MSI_Debug('Didn''t find the colour, exiting');
MSI_CloseHeader('MSI_WalkTPA: ' + BoolToStr(Result.x <> -1));
Exit;
End;

MSI_Debug('Found colour, length of array = ' + IntToStr(Length(TPA)));

If WalkInfo.Filter Then
FilterPointsPie(TPA, WalkInfo.StartRadial, WalkInfo.EndRadial, WalkInfo.MinRadius, WalkInfo.MaxRadius, MMCx, MMCy);

Case WalkInfo.SplitMethod Of
SPLIT_TPA_TO_ATPA:
TDPA := TPAToATPA(TPA, WalkInfo.SplitDist);
SPLIT_TPA_TO_ATPA_EX:
TDPA := TPAToATPAEx(TPA, WalkInfo.W, WalkInfo.H);
SPLIT_SPLIT_TPA:
TDPA := SplitTPA(TPA, WalkInfo.SplitDist);
SPLIT_SPLIT_TPA_EX:
TDPA := SplitTPAEx(TPA, WalkInfo.W, WalkInfo.H);
End;

Case WalkInfo.SortMethod Of
SORT_ATPA_FROM:
SortATPAFromFirstPoint(TDPA, WalkInfo.SortPoint);
SORT_FIRST_LARGE:
SortATPASize(TDPA, True);
SORT_FIRST_SMALL:
SortATPASize(TDPA, False);
End;

Wait(10);
H := High(TDPA);

if DEBUG_SMART then
DrawDotsMulti(true, TDPA);

For i := 0 To H Do
Begin
MiddleTPAEx(TDPA[i], x, y);
If rs_OnMinimap(x, y) Then
begin
Result := Point(x, y);
MSI_Debug('Found point: (' + IntToStr(x) + ', ' + IntToStr(y) + ')');
end;
End;

MSI_CloseHeader('MSI_WalkTPA: ' + BoolToStr(Result.x <> -1));
End;

{******************************************************************************}
{ function MSI_CreateWalkTPA( ... ): TPointArray; }
{ By: Blumblebee }
{ Date: 10 June 2010 }
{ Description: Creats a TPA of which can be walked to }
{******************************************************************************}
function MSI_CreateWalkTPA(x, y, color, width, height, tolerance: Integer): TpointArray;
var
TPA: tPointArray;
aTPA: t2DPointArray;
i: Integer;
L, P: Integer;
begin
FindColorsSpiralTolerance(x, y, TPA, color, MMx1, MMy1, MMx2, MMy2, tolerance);
aTPA := TPAtoATPAEx(TPA, width, height);
for i := 0 to High(aTPA) do
begin
if Length(aTPA) > 5 then
begin
l := getarraylength(Result);
SetArrayLength(Result, l+1);
Result[l] := MiddleTpa(aTPA[i]);
end;
end;
if Length(result) = 0 then Exit;
for i := 0 to High(Result) do
if rs_OnMiniMap(result[i].x, result[i].y) then Inc(p);
if p = 0 then SetArrayLength(Result, 0);
end;

{******************************************************************************}
{ function MSI_WalkTPAPoint( ... ): Boolean; }
{ By: Blumblebee }
{ Date: 10 June 2010 }
{ Description: Walks to a point on the minimap }
{******************************************************************************}
function MSI_WalkTPAPoint(TPA: tPointArray; sortP: tPoint; flagDist: shortInt): Boolean;
var
i: Integer;
t: LongInt;
begin
t := getSystemTime;
if Length(TPA) <= 0 then Exit;
SortTPAFrom(TPA, sortP);
for i := 0 to High(TPA) do
begin
if rs_OnMiniMap(TPA[i].x, TPA[i].y) then
begin
Mouse(TPA[i].x, TPA[i].y, random(8), random(8), true);
wait(randomRange(1000, 2000));
while not FlagPresent do
begin
wait(250+randomRange(150, 350));
if getSystemTime-t > randomRange(2500, 3750) then
continue;
end;
FFlag(flagDist);
Result := True;
Exit;
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_WC_VEPoints(index: integer): TPoint; }
{ By: The MSI Team }
{ Date: 10 June 2010 }
{ Description: Returns a point on the minimap depending on the specified }
{ location by 'index' }
{******************************************************************************}
function MSI_WC_VEPoints(index: integer): TPoint;
var
i, Tol: Integer;
aTPA: t2DPointArray;
TPA: tPointArray;
p: tPoint;
RockColor, TreeColor, BC: Integer;
t: LongInt;
begin
try MSI_AddHeader('MSI_WC_VEPoints');

Result := Point(-1, -1);
case index of
//road
WALK_WC_VE_TREE_1, WALK_WC_VE_OAKS_1:
begin
if countColor(RoadColor, MMx1, MMy1, MMx2, MMy2) <= 5 then
RoadColor := MSI_AutoColor(srl_VarrockRoadColor, COLOR_ROAD_VARROCK);
Tol := 2;
for i := 0 to 2 do
begin
FindColorsTolerance(TPA, RoadColor, MMCx, MMy1, MMx2, MMCy, Tol);
if Length(TPA) > 10 then
Break;
if i = 2 then
begin
MSI_Debug('Failed to locate road - 1.');
Exit;
end;
Tol := i * 2;
end;
SortTPAFrom(TPA, Point(MMX2, MMY1));
try
t := High(TPA) - randomRange(3, 6);
except
t := High(TPA);
end;
Result := Point(TPA[t].x, TPA[t].y);
end;

//road
WALK_WC_VE_TREE_2, WALK_WC_VE_OAKS_2:
begin
Tol := 2;
for i := 0 to 2 do
begin
RoadColor := MSI_AutoColor(srl_VarrockRoadColor, COLOR_ROAD_VARROCK);
FindColorsTolerance(TPA, RoadColor, MMCx + 40, MMCY - 40, MMx2, MMCy + 15, Tol);
if Length(TPA) > 10 then
Break;
if i = 2 then
begin
MSI_Debug('Failed to locate road - 2.');
Exit;
end;
Tol := i * 2;
end;
SortTPAFrom(TPA, Point(MMCx, MMCy));
i := (High(TPA) - RandomRange(1, 5));
Result := Point(TPA[i].x, TPA[i].y);
end;

//rock
WALK_WC_VE_TREE_3:
begin
RockColor := MSI_AutoColorMM(COLOR_ROCK);
TPA := MSI_CreateWalkTPA(MMcx, MMy1, RockColor, 2, 2, 8);
if length(TPA) <= 0 then Exit;
for i := 0 to High(TPA) do
begin
if TPA[i].y > MMcy then continue;
Result := Point(TPA[i].x, TPA[i].y);
Exit;
end;
end;

//final
WALK_WC_VE_TREE_4:
begin
TreeColor := MSI_AutoColor(srl_TreeColor, COLOR_TREE);
MSI_Debug('Tree AutoColor = '+IntToStr(TreeColor));
FindColorsTolerance(TPA, TreeColor, MMx1, MMy1, MMx2, MMy2, 8);
if Length(TPA) <= 0 then Exit;
aTPA := SplitTPAEx(TPA, 10, 10);
if Length(aTPA) <= 0 then Exit;
SortATPASize(aTPA, true);
p := MiddleTPA(aTPA[0]);
if (p.x < MMcx+20) and (p.y < MMcy) then
Result := Point(p.x, p.y);
end;

//rock
WALK_WC_VE_BANK_1:
begin
RockColor := MSI_AutoColorMM(COLOR_ROCK);
TPA := MSI_CreateWalkTPA(MMcx, MMy2, RockColor, 2, 2, 10);
if Length(TPA) <= 0 then Exit;
SortTPAFrom(TPA, point(700, 150));
for i := 0 to High(TPA) do
begin
if (TPA[i].y < MMcy+ 20) or (TPA[i].x < MMCX) then
continue;
Result := Point(TPA[i].x-5, TPA[i].y);
Exit;
end;
end;

//path
WALK_WC_VE_BANK_2:
begin
RoadColor := MSI_AutoColor(srl_VarrockRoadColor, COLOR_ROAD_VARROCK);
FindColorsTolerance(TPA, RoadColor, MMx1, MMCy + 15, MMx2 - 20, MMy2, 4);
if Length(TPA) <= 0 then
Exit;
SortTPAFrom(TPA, Point(MMCx, MMCy));

for t := 0 to 4 do
begin
i := Length(TPA) - Random(2);
try
if rs_OnMiniMap(TPA[i].x, TPA[i].y) then
BC := 1;
except
Continue;
end;
if BC = 1 then
Break;
end;

if (t = 4) or (BC < 1) then
begin
MSI_Debug('Failed to find road on minimap - Walk_WC_VE_Bank2');
Exit;
end;

Result := Point(TPA[i].x, TPA[i].y);
end;

//road
WALK_WC_VE_BANK_3:
begin
RoadColor := MSI_AutoColor(srl_VarrockRoadColor, COLOR_ROAD_VARROCK);
TPA := MSI_CreateWalkTPA(MMx1, MMcy, RoadColor, 3, 3, 8);
if Length(TPA) <= 0 then
Exit;
SortTPAFrom(TPA, point(MMx1-10, MMcy));
for i := 0 to High(TPA) do
begin
if not RS_onMinimap(TPA[i].x, TPA[i].y) then Continue;
Result := Point(TPA[i].x, TPA[i].y);
Exit;
end;
end;

//final
WALK_WC_VE_BANK_4:
begin
for i := 0 to 2 do
begin
BC := MSI_AutoColorMM(COLOR_BANKER);
FindColorsTolerance(TPA, BC, MMx1, MMCy, MMx2, MMy2, 5);
if Length(TPA) > 5 then
Break;
if i = 2 then
begin
MSI_Debug('Failed to find bankers on MiniMap- final.');
Exit;
end;
end;

aTPA := TPAToATPAEx(TPA, 25, 5);
SortATPASize(aTPA, True);

i := Length(aTPA[0]);
t := RandomRange(0, i);
Result := Point(aTPA[0][t].x, aTPA[0][t].y - RandomRange(3, 7));
end;
end;

finally
MSI_CloseHeader('MSI_WC_VEPoints');
end;

end;

{******************************************************************************}
{ function MSI_WC_DBPoints(Index: Integer): TPoint; }
{ By: The MSI Team }
{ Date: 09 July 2010 }
{ Description: Returns a point on the minimap depending on the specified }
{ location by 'index' }
{******************************************************************************}
function MSI_WC_DBPoints(Index: Integer): TPoint;
begin
Result := Point(-1, -1);

case Index of
WALK_WC_DB_WILLOWS_1:
begin
Result.x := RandomRange(595, 613);
Result.y := RandomRange(113, 130);
end;
//MouseBox(595, 113, 613, 130, 1);

WALK_WC_DB_WILLOWS_BANK_1:
begin
Result.x := RandomRange(645, 656);
Result.y := RandomRange(44, 53);
end;
//MouseBox(645, 44, 656, 53, 1);

else
MSI_SubDebug('MSI_WC_DBPoints: Invalid walk point!');
end;
end;
//////////// MY CHANGES HERE ///////////////////////////
function MSI_MN_VWPoints(Index: Integer): TPoint;
var
i, Tol: Integer;
aTPA: t2DPointArray;
TPA: tPointArray;
p: tPoint;
RockColor, DirtRoadColor, Rock: Integer;
t: LongInt;
begin
try MSI_AddHeader('MSI_MN_VWPoints');

Result := Point(-1, -1);
case index of
//road
WALK_MN_VW_1:
begin
RoadColor := MyFindColor('road');
Tol := 5;
for i := 0 to 2 do
begin
FindColorsTolerance(TPA, RoadColor, MMx1, MMY1, MMCX, MMY2, Tol);
if Length(TPA) > 10 then
Break;
if i = 2 then
begin
MSI_Debug('Failed to locate road - 1.');
Exit;
end;
Tol := i * 2;
end;
SortTPAFrom(TPA, Point(MMCX, MMY1));

i := (High(TPA) - RandomRange(1, 3));
Result := Point(TPA[i].x + 15, TPA[i].y + 2);
end;

//dirt road
WALK_MN_VW_2:
begin
Tol := 5;
for i := 0 to 2 do
begin
DirtRoadColor := MyFindColor('dirtroad');
FindColorsTolerance(TPA, DirtRoadColor, MMCx - 15, MMCY, MMx2, MMy2, Tol);
if Length(TPA) > 10 then
Break;
if i = 2 then
begin
MSI_Debug('Failed to locate road - 2.');
Exit;
end;
Tol := i * 2;
end;
SortTPAFrom(TPA, Point(MMx2, MMCy));

i := ((High(TPA)/2) + RandomRange(15, 20));
Result := Point(TPA[i].x - 40, TPA[i].y + 20);
end;

//dirt road
WALK_MN_VW_3:
begin
Tol := 5;
for i := 0 to 2 do
begin
DirtRoadColor := MyFindColor('dirtroad');
FindColorsTolerance(TPA, DirtRoadColor, MMCx, MMCY, MMx2, MMy2, Tol);
if Length(TPA) > 10 then
Break;
if i = 2 then
begin
MSI_Debug('Failed to locate road - 3.');
Exit;
end;
Tol := i * 2;
end;
SortTPAFrom(TPA, Point(MMx2, MMcy));

i := (High(TPA) - RandomRange(5, 10));
Result := Point(TPA[i].x - 14 , TPA[i].y - 5);
end;
//dirt road
WALK_MN_VW_4:
begin
Tol := 5;
for i := 0 to 2 do
begin
DirtRoadColor := MyFindColor('dirtroad');
FindColorsTolerance(TPA, DirtRoadColor, MMCX, MMCY + 30, MMX2, MMY2, Tol);
if Length(TPA) > 10 then
Break;
if i = 2 then
begin
MSI_Debug('Failed to locate road - 4.');
Exit;
end;
Tol := i * 2;
end;
SortTPAFrom(TPA, Point(MMCX, MMCY + 32));

i := (High(TPA) - RandomRange(2, 4));
Result := Point(TPA[i].x - 40, TPA[i].y + 20);
end;
//mine rocks
WALK_MN_VW_5:
begin
Tol := 5;
for i := 0 to 2 do
begin
Rock := MyFindColor('mmrock');
FindColorsTolerance(TPA, Rock, MMX1, MMCY, MMX2, MMY2, Tol);
if Length(TPA) > 10 then
Break;
if i = 2 then
begin
MSI_Debug('Failed to locate road - 5.');
Exit;
end;
Tol := i * 2;
end;
SortTPAFrom(TPA, Point(MMCX, MMCY));

i := (High(TPA) - RandomRange(2, 6));
Result := Point(TPA[i].x + 3, TPA[i].y - 6);
end;

WALK_MN_VW_BANK_1:
begin
Rock := MyFindColor('mmrock');
Tol := 5;
for i := 0 to 2 do
begin
FindColorsTolerance(TPA, Rock, MMCX, MMY1, MMX2, MMCY, Tol);
if Length(TPA) > 10 then
Break;
if i = 2 then
begin
MSI_Debug('Failed to locate road - 1.');
Exit;
end;
Tol := i * 2;
end;
SortTPAFrom(TPA, Point(MMCX, MMCY));

i := (High(TPA) - RandomRange(1, 2));
Result := Point(TPA[i].x + 2, TPA[i].y + 2);
end;

//dirt road
WALK_MN_VW_BANK_2:
begin
Tol := 5;
for i := 0 to 2 do
begin
DirtRoadColor := MyFindColor('dirtroad');
FindColorsTolerance(TPA, DirtRoadColor, MMCX, MMY1, MMX2, MMCY, Tol);
if Length(TPA) > 10 then
Break;
if i = 2 then
begin
MSI_Debug('Failed to locate road - 2.');
Exit;
end;
Tol := i * 2;
end;
SortTPAFrom(TPA, Point(MMX2, MMCY));

i := (High(TPA) - RandomRange(1, 2));
Result := Point(TPA[i].x - 40, TPA[i].y + 5);
end;

//dirt road
WALK_MN_VW_BANK_3:
begin
Tol := 5;
for i := 0 to 2 do
begin
DirtRoadColor := MyFindColor('dirtroad');
FindColorsTolerance(TPA, DirtRoadColor, MMCX, MMY1, MMX2, MMCY, Tol);
if Length(TPA) > 10 then
Break;
if i = 2 then
begin
MSI_Debug('Failed to locate road - 3.');
Exit;
end;
Tol := i * 2;
end;
SortTPAFrom(TPA, Point(MMCX, MMCY));

i := (High(TPA) - RandomRange(1, 2));
Result := Point(TPA[i].x - 55 , TPA[i].y + 5);
end;
//dirt road
WALK_MN_VW_BANK_4:
begin
Tol := 5;
for i := 0 to 2 do
begin
DirtRoadColor := MyFindColor('dirtroad');
FindColorsTolerance(TPA, DirtRoadColor, MMCX, MMY1, MMX2, MMCY, Tol);
if Length(TPA) > 10 then
Break;
if i = 2 then
begin
MSI_Debug('Failed to locate road - 4.');
Exit;
end;
Tol := i * 2;
end;
SortTPAFrom(TPA, Point(MMCX, MMCY));

i := (High(TPA) - RandomRange(1, 3));
Result := Point(TPA[i].x - 15, TPA[i].y + 5);
end;
//mine rocks
WALK_MN_VW_BANK_5:
begin
Tol := 5;
for i := 0 to 2 do
begin
Rock := MyFindColor('road');
FindColorsTolerance(TPA, Rock, MMCX, MMY1, MMX2, MMCY, Tol);
if Length(TPA) > 10 then
Break;
if i = 2 then
begin
MSI_Debug('Failed to locate road - 5.');
Exit;
end;
Tol := i * 2;
end;
SortTPAFrom(TPA, Point(MMX2, MMCY));

i := (High(TPA) - RandomRange(1, 2));
Result := Point(TPA[i].x + 25, TPA[i].y - 14);
end;
end;

finally
MSI_CloseHeader('MSI_MN_VWPoints');
end;

end;
//////////// MY CHANGES HERE ///////////////////////////
{******************************************************************************}
{ function MSI_CreateWalkIndex(index: Integer): TPoint; }
{ By: The MSI Team }
{ Date: 10 June 2010 }
{ Description: Returns a point on the minimap depending on the specified }
{ location by 'index' }
{******************************************************************************}
function MSI_CreateWalkIndex(index: Integer): TPoint;
begin
case index of
WALK_WC_VE_TREE_1..WALK_WC_VE_OAKS_2:
Result := MSI_WC_VEPoints(index);

WALK_WC_DB_WILLOWS_1, WALK_WC_DB_WILLOWS_BANK_1:
Result := MSI_WC_DBPoints(index);
//////////// MY CHANGES HERE ///////////////////////////
WALK_MN_VW_1..WALK_MN_VW_BANK_5: //so all walking happens
Result := MSI_MN_VWPoints(index);
//////////// MY CHANGES HERE ///////////////////////////
end;
end;

{******************************************************************************}
{ function MSI_WalkToColorIndex(index: Integer): Boolean; }
{ By: Coh3n }
{ Date: 10 June 2010 }
{ Description: Walked to a point specified by 'index' on the minimap }
{******************************************************************************}
function MSI_WalkToColorIndex(index: Integer): Boolean;
var
p: TPoint;
begin
p := MSI_CreateWalkIndex(index);

if (p.x = -1) then
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;

{******************************************************************************}
{ 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;
var
WalkLoop, Loop:Integer;
MiddleOfTPA: TPoint;
TPA : TPointArray;
begin
try
MSI_AddHeader('MSI_CreateWalkFailsafe');

if not MSI_WalkToColorIndex(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.

//////////// MY CHANGES HERE ///////////////////////////
//failsafe for my color walking
WALK_MN_VW_1:
repeat
if FindColorsPie(TPA, AutoColor(srl_VarrockRoadColor), 15, 200, 260, 5, 80, mmx1, mmy1, mmcx, mmy2, mmcx, mmcy) then //dungeon symbol color
begin
MSI_Debug('Walking to Mine Part 1 Complete');
MiddleOfTPA:= MiddleTPA(TPA);
Mouse(MiddleOfTPA.x , MiddleOfTPA.y , 5, 5, true);
Flag;
end;
inc(Loop);
until((FindColorsPie(TPA, 12632256, 5, 200, 280, 5, 80, mmx1, mmy1, mmcx, mmcy, mmcx, mmcy))or (Loop > 3));

//walkign step 2
WALK_MN_VW_2:
if FindColorsPie(TPA, AutoColor(srl_LightDirtRoadColor), 15, 100, 180, 50, 80, mmcx, mmcy, mmx2, mmy2, mmcx, mmcy) then //dungeon symbol color
begin
MSI_Debug('Walking to Mine Part 2 Complete');
MiddleOfTPA:= MiddleTPA(TPA);
Mouse(MiddleOfTPA.x - 45 , MiddleOfTPA.y + 10, 5, 5, true);
Flag;
end else
begin
MSI_Debug('Walking to Mine Part 2 Failed');
Exit;
end;

WALK_MN_VW_3:
//walkign step 3
if FindColorsPie(TPA, AutoColor(srl_LightDirtRoadColor), 15, 120, 180, 50, 80, mmcx, mmcy, mmx2, mmy2, mmcx, mmcy) then //dungeon symbol color
begin
MSI_Debug('Walking to Mine Part 3 Complete');
MiddleOfTPA:= MiddleTPA(TPA);
Mouse(MiddleOfTPA.x - 40 , MiddleOfTPA.y + 18, 5, 5, true);
Flag;
end else
begin
MSI_Debug('Walking to Mine Part 3 Failed');
Exit;
end;

WALK_MN_VW_4:
//walkign step 4
if FindColorsPie(TPA, AutoColor(srl_LightDirtRoadColor), 15, 120, 180, 50, 80, mmcx, mmcy, mmx2, mmy2, mmcx, mmcy) then //dungeon symbol color
begin
MSI_Debug('Walking to Mine Part 4 Complete');
MiddleOfTPA:= MiddleTPA(TPA);
Mouse(MiddleOfTPA.x - 20 , MiddleOfTPA.y + 8, 5, 5, true);
Flag;
end else
begin
MSI_Debug('Walking to Mine Part 4 Failed');
Exit;
end;
//last step
WALK_MN_VW_5:
if FindColorsPie(TPA, AutoColor(srl_MineRockColor), 15, 140, 220, 10, 60, mmx1, mmcy, mmx2, mmy2, mmcx, mmcy) then //dungeon symbol color
begin
MSI_Debug('Walking to Mine Part 5 Complete');
MiddleOfTPA:= MiddleTPA(TPA);
Mouse(MiddleOfTPA.x , MiddleOfTPA.y , 5, 5, true);
Flag;
end else
begin
MSI_Debug('Walking Failed step 5');
Exit;
end;
//bank walk
WALK_MN_VW_BANK_1:
if FindColorsPie(TPA, MyFindColor('mmrock'), 15, 0, 360, 0, 80, mmcx, mmy1, mmx2, mmcy, mmcx, mmcy) then //dungeon symbol color
begin
MiddleOfTPA:= MiddleTPA(TPA);
Mouse(MiddleOfTPA.x , MiddleOfTPA.y - 12, 5, 5, true);
Flag;
MSI_Debug('Walking to Mine Part 1 Complete');
end else
begin
MSI_Debug('Walking to Mine Part 1 Failed');
Exit;
end;
//walkign step 2
WALK_MN_VW_BANK_2:
if FindColorsPie(TPA, MyFindColor('dirtroad'), 15, 0, 60, 30, 70, mmcx, mmy1, mmx2, mmcy, mmcx, mmcy) then //dungeon symbol color
begin
MiddleOfTPA:= MiddleTPA(TPA);
Mouse(MiddleOfTPA.x - 55 , MiddleOfTPA.y - 10, 5, 5, true);
Flag;
MSI_Debug('Walking to Mine Part 2 Complete');
end else
begin
MSI_Debug('Walking to Mine Part 2 Failed');
Exit;
end;

WALK_MN_VW_BANK_3:
//walkign step 3
if FindColorsPie(TPA, MyFindColor('dirtroad'), 15, 0, 80, 30, 80, mmcx, mmy1, mmx2, mmcy, mmcx, mmcy) then //dungeon symbol color
begin
MiddleOfTPA:= MiddleTPA(TPA);
Mouse(MiddleOfTPA.x - 50 , MiddleOfTPA.y - 25, 5, 5, true);
Flag;
MSI_Debug('Walking to Mine Part 3 Complete');
end else
begin
MSI_Debug('Walking to Mine Part 3 Failed');
Exit;
end;

WALK_MN_VW_BANK_4:
//walkign step 4
if FindColorsPie(TPA, MyFindColor('dirtroad'), 15, 0, 80, 40, 80, mmcx, mmy1, mmx2, mmcy, mmcx, mmcy) then //dungeon symbol color
begin
MiddleOfTPA:= MiddleTPA(TPA);
Mouse(MiddleOfTPA.x - 10 , MiddleOfTPA.y - 20, 5, 5, true);
Flag;
MSI_Debug('Walking to Mine Part 4 Complete');
end else
begin
MSI_Debug('Walking to Mine Part 4 Failed');
Exit;
end;
//last step
WALK_MN_VW_BANK_5:
if FindColorsPie(TPA, MyFindColor('road'), 15, 0, 60, 10, 80, mmcx, mmy1, mmx2, mmcy, mmcx, mmcy) then //dungeon symbol color
begin
MiddleOfTPA:= MiddleTPA(TPA);
Mouse(MiddleOfTPA.x , MiddleOfTPA.y -22, 5, 5, true);
Flag;
MSI_Debug('Walking to Mine Complete');
end else
begin
MSI_Debug('Walking Failed step 5');
Exit;
end;
//////////// MY CHANGES 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]];

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
ProgressReportArray[CurrentPlayer].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;
Scripts.Simba
{==============================================================================\
| MSI Group Scripting Include |
| Scripts.scar |
|==============================================================================|
| For all the routines related to specific scripts |
| |
| * function MSI_LoadScript(): Boolean; * by The MSI Team |
| * procedure MSI_LoadAllScripts; * by Coh3n |
\_____________________________________________________________________________}

{******************************************************************************}
{ function MSI_LoadScript(whichScript: Integer): Boolean; }
{ By: The MSI Team }
{ Date: 17 August 2010 }
{ Description: Loads whichScript information. This should only be called in }
{ MSI_LoadAllScripts }
{******************************************************************************}
function MSI_LoadScript(whichScript: Integer): Boolean;
begin
case whichScript of

{ WOODCUTTERS ================================ ]
[============================================= }
SCRIPT_VE_TREES:
with MSI_Scripts[whichScript] do
begin
Name := 'Varrock East Trees';
Constant := SCRIPT_VE_TREES;
SkillName := 'Woodcutting';
SkillConstant := SKILL_WOODCUTTING;
Objects := [TREE_NORMAL];
Items := [[LOGS_NORMAL]];
BankType := Bank;
WhichBank := MSI_BANK_VE;
CompassAng := -1;
AutoObjects := @MSI_ChopInvFull;
PlayerSetup := @MSI_SetupWoodcutting;

with PathInfo do
begin
StartLoc := LOC_VE_BANK;
EndLoc := LOC_VE_TREES;

Reflection := [
Point(3253, 3421), Point(3265, 3428),
Point(3275, 3429), Point(3280, 3439),
Point(3276, 3450)
];

ColorTo := [
WALK_WC_VE_TREE_1, WALK_WC_VE_TREE_2,
WALK_WC_VE_TREE_3, WALK_WC_VE_TREE_4
];

ColorFrom := [
WALK_WC_VE_BANK_1, WALK_WC_VE_BANK_2,
WALK_WC_VE_BANK_3, WALK_WC_VE_BANK_4
];

// ObstaclePoints := [];
// Obstacles := [];
// DoObstacles := [];
end;
end;

SCRIPT_VE_OAKS:
with MSI_Scripts[whichScript] do
begin
Name := 'Varrock East Oaks';
Constant := SCRIPT_VE_OAKS;
SkillName := 'Woodcutting';
SkillConstant := SKILL_WOODCUTTING;
Objects := [TREE_OAK];
Items := [[LOGS_OAK]];
BankType := Bank;
WhichBank := MSI_BANK_VE;
CompassAng := -1;
AutoObjects := @MSI_ChopInvFull;
PlayerSetup := @MSI_SetupWoodcutting;

with PathInfo do
begin
StartLoc := LOC_VE_BANK;
EndLoc := LOC_VE_OAKS;

Reflection := [
Point(3253, 3420), Point(3266, 3429),
Point(3279, 3428)
];

ColorTo := [
WALK_WC_VE_OAKS_1, WALK_WC_VE_OAKS_2
];

ColorFrom := [
WALK_WC_VE_BANK_3, WALK_WC_VE_BANK_4
];

// ObstaclePoints := [];
// Obstacles := [];
// DoObstacles := [];
end;
end;

SCRIPT_POWER_CHOP:
with MSI_Scripts[whichScript] do
begin
Name := 'Powerchopper';
Constant := SCRIPT_POWER_CHOP;
SkillName := 'Woodcutting';
SkillConstant := SKILL_WOODCUTTING;

Objects := [
TREE_NORMAL, TREE_OAK, TREE_WILLOW, TREE_MAPLE,
TREE_YEW, TREE_MAGIC
];

Items := [
[LOGS_NORMAL], [LOGS_OAK], [LOGS_WILLOW],
[LOGS_MAPLE], [LOGS_YEW], [LOGS_MAGIC]
];

BankType := NoBank;
CompassAng := -1;
AutoObjects := @MSI_ChopInvFull;
PlayerSetup := @MSI_SetupWoodcutting;
end;

SCRIPT_GE_YEWS:
with MSI_Scripts[whichScript] do
begin
Name := 'Grand Exchange Yews';
Constant := SCRIPT_GE_YEWS;
SkillName := 'Woodcutting';
SkillConstant := SKILL_WOODCUTTING;
Objects := [TREE_YEW];
Items := [[LOGS_YEW]];
BankType := Bank;
WhichBank := MSI_BANK_GE;
CompassAng := -1;
AutoObjects := @MSI_ChopInvFull;
PlayerSetup := @MSI_SetupWoodcutting;

with PathInfo do
begin
StartLoc := LOC_GE_BANK;
EndLoc := LOC_GE_YEWS;

Reflection := [
Point(3169, 3490), Point(3183, 3489),
Point(3193, 3489), Point(3197, 3499),
Point(3208, 3503)
];

// ObstaclePoints := [];
// Obstacles := [];
// DoObstacles := [];
end;
end;

SCRIPT_DB_TREES:
with MSI_Scripts[whichScript] do
begin
Name := 'Draynor Normals';
Constant := SCRIPT_DB_TREES;
SkillName := 'Woodcutting';
SkillConstant := SKILL_WOODCUTTING;
Objects := [TREE_NORMAL];
Items := [[LOGS_NORMAL]];
BankType := Bank;
WhichBank := MSI_BANK_DB;
CompassAng := -1;
AutoObjects := @MSI_ChopInvFull;
PlayerSetup := @MSI_SetupWoodcutting;

with PathInfo do
begin
StartLoc := LOC_DB_BANK;
EndLoc := LOC_DB_TREES;

Reflection := [
Point(3092, 3240), Point(3084, 3248),
Point(3080, 3263), Point(3081, 3268)
];


// ObstaclePoints := [];
// Obstacles := [];
// DoObstacles := [];
end;
end;

SCRIPT_DB_OAKS:
With MSI_Scripts[WhichScript] do
begin
Name := 'Draynor Oaks';
Constant := SCRIPT_DB_OAKS;
SkillName := 'Woodcutting';
SkillConstant := SKILL_WOODCUTTING;
Objects := [TREE_OAK];
Items := [[LOGS_OAK]];
BankType := Bank;
WhichBank := MSI_BANK_DB;
CompassAng := 'w';
AutoObjects := @MSI_ChopInvFull;
PlayerSetup := @MSI_SetupWoodcutting;

with PathInfo do
begin
StartLoc := LOC_DB_BANK;
EndLoc := LOC_DB_OAKS;

Reflection := [
Point(3092, 3244), Point(3101, 3244)
];

// ObstaclePoints := [];
// Obstacles := [];
// DoObstacles := [];
end;
end;

SCRIPT_DB_WILLOWS:
with MSI_Scripts[whichScript] do
begin
Name := 'Draynor Willows';
Constant := SCRIPT_DB_WILLOWS;
SkillName := 'Woodcutting';
SkillConstant := SKILL_WOODCUTTING;
Objects := [TREE_WILLOW];
Items := [[LOGS_WILLOW]];
BankType := Bank;
WhichBank := MSI_BANK_DB;
CompassAng := -1;
AutoObjects := @MSI_ChopInvFull;
PlayerSetup := @MSI_SetupWoodcutting;

with PathInfo do
begin
StartLoc := LOC_DB_BANK;
EndLoc := LOC_DB_WILLOWS;

Reflection := [
Point(3092, 3245), Point(3087, 3234)
];

ColorTo := [
WALK_WC_DB_WILLOWS_1
];

ColorFrom := [
WALK_WC_DB_WILLOWS_BANK_1
];

// ObstaclePoints := [];
// Obstacles := [];
// DoObstacles := [];
end;
end;

SCRIPT_RM_YEWS:
with MSI_Scripts[whichScript] do
begin
Name := 'Rimmington Yews';
Constant := SCRIPT_RM_YEWS;
SkillName := 'Woodcutting';
SkillConstant := SKILL_WOODCUTTING;
Objects := [TREE_YEW];
Items := [[LOGS_YEW]];
BankType := Bank;
WhichBank := MSI_BANK_FE;
CompassAng := -1;
AutoObjects := @MSI_ChopInvFull;
PlayerSetup := @MSI_SetupWoodcutting;

with PathInfo do
begin
StartLoc := LOC_FE_BANK;
EndLoc := LOC_RM_YEWS;

Reflection := [
Point(3012, 3354), Point(3007, 3348),
Point(3008, 3334), Point(3008, 3323),
Point(3008, 3309), Point(3008, 3295),
Point(3003, 3285), Point(2991, 3279),
Point(2980, 3272), Point(2975, 3260),
Point(2965, 3252), Point(2956, 3241),
Point(2945, 3232), Point(2937, 3230)
];

// ObstaclePoints := [];
// Obstacles := [];
// DoObstacles := [];
end;
end;

SCRIPT_PS_WILLOWS:
with MSI_Scripts[whichScript] do
begin
Name := 'Port Sarim Willows';
Constant := SCRIPT_PS_WILLOWS;
SkillName := 'Woodcutting';
SkillConstant := SKILL_WOODCUTTING;
Objects := [TREE_WILLOW];
Items := [[LOGS_WILLOW]];
BankType := DBox;
WhichBank := DBOX_PS;
CompassAng := -1;
AutoObjects := @MSI_ChopInvFull;
PlayerSetup := @MSI_SetupWoodcutting;

with PathInfo do
begin
StartLoc := LOC_PS_DBOX;
EndLoc := LOC_PS_WILLOWS;

Reflection := [
Point(3047, 3236), Point(3052, 3248),
Point(3060, 3253)
];

// ObstaclePoints := [];
// Obstacles := [];
// DoObstacles := [];
end;
end;

SCRIPT_PS_YEWS:
with MSI_Scripts[whichScript] do
begin
Name := 'Port Sarim Yews';
Constant := SCRIPT_PS_YEWS;
SkillName := 'Woodcutting';
SkillConstant := SKILL_WOODCUTTING;
Objects := [TREE_YEW];
Items := [[LOGS_YEW]];
BankType := DBox;
WhichBank := DBOX_PS;
CompassAng := -1;
AutoObjects := @MSI_ChopInvFull;
PlayerSetup := @MSI_SetupWoodcutting;

with PathInfo do
begin
StartLoc := LOC_PS_DBOX;
EndLoc := LOC_PS_YEWS;

Reflection := [
Point(3046, 3235), Point(3042, 3245),
Point(3041, 3254), Point(3041, 3263),
Point(3044, 3269), Point(3053, 3270)
];

// ObstaclePoints := [];
// Obstacles := [];
// DoObstacles := [];
end;
end;

SCRIPT_SV_MAGICS:
with MSI_Scripts[whichScript] do
begin
Name := 'Seers Village Magics';
Constant := SCRIPT_SV_MAGICS;
SkillName := 'Woodcutting';
SkillConstant := SKILL_WOODCUTTING;
Objects := [TREE_MAGIC];
Items := [[LOGS_MAGIC]];
BankType := Bank;
WhichBank := MSI_BANK_SV;
CompassAng := -1;
AutoObjects := @MSI_ChopInvFull;
PlayerSetup := @MSI_SetupWoodcutting;

with PathInfo do
begin
StartLoc := LOC_SV_BANK;
EndLoc := LOC_SV_MAGICS;

Reflection := [
Point(2726, 3492), Point(2725, 3489),
Point(2722, 3474), Point(2722, 3458),
Point(2720, 3443), Point(2720, 3431),
Point(2720, 3415), Point(2715, 3402),
Point(2702, 3398)
];

// ObstaclePoints := [];
// Obstacles := [];
// DoObstacles := [];
end;
end;

SCRIPT_SV_MAPLES:
with MSI_Scripts[whichScript] do
begin
Name := 'Seers Village Maples';
Constant := SCRIPT_SV_MAPLES;
SkillName := 'Woodcutting';
SkillConstant := SKILL_WOODCUTTING;
Objects := [TREE_MAPLE];
Items := [[LOGS_MAPLE]];
BankType := Bank;
WhichBank := MSI_BANK_SV;
CompassAng := -1;
AutoObjects := @MSI_ChopInvFull;
PlayerSetup := @MSI_SetupWoodcutting;

with PathInfo do
begin
StartLoc := LOC_SV_BANK;
EndLoc := LOC_SV_MAPLES;

Reflection := [
Point(2726, 3492),
Point(2724, 3502)
];

// ObstaclePoints := [];
// Obstacles := [];
// DoObstacles := [];
end;
end;

SCRIPT_SV_YEWS:
with MSI_Scripts[whichScript] do
begin
Name := 'Seers Village Yews';
Constant := SCRIPT_SV_YEWS;
SkillName := 'Woodcutting';
SkillConstant := SKILL_WOODCUTTING;
Objects := [TREE_YEW];
Items := [[LOGS_YEW]];
BankType := Bank;
WhichBank := MSI_BANK_SV;
CompassAng := -1;
AutoObjects := @MSI_ChopInvFull;
PlayerSetup := @MSI_SetupWoodcutting;

with PathInfo do
begin
StartLoc := LOC_SV_BANK;
EndLoc := LOC_SV_YEWS;

Reflection := [
Point(2725, 3493), Point(2725, 3485),
Point(2725, 3477), Point(2725, 3468),
Point(2720, 3443), Point(2720, 3431),
Point(2719, 3463), Point(2714, 3464)
];

// ObstaclePoints := [];
// Obstacles := [];
// DoObstacles := [];
end;
end;

SCRIPT_EV_YEWS:
with MSI_Scripts[whichScript] do
begin
Name := 'Edgeville yews';
Constant := SCRIPT_EV_YEWS;
SkillName := 'Woodcutting';
SkillConstant := SKILL_WOODCUTTING;
Objects := [TREE_YEW];
Items := [[LOGS_YEW]];
BankType := Bank;
WhichBank := MSI_BANK_EV;
CompassAng := -1;
AutoObjects := @MSI_ChopInvFull;
PlayerSetup := @MSI_SetupWoodcutting;

with PathInfo do
begin
StartLoc := LOC_EV_BANK;
EndLoc := LOC_EV_YEWS;

Reflection := [
Point(3093, 3492), Point(3093, 3478),
Point(3087, 3472)
];

// ObstaclePoints := [];
// Obstacles := [];
// DoObstacles := [];
end;
end;

{ MINERS ===================================== ]
[============================================= }
SCRIPT_POWER_MINER:
with MSI_Scripts[whichScript] do
begin
Name := 'Powerminer';
Constant := SCRIPT_POWER_MINER;
SkillName := 'Mining';
SkillConstant := SKILL_MINING;

Objects := [
ROCK_CLAY, ROCK_COPPER, ROCK_TIN, ROCK_IRON, ROCK_SILVER,
ROCK_COAL, ROCK_GOLD, ROCK_MITHRIL, ROCK_ADAMANTITE
];

Items := [
[ORE_CLAY], [ORE_COPPER], [ORE_TIN], [ORE_IRON],
[ORE_SILVER], [ORE_COAL], [ORE_GOLD], [ORE_MITHRIL],
[ORE_ADAMANTITE]
];

BankType := NoBank;
CompassAng := -1;
AutoObjects := @MSI_MineInvFull;
PlayerSetup := @MSI_SetupMining;
end;

SCRIPT_VE_MINER:
with MSI_Scripts[whichScript] do
begin
Name := 'Varrock East Miner';
Constant := SCRIPT_VE_MINER;
SkillName := 'Mining';
SkillConstant := SKILL_MINING;
Objects := [ROCK_TIN, ROCK_COPPER, ROCK_IRON];
Items := [[ORE_TIN], [ORE_COPPER], [ORE_IRON]];
BankType := Bank;
WhichBank := MSI_BANK_VE;
CompassAng := -1;
AutoObjects := @MSI_MineInvFull;
PlayerSetup := @MSI_SetupMining;

with PathInfo do
begin
StartLoc := LOC_VE_BANK;
EndLoc := LOC_VE_MINE;

Reflection := [
Point(3254, 3421), Point(3265, 3429),
Point(3279, 3429), Point(3288, 3418),
Point(3292, 3406), Point(3292, 3393),
Point(3294, 3381), Point(3288, 3368)
];

// ObstaclePoints := [];
// Obstacles := [];
// DoObstacles := [];
end;
end;


SCRIPT_LSW_MINER:
with MSI_Scripts[whichScript] do
begin
Name := 'Lumby Swamp West Miner';
Constant := SCRIPT_LSW_MINER;
SkillName := 'Mining';
SkillConstant := SKILL_MINING;
Objects := [ROCK_COAL, ROCK_MITHRIL, ROCK_ADAMANTITE];
Items := [[ORE_COAL], [ORE_MITHRIL], [ORE_ADAMANTITE]];
BankType := Bank;
WhichBank := MSI_BANK_DB;
CompassAng := -1;
AutoObjects := @MSI_MineInvFull;
PlayerSetup := @MSI_SetupMining;

with PathInfo do
begin
StartLoc := LOC_DB_BANK;
EndLoc := LOC_LSW_MINE;

Reflection := [
Point(3092, 3242), Point(3101, 3234),
Point(3108, 3225), Point(3115, 3217),
Point(3124, 3211), Point(3132, 3205),
Point(3138, 3197), Point(3140, 3186),
Point(3141, 3175), Point(3144, 3165),
Point(3148, 3155), Point(3148, 3147)
];

// ObstaclePoints := [];
// Obstacles := [];
// DoObstacles := [];
end;
end;

SCRIPT_VW_MINER:
with MSI_Scripts[whichScript] do
begin
Name := 'Varrock West Miner';
Constant := SCRIPT_VE_MINER;
SkillName := 'Mining';
SkillConstant := SKILL_MINING;
Objects := [ROCK_TIN, ROCK_CLAY, ROCK_IRON, ROCK_SILVER];
Items := [[ORE_TIN], [ORE_CLAY], [ORE_IRON], [ORE_SILVER]];
BankType := Bank;
WhichBank := MSI_BANK_VW;
CompassAng := -1;
AutoObjects := @MSI_MineInvFull;
PlayerSetup := @MSI_SetupMining;

with PathInfo do
begin
StartLoc := LOC_VW_BANK;
EndLoc := LOC_VW_MINE;

Reflection := [
Point(3187, 3437), Point(3183, 3429),
Point(3174, 3427), Point(3171, 3418),
Point(3173, 3408), Point(3170, 3397),
Point(3173, 3387), Point(3174, 3377),
Point(3171, 3367), Point(3176, 3361),
Point(3181, 3367)
];
//////////// MY CHANGES HERE ///////////////////////////
//my color walking
ColorTo := [
WALK_MN_VW_1, WALK_MN_VW_2,
WALK_MN_VW_3, WALK_MN_VW_4,
WALK_MN_VW_5
];
//need to make bank walking still
ColorFrom := [
WALK_MN_VW_BANK_1, WALK_MN_VW_BANK_2,
WALK_MN_VW_BANK_3, WALK_MN_VW_BANK_4,
WALK_MN_VW_BANK_5

];
//////////// MY CHANGES HERE ///////////////////////////
// ObstaclePoints := [];
// Obstacles := [];
// DoObstacles := [];
end;
end;

SCRIPT_BBV_MINER:
with MSI_Scripts[whichScript] do
begin
Name := 'Barbarian Village Miner';
Constant := SCRIPT_BBV_MINER;
SkillName := 'Mining';
SkillConstant := SKILL_MINING;
Objects := [ROCK_TIN, ROCK_COAL];
Items := [[ORE_TIN], [ORE_COAL]];
BankType := Bank;
WhichBank := MSI_BANK_EV;
CompassAng := -1;
AutoObjects := @MSI_MineInvFull;
PlayerSetup := @MSI_SetupMining;

with PathInfo do
begin
StartLoc := LOC_EV_BANK;
EndLoc := LOC_BBV_MINE;

Reflection := [
Point(3093, 3493), Point(3085, 3486),
Point(3081, 3478), Point(3082, 3467),
Point(3088, 3458), Point(3087, 3448),
Point(3085, 3437), Point(3086, 3427),
Point(3079, 3423)
];

// ObstaclePoints := [];
// Obstacles := [];
// DoObstacles := [];
end;
end;

SCRIPT_RM_CLAY:
with MSI_Scripts[whichScript] do
begin
Name := 'Rimmington Clay Miner';
Constant := SCRIPT_RM_CLAY;
SkillName := 'Mining';
SkillConstant := SKILL_MINING;
Objects := [ROCK_CLAY];
Items := [[ORE_CLAY]];
BankType := DBox;
WhichBank := DBOX_PS;
CompassAng := -1;
AutoObjects := @MSI_MineInvFull;
PlayerSetup := @MSI_SetupMining;

with PathInfo do
begin
StartLoc := LOC_PS_DBOX;
EndLoc := LOC_RM_CLAY;

Reflection := [
Point(3047, 3234), Point(3033, 3234),
Point(3022, 3233), Point(3011, 3230),
Point(3000, 3232), Point(2993, 3230),
Point(2986, 3236)
];

// ObstaclePoints := [];
// Obstacles := [];
// DoObstacles := [];
end;
end;

SCRIPT_RM_TIN:
with MSI_Scripts[whichScript] do
begin
Name := 'Rimmington Tin Miner';
Constant := SCRIPT_RM_TIN;
SkillName := 'Mining';
SkillConstant := SKILL_MINING;
Objects := [ROCK_TIN];
Items := [[ORE_TIN]];
BankType := DBox;
WhichBank := DBOX_PS;
CompassAng := -1;
AutoObjects := @MSI_MineInvFull;
PlayerSetup := @MSI_SetupMining;

with PathInfo do
begin
StartLoc := LOC_PS_DBOX;
EndLoc := LOC_RM_TIN;

Reflection := [
Point(3047, 3234), Point(3033, 3234),
Point(3022, 3233), Point(3011, 3230),
Point(3000, 3232), Point(2993, 3230),
Point(2986, 3236)
];

// ObstaclePoints := [];
// Obstacles := [];
// DoObstacles := [];
end;
end;

SCRIPT_RM_COPPER:
with MSI_Scripts[whichScript] do
begin
Name := 'Rimmington Copper Miner';
Constant := SCRIPT_RM_COPPER;
SkillName := 'Mining';
SkillConstant := SKILL_MINING;
Objects := [ROCK_COPPER];
Items := [[ORE_COPPER]];
BankType := DBox;
WhichBank := DBOX_PS;
CompassAng := -1;
AutoObjects := @MSI_MineInvFull;
PlayerSetup := @MSI_SetupMining;

with PathInfo do
begin
StartLoc := LOC_PS_DBOX;
EndLoc := LOC_RM_COPPER;

Reflection := [
Point(3046, 3234), Point(3033, 3234),
Point(3020, 3230), Point(3007, 3231),
Point(2997, 3230), Point(2986, 3231),
Point(2981, 3241), Point(2979, 3245)
];

// ObstaclePoints := [];
// Obstacles := [];
// DoObstacles := [];
end;
end;

SCRIPT_RM_IRON_1:
with MSI_Scripts[whichScript] do
begin
Name := 'Rimmington Iron Miner 1';
Constant := SCRIPT_RM_IRON_1;
SkillName := 'Mining';
SkillConstant := SKILL_MINING;
Objects := [ROCK_IRON];
Items := [[ORE_IRON]];
BankType := DBox;
WhichBank := DBOX_PS;
CompassAng := -1;
AutoObjects := @MSI_MineInvFull;
PlayerSetup := @MSI_SetupMining;

with PathInfo do
begin
StartLoc := LOC_PS_DBOX;
EndLoc := LOC_RM_IRON_1;

Reflection := [
Point(3047, 3234), Point(3033, 3234),
Point(3021, 3233), Point(3008, 3231),
Point(2996, 3231), Point(2983, 3233)
];

// ObstaclePoints := [];
// Obstacles := [];
// DoObstacles := [];
end;
end;

SCRIPT_RM_IRON_2:
with MSI_Scripts[whichScript] do
begin
Name := 'Rimmington Iron Miner 2';
Constant := SCRIPT_RM_IRON_2;
SkillName := 'Mining';
SkillConstant := SKILL_MINING;
Objects := [ROCK_IRON];
Items := [[ORE_IRON]];
BankType := DBox;
WhichBank := DBOX_PS;
CompassAng := -1;
AutoObjects := @MSI_MineInvFull;
PlayerSetup := @MSI_SetupMining;

with PathInfo do
begin
StartLoc := LOC_PS_DBOX;
EndLoc := LOC_RM_IRON_2;

Reflection := [
Point(3047, 3234), Point(3033, 3234),
Point(3021, 3233), Point(3008, 3231),
Point(2996, 3231), Point(2983, 3230),
Point(2974, 3235), Point(2971, 3239)
];

// ObstaclePoints := [];
// Obstacles := [];
// DoObstacles := [];
end;
end;

SCRIPT_RM_GOLD:
with MSI_Scripts[whichScript] do
begin
Name := 'Rimmington Gold Miner';
Constant := SCRIPT_RM_GOLD;
SkillName := 'Mining';
SkillConstant := SKILL_MINING;
Objects := [ROCK_GOLD];
Items := [[ORE_GOLD]];
BankType := DBox;
WhichBank := DBOX_PS;
CompassAng := -1;
AutoObjects := @MSI_MineInvFull;
PlayerSetup := @MSI_SetupMining;

with PathInfo do
begin
StartLoc := LOC_PS_DBOX;
EndLoc := LOC_RM_GOLD;

Reflection := [
Point(3047, 3234), Point(3033, 3234),
Point(3021, 3233), Point(3008, 3231),
Point(2996, 3231), Point(2983, 3230),
Point(2977, 3233)
];

// ObstaclePoints := [];
// Obstacles := [];
// DoObstacles := [];
end;
end;

{ FISHERS ==================================== ]
[============================================= }
SCRIPT_POWER_FISHER:
with MSI_Scripts[whichScript] do
begin
Name := 'Powerfisher';
Constant := SCRIPT_POWER_FISHER;
SkillName := 'Fishing';
SkillConstant := SKILL_FISHING;

Objects := [
FISHSPOT_NET, FISHSPOT_BAIT, FISHSPOT_LURE,
FISHSPOT_CAGE, FISHSPOT_HARPOON
];

Items := [
[FISH_RAW_SHRIMP, FISH_RAW_ANCHOVIE],
[FISH_RAW_SARDINE, FISH_RAW_HERRING, FISH_RAW_PIKE],
[FISH_RAW_TROUT, FISH_RAW_SALMON], [FISH_RAW_LOBSTER],
[FISH_RAW_TUNA, FISH_RAW_SWORDFISH]
];

BankType := NoBank;
CompassAng := -1;
AutoObjects := @MSI_FishInvFull;
PlayerSetup := @MSI_SetupFishing;
end;

SCRIPT_DB_FISHER:
with MSI_Scripts[whichScript] do
begin
Name := 'Draynor Village Fisher';
Constant := SCRIPT_DB_FISHER;
SkillName := 'Fishing';
SkillConstant := SKILL_FISHING;

Objects := [
FISHSPOT_NET, FISHSPOT_BAIT
];

Items := [
[FISH_RAW_SHRIMP, FISH_RAW_ANCHOVIE],
[FISH_RAW_SARDINE, FISH_RAW_HERRING, FISH_RAW_PIKE]
];

BankType := Bank;
WhichBank := MSI_BANK_DB;
CompassAng := 'N';
AutoObjects := @MSI_FishInvFull;
PlayerSetup := @MSI_SetupFishing;

with PathInfo do
begin
StartLoc := LOC_DB_BANK;
EndLoc := LOC_DB_FISH;

Reflection := [
Point(3093, 3242), Point(3087, 3234),
Point(3087, 3228)
];

// ObstaclePoints := [];
// Obstacles := [];
// DoObstacles := [];
end;
end;

SCRIPT_BBV_FISHER:
with MSI_Scripts[whichScript] do
begin
Name := 'Barbarian Village Fisher';
Constant := SCRIPT_BBV_FISHER;
SkillName := 'Fishing';
SkillConstant := SKILL_FISHING;

Objects := [
FISHSPOT_LURE, FISHSPOT_BAIT
];

Items := [
[FISH_RAW_TROUT, FISH_RAW_SALMON],
[FISH_RAW_SARDINE, FISH_RAW_HERRING, FISH_RAW_PIKE]
];

BankType := Bank;
WhichBank := MSI_BANK_EV;
CompassAng := 'N';
AutoObjects := @MSI_FishInvFull;
PlayerSetup := @MSI_SetupFishing;

with PathInfo do
begin
StartLoc := LOC_EV_BANK;
EndLoc := LOC_BBV_FISH;

Reflection := [
Point(3094, 3489), Point(3099, 3485),
Point(3100, 3474), Point(3098, 3464),
Point(3096, 3449), Point(3103, 3435),
Point(3107, 3433)
];

// ObstaclePoints := [];
// Obstacles := [];
// DoObstacles := [];
end;
end;

{ COOKERS ==================================== ]
[============================================= }
SCRIPT_VE_COOKER:
with MSI_Scripts[whichScript] do
begin
Name := 'Varrock East Cooker';
Constant := SCRIPT_VE_COOKER;
SkillName := 'Cooker';
SkillConstant := SKILL_COOKING;

Objects := [COOKSPOT_RANGE];

Items := [
[MSI_LoadFoodRange]
];

BankType := Bank;
WhichBank := MSI_BANK_VE;
CompassAng := 'S';
AutoObjects := @MSI_CookFullInv;

with PathInfo do
begin
StartLoc := LOC_VE_BANK;
EndLoc := LOC_VE_MINE;

Reflection := [
Point(0, 0)
];

// ObstaclePoints := [];
// Obstacles := [];
// DoObstacles := [];
end;
end;
end;

Result := (MSI_Scripts[whichScript].Name <> '');
end;

{******************************************************************************}
{ procedure MSI_LoadAllScripts; }
{ By: Coh3n }
{ Date: 28 July 2010 }
{ Description: Loads all the scripts into MSI_Scripts array; should only be }
{ called once in SetupMSI }
{******************************************************************************}
procedure MSI_LoadAllScripts;
var
i: Integer;
begin
for i := 0 to High(MSI_Scripts) do
MSI_LoadScript(i);
end;
Globals.Simba
{==============================================================================\
| MSI Group Scripting Include |
| Globals.scar |
|==============================================================================|
| Used to store all necessary global types, consts and vars |
| |
\_____________________________________________________________________________}

(**
* Abbreviations:
* - FS: Fishing Spot
* - GS: General Store
* - GE: Grand Exchange
* - VE: Varrock East
* - VW: Varrock West
* - FW: Falador West
* - FE: Falador East
* - CG: Castle Guards
* - DW: Dark Wizards
* - SO: Stronghold Of *
* - AK: Al Kharid
* - SW: Spinning Wheel
* - LB: Lumby
* - EV: EdgeVille
* - BV: Barbarian Village
* - DB: Draynor Bank
* - RM: Rimmington
* - PS: Port Sarim
* - SV: Seers Village
*)

{==============================================================================\
| Constants |
\==============================================================================}

(**
* All of MSI's suppoted script constants; used in player setup
*)
const
// Woodcutting
SCRIPT_POWER_CHOP = 10;
SCRIPT_VE_TREES = 11;
SCRIPT_VE_OAKS = 12;
SCRIPT_GE_YEWS = 13;
SCRIPT_DB_WILLOWS = 14;
SCRIPT_DB_TREES = 15;
SCRIPT_DB_OAKS = 16;
SCRIPT_RM_YEWS = 17;
SCRIPT_PS_WILLOWS = 18;
SCRIPT_PS_YEWS = 19;
SCRIPT_SV_MAGICS = 20;
SCRIPT_SV_MAPLES = 21;
SCRIPT_SV_YEWS = 22;
SCRIPT_EV_YEWS = 23;

// Mining
SCRIPT_POWER_MINER = 30;
SCRIPT_VE_MINER = 31;
SCRIPT_VW_MINER = 32;
SCRIPT_LSW_MINER = 33;
SCRIPT_BBV_MINER = 34;
SCRIPT_RM_CLAY = 35;
SCRIPT_RM_TIN = 36;
SCRIPT_RM_COPPER = 37;
SCRIPT_RM_IRON_1 = 38;
SCRIPT_RM_IRON_2 = 39;
SCRIPT_RM_GOLD = 40;

// Fishing
SCRIPT_POWER_FISHER = 50;
SCRIPT_DB_FISHER = 51;
SCRIPT_BBV_FISHER = 52;

// Cooking
SCRIPT_VE_COOKER = 70;

SCRIPT_ARRAY_LENGTH = 70; // Change to the highest script constant

(**
* The constants that don't fit into any other category
*)
const
ANTI_BAN_CHANCE = 10; // The chance (in %) of performing antiban
BANK_SYMBOL_ACCURACY = 0.45; // The symbol accuracy of the bank
TOLERANCE_FLAG = 15; // The amount of pixels from the flag to player

PATH_PLAYER = IncludePath + 'MSI\Player.txt'; // Path for the player remote file
PATH_REPORT = IncludePath + 'MSI\MSI Progress Reports\'; // Path for progress report
PATH_DEBUG = IncludePath + 'MSI\MSI Logs\'; // Path for debug

(**
* Represents the stats system's custom variable array indexes
*)
const
STATS_LINK = 'http://scriptmanager.freehostia.com/submit.php';
STATS_LOGINS = 1;
STATS_BANKS = 2;
STATS_LOADS = 3;
STATS_RANDOMS = 4;
STATS_LEVELS = 5;
STATS_EXP = 6;
STATS_LOGS = 7;
STATS_ORES = 8;
STATS_FISH = 9;
STATS_COOKS = 10;
STATS_BURNS = 11;

(**
* Represents all the possible player locations; used for the indexes in
* the MSI_Location global array
*)
const
// Undefined
LOC_POWER_SKILL = 0;
LOC_LOST = 1;

// Varrock
// East
LOC_VE_TREES = 10;
LOC_VE_OAKS = 11;
LOC_VE_BANK = 12;
LOC_VE_MINE = 13;
LOC_VE_RANGES = 14;

// West
LOC_VW_BANK = 15;
LOC_VW_MINE = 16;

// Grand Exchange
LOC_GE_BANK = 20;
LOC_GE_YEWS = 21;

// Draynor
LOC_DB_BANK = 30;
LOC_DB_WILLOWS = 31;
LOC_DB_TREES = 32;
LOC_DB_OAKS = 33;
LOC_DB_FISH = 34;

// Rimmington
LOC_RM_YEWS = 40;
LOC_RM_CLAY = 41;
LOC_RM_TIN = 42;
LOC_RM_COPPER = 43;
LOC_RM_IRON_1 = 44;
LOC_RM_IRON_2 = 45;
LOC_RM_GOLD = 46;

// Falador
LOC_FE_BANK = 50;

// Port Sarim
LOC_PS_WILLOWS = 60;
LOC_PS_YEWS = 61;
LOC_PS_DBOX = 62;

// Lumbridge
LOC_LSW_MINE = 70;
LOC_LSE_MINE = 71;

// Edgeville
LOC_EV_BANK = 80;
LOC_EV_YEWS = 81;

// Barbarian Village
LOC_BBV_MINE = 90;
LOC_BBV_FISH = 91;

// Seers Village
LOC_SV_MAGICS = 100;
LOC_SV_BANK = 101;
LOC_SV_MAPLES = 102;
LOC_SV_YEWS = 103;

LOC_ARRAY_LENGTH = 101; // Change to the highest location constant

(**
* Color constants used in MSI's custom autocoloring functions
*)
const
COLOR_ROAD_GENERAL = 6579821;
COLOR_ROAD_VARROCK = 8686729;
COLOR_ROAD_FALLY = 7831173;
COLOR_ROAD_LUMBY = 8225677;
COLOR_ROAD_DIRT = 1853272;
COLOR_BANKER = 1179390;
COLOR_WATER = 10850700;
COLOR_ROCK = 5789528;
COLOR_TREE = 1532978;
COLOR_SAND = 0;

(**
* The different color walking points; used similar to reflection paths where
* instead of a TPointArray (or TTileArray), it's a TIntegerArray
*)
const
WALK_WC_VE_TREE_1 = 0;
WALK_WC_VE_TREE_2 = 1;
WALK_WC_VE_TREE_3 = 2;
WALK_WC_VE_TREE_4 = 3;

WALK_WC_VE_OAKS_1 = 4;
WALK_WC_VE_OAKS_2 = 5;

WALK_WC_VE_BANK_1 = 6;
WALK_WC_VE_BANK_2 = 7;
WALK_WC_VE_BANK_3 = 8;
WALK_WC_VE_BANK_4 = 9;

WALK_WC_DB_WILLOWS_1 = 10;
WALK_WC_DB_WILLOWS_BANK_1 = 11;

(** //////////// MY CHANGES HERE ///////////////////////////
* My color walking for Varrock West Mine
*)

WALK_MN_VW_1 = 12;
WALK_MN_VW_2 = 13;
WALK_MN_VW_3 = 14;
WALK_MN_VW_4 = 15;
WALK_MN_VW_5 = 16;

WALK_MN_VW_BANK_1 = 17;
WALK_MN_VW_BANK_2 = 18;
WALK_MN_VW_BANK_3 = 19;
WALK_MN_VW_BANK_4 = 20;
WALK_MN_VW_BANK_5 = 21;

(**
* All the different indexes for MSI_WalkInfo global variable; each index is
* used in MSI_WalkTPA by 3Garrett3 in Walking_Color.simba
*)
const
WALK_VE_MINE_1 = 10;
WALK_VE_MINE_2 = 11;

WALK_ARRAY_LENGTH = 21; // Change to the highest walk constant
//////////// MY CHANGES HERE ///////////////////////////
(**
* Constants used for MSI_WalkTPA for splitting and sorting methods
*)
const
SPLIT_TPA_TO_ATPA = 0;
SPLIT_TPA_TO_ATPA_EX = 1;
SPLIT_SPLIT_TPA = 2;
SPLIT_SPLIT_TPA_EX = 3;

SORT_ATPA_FROM = 0;
SORT_FIRST_LARGE = 1;
SORT_FIRST_SMALL = 2;

(**
* All the different color minimap areas used for relocating
*)
const
AREA_GE_YEWS_1 = 10;
AREA_GE_YEWS_2 = 11;

AREA_RM_YEWS_1 = 20;
AREA_RM_YEWS_2 = 21;

AREA_EV_YEWS_1 = 30;
AREA_EV_YEWS_2 = 31;

AREA_ARRAY_LENGTH = 31; // Change to the highest area constant

(**
* Constants used for (D)DTMs in ItemInfo.scar; each point constant corresponds
* to the TPointArray returned in MSI_GetDTMPoints();
*)
const
DTM_TOLERANCE = 15;
DTM_POINT_1 = 0;
DTM_POINT_2 = 1;
DTM_POINT_3 = 2;
DTM_POINT_4 = 3;
DTM_POINT_5 = 4;

(**
* Represents the required level to use the different tools
*)
const
// Hatchets and pickaxes
REQ_BRONZE = 1;
REQ_IRON = 1;
REQ_STEEL = 6;
REQ_MITHRIL = 21;
REQ_ADAMANT = 31;
REQ_RUNE = 41;
REQ_DRAGON = 61;

REQ_MAX_LEVEL = 99;

(**
* All the different items used throughout the MSI scripts
*)
const
PICKAXE_BRONZE = 10;
PICKAXE_IRON = 11;
PICKAXE_STEEL = 12;
PICKAXE_MITHRIL = 13;
PICKAXE_ADAMANT = 14;
PICKAXE_RUNE = 15;
PICKAXE_DRAGON = 16;

HATCHET_BRONZE = 20;
HATCHET_IRON = 21;
HATCHET_STEEL = 22;
HATCHET_MITHRIL = 23;
HATCHET_ADAMANT = 24;
HATCHET_RUNE = 25;
HATCHET_DRAGON = 26;

LOGS_NORMAL = 30;
LOGS_OAK = 31;
LOGS_WILLOW = 32;
LOGS_MAPLE = 33;
LOGS_YEW = 34;
LOGS_MAGIC = 35;

ORE_CLAY = 40;
ORE_COPPER = 41;
ORE_TIN = 42;
ORE_IRON = 43;
ORE_SILVER = 44;
ORE_COAL = 45;
ORE_GOLD = 46;
ORE_MITHRIL = 47;
ORE_ADAMANTITE = 48;
ORE_RUNITE = 49;

FISH_SMALLNET = 60;
FISH_CRAYPOT = 61;
FISH_ROD_BAIT = 62;
FISH_BAIT = 63;
FISH_ROD_FLY = 64;
FISH_HARPOON = 65;
FISH_CAGE = 66;

FISH_RAW_SHRIMP = 70;
FISH_RAW_CRAYFISH = 71;
FISH_RAW_SARDINE = 72;
FISH_RAW_HERRING = 73;
FISH_RAW_ANCHOVIE = 74;
FISH_RAW_TROUT = 75;
FISH_RAW_PIKE = 76;
FISH_RAW_SALMON = 77;
FISH_RAW_TUNA = 78;
FISH_RAW_LOBSTER = 79;
FISH_RAW_SWORDFISH = 80;

FISH_COOKED_SHRIMP = 100;
FISH_COOKED_CRAYFISH = 101;
FISH_COOKED_SARDINE = 102;
FISH_COOKED_HERRING = 103;
FISH_COOKED_ANCHOVIE = 104;
FISH_COOKED_TROUT = 105;
FISH_COOKED_PIKE = 106;
FISH_COOKED_SALMON = 107;
FISH_COOKED_TUNA = 108;
FISH_COOKED_LOBSTER = 109;
FISH_COOKED_SWORDFISH = 110;

GEM_SAPPHIRE = 120;
GEM_EMERALD = 121;
GEM_RUBY = 122;
GEM_DIAMOND = 123;

MISC_BIRD_NEST = 130;
MISC_FEATHER = 131;

STAFF_AIR = 150;
STAFF_WATER = 151;
STAFF_EARTH = 152;
STAFF_FIRE = 153;

ITEM_ARRAY_LENGTH = 153; // Change to the highest item constant

(**
* All the different objects used throughout the MSI scripts
*)
const
TREE_NORMAL = 10;
TREE_OAK = 11;
TREE_WILLOW = 12;
TREE_MAPLE = 13;
TREE_YEW = 14;
TREE_MAGIC = 15;

ROCK_CLAY = 20;
ROCK_TIN = 21;
ROCK_COPPER = 22;
ROCK_IRON = 23;
ROCK_SILVER = 24;
ROCK_COAL = 25;
ROCK_GOLD = 26;
ROCK_MITHRIL = 27;
ROCK_ADAMANTITE = 28;
ROCK_RUNITE = 29;

MSI_BANK_VE = 30; // Includes the 'MSI_' because there are bank constants in SRL's Bank.scar
MSI_BANK_VW = 31;
MSI_BANK_DB = 32;
MSI_BANK_GE = 33;
MSI_BANK_FE = 34;
MSI_BANK_EV = 35;
MSI_BANK_SV = 36;

DBOX_PS = 40;

FISHSPOT_NET = 50;
FISHSPOT_BAIT = 51;
FISHSPOT_LURE = 52;
FISHSPOT_CAGE = 53;
FISHSPOT_HARPOON = 54;

COOKSPOT_FIRE = 60;
COOKSPOT_RANGE = 61;

OBJ_BIRD_NEST = 70;
BIRD_NEST_CBMESSAGE = 'nest falls out of';

OBJ_ARRAY_LENGTH = 70; // Change to the highest object constant

(**
* Constants representing all the different spells
*)
const
SPELL_WIND_STRIKE = 0;
SPELL_WIND_BOLT = 1;
SPELL_WIND_BLAST = 2;
SPELL_WIND_WAVE = 3;

SPELL_WATER_STRIKE = 4;
SPELL_WATER_BOLT = 5;
SPELL_WATER_BLAST = 6;
SPELL_WATER_WAVE = 7;

SPELL_EARTH_STRIKE = 8;
SPELL_EARTH_BOLT = 9;
SPELL_EARTH_BLAST = 10;
SPELL_EARTH_WAVE = 11;

SPELL_FIRE_STRIKE = 12;
SPELL_FIRE_BOLT = 13;
SPELL_FIRE_BLAST = 14;
SPELL_FIRE_WAVE = 15;

SPELL_STATE_CONFUSE = 16;
SPELL_STATE_WEAKE = 17;
SPELL_STATE_CURSE = 18;
SPELL_STATE_BIND = 19;

SPELL_TELE_HOME = 20;
SPELL_TELE_VARROCK = 21;
SPELL_TELE_LUMBY = 22;
SPELL_TELE_FALLY = 23;

SPELL_ALCH_LOW = 24;
SPELL_ALCH_HIGH = 25;

SPELL_TELEGRAB = 26;
SPELL_SUPERHEAT = 27;

(**
* Used in MSI_AddToProggy in Debug.scar to determine what to add to the
* progress report
*)
const
PROG_ADD_EXP = 0;
PROG_ADD_ITEMS = 1;
PROG_ADD_LOADS = 2;

(**
* Used for any array indexes in DeclarePlayers
*)
const
L_BREAK = 0;
L_TOTAL = 1;
L_COUNT = 2;

{==============================================================================\
| Types |
\==============================================================================}

(**
* The type that holds all the attributes of any main screen objects used
* throughout MSI scripts
*)
type
TMSObject = record
X, Y : Integer;
Name : string;
UpText : string;
Option : string;
Exp : Extended;
Colors : TIntegerArray;
FindAllColors : Boolean; // Result False if not ALL colors are found
Tol : Integer;
Hue : Extended;
Sat : Extended;
W, H : Integer;
Accuracy : Integer; // Min pixels to be found
ExcludeSelf : Boolean; // Exclude pixels in a box, the box might need revamping / making it dynamic
RightClickOnly : Boolean;
Tries : Integer;
Anim : Boolean; // Result False if not animating
WaitToMove : Boolean; // When ClickLeft, wait till we have stopped moving?
BadColors : TIntegerArray;
BadColorTolerance: Integer;
AssociatedItems : TVariantArray;
end;

TMSObjectArray = array of TMSObject;

(**
* Stores all the attributes of each item used in MSI scripts
*)
type
TItem = record
Name : string;
UpText : TStringArray;
InvSlot : Integer;
Stackable: Boolean;
Colors : TIntegerArray;
Tol : Integer;
DTM : Integer;
end;

TItemArray = array of TItem;

(**
* Stores all the attributes of each recipe.
*)
type
TRecipe = record
Name : string;
Ingredients : TIntegerArray;
MemberOnly : Boolean;
Level : Integer;
Place : Integer;
XPGain : Extended;
end;

TRecipeArray = array of TRecipe;

(**
* Used in the banking functions to determine the type of bank
*)
type
TBank = (Bank, DBox, NoBank);

(**
* Stores all the different path information. Used in the TScript type
*)
type
TPath = record
StartLoc : Integer;
EndLoc : Integer;
Reflection : TPointArray;
ColorTo : TIntegerArray;
ColorFrom : TIntegerArray;
ObstaclePoints: TPointArray;
Obstacles : TIntegerArray;
DoObstacles : array of function(Obstacle: Integer): Boolean;
end;

(**
* Stores all the necessary script information for ease of adding new scripts
*)
type
TScript = record
// All relative script information
Name : string;
Constant : Integer;
Runtime : Integer;
SkillName : string;
SkillConstant: Integer; // The skill constants are in Players.scar (SRL)
Objects : TVariantArray; // The default objects to be autoed;
Items : array of TVariantArray;
BankType : TBank;
WhichBank : Integer;
CompassAng : Variant; // Ideal compass angle to auto at (-1 to leave as is)
AutoObjects : function: Boolean;
PlayerSetup : function: Boolean;
PathInfo : TPath;

// Used for progress reports; keeps track of player information
PlayerSkillLevel : Integer;
PlayerGainedExp : Integer;
PlayerLoads : Integer;
PlayerItemAmounts: array of TIntegerArray;
end;

TScriptArray = array of TScript;

(**
* Stores the necessary information for a player's progress report
*)
type
TProggy = record
PlayerName : string;
PlayerStatus: Boolean;
FalseReason : string;
PlayerLoc : Integer;
PlayerTime : Integer;
LoadsDone : Integer;
ScriptInfo : TScriptArray;
end;

TProggyArray = array of TProggy;

(**
* MSI's custom player record; used to setup each player. TUser can be found in
* SRL (Players.scar)
*)
type
TPlayerInfo = record
Name : string;
Pass : string;
Nick : string;
Pin : string;
Active : Boolean;
Member : Boolean;
Location : Integer;
Scripts : TIntegerArray;
Objects : array of TVariantArray;
Priority : array of TVariantArray;
DontDrop : TIntegerArray;
Loads : array[0..(L_COUNT - 1)] of Integer;
Items : array of array of TVariantArray;
ItemNames : array of array of TStringArray;
Experiences: array of array of TExtendedArray;
end;

TPlayerInfoArray = array of TPlayerInfo;

(**
* A record that stores all the properties of the different MSI player
* locations. Used in the MSI relocater
*)
type
TLocation = record
Name : string;
Constant : Integer;
AtBank : Boolean;
RelocatePoints: TPointArray; // Reflection tiles
RelocateAreas : TIntegerArray; // Area constants
RelocateDist : Integer; // Min distance (in pixels) for the player to be from the relocation point
end;

(**
* A record that stores all the color properties for relocating to certain
* locations. Used in the MSI relocater
*)
type
TMMColorArea = record
Name : string;
Symbol : string;
DTM : Integer;
W, H : Integer;
Colors : TIntegerArray;
Tolerances : TIntegerArray;
Counts : TIntegerArray;
Bounds : TBox;
end;

TMMColorAreaArray = array of TMMColorArea;

(**
* A record that stores all the color properties for individual points for
* walking paths
*)
type
TWalkInfo = record
Name : string;
Color : Integer;
Tolerance : Integer;
SplitMethod : Integer; // See the split method constants
SortMethod : Integer; // See the sort method constants
Filter : Boolean; // Use FilterPointsPie?
CTS2 : Boolean; // Use ColorToleranceSpeed 2?
HueMod : Extended;
SatMod : Extended;
StartRadial : Integer;
EndRadial : Integer;
MinRadius : Integer;
MaxRadius : Integer;
SortPoint : TPoint; // Point to sort from (for SortTPAFrom only)
SplitDist : Integer; // For TPAToATPA/SplitTPA only
W, H : Integer; // For TPAToATPAEx/SplitTPAEx only
end;

TWalkInfoArray = array of TWalkInfo;

{==============================================================================\
| Variables |
\==============================================================================}

(**
* Miscellaneous variables used throughout the include
*)
var
ProgressReportArray: TProggyArray;
CurrentScript : Integer;
ReflectionBroken : Boolean;
MSIRev : string;
ScriptStart : string;
NextAntiban : Integer;

(**
* Arrays that store all the necessary "go-to" information for MSI
*)
var
MSI_Players : TPlayerInfoArray;
MSI_Items : array[0..ITEM_ARRAY_LENGTH] of TItem;
MSI_Objects : array[0..OBJ_ARRAY_LENGTH] of TMSObject;
MSI_Locations : array[0..LOC_ARRAY_LENGTH] of TLocation;
MSI_Scripts : array[0..SCRIPT_ARRAY_LENGTH] of TScript;
MSI_ColorAreas: array[0..AREA_ARRAY_LENGTH] of TMMColorArea;
MSI_WalkInfo : array[0..WALK_ARRAY_LENGTH] of TWalkInfo;

(**
* The global variables used throughout the stats system (Stats.scar)
*)
var
Stats_UserID : string;
Stats_Password : string;
Stats_ScriptID : string;
Stats_LastTime : Integer;
Stats_CustomVars: array [1..20] of Integer;



Coh3n

2010-10-19 19:17:36

Hmm I can't see it right away. :unsure:

I don't have time to look more, but hopefully someone can find it. You can try using MSI's autocoloring (although I can't see anything wrong with yours). Also, does the error always happen at the same point?

Bobzilla69

2010-10-19 19:58:09

no it doesnt always happen at the same point. its so weird.

hope someone else can see something (need some fresh eyes on this)

Edit: Updates some of the points in Walking_Color.simba

I have noticed if i walk from bank to mine (bank as start point) the error seems to happen in the first walking point to bank (after full inventory)

if i walk from Mine to Bank (mine as start point) it walk fine to bank and back until i try and walk back to bank for second load.

BUT this is not always the case, it just happens more often in that scenario

nickrules

2010-10-23 18:22:41

Bump!

How's this coming along?


Keep up the good work. Personally, I prefer color. Far more reliable.

Bobzilla69

2010-10-24 03:58:36

well, i have stopped development, for now.

in the previous posts we had an error that would break walking so until this is fixed developing color would be pointless.

if anyone can spot the problem i would be extremely great full and will start developing more areas

nickrules

2010-10-24 08:29:14

We used to have this problem awhile ago too. I can't remember what was done to fix it though (if anything).
I'll do a little looking around for one of the many threads pertaining to random runtime errors on commented out lines xD

Camaro'

2010-11-02 00:27:47

Lumbridge West Swamp Miner

Walking_Color:


{******************************************************************************}
{ function MSI_InLWSMine: Boolean; }
{ By: The MSI Team }
{ 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, CTS: 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_MINE_LSWPoints(index: integer): TPoint; }
{ By: The MSI Team }
{ Date: October 30th 2010 }
{ Description: Returns a point on the minimap depending on the specified }
{ location by 'index' }
{******************************************************************************}
function MSI_MINE_LSWPoints(index: integer): TPoint;
var

TPA: TPointArray;
I, B, C, X, Y: integer;
aTPA: t2DPointArray;
TP : TPoint;
TB: TBox;

begin
try MSI_AddHeader('MSI_MINE_DBPoints');

Result := Point(-1, -1);
case index of
//road
WALK_MINE_LSW_1:
begin
WRiteln('TRYING WALK 1');
TPA := MSI_CreateWalkTPA(MMCX, MMCY, COLOR_ROAD_DRAYNOR, 6, 6, 18);
for I := 0 to High(TPA) do
begin
X := TPA[I].x;
Y := TPA[I].y;

if (X > 662) and (Y > 106) then
begin
if not RS_onMinimap(X, Y) then
Continue;
Result := Point(X, Y);
Break;
end;
end;
end;

//road
WALK_MINE_LSW_2:
begin
TPA := MSI_CreateWalkTPA(MMCx, MMcy, COLOR_ROAD_DRAYNOR, 6, 6, 18);
SortTPAFrom(TPA, Point(MMCX, MMCY));
InvertTPA(TPA);

for I := 10 to High(TPA) do
begin
X := TPA[I].x;
Y := TPA[I].y;
if not RS_onMinimap(X, Y) then
Continue;

if (Y > 100) then
begin

Result := Point(X, Y);
Break;
end;
end;
end;

//Blind to rock :S (Sorry :) )
WALK_MINE_LSW_3:
begin
Result := Point(664, 128);
end;

//water
WALK_MINE_LSW_4:
begin
FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color_Water, MMX1, MMY1, MMX2, MMy2, 25);

SortTPAFrom(TPA, Point(686, 119));
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;

//water -> south
WALK_MINE_LSW_5, WALK_MINE_LSW_6, WALK_MINE_LSW_7:
begin
FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color_Water, MMX1, MMY1, MMX2, MMy2, 25);
SortTPAFrom(TPA, Point(635, 152));
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 + 10, Y);
Break;
end;
end;

WALK_MINE_LSW_8:
begin
if (not(MSI_InLWSMine)) then
begin
Result := Point(MMCX, MMCY + 15);
end else
Result := Point(0, 0);
end;

WALK_MINE_LSW_BANK_1, WALK_MINE_LSW_BANK_2, WALK_MINE_LSW_BANK_3:
begin
FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color_Water, MMX1, MMY1, MMX2, MMy2, 25);
SortTPAFrom(TPA, Point(618, 19));
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 + 15, Y);
Break;

end;
end;


WALK_MINE_LSW_BANK_4:
begin
FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color_Water, MMX1, MMY1, MMX2, MMy2, 25);
SortTPAFrom(TPA, Point(575, 59));
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_MINE_LSW_BANK_5:
begin
FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color_Road_Draynor, MMX1, MMY1, MMX2, MMy2, 25);

SortTPAFrom(TPA, Point(MMCX, MMCY));
InvertTPA(TPA);
for I := 30 to High(TPA) do
begin
X := TPA[I].x;
Y := TPA[I].y;
if (Y < 34) then
if (X < 610) then
begin
if not RS_onMinimap(X, Y) then
Continue;
Result := Point(X, Y);
Break;
end;
end;
end;

WALK_MINE_LSW_BANK_6:
begin
FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color_Road_Draynor, MMX1, MMY1, MMX2, MMy2, 25);

SortTPAFrom(TPA, Point(MMCX, MMCY));
InvertTPA(TPA);
for I := 33 to High(TPA) do
begin
X := TPA[I].x;
Y := TPA[I].y;
if (Y < 75) then
if (X < 602) then
begin
if not RS_onMinimap(X, Y) then
Continue;
Result := Point(X, Y);
Break;
end;
end;
end;

WALK_MINE_LSW_BANK_7:
begin
TPA := MSI_CreateWalkTPA(MMCx, MMcy, COLOR_DB_BANK_FLOOR, 6, 6, 20);

SortTPAFrom(TPA, Point(MMCX, MMCY));
InvertTPA(TPA);

for I := 5 to High(TPA) do
begin
X := TPA[I].x;
Y := TPA[I].y;
if (Y < 70) then
if (X < 607) then
if (Y > 45) then
begin
if not RS_onMinimap(X, Y) then
Continue;
Result := Point(X, Y);
Break;
end;
end;
end;
end;

finally
MSI_CloseHeader('MSI_MINE_DBPoints');
end;

end;


Globals

const
COLOR_ROAD_GENERAL = 6579821;
COLOR_ROAD_VARROCK = 8686729;
COLOR_ROAD_FALLY = 7831173;
COLOR_ROAD_LUMBY = 8225677;
COLOR_ROAD_DRAYNOR = 7171953;
COLOR_ROAD_DIRT = 1853272;
COLOR_BANKER = 1179390;
COLOR_WATER = 10850700;
COLOR_ROCK = 5789528;
COLOR_TREE = 1532978;
COLOR_SAND = 0;
COLOR_DB_BANK_FLOOR = 3026991;


WALK_MINE_LSW_1 = 12;
WALK_MINE_LSW_2 = 13;
WALK_MINE_LSW_3 = 14;
WALK_MINE_LSW_4 = 15;
WALK_MINE_LSW_5 = 16;
WALK_MINE_LSW_6 = 17;
WALK_MINE_LSW_7 = 18;
WALK_MINE_LSW_8 = 19;

WALK_MINE_LSW_BANK_1 = 20;
WALK_MINE_LSW_BANK_2 = 21;
WALK_MINE_LSW_BANK_3 = 22;
WALK_MINE_LSW_BANK_4 = 23;
WALK_MINE_LSW_BANK_5 = 24;
WALK_MINE_LSW_BANK_6 = 25;
WALK_MINE_LSW_BANK_7 = 26;



Scripts


ColorTo := [
WALK_MINE_LSW_1, WALK_MINE_LSW_2, WALK_MINE_LSW_3,
WALK_MINE_LSW_4, WALK_MINE_LSW_5, WALK_MINE_LSW_6,
WALK_MINE_LSW_7, WALK_MINE_LSW_8

];

ColorFrom := [
WALK_MINE_LSW_BANK_1, WALK_MINE_LSW_BANK_2, WALK_MINE_LSW_BANK_3,
WALK_MINE_LSW_BANK_4, WALK_MINE_LSW_BANK_5, WALK_MINE_LSW_BANK_6,
WALK_MINE_LSW_BANK_7
];

:)

NCDS

2010-11-02 00:48:53

I'm assuming it's all been tested?

I'll plug it into my MSI and have a few test runs with it. There's a few edits I'm going to make to the code, but nice job :)

Also, have you made the failsafe clicks?

Coh3n

2010-11-02 01:00:23

From: NCDS
I'm assuming it's all been tested?

I'll plug it into my MSI and have a few test runs with it. There's a few edits I'm going to make to the code, but nice job :)

Also, have you made the failsafe clicks?

Already committed, and no there aren't failsafes. They probably should be added though.

Also, hopefully tomorrow I'll have the time to update the first post. There are several different methods to choose from if you want to write color walking. I need to explain them all in the first post.

Camaro'

2010-11-02 01:19:09

From: Coh3n
Already committed, and no there aren't failsafes. They probably should be added though.

Also, hopefully tomorrow I'll have the time to update the first post. There are several different methods to choose from if you want to write color walking. I need to explain them all in the first post.


No failsafes, I really have had it with that location, I would prefer if someone else did those :)

Tested by me and Coh3n.

Draynor Fishing

Walking_Color


{******************************************************************************}
{ function MSI_FISH_DBPoints(Index: Integer): TPoint; }
{ By: The MSI Team }
{ Date: 09 July 2010 }
{ Description: Returns a point on the minimap depending on the specified }
{ location by 'index' }
{******************************************************************************}
function MSI_FISH_DBPoints(Index: Integer): TPoint;
var TPA: TPointArray;
I , X, Y :Integer;
begin
Result := Point(-1, -1);

case Index of
WALK_FISH_DB_1:
begin
FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color_Water, MMX1, MMY1, MMX2, MMy2, 25);
SortTPAFrom(TPA, Point(612, 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 + 4, Y);
Break;
end;
end;

WALK_FISH_DB_BANK_1:
begin
FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color_NPC, MMX1, MMY1, MMX2, MMy2, 20);
SortTPAFrom(TPA, Point(649, 24));
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 + 4);
Break;
end;
end;


else
MSI_SubDebug('MSI_FISH_DBPoints: Invalid walk point!');
end;
end;

{******************************************************************************}
{ function MSI_CreateWalkIndex(index: Integer): TPoint; }
{ By: The MSI Team }
{ Date: 10 June 2010 }
{ Description: Returns a point on the minimap depending on the specified }
{ location by 'index' }
{******************************************************************************}
function MSI_CreateWalkIndex(index: Integer): TPoint;
begin
case index of
WALK_WC_VE_TREE_1..WALK_WC_VE_OAKS_2:
Result := MSI_WC_VEPoints(index);

WALK_WC_DB_WILLOWS_1, WALK_WC_DB_WILLOWS_BANK_1:
Result := MSI_WC_DBPoints(index);
WALK_MINE_LSW_1..WALK_MINE_LSW_BANK_7:
Result := MSI_MINE_LSWPoints(index);
WALK_FISH_DB_1, WALK_FISH_DB_BANK_1:
Result := MSI_FISH_DBPoints(index);
end;
end;




Globals



COLOR_NPC = 195836;


WALK_FISH_DB_1 = 27;
WALK_FISH_DB_BANK_1 = 28;

WALK_ARRAY_LENGTH = 28; // Change to the highest walk constant

Scripts

ColorTo := [
WALK_FISH_DB_1
];

ColorFrom := [
WALK_FISH_DB_BANK_1
];

Tested, works!


{----------------------------------------------------------------}
{ MSI Phoenix Player Report }
{------------------------- Revision 353 -------------------------}
{ Time Running: 11 Minutes and 7 Seconds }
{----------------------------------------------------------------}
{ }
{ Player 0: Soaaan Waaa }
{ Location: Draynor Village bank }
{ Time: 10m 52s }
{ Total Loads: 3 }
{ Active: True }
{ }
{ Script: Draynor Village Fisher }
{ Time: 10m 52s }
{ Skill: Fishing }
{ Loads: 3 }
{ Exp: 1,510 }
{ Level: 39 }
{ Item: Raw shrimps }
{ Amount: 39 }
{ Item: Raw anchovies }
{ Amount: 28 }
{ }
{----------------------------------------------------------------}
{----------------------------------------------------------------}



{----------------------------------------------------------------}
{ MSI Phoenix Player Report }
{------------------------- Revision 353 -------------------------}
{ Time Running: 1 Hours, 30 Minutes and 53 Seconds }
{----------------------------------------------------------------}
{ }
{ Player 0: Solemn Want }
{ Location: Draynor Village fishing spots }
{ Time: 01h 01m 53s }
{ Total Loads: 12 }
{ Active: False }
{ Reason: Failed to deposit items }
{ }
{ Script: Draynor Village Fisher }
{ Time: 01h 01m 53s }
{ Skill: Fishing }
{ Loads: 12 }
{ Exp: 7,160 }
{ Level: 39 }
{ Item: Raw shrimps }
{ Amount: 200 }
{ Item: Raw anchovies }
{ Amount: 129 }
{ }
{----------------------------------------------------------------}
{----------------------------------------------------------------}
:)

Coh3n

2010-11-04 19:23:37

Committed color walking for SCRIPT_DB_FISHER. Thanks Camaro'! :)

Camaro'

2010-11-06 15:00:28

Grand Exchange Yews

Walking_Color


{******************************************************************************}
{ 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_SwitchTrees(Left: Boolean): Boolean; }
{ By: LordSaturn }
{ Date: 05 November 2010 }
{ Description: Switchs Trees at the Grand Exchange location }
{ }
{******************************************************************************}
function MSI_SwitchTrees: 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 LeftTree of
True: LeftTree := False;
False: 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_WC_GEPoints(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_GEPoints(Index: Integer): TPoint;
var
TPA: TPointArray;
I , X, Y :Integer;
begin
Result := Point(-1, -1);

case Index of
WALK_WC_GE_YEW_1:
begin
FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color_GE_Floor, MMX1, MMY1, MMX2, MMy2, 20);
SortTPAFrom(TPA, Point(697, 81));
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);
Break;
end;
end;

WALK_WC_GE_YEW_2:
begin
FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color_GE_Path, MMX1, MMY1, MMX2, MMy2, 20);
SortTPAFrom(TPA, Point(683, 47));
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 + 2, Y + 2);
Break;
end;
end;
WALK_WC_GE_YEW_3:
begin
FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color_GE_Path, MMX1, MMY1, MMX2, MMy2, 20);
SortTPAFrom(TPA, Point(672, 64));
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 - 6);
LeftTree := True;
Break;
end;
end;
WALK_WC_GE_YEW_BANK_1:
begin
if (LeftTree) then
begin
FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color_GE_Floor, MMX1, MMY1, MMX2, MMy2, 20);
SortTPAFrom(TPA, Point(579, 134));
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 else
begin
if (MSI_SwitchTrees) then
begin
FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color_GE_Floor, MMX1, MMY1, MMX2, MMy2, 20);
SortTPAFrom(TPA, Point(579, 134));
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;
end;
end;

WALK_WC_GE_YEW_BANK_2:
begin
FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color_GE_Floor, MMX1, MMY1, MMX2, MMy2, 20);
SortTPAFrom(TPA, Point(575, 98));
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 - 3, Y);
Break;
end;
end;
WALK_WC_GE_YEW_BANK_3:
begin
//Result := Point(565, 83);

FindColorsSpiralTolerance(MMCX, MMCY, TPA, 329453, MMX1, MMY1, MMX2, MMy2, 20);//RED GE CIRCLE
SortTPAFrom(TPA, Point(564, 86));
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);
Break;
end;
end;

else
MSI_SubDebug('MSI_WC_GEPoints: Invalid walk point!');
end;
end;

{******************************************************************************}
{ function MSI_CreateWalkIndex(index: Integer): TPoint; }
{ By: The MSI Team }
{ Date: 10 June 2010 }
{ Description: Returns a point on the minimap depending on the specified }
{ location by 'index' }
{******************************************************************************}
function MSI_CreateWalkIndex(index: Integer): TPoint;
begin
case index of
WALK_WC_VE_TREE_1..WALK_WC_VE_OAKS_2:
Result := MSI_WC_VEPoints(index);

WALK_WC_DB_WILLOWS_1, WALK_WC_DB_WILLOWS_BANK_1:
Result := MSI_WC_DBPoints(index);

WALK_MINE_LSW_1..WALK_MINE_LSW_BANK_7:
Result := MSI_MINE_LSWPoints(index);

WALK_FISH_DB_1, WALK_FISH_DB_BANK_1:
Result := MSI_FISH_DBPoints(index);
WALK_WC_GE_YEW_1..WALK_WC_GE_YEW_BANK_3:
Result := MSI_WC_GEPoints(index);
end;
end;


Relocate

Just replace the MSI_RelocateColor function with this one
{******************************************************************************}
{ function MSI_RelocateColor(...): Boolean; }
{ By: marpis }
{ Description: Finds a location in minimap. First tries to find DTM, then }
{ colors, and if still not found it will find it by symbol }
{******************************************************************************}
function MSI_RelocateColor(var P: TPoint; Location, Index: Integer): Boolean;
Var
SA, EA, tmp_Ang: Extended;
N, I, II, III, H, HH, X, Y, Score, Step: Integer;
ATPA: T2DPointArray;
tmp_TPA: TPointArray;
X1, Y1, X2, Y2, ScriptConst: Integer;
Loc: TMMColorArea;
begin
Result := False;
P := Point(-1, -1);
ScriptConst := MSI_Players[CurrentPlayer].Scripts[CurrentScript].Name;
case ScriptConst of
SCRIPT_GE_YEWS:
begin
if (MSI_SwitchTrees) then
begin
Result := True;
Exit;
end;
end;
end;

if (not LoggedIn) then
Exit;

if (Length(MSI_Locations[Location].RelocateAreas) <= 0) then
begin
MSI_SubDebug('No relocation areas for ' + MSI_Locations[Location].Name);
Exit;
end;

Loc := MSI_ColorAreas[MSI_Locations[Location].RelocateAreas[Index]];
Step := (Loc.W * Loc.H) / 10;

// DTM Search
if (Loc.DTM > -1) then
while (N < 10) do
begin
if FindDTMRotated(Loc.DTM, X, Y, MMX1, MMY1, MMX2, MMY2, SA, EA, 0.02, tmp_Ang) then
begin
Result := True;
P := Point(X, Y);
MSI_SubDebug('Found relocation point via DTM: (' + IntToStr(P.X) + ', ' + IntToStr(P.Y) + ')');
Exit;
end;
Inc(N);
SA := SA - (N * 0.02);
EA := EA + (N * 0.02);
end;

// Color search
if (Length(Loc.Colors) > 0) then
begin
H := High(Loc.Colors);
SetLength(ATPA, H + 1);

for I := 0 to H do
begin
FindColorsSpiralTolerance(MMCX, MMCY, ATPA[I], Loc.Colors[I], MMX1, MMY1, MMX2, MMY2, Loc.Tolerances[I]);
FilterPointsPie(ATPA[I], 0.0, 360.0, 0.0, 76.0, MMCX, MMCY);
end;

// Go through every TPA that contains one color.
for I := 0 to H do
begin
HH := High(ATPA[I]);

// Go through every 10th point in ATPA[I] to avoid lag.
for II := 0 to HH do
begin
if ((II mod Step) <> 0) then
Continue;

Score := 0;

X1 := ATPA[I][II].X - (Loc.W / 2);
Y1 := ATPA[I][II].Y - (Loc.H / 2);
X2 := ATPA[I][II].X + (Loc.W / 2);
Y2 := ATPA[I][II].Y + (Loc.H / 2);

// Go through every TPA again, calculating surrounding color counts.
for III := 0 to H do
begin
tmp_TPA := MSI_ReturnPointsInBox(ATPA[III], IntToBox(X1, Y1, X2, Y2));
if (Length(tmp_TPA) >= Loc.Counts[III]) then
Inc(Score);
end;

// If there are enough points of all colors, the location has been found.
if (Score = H) then
begin
Result := True;
X := (X1 + X2) shr 1;
Y := (Y1 + Y2) shr 1;
P := Point(X, Y);
MSI_SubDebug('Found relocation point via color: (' + IntToStr(P.X) + ', ' + IntToStr(P.Y) + ')');
Exit;
end;

end;
end;
end;

// Symbol Search
if (Loc.Symbol <> '') then
if FindSymbol(X, Y, Loc.Symbol) then
begin
Result := True;
P := Point(X, Y);
MSI_SubDebug('Found relocation point via symbol: (' + IntToStr(P.X) + ', ' + IntToStr(P.Y) + ')');
Exit;
end;
end;

Scripts.simba

Add this for the GE script

ColorTo := [
WALK_WC_GE_YEW_1, WALK_WC_GE_YEW_2, WALK_WC_GE_YEW_3
];

ColorFrom := [
WALK_WC_GE_YEW_BANK_1, WALK_WC_GE_YEW_BANK_2, WALK_WC_GE_YEW_BANK_3
];

Globals


COLOR_GE_FLOOR = 5600640;
COLOR_GE_PATH = 6720921;

//////////////////////////////////

WALK_WC_GE_YEW_1 = 29;
WALK_WC_GE_YEW_2 = 30;
WALK_WC_GE_YEW_3 = 31;

WALK_WC_GE_YEW_BANK_1 = 32;
WALK_WC_GE_YEW_BANK_2 = 33;
WALK_WC_GE_YEW_BANK_3 = 34;

//////////////////////////////////


Coh3n

2010-11-07 18:53:33

I have a few questions before adding that, Camaro'. Have you asked Markus and Lordsaturn for permission to use those procedures? Also, it doesn't look like you've tested it because you took out the "Left" parameter in SwitchTrees, and it's still used. It's also used in the walking points. How do you think we should handle that?

Camaro'

2010-11-07 21:17:21

I asked LordSaturn and he said it was fine, I forgot to ask markus. I'll PM him in a few.



case LeftTree of
True: LeftTree := False;
False: LeftTree := True;
end;

Just changes a boolean that holds what tree you are at, so when walking back to the bank,

If (not(LeftTree)) then
MSI_SwitchTrees;

can be done because the path for Bank -> GE starts from the left tree.

Edit: Oh , I see what you mean. No, I had it working, I just forgot to post the variable for left tree. I forgot where I put it, I think it was in globals. (In the variables you just need to add LeftTree: Boolean)

Coh3n

2010-11-08 00:18:32

[QUOTE=Camaro';748420]Edit: Oh , I see what you mean. No, I had it working, I just forgot to post the variable for left tree. I forgot where I put it, I think it was in globals. (In the variables you just need to add LeftTree: Boolean)[/QUOTE]
Yeah, that's what I thought, in which case I would say we can't do it that way. LeftTree could mean several different locations, and I don't want to flood globals with global variables that are script-specific.

I'm thinking we can add a LeftTree boolean to TScriptSetup, and it can be set per script if needed. The same thing could be done for Edgeville Yews (IsNorthTree) or something similar.

Camaro'

2010-11-08 20:51:58

From: Coh3n
Yeah, that's what I thought, in which case I would say we can't do it that way. LeftTree could mean several different locations, and I don't want to flood globals with global variables that are script-specific.

I'm thinking we can add a LeftTree boolean to TScriptSetup, and it can be set per script if needed. The same thing could be done for Edgeville Yews (IsNorthTree) or something similar.


I'm running linux now, so for a while I wont have any developement, sorry MSI :(

Coh3n

2010-11-09 00:45:49

[QUOTE=Camaro';748647]I'm running linux now, so for a while I wont have any developement, sorry MSI :(
You can still run Simba/SMART through WINE. I did it for several months while I had Ubundu.

E: Any replies from Markus?

Camaro'

2010-11-17 06:43:32

From: Coh3n
You can still run Simba/SMART through WINE. I did it for several months while I had Ubundu.

E: Any replies from Markus?


I forgot :). Let me send a PM to him now, and if he says its fine this will be committed?

Coh3n

2010-11-17 11:55:07

[QUOTE=Camaro';750119]I forgot :). Let me send a PM to him now, and if he says its fine this will be committed?[/QUOTE]
Yeah I don't see why not.

Camaro'

2010-11-17 15:20:34

From: Coh3n
Yeah I don't see why not.


He has no problem :)

Coh3n

2010-11-18 22:34:16

Committed. :)

Camaro'

2010-11-18 22:45:43

Thanks!

Cohen, what is your MSN?

I made a new MSN, because the hacker stole my MSN.
[email]aarondawg14@yahoo.com[/email]

weequ

2010-11-19 03:27:24

+1. I enjoy not using smart because I feel more safe that way =) So no reflection for me.

Camaro'

2010-11-19 06:48:43

From: antti mies
+1. I enjoy not using smart because I feel more safe that way =) So no reflection for me.


Nice, so your luvin' all this color walking! :)

Camaro'

2010-12-10 18:01:45

Paths that need developing:


// Walking Paths

//Woodcutting
SCRIPT_RM_YEWS = 15;
SCRIPT_PS_YEWS = 17;

// Mining
SCRIPT_VE_MINER = 31;
SCRIPT_VW_MINER = 32;
SCRIPT_RM_MINER = 34;
SCRIPT_BBV_MINER = 35;