SRL Archive - MSI Suggestions

Al Kharid miner


TomTuff

2010-09-26 07:54:36

I've taken it upon myself to impliment an Al Kharid miner into MSI :D given the size of the AK Mining pit, i've split it up into 7 small scripts (kind of like the rimmington miner):
Gold miner
Silver Miner
Coal Miner
Iron Miner
Mithril Miner
Copper/Tin Miner
Adamantite Miner
each script includes the other rock types around it in its objects, so if the user wishes to mine say mithril and coal they can run the coal script and also place coal in the objects feild.

I wasn't sure if i was just supposed to post only the portion i changed or what, so sorry if my formatting is wrong.

Here it is!

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;
Tools := [TOOL_HATCHET];
SkillName := 'Woodcutting';
SkillConstant := SKILL_WOODCUTTING;
Objects := [TREE_NORMAL];
Items := [[LOGS_NORMAL]];
BankType := Bank;
WhichBank := MSI_BANK_VE;
CompassAng := -1;
AutoObjects := @MSI_ChopInvFull;

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;
Tools := [TOOL_HATCHET];
SkillName := 'Woodcutting';
SkillConstant := SKILL_WOODCUTTING;
Objects := [TREE_OAK];
Items := [[LOGS_OAK]];
BankType := Bank;
WhichBank := MSI_BANK_VE;
CompassAng := -1;
AutoObjects := @MSI_ChopInvFull;

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;
Tools := [TOOL_HATCHET];
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;
end;

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

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_WILLOWS:
with MSI_Scripts[whichScript] do
begin
Name := 'Draynor Willows';
Constant := SCRIPT_DB_WILLOWS;
Tools := [TOOL_HATCHET];
SkillName := 'Woodcutting';
SkillConstant := SKILL_WOODCUTTING;
Objects := [TREE_WILLOW];
Items := [[LOGS_WILLOW]];
BankType := Bank;
WhichBank := MSI_BANK_DB;
CompassAng := -1;
AutoObjects := @MSI_ChopInvFull;

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;
Tools := [TOOL_HATCHET];
SkillName := 'Woodcutting';
SkillConstant := SKILL_WOODCUTTING;
Objects := [TREE_YEW];
Items := [[LOGS_YEW]];
BankType := Bank;
WhichBank := MSI_BANK_FE;
CompassAng := -1;
AutoObjects := @MSI_ChopInvFull;

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;
Tools := [TOOL_HATCHET];
SkillName := 'Woodcutting';
SkillConstant := SKILL_WOODCUTTING;
Objects := [TREE_WILLOW];
Items := [[LOGS_WILLOW]];
BankType := DBox;
WhichBank := DBOX_PS;
CompassAng := -1;
AutoObjects := @MSI_ChopInvFull;

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;
Tools := [TOOL_HATCHET];
SkillName := 'Woodcutting';
SkillConstant := SKILL_WOODCUTTING;
Objects := [TREE_YEW];
Items := [[LOGS_YEW]];
BankType := DBox;
WhichBank := DBOX_PS;
CompassAng := -1;
AutoObjects := @MSI_ChopInvFull;

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

Reflection := [
Point(3047, 3263), Point(3041, 3244),
Point(3041, 3256), Point(3048, 3263),
Point(3052, 3270)
];

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

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

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;

{ MINERS ===================================== ]
[============================================= }
SCRIPT_POWER_MINER:
with MSI_Scripts[whichScript] do
begin
Name := 'Powerminer';
Constant := SCRIPT_POWER_MINER;
Tools := [TOOL_PICKAXE];
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;
end;

SCRIPT_VE_MINER:
with MSI_Scripts[whichScript] do
begin
Name := 'Varrock East Miner';
Constant := SCRIPT_VE_MINER;
Tools := [TOOL_PICKAXE];
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;

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;
Tools := [TOOL_PICKAXE];
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;

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

Reflection := [
Point(3094, 3242), Point(3105, 3246),
Point(3108, 3233), Point(3117, 3219),
Point(3124, 3213), Point(3132, 3207),
Point(3144, 3201), Point(3147, 3191),
Point(3147, 3181), Point(3148, 3170),
Point(3149, 3161), Point(3150, 3153),
Point(3149, 3146)
];

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

SCRIPT_VW_MINER:
with MSI_Scripts[whichScript] do
begin
Name := 'Varrock West Miner';
Constant := SCRIPT_VE_MINER;
Tools := [TOOL_PICKAXE];
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;

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)
];

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

