Eg replacement of fresh meat on rotten meat.
In stores, I realized how to do, but how I do not know in a backpack.
Mods
Food spoilage
Food spoilage
1

alteritem
local $x,$z,$id,$tmp1,$tmp2,$tmp3,$tmp4;
$x=getx("unit",1);
$z=getz("unit",1);
if (this condition is true or false) {
$tmp1=count_stored("unit",1,FreshMeatID); //if he has 10 $tmp1=10
$tmp2=4; //the rotted meat count if you want for $tmp2=4
$id=create("item",RottedMeatID,$x,$z,$tmp2); //create the 4 rotted meat at player postion x,z
store $id,"unit",1; //store the ID 4 rotted meat in the players backpack
$tmp3=$tmp1-$tmp2; //6=10-4
$tmp4=$tmp1-$tmp3; //4=10-6
freestored "unit",1,FreshMeatID,$tmp4; //delete $tmp4...your simply deleting 4, leaving 6 in the backpack
}
JasJack67: your example is way too complicated again and it missed the point of what I said:
2 meat on day 1
5 meat on day 2
3 meat on day 3
...
random variance), you'd have to start a timer each time a piece of meat is created.
on day 1 you start 2 timers
on day 2 you start 5 timers so you have 7
on day 3 you start 3 timers so you have 10 and after that the 2 timers from day 1 time out which still leaves you with 8 timers
...
would lag probably.
1
