SRL Archive - Bugs

GroundItems


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
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 do
or is this there for some reason incomprehensible to my tiny mind…

mormonman

2010-10-11 00:01:19

That's just so it starts on the first node.

Bad Boy JH

2010-10-11 01:17:31

then why not have the
for I := index - 1 downto Index - 10 do
instead…

or does this have something to do with the try except,

EDIT: right I see why not

can we not try and copy most of this from Tribot, I have trilez's permission, but clearly I didn't have enough java knowledge to actually do it.

i luffs yeww

2010-10-11 01:27:27

As far as I know, the problem is in SMART, not our reflection methods.

mormonman

2010-10-11 01:45:49

From: Bad Boy JH
then why not have the
for I := index - 1 downto Index - 10 do
instead…

or does this have something to do with the try except,


because the node does not start at 0. its a dynamic number.

pyroryan

2010-10-11 15:57:47

A few people are working with me on GroundItems. We do have a detection script that has worked for about half an hour (before I stopped the script). Its still in the testing phase and I still need to add a set of backup patterns to my updater.

Narcle

2010-10-11 16:42:48

From: pyroryan
A few people are working with me on GroundItems. We do have a detection script that has worked for about half an hour (before I stopped the script). Its still in the testing phase and I still need to add a set of backup patterns to my updater.


Are you guys checking with SMARTs source? Last time I did GroundItems it would just bog down after awhile. I did various testing with Drags at the time but could never stop the leak or w/e happening in SMART.

Naike

2010-10-11 16:59:09

From: Narcle
Are you guys checking with SMARTs source? Last time I did GroundItems it would just bog down after awhile. I did various testing with Drags at the time but could never stop the leak or w/e happening in SMART.


Did you guys tell BenLand?

pyroryan

2010-10-11 17:01:53

From: Narcle
Are you guys checking with SMARTs source? Last time I did GroundItems it would just bog down after awhile. I did various testing with Drags at the time but could never stop the leak or w/e happening in SMART.


175 mb after 30 minutes of sitting there recording the ground (manually moved the player to spots where players were dropping fish at barb village). No Simba crashes.

Narcle

2010-10-11 17:50:06

From: pyroryan
175 mb after 30 minutes of sitting there recording the ground (manually moved the player to spots where players were dropping fish at barb village). No Simba crashes.


When I tested it it wasn't a ram leak it was something else. The ram used didn't change but it would still bog down or stop completely.

Bad Boy JH

2010-10-11 21:13:16

hmmm, I am glad people are trying, it just seemed like people weren't, so I thought there couldn't be any harm if I tried.

Narcle

2010-10-12 02:43:12

Pyroryan got your message. I look forward to the release. Been wanting it for awhile now.