Counting drinks(solved)

I want to count the amount of whiskys drunk to print a message and fall down drunk.

You can add an attribute to player call it Drunk and make it an integer and make integer 6. Then make a object called whiskey, in whisky make attribute called DrinksTaken and make integer, then in whiskey add a verb called drink then add run script then input this.

IncreaseObjectCounter (whiskey, "DrinksTaken")
msg ("Took a drink.")
if (whiskey.DrinksTaken >= player.Drunk) {
  msg ("You passout on floor.")

After you take 6th drink you passout and game is over. You can do what ever you like just added that for effect. Also you can change Drunk player attribute to any number now to get that effect.

You might also want to have a look at this discussion page. It also adds an effect that blurs the text as you get increasingly drunk.

Thanks .took a few tries but it's working now.I am so drunk.

Never drink and text adventure. Always have a designated Quester.

This topic is now closed. Topics are closed after 60 days of inactivity.