Date: 2022/01/18 23:39:01 UTC-08:00
Type: Denizen Script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Nullorb:
type: item
material: emerald
display name: <&d><&l>Null Orb
mechanisms:
custom_model_data: 106
lore:
- <&d><&l>Fabled <&r><&d>Consumable
- <&8><&m>⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯<&r>
- <&7>Capable of wiping enchantments from an item.
- <&7>Click on an enchanted item to delete its enchantments.
- <&c>Careful, this cannot be reverted!
nullorb_handler:
type: world
debug: false
events:
on player clicks in inventory with:nullorb:
- ratelimit <player> 5t
- if <context.item.material.name> != air:
- if <context.item.is_enchanted>:
- determine passively cancelled
- inventory adjust remove_enchantments slot:<context.slot>
- take cursoritem quantity:1
- playsound <player> sound:BLOCK_ANVIL_STEP
- define lore <context.item.lore>
- foreach lore
- if <context.item.lore.starts_with[<[★].strip_color>]>
- adjust <context.item.lore>
- wait 1t
- inventory update
- else:
- narrate "<&c>Can only be used on an enchanted item."
- playsound <player> sound:BLOCK_NOTE_BLOCK_BASS pitch:0.1
- wait 1t
- inventory update