Trigger: no more potions
Then the check for if you should quaff:
Trigger: your prompt trigger
And lastly on the healing success:
Trigger: I drank it!
The display() function calls are to check the value of the variables(As per your last statement in previous post), so you can comment them out when you've got it working(anything after "--" (minus the quotes) in lua is a comment, see the comment after the optional color echo telling you you're out of potions). You may also want to declare them at the top of a script like so:
It can sometimes help to have one script object just to initialize variables. Just don't initialize them with simple statements like:
quaffing = false
Because if you do, and you click on the script in the middle of trying to quaff, it will set quaffing back to false and try to drink again. I know this isn't real likely, but if it did happen it'd drive you batty trying to figure out why.