· 8 years ago · Apr 03, 2018, 06:26 PM
1# COPYRIGHT MCSKRIPTS.DK ALLE RETTIGHEDER FORBEHOLDT #
2# DETTE SKRIPT MÅ IKKE VIDERESÆLGES #
3
4on load:
5 if folder "plugins/SkriptEnchant" doesn't exists:
6 create folder "plugins/SkriptEnchant"
7 if file "plugins/SkriptEnchant/prefix.yml" doesn't exists:
8 create file "plugins/SkriptEnchant/prefix.yml"
9 wf "Prefix: '&3&lENCHANT &8»'" to "plugins/SkriptEnchant/prefix.yml"
10
11 wait 2 ticks
12 set {Prefix::YAML} to coloured value "Prefix" get of "plugins/SkriptEnchant/prefix.yml"
13on right click on enchantment table:
14 cancel event
15 execute player command "enchant"
16
17
18command /enchant [<text>]:
19 trigger:
20 if arg-1 is not set:
21 open chest with 5 rows named "&3&lENCHANT" to player
22 wait 3 ticks
23 format slot 0 of player with 160:11 named "&r" to be unstealable
24 format slot 1 of player with 160:3 named "&r" to be unstealable
25 format slot 2 of player with 160:11 named "&r" to be unstealable
26 format slot 3 of player with 160:3 named "&r" to be unstealable
27 format slot 4 of player with 160:11 named "&r" to be unstealable
28 format slot 5 of player with 160:3 named "&r" to be unstealable
29 format slot 6 of player with 160:11 named "&r" to be unstealable
30 format slot 7 of player with 160:3 named "&r" to be unstealable
31 format slot 8 of player with 160:11 named "&r" to be unstealable
32 format slot 9 of player with 160:3 named "&r" to be unstealable
33 format slot 17 of player with 160:3 named "&r" to be unstealable
34 format slot 18 of player with 160:11 named "&r" to be unstealable
35 format slot 26 of player with 160:11 named "&r" to be unstealable
36 format slot 27 of player with 160:3 named "&r" to be unstealable
37 format slot 35 of player with 160:3 named "&r" to be unstealable
38 format slot 36 of player with 160:11 named "&r" to be unstealable
39 format slot 37 of player with 160:3 named "&r" to be unstealable
40 format slot 38 of player with 160:11 named "&r" to be unstealable
41 format slot 39 of player with 160:3 named "&r" to be unstealable
42 format slot 40 of player with 160:11 named "&r" to be unstealable
43 format slot 41 of player with 160:3 named "&r" to be unstealable
44 format slot 42 of player with 160:11 named "&r" to be unstealable
45 format slot 43 of player with 160:3 named "&r" to be unstealable
46 format slot 44 of player with 160:11 named "&r" to be unstealable
47 format slot 10 of player with glowing diamond chestplate named "&aArmor" with lore "&7&m-----&r&7»" to be unstealable
48 format slot 19 of player with glowing diamond sword named "&aSværd" with lore "&7&m-----&r&7»" to be unstealable
49 format slot 28 of player with glowing bow named "&aBue" with lore "&7&m-----&r&7»" to be unstealable
50 #Armor
51 format slot 11 of player with enchanted book named "&aProtection IV" with lore "&r||&7Koster &a$&f700" to close then run [ make player execute command "enchant p4"]
52 format slot 12 of player with enchanted book named "&aProtection III" with lore "&r||&7Koster &a$&f500" to close then run [ make player execute command "enchant p3"]
53 format slot 13 of player with enchanted book named "&aProtection II" with lore "&r||&7Koster &a$&f300" to close then run [ make player execute command "enchant p2"]
54 format slot 14 of player with enchanted book named "&aProtection I" with lore "&r||&7Koster &a$&f150" to close then run [ make player execute command "enchant p1"]
55 #Sv糤
56 format slot 20 of player with enchanted book named "&aSharpness IV" with lore "&r||&7Koster &a$&f1000" to close then run [ make player execute command "enchant s4"]
57 format slot 21 of player with enchanted book named "&aSharpness III" with lore "&r||&7Koster &a$&f800" to close then run [ make player execute command "enchant s3"]
58 format slot 22 of player with enchanted book named "&aSharpness II" with lore "&r||&7Koster &a$&f600" to close then run [ make player execute command "enchant s2"]
59 format slot 23 of player with enchanted book named "&aSharpness I" with lore "&r||&7Koster &a$&f400" to close then run [ make player execute command "enchant s1"]
60 format slot 24 of player with enchanted book named "&aFire Aspect I" with lore "&r||&7Koster &a$&f700" to close then run [ make player execute command "enchant fa1"]
61 #Bue
62 format slot 29 of player with enchanted book named "&aPower IV" with lore "&r||&7Koster &a$&f900" to close then run [ make player execute command "enchant po4"]
63 format slot 30 of player with enchanted book named "&aPower III" with lore "&r||&7Koster &a$&f700" to close then run [ make player execute command "enchant po3"]
64 format slot 31 of player with enchanted book named "&aPower II" with lore "&r||&7Koster &a$&f600" to close then run [ make player execute command "enchant po2"]
65 format slot 32 of player with enchanted book named "&aPower I" with lore "&r||&7Koster &a$&f400" to close then run [ make player execute command "enchant po1"]
66 format slot 33 of player with enchanted book named "&aPunch I" with lore "&r||&7Koster &a$&f600" to close then run [ make player execute command "enchant pu1"]
67 format slot 34 of player with enchanted book named "&aFlame I" with lore "&r||&7Koster &a$&f550" to close then run [ make player execute command "enchant f1"]
68 if arg-1 is "p4":
69 if player is holding a diamond chestplate, diamond helmet, diamond leggings or diamond boots:
70 if player's balance is between 700 and 100000000:
71 send "%{Prefix::YAML}%&7 Du købte &aProtection 4 :)"
72 subtract 700 from player's balance
73 enchant tool of player with protection 4
74 if arg-1 is "p3":
75 if player is holding a diamond chestplate, diamond helmet, diamond leggings or diamond boots:
76 if player's balance is between 500 and 100000000:
77 send "%{Prefix::YAML}%&7 Du købte &aProtection 3 :)"
78 subtract 500 from player's balance
79 enchant tool of player with protection 3
80 if arg-1 is "p2":
81 if player is holding a diamond chestplate, diamond helmet, diamond leggings or diamond boots:
82 if player's balance is between 300 and 100000000:
83 send "%{Prefix::YAML}%&7 Du købte &aProtection 2 :)"
84 subtract 500 from player's balance
85 enchant tool of player with protection 2
86 if arg-1 is "p1":
87 if player is holding a diamond chestplate, diamond helmet, diamond leggings or diamond boots:
88 if player's balance is between 300 and 100000000:
89 send "%{Prefix::YAML}%&7 Du købte &aProtection 1 :)"
90 subtract 150 from player's balance
91 enchant tool of player with protection 1
92 if arg-1 is "s4":
93 if player is holding a diamond sword:
94 if player's balance is between 1000 and 100000000:
95 send "%{Prefix::YAML}%&7 Du købte &aSharpness 4 :)"
96 subtract 1000 from player's balance
97 enchant tool of player with sharpness 4
98 if arg-1 is "s3":
99 if player is holding a diamond sword:
100 if player's balance is between 800 and 100000000:
101 send "%{Prefix::YAML}%&7 Du købte &aSharpness 3 :)"
102 subtract 800 from player's balance
103 enchant tool of player with sharpness 3
104 if arg-1 is "s2":
105 if player is holding a diamond sword:
106 if player's balance is between 600 and 100000000:
107 send "%{Prefix::YAML}%&7 Du købte &aSharpness 2 :)"
108 subtract 600 from player's balance
109 enchant tool of player with sharpness 2
110 if arg-1 is "s1":
111 if player is holding a diamond sword:
112 if player's balance is between 400 and 100000000:
113 send "%{Prefix::YAML}%&7 Du købte &aSharpness 1 :)"
114 subtract 400 from player's balance
115 enchant tool of player with sharpness 1
116
117 if arg-1 is "fa1":
118 if player is holding a diamond sword:
119 if player's balance is between 700 and 100000000:
120 send "%{Prefix::YAML}%&7 Du købte &aFire Aspect 1 :)"
121 subtract 700 from player's balance
122 enchant tool of player with fire aspect 1
123 if arg-1 is "po4":
124 if player is holding a bow:
125 if player's balance is between 900 and 100000000:
126 send "%{Prefix::YAML}%&7 Du købte &aPower 4 :)"
127 subtract 900 from player's balance
128 enchant tool of player with power 4
129 if arg-1 is "po3":
130 if player is holding a bow:
131 if player's balance is between 700 and 100000000:
132 send "%{Prefix::YAML}%&7 Du købte &aPower 3 :)"
133 subtract 700 from player's balance
134 enchant tool of player with power 3
135 if arg-1 is "po2":
136 if player is holding a bow:
137 if player's balance is between 600 and 100000000:
138 send "%{Prefix::YAML}%&7 Du købte &aPower 2 :)"
139 subtract 600 from player's balance
140 enchant tool of player with power 2
141 if arg-1 is "po1":
142 if player is holding a bow:
143 if player's balance is between 400 and 100000000:
144 send "%{Prefix::YAML}%&7 Du købte &aPower 1 :)"
145 subtract 400 from player's balance
146 enchant tool of player with power 1
147 if arg-1 is "pu1":
148 if player is holding a bow:
149 if player's balance is between 600 and 100000000:
150 send "%{Prefix::YAML}%&7 Du købte &aPunch 1 :)"
151 subtract 600 from player's balance
152 enchant tool of player with punch 1
153 if arg-1 is "f1":
154 if player is holding a bow:
155 if player's balance is between 550 and 100000000:
156 send "%{Prefix::YAML}%&7 Du købte &aFlame 1 :)"
157 subtract 550 from player's balance
158 enchant tool of player with flame 1