Date: 2020/03/05 08:15:15 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# +----------------------
# |
# | XP Bottler
# |
# | Simple script to bottle and save your XP
# |
# +----------------------
#
# @author Civalo
# @date 2020/03/04
# @denizen-build REL-1703
# @script-version 1.1
#
# Installation:
# Just put the script in your denizen scripts folder and reload. (/ex reload)
#
# Thanks to mcmonkey for pushing updates to Denizen to make this all work right!
# ---------------------------- END HEADER ----------------------------
# --------------------------- World Scripts --------------------------
XpBottler:
type: world
debug: false
events:
on player right clicks with XpEmpty using hand:
- if <player.xp_total> >= 100:
- narrate <player.xp_total>
- take xp quantity:100
- give Xp100
- take XpEmpty quantity:1
- else:
- narrate "<red>You don't have enough XP"
# Flag the player for item used
on player right clicks with Xp100:
- flag player xpBottleValue:100
on player right clicks with Xp400:
- flag player xpBottleValue:400
on player right clicks with Xp900:
- flag player xpBottleValue:900
on experience bottle breaks:
- if <context.entity.shooter.has_flag[xpBottleValue]>:
- define value <context.entity.shooter.flag[xpBottleValue]>
- flag player xpBottleValue:!
- determine experience:<[value]>
# --------------------------- Item Scripts ---------------------------
XpEmpty:
type: item
material: glass_bottle
display name: <gold>Empty Bottle O' Enchanting
lore:
- This XP bottle is empty
- Right Click with it in your hand to fill it
enchantments:
- unbreaking:1
mechanisms:
flags: HIDE_ENCHANTS
recipes:
1:
type: shaped
output_quantity: 8
input:
- glass_bottle|glass_bottle|glass_bottle
- glass_bottle|prismarine_crystals|glass_bottle
- glass_bottle|glass_bottle|glass_bottle
Xp100:
type: item
material: experience_bottle
display name: <gold> 100 XP Bottle O' Enchanting
lore:
- <green>This bottle contains 100 XP points
recipes:
1:
type: shapeless
output_quantity: 9
input: Xp900
2:
type: shapeless
output_quantity: 4
input: Xp400
Xp400:
type: item
material: experience_bottle
display name: <gold> 400 XP Bottle O' Enchanting
lore:
- <green>This bottle contains 400 XP points
recipes:
1:
type: shapeless
output_quantity: 1
input: Xp100|Xp100|Xp100|Xp100
Xp900:
type: item
material: experience_bottle
display name: <gold> 900 XP Bottle O' Enchanting
lore:
- <green>This bottle contains 900 XP points
recipes:
1:
type: shapeless
output_quantity: 1
input: Xp100|Xp100|Xp100|Xp100|Xp100|Xp100|Xp100|Xp100|Xp100