Here's code that should do what you want (take what you need from it in terms of the command):
<!--Saved by Quest 5.5.5328.26617-->
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="drinktest">
<gameid>f9a6d4f3-d97c-4fe0-a0f1-362733077258</gameid>
<version>1.0</version>
<firstpublished>2014</firstpublished>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<alclevel type="int">0</alclevel>
<drink type="script"><![CDATA[
if (player.alclevel = 0) {
msg ("You take a healthy gulp of wine. It's got quite a kick to it, and you feel light-headed almost at once.")
player.alclevel = 10
} else if (player.alclevel <= 10) {
msg ("You take another healthy guzzle from the bottle. You're starting to feel more confident. And tough! In fact, you feel like you could take on the world and lick it with one hand tied behind your back! You're not scared of anything!")
player.alclevel = 20
} else {
msg ("You take a long, sloppy draft from the bottle. You're so plastered now you're having trouble staying upright. You sit down, head spinning, and clutch the bottle, the beautiful, beautiful bottle, like a lifeline in a storm.<br/><br/>After a few minutes of frantic effort by your liver, you jerk awake, feeling a little sick, but sober.")
player.alclevel = 0
}
]]></drink>
</object>
</object>
<turnscript name="alclevel_turnscript">
<enabled />
<script><![CDATA[
if (player.alclevel <> 0) {
player.alclevel = player.alclevel - 1
if (player.alclevel = 0) {
msg ("<br/>Your head feels perfectly clear again.")
} else if (player.alclevel = 10) {
msg ("<br/>You're beginning to sober up, and your bravado fades a little as you remember the dangers of your situation.")
}
}
]]>
</script>
</turnscript>
<command name="drinkcommand">
<pattern>drink</pattern>
<script>
do(player, "drink")
</script>
</command>
</asl>
The core parts are the "drink" script:
<drink type="script"><![CDATA[
if (player.alclevel = 0) {
msg ("You take a healthy gulp of wine. It's got quite a kick to it, and you feel light-headed almost at once.")
player.alclevel = 10
} else if (player.alclevel <= 10) {
msg ("You take another healthy guzzle from the bottle. You're starting to feel more confident. And tough! In fact, you feel like you could take on the world and lick it with one hand tied behind your back! You're not scared of anything!")
player.alclevel = 20
} else {
msg ("You take a long, sloppy draft from the bottle. You're so plastered now you're having trouble staying upright. You sit down, head spinning, and clutch the bottle, the beautiful, beautiful bottle, like a lifeline in a storm.<br/><br/>After a few minutes of frantic effort by your liver, you jerk awake, feeling a little sick, but sober.")
player.alclevel = 0
}
]]></drink>
and the turn script:
<turnscript name="alclevel_turnscript">
<enabled />
<script><![CDATA[
if (player.alclevel <> 0) {
player.alclevel = player.alclevel - 1
if (player.alclevel = 0) {
msg ("<br/>Your head feels perfectly clear again.")
} else if (player.alclevel = 10) {
msg ("<br/>You're beginning to sober up, and your bravado fades a little as you remember the dangers of your situation.")
}
}
]]>
</script>
</turnscript>
Let me know if you have any questions or problems.