Cookies


Author: aufdemrand
Created: 2013-01-18T10:38:10-0500
Edited: 2013-02-16T10:30:53-0500
Denizen Version: 0.8
Views: 91
Downloads: 2234
Likes: 1


WGET
Description: COOKIES is a small interact script example for 0.8.4+
This script is kept simple to allow a base scripting example to extend upon.

Tell the npc 'cookies' and get a treat!
Note: Be sure the 'chat trigger' is enabled.


# COOKIES is a small interact script example for 0.8.4+
# This script is kept simple to allow a base scripting example to extend upon.
#
# Tell the npc 'cookies' and get a treat!
# Note: Be sure the 'chat trigger' is enabled.
#
# @author aufdemrand
# @version 1.0
# @last-updated Jan 18 2013

"Cookies":
    type: assignment

    actions:
      on assignment:
      - trigger name:chat toggle:true
      - trigger name:click toggle:true

    interact scripts:
    - 10 Cookie Greeting
 

'Cookie Greeting':
    type: interact

    steps:
        'Spreading the Word*':

            click trigger:
                script:
                - random 3
                - chat 'I like cookies!'
                - chat 'MMmm.. cookies are my favorite!'
                - chat 'Cocoa and wheat make me freak!'

            chat trigger:

                'Cookies':
                    trigger: 'I love /cookie/s!'
                    script: 
                    - chat 'Me too!'
                    - narrate '<npc.name> gives you some cookies.'
                    - give item:cookie qty:6
                    - zap 'step:Cookies given'

        'Cookies given':

            click trigger:
                script:
                - chat 'How were the cookies?'
                - zap 'step:Spreading the Word'




Comments
2013-02-04 18:11:30 - DonneR:

Works great, thanks!
2013-08-20 18:18:43 - WrennAmethyst:

The click trigger works, but I can't get the chat trigger to do anything. I downloaded this code and used it without changing anything. Where do I enable chat trigger?