Sorry, I miscommunicated. The bit about script initialization was just for reference compared to local variable speeds.
What I meant was, when the PC logs in, instead of running this on all those initial OnAcquireItems...
int nCount = GetLocalInt(oPC, "ItemCount");
SetLocalInt(oPC, "ItemCount", nCount + 1);
... you could wait until a few seconds after the PC has logged in and just do a scan to count them. Still, I dunno if that'd save you any cycles (you'd have to do a GetLocalInt() to see if the PC has finished loading, after all, so all you're avoiding is a SetLocalInt(); what you save not doing that will not likely be much more that what it costs to loop through the inventory once).
So... yeah. Silliness on my part. Carry on!
Modifié par Squatting Monk, 14 septembre 2012 - 05:32 .