SCRIPT_BBV_MINER:
with MSI_Scripts[whichScript] do
begin
Name := 'Barbarian Village Miner';
Constant := SCRIPT_BBV_MINER;
Tools := [TOOL_PICKAXE];
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;

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

Reflection := [
Point(3093, 3494), Point(3087, 3492),
Point(3081, 3479), Point(3085, 3464),
Point(3088, 3451), Point(3089, 3436),
Point(3082, 3422)
];

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

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

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;
Tools := [TOOL_PICKAXE];
SkillName := 'Mining';
SkillConstant := SKILL_MINING;
Objects := [ROCK_TIN];
Items := [[ORE_TIN]];
BankType := DBox;
WhichBank := DBOX_PS;
CompassAng := -1;
AutoObjects := @MSI_MineInvFull;

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;
Tools := [TOOL_PICKAXE];
SkillName := 'Mining';
SkillConstant := SKILL_MINING;
Objects := [ROCK_COPPER];
Items := [[ORE_COPPER]];
BankType := DBox;
WhichBank := DBOX_PS;
CompassAng := -1;
AutoObjects := @MSI_MineInvFull;

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;
Tools := [TOOL_PICKAXE];
SkillName := 'Mining';
SkillConstant := SKILL_MINING;
Objects := [ROCK_IRON];
Items := [[ORE_IRON]];
BankType := DBox;
WhichBank := DBOX_PS;
CompassAng := -1;
AutoObjects := @MSI_MineInvFull;

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;
Tools := [TOOL_PICKAXE];
SkillName := 'Mining';
SkillConstant := SKILL_MINING;
Objects := [ROCK_IRON];
Items := [[ORE_IRON]];
BankType := DBox;
WhichBank := DBOX_PS;
CompassAng := -1;
AutoObjects := @MSI_MineInvFull;

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;
Tools := [TOOL_PICKAXE];
SkillName := 'Mining';
SkillConstant := SKILL_MINING;
Objects := [ROCK_GOLD];
Items := [[ORE_GOLD]];
BankType := DBox;
WhichBank := DBOX_PS;
CompassAng := -1;
AutoObjects := @MSI_MineInvFull;

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;

