Code:
/run local n=0; local sets={{48602,48631,1},{50324,50328,10},{51160,51164,10},{51275,51279,10}}; local slots={"HeadSlot","ShoulderSlot","ChestSlot","HandsSlot","LegsSlot"}; for i=1,#slots do local id=tonumber(({string.find(GetInventoryItemLink("player", ({GetInventorySlotInfo(slots[i])})[1]), "^\124c%x+\124Hitem:([^:]+):.*\124h%[.*%]")})[3]); for j=1,#sets do if id>=sets[j][1] and id<=sets[j][2] then n=n+sets[j][3] end end end; local a=n-math.floor(n/10)*10; local b=math.floor(n/10); print(n); print(a); print(b);
Prints 1 1 0
and
Code:
/run local n=0; local sets={{48602,48631,1},{50324,50328,10},{51160,51164,10},{51275,51279,10}}; local slots={"HeadSlot","ShoulderSlot","ChestSlot","HandsSlot","LegsSlot"}; for i=1,#slots do local id=tonumber(({string.find(GetInventoryItemLink("player", ({GetInventorySlotInfo(slots[i])})[1]), "^\124c%x+\124Hitem:([^:]+):.*\124h%[.*%]")})[3]); for j=1,#sets do if id>=sets[j][1] and id<=sets[j][2] then n=n+sets[j][3] end end end; local a=n-math.floor(n/10)*10; local b=math.floor(n/10); print(n); print(a); print(b); print(vRet); vRet=0; print(vRet); if a>1 and b<2 then vRet=1 elseif a>1 and b>1 then vRet=2 elseif b>3 then vRet=3 end; print(vRet);
Prints 1 1 0 nil 0 0
If I click this one twice, it prints 1 1 0 0 0 0 the next time.
Also, stripping down to my underwear doesn't make the macro work.