Bad Boy JH
2010-10-10 23:56:29
I am currently using TriBot to try and fix up GroundItems, which I really want for a script. I ran into something weird in part of it
F is made true at the beginning, and then on the first loop through the procedure, is made false, and then is left that way, thats the only two changes to the variable 'F', perhaps removing it, and having
function GetItemNodeList(ID: Integer; Info: TCacheInfo): integer;
var
Node, NextNode, D2NextNode, NodeID, i, index: integer;
F: Boolean;
begin
[B] F := true;[/B]
Result := 0;
try
Index := ID and (Info.NLength - 1);
Node := SmartGetFieldArrayObject(Info.Nodes, '', Index);
for i := Index downto Index-10 do
begin
[B]if not F then[/B]
begin
Node := SmartGetFieldObject(D2NextNode, hook_node_next);
SmartFreeObject(D2NextNode);
end else
[B]F := false;[/B]
NodeID := SmartGetFieldLongL(Node, hook_node_GetID);
if(NodeID = ID)then
begin
Result := SmartGetFieldObject(Node, hook_nodelistcache_GetNodeList);
Break;
end;
NextNode := SmartGetFieldObject(Node, hook_node_Previous);
SmartFreeObject(Node);
D2NextNode := SmartGetFieldObject(NextNode, hook_node_Previous);
SmartFreeObject(NextNode);
end;
finally
SmartFreeObject(Node);
SmartFreeObject(NextNode);
SmartFreeObject(D2NextNode);
end;
end;F is made true at the beginning, and then on the first loop through the procedure, is made false, and then is left that way, thats the only two changes to the variable 'F', perhaps removing it, and having
for I := index - 1 downto Index - 10 door is this there for some reason incomprehensible to my tiny mind…