-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathencantamentos.lua
55 lines (42 loc) · 1.08 KB
/
encantamentos.lua
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
--ID dos encantamenros
--[[
Espada
5 Ataque Voador*
6 Afiado*
7 Caçador de Humanos
8 Caçador de animais
9 Caçador de demonios*
10 Inflamar*
11 Repelir
29 Caçador de selvagens]]--
RedBlockId=681
GreenBlockId=680
BlueBlockId=678
IdEnchant=0
SwordEnchants={5,6,10,29,9}
PickaxeEnchants={15,25}
ArmorEnchants={23,16,22,18,19}
function encantar(e)
local player =e.eventobjid
local BlockId=e.blockid
if BlockId==RedBlockId then
for i=1,#SwordEnchants do
IdEnchant=SwordEnchants[i]
Actor:addEnchant(player ,5,IdEnchant,5)
end
end
if BlockId==GreenBlockId then
for i=1,#PickaxeEnchants do
IdEnchant=PickaxeEnchants[i]
Actor:addEnchant(player ,5,IdEnchant,5)
end
Actor:addEnchant(player,5,26,3)
end
if BlockId==BlueBlockId then
for i=1,#ArmorEnchants do
IdEnchant=ArmorEnchants[i]
Actor:addEnchant(player ,5,IdEnchant,5)
end
end
end
ScriptSupportEvent:registerEvent([=[Player.ClickBlock]=],encantar)