I think when i ran it it only showed the correct amount for $v84, and the rest showed as 84 of xxx items. It might have been because the item names i put in, cant remember exactly.
It should work for stacked items also, but will tell you how many stacks you have of them, and not the total. You can refine it for stacks of items.
Gimme some feedback on my first posted macro please. Good, bad or ugly. I can handle them.
If we can improve on it, I'll post over on the depot.
Im goint to try it again tonight.
Code: Select all
| -------COUNTITEMS.MAC-------
#turbo
Sub Main
/Varset v84 0
/varset v85 0
/varset v86 0
/for v1 0 to 7
/for v2 0 to $pack($v1,slots)
/delay 0
/if "$item($v1,$v2,name)"~~"$p0" /varadd v84 1
/if "$item($v1,$v2,name)"~~"$p1" /varadd v85 1
/if "$item($v1,$v2,name)"~~"$p2" /varadd v86 1
/next v2
/next v1
:echo
/echo $v84 $p0
/echo $v85 $p1
/echo $v86 $p2
/return
| -------COUNTITEMS.MAC-------
#turbo
Sub Main
/Varset v84 0
/varset v85 0
/varset v86 0
/for v1 0 to 7
/for v2 0 to $pack($v1,slots)
/delay 0
/if "$item($v1,$v2,name)"~~"$p0" /if n $v84<10 /varadd v84 1
/if "$item($v1,$v2,name)"~~"$p1" /if n $v85<10 /varadd v85 1
/if "$item($v1,$v2,name)"~~"$p2" /if n $v86<10 /varadd v86 1
/next v2
/next v1
:echo
/echo $v84 $p0
/echo $v85 $p1
/echo $v86 $p2
/return

