Date: 2020/05/18 21:42:08 UTC-07:00
Type: Denizen Script
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