SCRIPT_AK_IRON:
with MSI_Scripts[whichScript] do
begin
Name := 'Al Kharid iron miner';
Constant := SCRIPT_AK_MIRON;
Tools := [TOOL_PICKAXE];
SkillName := 'Mining';
SkillConstant := SKILL_MINING;
Objects := [ROCK_COPPER, ROCK_IRON;
Items := [[ROCK_COPPER], [ROCK_IRON]];
BankType := Bank;
WhichBank := MSI_BANK_AK;
CompassAng := 'n';
AutoObjects := @MSI_MineInvFull;

with PathInfo do
begin
StartLoc := LOC_AK_BANK;
EndLoc := LOC_AK_IRON;

Reflection := [
Point(3269, 3164), Point(3277, 3178), Point(3282, 3193),
Point(3285, 3210), Point(3279, 3226), Point(3287, 3241),
Point(3294, 3255), Point(3296, 3273), Point(3297, 3287),
Point(3294, 3300), Point(3298, 3311)
];

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

SCRIPT_AK_MITHRIL:
with MSI_Scripts[whichScript] do
begin
Name := 'Al Kharid mithril miner';
Constant := SCRIPT_AK_MINER;
Tools := [TOOL_PICKAXE];
SkillName := 'Mining';
SkillConstant := SKILL_MINING;
Objects := [ROCK_IRON, ROCK_MITHRIL];
Items := [[ROCK_IRON], [[ROCK_MITHRIL]];
BankType := Bank;
WhichBank := MSI_BANK_AK;
CompassAng := 'n';
AutoObjects := @MSI_MineInvFull;

with PathInfo do
begin
StartLoc := LOC_AK_BANK;
EndLoc := LOC_AK_MITHRIL;

Reflection := [
Point(3269, 3164), Point(3277, 3178), Point(3282, 3193),
Point(3285, 3210), Point(3279, 3226), Point(3287, 3241),
Point(3294, 3255), Point(3296, 3273), Point(3297, 3287),
Point(3294, 3300), Point(3302, 3311)
];

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

SCRIPT_AK_SILVER:
with MSI_Scripts[whichScript] do
begin
Name := 'Al Kharid silver miner';
Constant := SCRIPT_AK_SILVER;
Tools := [TOOL_PICKAXE];
SkillName := 'Mining';
SkillConstant := SKILL_MINING;
Objects := [ROCK_SILVER];
Items := [[ROCK_SILVER]];
BankType := Bank;
WhichBank := MSI_BANK_AK;
CompassAng := 'n';
AutoObjects := @MSI_MineInvFull;

with PathInfo do
begin
StartLoc := LOC_AK_BANK;
EndLoc := LOC_AK_SILVER;

Reflection := [
Point(3269, 3164), Point(3277, 3178), Point(3282, 3193),
Point(3285, 3210), Point(3279, 3226), Point(3287, 3241),
Point(3294, 3255), Point(3296, 3273), Point(3297, 3287),
Point(3294, 3300)
];

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

SCRIPT_AK_COAL:
with MSI_Scripts[whichScript] do
begin
Name := 'Al Kharid coal miner';
Constant := SCRIPT_AK_COAL;
Tools := [TOOL_PICKAXE];
SkillName := 'Mining';
SkillConstant := SKILL_MINING;
Objects := [ROCK_IRON, ROCK_COAL];
Items := [[ROCK_IRON], [ROCK_COAL]];
BankType := Bank;
WhichBank := MSI_BANK_AK;
CompassAng := 'n';
AutoObjects := @MSI_MineInvFull;

with PathInfo do
begin
StartLoc := LOC_AK_BANK;
EndLoc := LOC_AK_COAL;

Reflection := [
Point(3269, 3164), Point(3277, 3178), Point(3282, 3193),
Point(3285, 3210), Point(3279, 3226), Point(3287, 3241),
Point(3294, 3255), Point(3296, 3273), Point(3297, 3287),
Point(3300, 3300)
];

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

SCRIPT_AK_GOLD:
with MSI_Scripts[whichScript] do
begin
Name := 'Al Kharid miner';
Constant := SCRIPT_AK_MINER;
Tools := [TOOL_PICKAXE];
SkillName := 'Mining';
SkillConstant := SKILL_MINING;
Objects := [ROCK_IRON, ROCK_GOLD];
Items := [[ROCK_IRON], [ROCK_GOLD]];
BankType := Bank;
WhichBank := MSI_BANK_AK;
CompassAng := 'n';
AutoObjects := @MSI_MineInvFull;

with PathInfo do
begin
StartLoc := LOC_AK_BANK;
EndLoc := LOC_AK_GOLD;

Reflection := [
Point(3269, 3164), Point(3277, 3178), Point(3282, 3193),
Point(3285, 3210), Point(3279, 3226), Point(3287, 3241),
Point(3294, 3255), Point(3296, 3273), Point(3297, 3287)
];

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

SCRIPT_AK_ADAMANT:
with MSI_Scripts[whichScript] do
begin
Name := 'Al Kharid miner';
Constant := SCRIPT_AK_ADAMANT;
Tools := [TOOL_PICKAXE];
SkillName := 'Mining';
SkillConstant := SKILL_MINING;
Objects := [ROCK_TIN, ROCK_COPPER, ROCK_ADAMANTITE];
Items := [[ROCK_TIN], [ROCK_COPPER], [ROCK_ADAMANTITE]];
BankType := Bank;
WhichBank := MSI_BANK_AK;
CompassAng := 'n';
AutoObjects := @MSI_MineInvFull;

with PathInfo do
begin
StartLoc := LOC_AK_BANK;
EndLoc := LOC_AK_ADAMANT;

Reflection := [
Point(3269, 3164), Point(3277, 3178), Point(3282, 3193),
Point(3285, 3210), Point(3279, 3226), Point(3287, 3241),
Point(3294, 3255), Point(3296, 3273), Point(3297, 3287),
Point(3294, 3300), Point(3300, 3316)
];

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

SCRIPT_AK_COP_TIN:
with MSI_Scripts[whichScript] do
begin
Name := 'Al Kharid miner';
Constant := SCRIPT_AK_COP_TIN;
Tools := [TOOL_PICKAXE];
SkillName := 'Mining';
SkillConstant := SKILL_MINING;
Objects := [ROCK_TIN, ROCK_COPPER, ROCK_IRON, ROCK_SILVER, ROCK_GOLD, ROCK_COAL, ROCK_MITHRIL, ROCK_ADAMANTITE];
Items := [[ROCK_TIN], [ROCK_COPPER], [ROCK_IRON], [ROCK_SILVER], [ROCK_GOLD], [ROCK_COAL], [ROCK_MITHRIL], [ROCK_ADAMANTITE]];
BankType := Bank;
WhichBank := MSI_BANK_AK;
CompassAng := 'n';
AutoObjects := @MSI_MineInvFull;

with PathInfo do
begin
StartLoc := LOC_AK_BANK;
EndLoc := LOC_AK_COP_TIN;

Reflection := [
Point(3269, 3164), Point(3277, 3178), Point(3282, 3193),
Point(3285, 3210), Point(3279, 3226), Point(3287, 3241),
Point(3294, 3255), Point(3296, 3273), Point(3297, 3287),
Point(3294, 3300), Point(3297, 3314)
];

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


{ FISHERS ==================================== ]
[============================================= }
SCRIPT_POWER_FISHER:
with MSI_Scripts[whichScript] do
begin
Name := 'Powerfisher';
Constant := SCRIPT_POWER_FISHER;
Tools := [TOOL_FISH];
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;
end;

SCRIPT_DB_FISHER:
with MSI_Scripts[whichScript] do
begin
Name := 'Draynor Village Fisher';
Constant := SCRIPT_DB_FISHER;
Tools := [TOOL_FISH];
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;

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;

{ COOKERS ==================================== ]
[============================================= }
SCRIPT_VE_COOKER:
with MSI_Scripts[whichScript] do
begin
Name := 'Varrock East Cooker';
Constant := SCRIPT_VE_COOKER;
Tools := [];
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_RM_YEWS = 15;
SCRIPT_PS_WILLOWS = 16;
SCRIPT_PS_YEWS = 17;
SCRIPT_SV_MAGICS = 18;

// 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;
SCRIPT_AK_GOLD = 41;
SCRIPT_AK_SILVER = 42;
SCRIPT_AK_COAL = 43;
SCRIPT_AK_IRON = 44;
SCRIPT_AK_MITHRIL = 45;
SCRIPT_AK_COP_TIN = 46;
SCRIPT_AK_ADAMANT = 47;

// Fishing
SCRIPT_POWER_FISHER = 50;
SCRIPT_DB_FISHER = 51;

// 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;

(**
* 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_RANGE = 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_FISH = 32;

// 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;

// Barbarian Village
LOC_BBV_MINE = 90;

// Seers Village
LOC_SV_MAGICS = 100;
LOC_SV_BANK = 101;

// Al Kharid
LOC_AK_BANK = 110;
LOC_AK_GOLD = 111;
LOC_AK_SILVER = 112;
LOC_AK_COAL = 113;
LOC_AK_IRON = 114;
LOC_AK_MITHRIL = 115;
LOC_AK_COP_TIN = 116;
LOC_AK_ADAMANT = 117;

LOC_ARRAY_LENGTH = 117; // 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;

(**
* 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 = 11; // Change to the highest walk constant

(**
* 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_ARRAY_LENGTH = 21; // 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 different types of tools; used in the scriptTools attribute
* in the TScript type
*)
const
TOOL_HATCHET = 0;
TOOL_PICKAXE = 1;
TOOL_FISH = 2;

(**
* 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;

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 = 62;
FISH_BAIT = 63;
FISH_FLY = 64;
FISH_FEATHER = 65;
FISH_HARPOON = 66;
FISH_CAGE = 67;

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;

ITEM_ARRAY_LENGTH = 130; // 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;
MSI_BANK_AK = 37;

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

(**
* 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_COUNT = 2;

L_BREAK = 0;
L_TOTAL = 1;

{==============================================================================\
| 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;
ItemP : TPoint;
Stackable: Boolean;
Colors : TIntegerArray;
Tol : Integer;
DTM : Integer;
end;

TItemArray = array of TItem;

(**
* 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;
Tools : TIntegerArray; // The required tools for the script
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;
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
RelocateTime : Integer; // Time (in ms) to wait before relocating
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;



Locations.simba:
{==============================================================================\
| MSI Group Scripting Include |
| Scripts.scar |
|==============================================================================|
| For all the routines related to specific scripts |
| |
| * function MSI_LoadLocation(): Boolean; * by The MSI Team |
| * procedure MSI_LoadAllLocations; * by Coh3n |
\_____________________________________________________________________________}

{******************************************************************************}
{ procedure MSI_LoadAllLocations; }
{ By: The MSI Team }
{ Date: 17 August 2010 }
{ Description: Loads Which location information. This should only be called }
{ in MSI_LoadAllScripts }
{******************************************************************************}
function MSI_LoadLocation(Which: Integer): Boolean;
begin
case Which of
LOC_POWER_SKILL:
with MSI_Locations[Which] do
begin
Name := 'The wonderful world of Runescape!';
Constant := LOC_POWER_SKILL;
AtBank := False;
end;

LOC_LOST:
with MSI_Locations[Which] do
begin
Name := 'Lost';
Constant := LOC_LOST;
AtBank := False;
end;

LOC_VE_TREES:
with MSI_Locations[Which] do
begin
Name := 'Varrock east trees';
Constant := LOC_VE_TREES;
AtBank := False;
end;

LOC_VE_OAKS:
with MSI_Locations[Which] do
begin
Name := 'Varrock east oaks';
Constant := LOC_VE_OAKS;
AtBank := False;
end;

LOC_VE_BANK:
with MSI_Locations[Which] do
begin
Name := 'Varrock east bank';
Constant := LOC_VE_BANK;
AtBank := True;
end;

LOC_VE_MINE:
with MSI_Locations[Which] do
begin
Name := 'Varrock east mine';
Constant := LOC_VE_MINE;
AtBank := False;
end;

LOC_VW_MINE:
with MSI_Locations[Which] do
begin
Name := 'Varrock west mine';
Constant := LOC_VW_MINE;
AtBank := False;
end;

LOC_VW_BANK:
with MSI_Locations[Which] do
begin
Name := 'Varrock west bank';
Constant := LOC_VW_BANK;
AtBank := True;
end;

LOC_GE_BANK:
with MSI_Locations[Which] do
begin
Name := 'Grand Exchange bank';
Constant := LOC_GE_BANK;
AtBank := True;
end;

LOC_GE_YEWS:
with MSI_Locations[Which] do
begin
Name := 'Grand Exchange yews';
Constant := LOC_GE_YEWS;
AtBank := False;
RelocatePoints := [Point(3209, 3503), Point(3220, 3502)];
RelocateAreas := [AREA_GE_YEWS_1, AREA_GE_YEWS_2];
RelocateDist := 10;
RelocateTime := 2000;
end;

LOC_DB_BANK:
with MSI_Locations[Which] do
begin
Name := 'Draynor Village bank';
Constant := LOC_DB_BANK;
AtBank := True;
end;

LOC_DB_WILLOWS:
with MSI_Locations[Which] do
begin
Name := 'Draynor Village willows';
Constant := LOC_DB_WILLOWS;
AtBank := False;
end;

LOC_DB_FISH:
with MSI_Locations[Which] do
begin
Name := 'Draynor Village fishing spots';
Constant := LOC_DB_FISH;
AtBank := False;
end;

LOC_RM_YEWS:
with MSI_Locations[Which] do
begin
Name := 'Rimmington yews';
Constant := LOC_RM_YEWS;
AtBank := False;
RelocatePoints := [Point(2937, 3231), Point(2935, 3228)];
RelocateAreas := [AREA_RM_YEWS_1, AREA_RM_YEWS_2];
RelocateDist := 5;
RelocateTime := 8000;
end;

LOC_RM_CLAY:
with MSI_Locations[Which] do
begin
Name := 'Rimmington clay rocks';
Constant := LOC_RM_CLAY;
AtBank := False;
end;

LOC_RM_TIN:
with MSI_Locations[Which] do
begin
Name := 'Rimmington tin rocks';
Constant := LOC_RM_TIN;
AtBank := False;
end;

LOC_RM_COPPER:
with MSI_Locations[Which] do
begin
Name := 'Rimmington copper rocks';
Constant := LOC_RM_COPPER;
AtBank := False;
end;

LOC_RM_IRON_1:
with MSI_Locations[Which] do
begin
Name := 'Rimmington iron rocks 1';
Constant := LOC_RM_IRON_1;
AtBank := False;
end;

LOC_RM_IRON_2:
with MSI_Locations[Which] do
begin
Name := 'Rimmington iron rocks 2';
Constant := LOC_RM_IRON_2;
AtBank := False;
end;

LOC_RM_GOLD:
with MSI_Locations[Which] do
begin
Name := 'Rimmington gold rocks';
Constant := LOC_RM_GOLD;
AtBank := False;
end;

LOC_FE_BANK:
with MSI_Locations[Which] do
begin
Name := 'Falador east bank';
Constant := LOC_FE_BANK;
AtBank := True;
end;

LOC_PS_WILLOWS:
with MSI_Locations[Which] do
begin
Name := 'Port Sarim willows';
Constant := LOC_PS_WILLOWS;
AtBank := False;
end;

LOC_PS_YEWS:
with MSI_Locations[Which] do
begin
Name := 'Port Sarim yews';
Constant := LOC_PS_YEWS;
AtBank := False;
end;

LOC_PS_DBOX:
with MSI_Locations[Which] do
begin
Name := 'Port Sarim deposit box';
Constant := LOC_PS_DBOX;
AtBank := True;
end;

LOC_LSW_MINE:
with MSI_Locations[Which] do
begin
Name := 'Lumbridge swamp west mine';
Constant := LOC_LSW_MINE;
AtBank := False;
end;

LOC_LSE_MINE:
with MSI_Locations[Which] do
begin
Name := 'Lumbridge swamp east mine';
Constant := LOC_LSE_MINE;
AtBank := False;
end;

LOC_EV_BANK:
with MSI_Locations[Which] do
begin
Name := 'Edgeville bank';
Constant := LOC_EV_BANK;
AtBank := True;
end;

LOC_BBV_MINE:
with MSI_Locations[Which] do
begin
Name := 'Barbarian Village mine';
Constant := LOC_BBV_MINE;
AtBank := False;
end;

LOC_VE_RANGE:
with MSI_Locations[Which] do
begin
Name := 'Varrock East cooking ranges';
Constant := LOC_VE_RANGE;
AtBank := False;
end;

LOC_AK_BANK:
with MSI_Locations[Which] do
begin
Name := 'Al Kharid bank';
Constant := LOC_AK_BANK;
AtBank := True;
end;

LOC_AK_GOLD:
With MSI_Locations[Which] do
begin
Name := 'Al Kharid gold rocks';
Constant := LOC_AK_GOLD;
AtBank := False;
end;

LOC_AK_SILVER:
With MSI_Locations[Which] do
begin
Name := 'Al Kharid silver rocks';
Constant := LOC_AK_SILVER;
AtBank := False;
end;

LOC_AK_COAL:
With MSI_Locations[Which] do
begin
Name := 'Al Kharid coal rocks';
Constant := LOC_AK_COAL;
AtBank := False;
end;

LOC_AK_IRON:
With MSI_Locations[Which] do
begin
Name := 'Al Kharid iron rocks';
Constant :+ LOC_AK_IRON;
AtBank := False;
end;

LOC_AK_MITHRIL:
With MSI_Locations[Which] do
begin
Name := 'Al Kharid mithril rocks';
Constant :+ LOC_AK_MITHRIL;
AtBank := False;
end;

LOC_AK_COP_TIN:
With MSI_Locations[Which] do
begin
Name := 'Al Kharid copper/tin rocks';
Constant :+ LOC_AK_COP_TIN;
AtBank := False;
end;

LOC_AK_ADAMANT:
With MSI_Locations[Which] do
begin
Name := 'Al Kharid adamantite rocks';
Constant :+ LOC_AK_ADAMANT;
AtBank := False;
end;

end;

Result := (MSI_Locations[Which].Name <> '');
end;

{******************************************************************************}
{ procedure MSI_LoadAllLocations; }
{ By: Coh3n }
{ Date: 02 August 2010 }
{ Description: Loads all the locations into MSI_Locations array; should only }
{ be called once in SetupMSI }
{******************************************************************************}
procedure MSI_LoadAllLocations;
var
i: Integer;
begin
for i := 0 to High(MSI_Locations) do
MSI_LoadLocation(i);
end;


E: Fixed globals.simba, forgot to set SCRIPT_AK_ consants.
E2: THIS IS NOT TESTED.

NCDS

2010-09-26 10:59:55

Refer here http://villavu.com/forum/showthread.php?t=59170

Coh3n

2011-05-25 17:23:40

An Al Kharid miner would be nice. Tom, if you want to you can fork MSI and send a pull request with your changes. :) I know this was posted a long time ago, but I just found it now.

TomTuff

2011-05-25 20:35:39

From: Coh3n
An Al Kharid miner would be nice. Tom, if you want to you can fork MSI and send a pull request with your changes. :) I know this was posted a long time ago, but I just found it now.


I don't even have this on my computer any more, I've reformatted windows since. I don't have internet in my room right now (family issues… *sigh*), so I couldn't redo this if I wanted to. feel free to work with whatever is in the original post if any of it is still good.

Coh3n

2011-05-25 20:59:53

From: TomTuff
I don't even have this on my computer any more, I've reformatted windows since. I don't have internet in my room right now (family issues… *sigh*), so I couldn't redo this if I wanted to. feel free to work with whatever is in the original post if any of it is still good.

Okay sounds good. :)