Paste #15552: same issue

Date: 2015/05/04 13:02:25 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


"fortTulipMusic":
    type: world
    debug: true

    default constants:

        whiteNote: l@364.0,68.0,161.0,world
        redNote: l@362.0,68.0,161.0,world
        goldNote: l@360.0,68.0,161.0,world
        blueNote: l@358.0,68.0,161.0,world

        correctNotes: 2|3|1|4|2

    events:
        on player clicks note_block:
        - if <player.flag[tulipFirstNote]||false> == false {
            - flag player noteBoxList:0|0|0|0|0
            - flag player tulipFirstNote:true
        }

        - if <context.location> == <script.constant[whiteNote]> {
            - if <player.flag[currentNote]||0> < 5 {
                - flag <player> currentNote:++ 
                - narrate "You clicked on the white note. Count: <player.flag[currentNote]>"
                - flag player noteBoxList[<player.flag[currentNote].as_list>]:1
            } else {
                - flag <player> currentNote:1
                - narrate "You clicked on the white note. Count: <player.flag[currentNote]>"
                - flag player noteBoxList[<player.flag[currentNote].as_list>]:1 }
        }

        - if <context.location> == <script.constant[redNote]> {
            - if <player.flag[currentNote]||0> < 5 {
                - flag <player> currentNote:++ 
                - narrate "You clicked on the <dark_red>red<reset> note. Count: <player.flag[currentNote]>"
                - flag player noteBoxList[<player.flag[currentNote].as_list>]:2
            } else {
                - flag <player> currentNote:1
                - narrate "You clicked on the <dark_red>red<reset> note. Count: <player.flag[currentNote]>"
                - flag player noteBoxList[<player.flag[currentNote].as_list>]:2 }
        }

        - if <context.location> == <script.constant[goldNote]> {
            - if <player.flag[currentNote]||0> < 5 {
                - flag <player> currentNote:++ 
                - narrate "You clicked on the <gold>gold<reset> note. Count: <player.flag[currentNote]>"
                - flag player noteBoxList[<player.flag[currentNote].as_list>]:3 
            } else {
                - flag <player> currentNote:1
                - narrate "You clicked on the <gold>gold<reset> note. Count: <player.flag[currentNote]>" 
                - flag player noteBoxList[<player.flag[currentNote].as_list>]:3 }
        }

        - if <context.location> == <script.constant[blueNote]> {
            - if <player.flag[currentNote]||0> < 5 {
                - flag <player> currentNote:++ 
                - narrate "You clicked on the <blue>blue<reset> note. Count: <player.flag[currentNote]>"
                - flag player noteBoxList[<player.flag[currentNote].as_list>]:4 
            } else {
                - flag <player> currentNote:1
                - narrate "You clicked on the <blue>blue<reset> note. Count: <player.flag[currentNote]>"
                - flag player noteBoxList[<player.flag[currentNote].as_list>]:4 }
        }