I'd like to use the potions that are dropped from monsters as required.

Example: I once wore something like this:

if itemcount (236)> 0 and $ hp <= 2300 then
useoncreature ()
end

I do not know if this command is right, but would like something like this.

Thanks guys.