Paste #69189: Untitled Paste

Date: 2020/05/18 21:42:08 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21


melee_hit:
    type: world
    debug: true
    events:
        on player clicks in inventory with item:
        - define dragging_item:<context.cursor_item>
        - define hotslots:|:0|1|2|3|4|5|6|7|8|9|41
        - define clicktypes:|:CONTROL_DROP|CREATIVE|DOUBLE_CLICK|MIDDLE|NUMBER_KEY|SHIFT_LEFT|SHIFT_RIGHT|UNKNOWN|WINDOW_BORDER_LEFT|WINDOW_BORDER_RIGHT

        - if !<[dragging_item].has_script>:
            - stop

        - choose <[dragging_item].script.name>:
            - case revenant_dagger:
                - if <[clicktypes].contains_any[<context.click>]>:
                    - determine cancelled
                - if <[hotslots].contains_any[<context.slot>]>:
                    - if <player.flag[attacklvl]> >= 20:
                        - stop
                    - narrate "<&c><&l>Your attack level is not high enough to use this weapon."
                    - determine cancelled