Paste #57817: test

Date: 2019/09/06 00:29:15 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


necrosynth_script:
    type: world
    debug: true
    events:
        on player clicks with necrosynth_item:
            if <player> == "ee9c8f5d-4879-4c25-bd24-2848af3aea75":
                if <player.is_sneaking> == true:
                    if <player.flag[necrospell]> == fireball:
                        - flag player necrospell:teleport
                        - narrate "<&f><&l>[<&5><&l>Necrosynth<&f><&l>] <&9><&l>Set to Teleport"
                        - queue clear
                    if <player.flag[necrospell]> == teleport:
                        - flag player necrospell:manipulate
                        - narrate "<&f><&l>[<&5><&l>Necrosynth<&f><&l>] <&9><&l>Set to Manipulate"
                        - queue clear
                    if <player.flag[necrospell]> == manipulate:
                        - flag player necrospell:throw
                        - narrate "<&f><&l>[<&5><&l>Necrosynth<&f><&l>] <&9><&l>Set to Throw"
                        - queue clear
                    if <player.flag[necrospell]> == throw:
                        - flag player necrospell:split
                        - narrate "<&f><&l>[<&5><&l>Necrosynth<&f><&l>] <&9><&l>Set to Split"
                        - queue clear
                    if <player.flag[necrospell]> == split:
                        - flag player necrospell:fireball
                        - narrate "<&f><&l>[<&5><&l>Necrosynth<&f><&l>] <&9><&l>Set to Fireball"
                        - queue clear
                if <context.click_type> contains LEFT_CLICK:
                    if <player.flag[necrospell]> == teleport:
                        - run necrospell_weak_teleport
                    if <player.flag[necrospell]> == fireball:
                        - run necrospell_weak_fireball
                    if <player.flag[necrospell]> == manipulate:
                        - run necrospell_weak_manipulate
                if <context.click_type> contains RIGHT_CLICK:
                    if <player.flag[necrospell]> == teleport:
                        - run necrospell_strong_teleport
                    if <player.flag[necrospell]> == fireball:
                        - run necrospell_strong_fireball
                    if <player.flag[necrospell]> == throw:
                        - run necrospell_strong_throw
                    if <player.flag[necrospell]> == split:
                        - run necrospell_strong_split
            else:
                - narrate "<&5><&o>You lost the book!"
                - take iteminhand

        on player breaks block with necrosynth_item:
            - determine CANCELLED
        on player damages block with necrosynth_item:
            - determine CANCELLED
        on entity breaks hanging:
            if <player.item_in_hand> contains necrosynth_item:
                - determine CANCELLED