Counting drinks(solved)

spamoid1
06 Aug 2019, 18:21I want to count the amount of whiskys drunk to print a message and fall down drunk.

onimike
06 Aug 2019, 20:51You 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.")
finish
}
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.

Doctor Agon
06 Aug 2019, 22:26You 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.
https://textadventures.co.uk/forum/quest/topic/4947/getting-drunk

spamoid1
18 Aug 2019, 17:08Thanks .took a few tries but it's working now.I am so drunk.
jmnevil54
18 Aug 2019, 23:11Never drink and text adventure. Always have a designated Quester.