Morgul Decay
01-15-2012, 10:09 AM
Example:
.. code-block:: pascal
MSI_SetPlayerLoc();
*)
function MSI_SetPlayerLoc(): boolean;
var
i: Integer;
locArr: TIntegerArray;
Script: TScript;
begin
if (not LoggedIn) then
Exit;
MSI_AddHeader('MSI_SetPlayerLoc');
with MSI_Players[CurrentPlayer] do
begin
Script := MSI_Scripts[Scripts[CurrentScript].Name];
SetLength(locArr, 2);
locArr[0] := Script.PathInfo.StartLoc;
locArr[1] := Script.PathInfo.EndLoc;
for i := 0 to 1 do
if (MSI_AtLocation(locArr[i], false)) then
begin
Location := locArr[i];
result := true;
break;
end else
if (i = 1) then
if (not MSI_WalkPath(script.pathInfo, ((invCount < 15) and (script.skillConst <> SKILL_RUNECRAFTING)) or ((invCount > 15) and (script.skillConst = SKILL_RUNECRAFTING)))) then
result := MSI_DeathWalk()
else
result := true;
if (result) then
MSI_Debug('Player''s location: '+MSI_Locations[Location].Name)
else
MSI_Debug('Failed to get player''s location');
end;
MSI_CloseHeader('MSI_SetPlayerLoc: '+boolToStr(result));
end;
and this:
Error: Out Of Range at line 1466
The following DTMs were not freed: [Bronze Pickaxe, Iron Pickaxe, Steel Pickaxe, Mithril Pickaxe, Adamant Pickaxe, Rune Pickaxe, Dragon Pickaxe, Bronze Hatchet, Iron Hatchet, Steel Hatchet, Mithril Hatchet, Adamant Hatchet, Rune Hatchet, Dragon Hatchet, Normal Logs, Oak Logs, Willow Logs, Maple Logs, Yew Logs, Magic Logs, Clay Ore, Copper Ore, Tin Ore, Iron Ore, Silver Ore, Coal Ore, Gold Ore, Mithril Ore, Adamantite Ore, Runite Ore, Small Fishing Net, Crayfish Cage, Fishing Rod, Fishing Bait, Fly Fishing Rod, Harpoon, Barb-Tail Harpoon, Lobster Pot, Raw Shrimps, Raw Crayfish, Raw Sardines, Raw Anchovies, Raw Herring, Raw Trout, Raw Pike, Raw Salmon, Raw Tuna, Raw Lobster, Raw Swordfish, Raw Monkfish, Raw Shark, Cooked Shrimps, Cooked Crayfish, Cooked Sardines, Cooked Anchovies, Cooked Herring, Cooked Trout, Cooked Pike, Cooked Salmon, Cooked Tuna, Cooked Lobster, Cooked Swordfish, Cooked Monkfish, Cooked Shark, Uncut Sapphire, Uncut Emerald, Uncut Ruby, Uncut Diamond, Bird'S Nest, Feather, Staff Of Air, Staff Of Water, Staff Of Earth, Staff Of Fire, Air Rune, Body Rune, Mind Rune, Earth Rune, Fire Rune, Water Rune, Chaos Rune, Law Rune, Cosmic Rune, Death Rune, Nature Rune, Rune Essence, Pure Essence, Soft Clay, Vial, Vial Of Water, Jug, Jug Of Water, Bowl, Bowl Of Water, Bucket, Bucket Of Water, Air Tiara, Body Tiara, Mind Tiara, Earth Tiara, Fire Tiara, Water Tiara, Dwarven Army Axe, SRL - Lamp bitmap, 104]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]
File[C:\Simba\Includes\MSI\Debug Logs\15-01-12 at 12 06 00 PM.txt] has not been freed in the script, freeing it now.
.. code-block:: pascal
MSI_SetPlayerLoc();
*)
function MSI_SetPlayerLoc(): boolean;
var
i: Integer;
locArr: TIntegerArray;
Script: TScript;
begin
if (not LoggedIn) then
Exit;
MSI_AddHeader('MSI_SetPlayerLoc');
with MSI_Players[CurrentPlayer] do
begin
Script := MSI_Scripts[Scripts[CurrentScript].Name];
SetLength(locArr, 2);
locArr[0] := Script.PathInfo.StartLoc;
locArr[1] := Script.PathInfo.EndLoc;
for i := 0 to 1 do
if (MSI_AtLocation(locArr[i], false)) then
begin
Location := locArr[i];
result := true;
break;
end else
if (i = 1) then
if (not MSI_WalkPath(script.pathInfo, ((invCount < 15) and (script.skillConst <> SKILL_RUNECRAFTING)) or ((invCount > 15) and (script.skillConst = SKILL_RUNECRAFTING)))) then
result := MSI_DeathWalk()
else
result := true;
if (result) then
MSI_Debug('Player''s location: '+MSI_Locations[Location].Name)
else
MSI_Debug('Failed to get player''s location');
end;
MSI_CloseHeader('MSI_SetPlayerLoc: '+boolToStr(result));
end;
and this:
Error: Out Of Range at line 1466
The following DTMs were not freed: [Bronze Pickaxe, Iron Pickaxe, Steel Pickaxe, Mithril Pickaxe, Adamant Pickaxe, Rune Pickaxe, Dragon Pickaxe, Bronze Hatchet, Iron Hatchet, Steel Hatchet, Mithril Hatchet, Adamant Hatchet, Rune Hatchet, Dragon Hatchet, Normal Logs, Oak Logs, Willow Logs, Maple Logs, Yew Logs, Magic Logs, Clay Ore, Copper Ore, Tin Ore, Iron Ore, Silver Ore, Coal Ore, Gold Ore, Mithril Ore, Adamantite Ore, Runite Ore, Small Fishing Net, Crayfish Cage, Fishing Rod, Fishing Bait, Fly Fishing Rod, Harpoon, Barb-Tail Harpoon, Lobster Pot, Raw Shrimps, Raw Crayfish, Raw Sardines, Raw Anchovies, Raw Herring, Raw Trout, Raw Pike, Raw Salmon, Raw Tuna, Raw Lobster, Raw Swordfish, Raw Monkfish, Raw Shark, Cooked Shrimps, Cooked Crayfish, Cooked Sardines, Cooked Anchovies, Cooked Herring, Cooked Trout, Cooked Pike, Cooked Salmon, Cooked Tuna, Cooked Lobster, Cooked Swordfish, Cooked Monkfish, Cooked Shark, Uncut Sapphire, Uncut Emerald, Uncut Ruby, Uncut Diamond, Bird'S Nest, Feather, Staff Of Air, Staff Of Water, Staff Of Earth, Staff Of Fire, Air Rune, Body Rune, Mind Rune, Earth Rune, Fire Rune, Water Rune, Chaos Rune, Law Rune, Cosmic Rune, Death Rune, Nature Rune, Rune Essence, Pure Essence, Soft Clay, Vial, Vial Of Water, Jug, Jug Of Water, Bowl, Bowl Of Water, Bucket, Bucket Of Water, Air Tiara, Body Tiara, Mind Tiara, Earth Tiara, Fire Tiara, Water Tiara, Dwarven Army Axe, SRL - Lamp bitmap, 104]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]
File[C:\Simba\Includes\MSI\Debug Logs\15-01-12 at 12 06 00 PM.txt] has not been freed in the script, freeing it now.