Camaro'
2010-12-09 16:45:35
Items.simba
There was a problem, cause some items share a color and a blacklist (Rune through bronze hatchets all share with the dragon hatchet) but I fixed that, by instead of searching through each color in the color array, just using MSI_GetItemColor. This should fix the color issue. If the color issue does pop up again, all that would be needed to do is update the MSI_GetItemColor. Although, it shouldn't be a problem because DTM's are still being used as the first check.
What it currently does, for every Item(except dragon pickaxe, and the birds nest) is…. If it can not find the DTM, it will find it using blacklists.
Blacklist info: http://villavu.com/forum/showthread.php?t=57813
I revised that idea and used it as a backup, instead of replacing DTM's all together. I don't know really know the MSI like someone like NCDS, or Coh3n does. So I didn't want to start removing things.
Items.simba
MSI_GetItemBlackList
MSI_LoadItem
MSI_FindItemBL, MSI_FindItemSlotsBL, MSI_FindTool
There was a problem, cause some items share a color and a blacklist (Rune through bronze hatchets all share with the dragon hatchet) but I fixed that, by instead of searching through each color in the color array, just using MSI_GetItemColor. This should fix the color issue. If the color issue does pop up again, all that would be needed to do is update the MSI_GetItemColor. Although, it shouldn't be a problem because DTM's are still being used as the first check.
What it currently does, for every Item(except dragon pickaxe, and the birds nest) is…. If it can not find the DTM, it will find it using blacklists.
Blacklist info: http://villavu.com/forum/showthread.php?t=57813
I revised that idea and used it as a backup, instead of replacing DTM's all together. I don't know really know the MSI like someone like NCDS, or Coh3n does. So I didn't want to start removing things.
Items.simba
MSI_GetItemBlackList
{******************************************************************************}
{ function MSI_GetItemBlackList(which: Integer): Integer; }
{ By: Camaro' }
{ Date: 8 December 2010 }
{ Description: Loads the item's (which) black list color }
{ // Means the blacklist is a duplicate. If no blacklist is known, use 1. }
{******************************************************************************}
function MSI_GetItemBlackList(which: Integer): Integer;
begin
case which of
HATCHET_BRONZE : Result := 76;
HATCHET_IRON : Result := 76;
HATCHET_STEEL : Result := 76;
HATCHET_MITHRIL: Result := 76;
HATCHET_ADAMANT: Result := 76;
HATCHET_RUNE : Result := 76;
HATCHET_DRAGON : Result := 1;
LOGS_NORMAL: Result := 85;
LOGS_OAK : Result := 85;
LOGS_WILLOW: Result := 85;
LOGS_MAPLE : Result := 85;
LOGS_YEW : Result := 85;
LOGS_MAGIC : Result := 85;
PICKAXE_BRONZE : Result := 98;
PICKAXE_IRON : Result := 98;
PICKAXE_STEEL : Result := 98;
PICKAXE_MITHRIL: Result := 98;
PICKAXE_ADAMANT: Result := 98;
PICKAXE_RUNE : Result := 98;
PICKAXE_DRAGON : Result := 1;
ORE_CLAY : Result := 62;
ORE_COPPER : Result := 170;
ORE_TIN : Result := 170;
ORE_IRON : Result := 170;
ORE_SILVER : Result := 170;
ORE_COAL : Result := 170;
ORE_GOLD : Result := 170;
ORE_MITHRIL : Result := 170;
ORE_ADAMANTITE: Result := 170;
ORE_RUNITE : Result := 170;
FISH_SMALLNET : Result := 177;
FISH_CAGE_CRAYFISH: Result := 70;//
FISH_ROD_BAIT : Result := 134;
FISH_BAIT : Result := 91;
FISH_ROD_FLY : Result := 119;//
FISH_HARPOON : Result := 70;//
FISH_POT_LOBSTER : Result := 80;//
FISH_RAW_SHRIMP : Result := 141;
FISH_RAW_CRAYFISH : Result := 115;
FISH_RAW_ANCHOVIE : Result := 141;
FISH_RAW_SARDINE : Result := 44;
FISH_RAW_HERRING : Result := 71;
FISH_RAW_TROUT : Result := 77;//
FISH_RAW_PIKE : Result := 77;//
FISH_RAW_SALMON : Result := 77;//
FISH_RAW_TUNA : Result := 77;//
FISH_RAW_LOBSTER : Result := 119;//
FISH_RAW_SWORDFISH : Result := 82;
FISH_COOKED_SHRIMP : Result := 141;
FISH_COOKED_CRAYFISH : Result := 115;
FISH_COOKED_ANCHOVIE : Result := 141;
FISH_COOKED_SARDINE : Result := 44;
FISH_COOKED_HERRING : Result := 71;
FISH_COOKED_TROUT : Result := 77;//
FISH_COOKED_PIKE : Result := 77;//
FISH_COOKED_SALMON : Result := 77;//
FISH_COOKED_TUNA : Result := 77;//
FISH_COOKED_LOBSTER : Result := 119;//
FISH_COOKED_SWORDFISH : Result := 82;
GEM_UNCUT_SAPPHIRE : Result := 66;
GEM_UNCUT_EMERALD : Result := 66;
GEM_UNCUT_RUBY : Result := 66;
GEM_UNCUT_DIAMOND : Result := 66;
MISC_BIRD_NEST : Result := 1;
MISC_FEATHER : Result := 104;
STAFF_AIR : Result := 68;
STAFF_WATER : Result := 68;
STAFF_EARTH : Result := 68;
STAFF_FIRE : Result := 68;
MSI_RUNE_AIR : Result := 80;
MSI_RUNE_BODY : Result := 80;
MSI_RUNE_MIND : Result := 80;
MSI_RUNE_EARTH : Result := 80;
MSI_RUNE_FIRE : Result := 80;
MSI_RUNE_WATER : Result := 80;
MSI_RUNE_CHAOS : Result := 80;
MSI_RUNE_LAW : Result := 80;
MSI_RUNE_COSMIC: Result := 80;
MSI_RUNE_DEATH : Result := 80;
MSI_RUNE_NATURE: Result := 80;
MSI_RUNE_BLOOD : Result := 80;
MSI_RUNE_SOUL : Result := 80;
MSI_RUNE_ASTRAL: Result := 80;
else
MSI_SubDebug('MSI_GetItemColor: Invalid item constant - '+IntToStr(Which));
end;
end;
MSI_LoadItem
{******************************************************************************}
{ function MSI_LoadItem(whichItem: Integer): Boolean; }
{ By: The MSI Team }
{ Date: 25 July 2010 }
{ Description: Loads the item whichItem into the MSI_Items array; should only }
{ be called in MSI_LoadAllITems }
{******************************************************************************}
function MSI_LoadItem(whichItem: Integer): Boolean;
begin
case whichItem of
{ HATCHETS =================================== ]
[============================================= }
HATCHET_BRONZE:
with MSI_Items[whichItem] do
begin
Name := 'Bronze Hatchet';
UpText := ['onze hat'];
Colors := [1649466, 1583415, 1715516];
Tol := 3;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
HATCHET_IRON:
with MSI_Items[whichItem] do
begin
Name := 'Iron Hatchet';
UpText := ['on hatch'];
Colors := [3618618, 3815996];
Tol := 4;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
HATCHET_STEEL:
with MSI_Items[whichItem] do
begin
Name := 'Steel Hatchet';
UpText := ['eel hatc'];
Colors := [5855581, 6118753, 6513511];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
HATCHET_MITHRIL:
with MSI_Items[whichItem] do
begin
Name := 'Mithril Hatchet';
UpText := ['thril ha'];
Colors := [4599598, 4468013];
Tol := 3;
Stackable := False;
DTM := MSI_LoadDTM(HATCHET_MITHRIL);
BlackList := MSI_GetItemBlackList(whichItem);
end;
HATCHET_ADAMANT:
with MSI_Items[whichItem] do
begin
Name := 'Adamant Hatchet';
UpText := ['amant ha'];
Colors := [3291698, 3423284];
Tol := 4;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
HATCHET_RUNE :
with MSI_Items[whichItem] do
begin
Name := 'Rune Hatchet';
UpText := ['ne hatch'];
Colors := [4932921, 5261885];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
HATCHET_DRAGON :
with MSI_Items[whichItem] do
begin
Name := 'Dragon Hatchet';
UpText := ['gon hat'];
Colors := [856663, 790865];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
{ LOGS ======================================= ]
[============================================= }
LOGS_NORMAL:
with MSI_Items[whichItem] do
begin
Name := 'Normal logs';
UpText := ['Logs'];
Colors := [2704989];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
LOGS_OAK:
with MSI_Items[whichItem] do
begin
Name := 'Oak logs';
UpText := ['logs'];
Colors := [3496567];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
LOGS_WILLOW:
with MSI_Items[whichItem] do
begin
Name := 'Willow logs';
UpText := ['illow', 'illow logs', 'low'];
Colors := [2509137];
Tol := 6;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
LOGS_MAPLE:
with MSI_Items[whichItem] do
begin
Name := 'Maple logs';
UpText := ['ple logs'];
Colors := [800853];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
LOGS_YEW:
with MSI_Items[whichItem] do
begin
Name := 'Yew logs';
UpText := ['ew l'];
Colors := [668228];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
LOGS_MAGIC:
with MSI_Items[whichItem] do
begin
Name := 'Magic logs';
UpText := ['gic lo'];
Colors := [9609010];
Tol := 2;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
{ PICKAXES =================================== ]
[============================================= }
PICKAXE_BRONZE:
with MSI_Items[whichItem] do
begin
Name := 'Bronze pickaxe';
UpText := ['onze pi'];
Colors := [5344186];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
PICKAXE_IRON:
with MSI_Items[whichItem] do
begin
Name := 'Iron pickaxe';
UpText := ['ron pi'];
Colors := [12040384];
Tol := 3;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
PICKAXE_STEEL:
with MSI_Items[whichItem] do
begin
Name := 'Steel pickaxe';
UpText := ['eel pi'];
Colors := [12435142];
Tol := 3;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
PICKAXE_MITHRIL:
with MSI_Items[whichItem] do
begin
Name := 'Mithril pickaxe';
UpText := ['ril pi'];
Colors := [11958905];
Tol := 4;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
PICKAXE_ADAMANT:
with MSI_Items[whichItem] do
begin
Name := 'Adamant pickaxe';
UpText := ['ant pi'];
Colors := [9743251];
Tol := 6;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
PICKAXE_RUNE:
with MSI_Items[whichItem] do
begin
Name := 'Rune pickaxe';
UpText := ['une pi'];
Colors := [12495486];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
PICKAXE_DRAGON:
with MSI_Items[whichItem] do
begin
Name := 'Dragon pickaxe';
UpText := ['agon pi'];
Colors := [725070];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
{ ORE ======================================== ]
[============================================= }
ORE_CLAY:
with MSI_Items[whichItem] do
begin
Name := 'Clay';
UpText := ['lay', 'Clay'];
Colors := [5274001];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
ORE_COPPER:
with MSI_Items[whichItem] do
begin
Name := 'Copper ore';
UpText := ['opper'];
Colors := [3762874];
Tol := 3;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
ORE_TIN:
with MSI_Items[whichItem] do
begin
Name := 'Tin ore';
UpText := ['in or'];
Colors := [6842476];
Tol := 2;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
ORE_IRON:
with MSI_Items[whichItem] do
begin
Name := 'Iron ore';
UpText := ['ron o'];
Colors := [1515574];
Tol := 2;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
ORE_SILVER:
with MSI_Items[whichItem] do
begin
Name := 'Silver ore';
UpText := ['ilver'];
Colors := [9538186];
Tol := 10;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
ORE_COAL:
with MSI_Items[whichItem] do
begin
Name := 'Coal ore';
UpText := ['oal'];
Colors := [1844261];
Tol := 3;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
ORE_GOLD:
with MSI_Items[whichItem] do
begin
Name := 'Gold ore';
UpText := ['Gold','old'];
Colors := [1675188];
Tol := 13;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
ORE_MITHRIL:
with MSI_Items[whichItem] do
begin
Name := 'Mithril ore';
UpText := ['ithril'];
Colors := [5519672];
Tol := 3;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
ORE_ADAMANTITE:
with MSI_Items[whichItem] do
begin
Name := 'Adamantite ore';
UpText := ['daman'];
Colors := [6517347];
Tol := 3;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
ORE_RUNITE:
with MSI_Items[whichItem] do
begin
Name := 'Runite ore';
UpText := ['unite'];
Colors := [5525056];
Tol := 8;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
{ FISH TOOLS ================================= ]
[============================================= }
FISH_SMALLNET:
with MSI_Items[whichItem] do
begin
Name := 'Small Fishing Net';
UpText := ['ishing net'];
Colors := [2569539];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
FISH_CAGE_CRAYFISH:
with MSI_Items[whichItem] do
begin
Name := 'Crayfish Cage';
UpText := ['rayfish cage'];
Colors := [5461079];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
FISH_ROD_BAIT:
with MSI_Items[whichItem] do
begin
Name := 'Fishing Rod';
UpText := ['Fishing'];
Colors := [5197651];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
FISH_BAIT:
with MSI_Items[whichItem] do
begin
Name := 'Fishing Bait';
UpText := ['ishing bait'];
Colors := [1605551];
Tol := 5;
Stackable := True;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
FISH_ROD_FLY:
with MSI_Items[whichItem] do
begin
Name := 'Fly Fishing Rod';
UpText := ['ly fishing'];
Colors := [3355445];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
FISH_HARPOON:
with MSI_Items[whichItem] do
begin
Name := 'Harpoon';
UpText := ['arpoon'];
Colors := [6052960];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
FISH_POT_LOBSTER:
with MSI_Items[whichItem] do
begin
Name := 'Lobster Pot';
UpText := ['obster pot'];
Colors := [6184546];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
{ FISH ======================================== ]
[============================================== }
FISH_RAW_SHRIMP:
with MSI_Items[whichItem] do
begin
Name := 'Raw shrimps';
UpText := ['aw shrimps'];
Colors := [1712955];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
FISH_RAW_CRAYFISH:
with MSI_Items[whichItem] do
begin
Name := 'Raw crayfish';
UpText := ['aw crayfish'];
Colors := [1914462];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
FISH_RAW_ANCHOVIE:
with MSI_Items[whichItem] do
begin
Name := 'Raw anchovies';
UpText := ['aw anchovies'];
Colors := [7696496];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
FISH_RAW_SARDINE:
with MSI_Items[whichItem] do
begin
Name := 'Raw sardines';
UpText := ['aw sardine', 'ine'];
Colors := [6466656];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
FISH_RAW_HERRING:
with MSI_Items[whichItem] do
begin
Name := 'Raw herring';
UpText := ['aw herring'];
Colors := [11053232];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
FISH_RAW_TROUT:
with MSI_Items[whichItem] do
begin
Name := 'Raw trout';
UpText := ['aw trout'];
Colors := [11843005];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
FISH_RAW_PIKE:
with MSI_Items[whichItem] do
begin
Name := 'Raw pike';
UpText := ['aw pike'];
Colors := [10269852];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
FISH_RAW_SALMON:
with MSI_Items[whichItem] do
begin
Name := 'Raw salmon';
UpText := ['aw salmon'];
Colors := [9606569];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
FISH_RAW_TUNA:
with MSI_Items[whichItem] do
begin
Name := 'Raw tuna';
UpText := ['aw tuna'];
Colors := [9408662];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
FISH_RAW_LOBSTER:
with MSI_Items[whichItem] do
begin
Name := 'Raw lobster';
UpText := ['aw lobster'];
Colors := [2046823];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
FISH_RAW_SWORDFISH:
with MSI_Items[whichItem] do
begin
Name := 'Raw swordfish';
UpText := ['aw swordfish'];
Colors := [9264774];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
FISH_COOKED_SHRIMP:
with MSI_Items[whichItem] do
begin
Name := 'Cooked shrimps';
UpText := ['hrimps'];
Colors := [996713];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
FISH_COOKED_CRAYFISH:
with MSI_Items[whichItem] do
begin
Name := 'Cooked crayfish';
UpText := ['rayfish'];
Colors := [];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
FISH_COOKED_ANCHOVIE:
with MSI_Items[whichItem] do
begin
Name := 'Cooked anchovies';
UpText := ['nchovies'];
Colors := [];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
FISH_COOKED_SARDINE:
with MSI_Items[whichItem] do
begin
Name := 'Cooked sardines';
UpText := ['ardine'];
Colors := [];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
FISH_COOKED_HERRING:
with MSI_Items[whichItem] do
begin
Name := 'Cooked herring';
UpText := ['erring'];
Colors := [];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
FISH_COOKED_TROUT:
with MSI_Items[whichItem] do
begin
Name := 'Cooked trout';
UpText := ['rout'];
Colors := [];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
FISH_COOKED_PIKE:
with MSI_Items[whichItem] do
begin
Name := 'Cooked pike';
UpText := ['ike'];
Colors := [];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
FISH_COOKED_SALMON:
with MSI_Items[whichItem] do
begin
Name := 'Cooked salmon';
UpText := ['almon'];
Colors := [];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
FISH_COOKED_TUNA:
with MSI_Items[whichItem] do
begin
Name := 'Cooked tuna';
UpText := ['una'];
Colors := [];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
FISH_COOKED_LOBSTER:
with MSI_Items[whichItem] do
begin
Name := 'Cooked lobster';
UpText := ['obster'];
Colors := [];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
FISH_COOKED_SWORDFISH:
with MSI_Items[whichItem] do
begin
Name := 'Cooked swordfish';
UpText := ['wordfish'];
Colors := [];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
{ GEMS ======================================== ]
[============================================== }
GEM_UNCUT_SAPPHIRE:
with MSI_Items[whichItem] do
begin
Name := 'Uncut sapphire';
UpText := ['ut sapp'];
Colors := [7475984];
Tol := 3;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
GEM_UNCUT_EMERALD:
with MSI_Items[whichItem] do
begin
Name := 'Uncut emerald';
UpText := ['ut emer'];
Colors := [1206543];
Tol := 3;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
GEM_UNCUT_RUBY:
with MSI_Items[whichItem] do
begin
Name := 'Uncut ruby';
UpText := ['ut rub'];
Colors := [791129];
Tol := 3;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
GEM_UNCUT_DIAMOND:
with MSI_Items[whichItem] do
begin
Name := 'Uncut diamond';
UpText := ['ut diamo'];
Colors := [9145233];
Tol := 3;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
{ MISC ITEMS ================================= ]
[============================================= }
MISC_BIRD_NEST:
with MSI_Items[whichItem] do
begin
Name := 'Bird''s nest';
UpText := ['s nest'];
Colors := [3489088];
Tol := 11;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
MISC_FEATHER:
with MSI_Items[whichItem] do
begin
Name := 'Feather';
UpText := ['eather'];
Colors := [530952];
Tol := 5;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
{ STAFFS ===================================== ]
[============================================= }
STAFF_AIR:
with MSI_Items[whichItem] do
begin
Name := 'Staff of Air';
UpText := ['of air'];
Colors := [12235442, 13353922, 12564407];
Tol := 3;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
STAFF_WATER:
with MSI_Items[whichItem] do
begin
Name := 'Staff of Water';
UpText := ['of water'];
Colors := [11804186, 14427424, 13115933];
Tol := 3;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
STAFF_EARTH:
with MSI_Items[whichItem] do
begin
Name := 'Staff of Earth';
UpText := ['of earth'];
Colors := [3227223, 4874115, 4808066];
Tol := 3;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
STAFF_FIRE:
with MSI_Items[whichItem] do
begin
Name := 'Staff of Fire';
UpText := ['of fire'];
Colors := [1713844, 1977293, 2109145];
Tol := 3;
Stackable := False;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
{ RUNES ====================================== ]
[ ============================================ }
MSI_RUNE_AIR:
with MSI_Items[whichItem] do
begin
Name := 'Air rune';
UpText := ['Air', 'ir', 'ir r'];
Colors := [10296087];
Tol := 3;
Stackable := True;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
MSI_RUNE_WATER:
with MSI_Items[whichItem] do
begin
Name := 'Water rune';
UpText := ['er ru'];
Colors := [10296087];
Tol := 3;
Stackable := True;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
MSI_RUNE_EARTH:
with MSI_Items[whichItem] do
begin
Name := 'Earth rune';
UpText := ['th ru'];
Colors := [867676];
Tol := 3;
Stackable := True;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
MSI_RUNE_FIRE:
with MSI_Items[whichItem] do
begin
Name := 'Fire rune';
UpText := ['ire ru'];
Colors := [1515933];
Tol := 3;
Stackable := True;
DTM := MSI_LoadDTM(whichItem);
end;
MSI_RUNE_MIND:
with MSI_Items[whichItem] do
begin
Name := 'Mind rune';
UpText := ['nd run'];
Colors := [2129366, 538424];
Tol := 3;
Stackable := True;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
MSI_RUNE_BODY:
with MSI_Items[whichItem] do
begin
Name := 'Body rune';
UpText := ['ody r'];
Colors := [921102, 12656924];
Tol := 3;
Stackable := True;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
MSI_RUNE_CHAOS:
with MSI_Items[whichItem] do
begin
Name := 'Chaos rune';
UpText := ['haos'];
Colors := [2137558, 13948126, 538424];
Tol := 3;
Stackable := True;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
MSI_RUNE_DEATH:
with MSI_Items[whichItem] do
begin
Name := 'Death rune';
UpText := ['Death', 'eath rune', 'eat'];
Colors := [13948126, 921102];
Tol := 3;
Stackable := True;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
MSI_RUNE_NATURE:
with MSI_Items[whichItem] do
begin
Name := 'Nature rune';
UpText := ['ture r'];
Colors := [1408531];
Tol := 3;
Stackable := True;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
MSI_RUNE_COSMIC:
with MSI_Items[whichItem] do
begin
Name := 'Cosmic rune';
UpText := ['osmic'];
Colors := [2151638];
Tol := 3;
Stackable := True;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
MSI_RUNE_LAW:
with MSI_Items[whichItem] do
begin
Name := 'Law rune';
UpText := ['aw ru'];
Colors := [14034208];
Tol := 3;
Stackable := True;
DTM := MSI_LoadDTM(whichItem);
BlackList := MSI_GetItemBlackList(whichItem);
end;
end;
Result := (MSI_Items[whichItem].Name <> '');
end;
MSI_FindItemBL, MSI_FindItemSlotsBL, MSI_FindTool
{******************************************************************************}
{ procedure MSI_FindItemBL(InvSlot, Count, Item: Integer): Boolean; }
{ By: Camaro' }
{ Date: 09 December 2010 }
{ Description: Finds item based on its blacklist(black pixels) }
{******************************************************************************}
function MSI_FindItemBL(InvSlot, Count, Item: Integer): Boolean;
var
b: TBox;
UTBool : Boolean;
I, x, y : Integer;
begin
b := InvBox(InvSlot);
UTBool := CountColor(SRL_OUTLINE_BLACK, b.x1, b.y1, b.x2, b.y2) = Count;
if (UTBool) then
// for i := 0 to High(MSI_Items[Item].Colors) do
if FindColorTolerance(x, y, MSI_GetItemColor(Item), b.x1, b.y1, b.x2, b.y2, 3) then
begin
Result := True;
Exit;
end;
end;
{******************************************************************************}
{ procedure MSI_FindItemSlotsBL(Item: Integer): TIntegerArray; }
{ By: Camaro' }
{ Date: 09 December 2010 }
{ Description: Finds item based on its blacklist(black pixels) , searchs the }
{ inv }
{******************************************************************************}
function MSI_FindItemSlotBL(count, item: Integer): Integer;
var
i, l: Integer;
begin
for i := 1 to 28 do
if MSI_FindItemBL(i, count, item) then
Result := i;
end;
{******************************************************************************}
{ function MSI_FindTool(Tool, WhichTab: Integer; var x, y: Integer): Boolean; }
{ By: Coh3n }
{ Date: 16 October 2010 }
{ Description: Finds the specified tool }
{******************************************************************************}
function MSI_FindTool(Tool, WhichTab: Integer; var x, y: Integer): Boolean;
var
X1, X2, Y1, Y2, ISP: Integer;//ISP is the slot of the found blacklist
s: string;
TP : TPoint;
begin
if (not LoggedIn) then
Exit;
GameTab(WhichTab);
if (WhichTab = TAB_INV) then
begin
s := 'Inventory';
// Edited inventory coords
X1 := 550; X2 := 735;
Y1 := 209; Y2 := 459;
end else begin
s := 'Equipment';
// Weapon equipment box
X1 := 570; X2 := 602;
Y1 := 289; Y2 := 322;
end;
MSI_AddHeader('MSI_FindTool - Gametab: ' + s);
if (FindDTM(MSI_Items[Tool].DTM, x, y, X1, Y1, X2, Y2)) then
begin
Result := True;
MSI_Debug('Found DTM: ' + MSI_Items[Tool].Name);
if (WhichTab = TAB_INV) then
MSI_AddException(Tool, CoordsToItem(x, y));
end else//If DTM is NOT found, then it is time to search for the BlackList
begin
MSI_Debug('Failed Finding DTM: ' + MSI_Items[Tool].Name +' : Attempting Blacklists');
MSI_Debug('Item Name = '+ToStr(MSI_Items[Tool].Name)+', Items Blacklist = '+ToStr(MSI_Items[Tool].BlackList)+'');
ISP := MSI_FindItemSlotBL(MSI_Items[Tool].BlackList, Tool);
if (ISP > 0)then
begin
Result := True;
MSI_Debug('Found Blacklist: ' + MSI_Items[Tool].Name);
TP := ItemCoords(ISP);
X := TP.x;
Y := TP.y;
if (WhichTab = TAB_INV) then
MSI_AddException(Tool, ISP);
end;
end;
MSI_CloseHeader('MSI_FindTool: ' + BoolToStr(Result))
end;
If you want to test, you just gotta jack up FindTool to not find the DTM's. I changed
if (FindDTM(MSI_Items[Tool].DTM, x, y, X1, Y1, X2, Y2)) then
to
if (FindDTM(MSI_Items[Tool].DTM, x, y, X1 + 100, Y1, X2, Y2)) then
Therefore it wouldn't find any DTM's and it would test the blacklists.
Just have your tool to use for your script ( hatchet for woodcutting ). Once the script starts walking look at the debug. :)