You can create a set of button fields with the images as their icons and then show/hide those buttons based on the value entered by the user. By the way, if you only want the user to enter specific values (0-3, for example) you should use a drop-down field instead of a text field. You can still use the same validation script, though.
You need to use JS, because it's conditional on the value of the other fields.
You can integrate the code into your existing code. Let's say you have a button field called "PainImage" and you want to show it when the Deepsquat field equals zero. You can add this code to your existing code:
this.getField("PainImage").display = (Deepsquat == "0") ? display.visible : display.hidden;
Repeat the same for the other image fields, and it should work as you've described.
This worked perfect, thank you very much!