Explain what you mean that it "doesnt work" for you.
The custom refill value is picks a random number between the 2 values you set and will refill when the cannon has less cannonballs remaining than that randomly choosen value.
If you set the values too low based on the location you are cannoning at it will run out before the script can react.