Camaro'
2010-09-28 22:48:25
Walking_Color.Simba
________________________________________________
Scripts.Simba
________________________________________________
Globals.simba
{******************************************************************************}
{ function MSI_FISH_DBPoints(Index: Integer): TPoint; }
{ By: The MSI Team }
{ Date: September 28th 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;
Auto, x, y, I: Integer;
begin
Result := Point(-1, -1);
case Index of
WALK_DB_FISH_1:
begin
Auto := MSI_AutoColorMM(COLOR_TREE);//Finds the closest color to the tree (mm)
TPA := MSI_CreateWalkTPA(x, y, Auto, 4, 4, 7);//TPA of that color
if Length(TPA) <> 0 then //If the tpa found something
begin
SortTPAFrom(TPA, Point(616, 157));//Sorts the tpa from somewhere near the bottom (south) of the minimap
for i := 0 to High(TPA) do//loop through all the points
begin
if not RS_onMinimap(TPA[i].x, TPA[i].y) then Continue;//Check if its on mm
Result := Point(TPA[i].x - 15, TPA[i].y);//We have our point
Exit;
end;
end;
end;
WALK_DB_FISH_BANK_1:
begin
Auto := MSI_AutoColorMM(COLOR_DB_BANK_FLOOR);//Finds the closest color to the bank floor (mm)
TPA := MSI_CreateWalkTPA(x, y, Auto, 9, 9, 8);//TPA of that color
if Length(TPA) <> 0 then //If the tpa found something
begin
SortTPAFrom(TPA, Point(MMCx, MMCy));//Sorts the tpa from closest to me
InvertTPA(TPA);//reverses it so that the furthest points are looped first
for i := 0 to High(TPA) do//loop through all the points
begin
if not RS_onMinimap(TPA[i].x, TPA[i].y) then Continue;//Check if its on mm
Result := Point(TPA[i].x - 9, TPA[i].y + 15);//We have our point
Exit;
end;
end;
end;
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_DB_FISH_1, WALK_DB_FISH_BANK_1:
Result := MSI_FISH_DBPoints(index);
end;
end;
________________________________________________
Scripts.Simba
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)
];
ColorTo := [
WALK_DB_FISH_1
];
ColorFrom := [
WALK_DB_FISH_BANK_1
];
// ObstaclePoints := [];
// Obstacles := [];
// DoObstacles := [];
end;
end;
________________________________________________
Globals.simba
COLOR_DB_BANK_FLOOR= 4077633;
WALK_DB_FISH_1 = 12;
WALK_DB_FISH_BANK_1 = 13;