Paste #12962: Untitled Paste

Date: 2015/01/15 09:16:19 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


emotion: 
    type: world 
    events: 
        on emotion command: 
        - flag player arg1:<c.args.get[1]> 
        - if <player.flag[arg1]> == 'happy' || <player.flag[arg1]> == 'sad' && <player.has_flag[emotion]> != true  { 
          - inject <player.flag[arg1]>
          - determine fulfilled
          - queue clear          
          } 
          else if <player.flag[arg1]> == 'happy' || <player.flag[arg1]> == 'sad' && <player.has_flag[emotion]> == true {          
          - narrate '<RED>Please wait atleast 10 seconds before using emotions again.'
          - determine fulfilled
          - queue clear       
          } 
          else { 
          - narrate '<RED>Invalid command'
          - determine fulfilled
          - queue clear          
          } 


Mytask:
    type: task
    script:
    - determine passively fulfilled
    - narrate 'You have now entered cooldown mode!'     
    - flag player incooldownmode    
    - narrate 'test'
    - wait 25s
    - flag player emotion:!
    - narrate '<GREEN>You may now use emotions again.'
    - queue clear 
    - determine fulfilled

happy: 
    type: task
    script:
    - announce '<GREEN><player.name> is feeling happy.'   
    - flag player emotion:true
    - inject Mytask

sad: 
    type: task
    script:
    - announce '<GREEN><player.name> is feeling sad.'   
    - flag player emotion:true
    - inject Mytask