-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsenzu.lua
95 lines (81 loc) · 2.45 KB
/
senzu.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
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
UI.Separator()
UI.Label("health & Mana potions/runes")
-- Configuración inicial de los ítems de salud y maná
if type(storage.hpitem1) ~= "table" then
storage.hpitem1 = {
title = "HP%",
item = 11862,
min = 0,
max = 90,
on = false
}
end
if type(storage.hpitem2) ~= "table" then
storage.hpitem2 = {
title = "HP%",
item = 11862,
min = 0,
max = 45,
on = true
}
end
if type(storage.manaitem1) ~= "table" then
storage.manaitem1 = {
title = "MP%",
item = 11862,
min = 0,
max = 90,
on = false
}
end
if type(storage.manaitem2) ~= "table" then
storage.manaitem2 = {
title = "MP%",
item = 11862,
min = 0,
max = 20,
on = true
}
end
-- Configuración inicial del ítem de 'power'
if type(storage.powerItem) ~= "table" then
storage.powerItem = {
title = "Power Item",
item = 11863, -- Reemplaza con el identificador real del ítem.
min =1, -- Establece el valor mínimo de 'power' para usar el ítem.
max = 5, -- Establece el valor máximo de 'power' para usar el ítem.
on = true
}
end
-- Macro para el uso de pociones de salud, maná y el ítem de 'power'
for i, healingInfo in ipairs({
storage.hpitem1,
storage.hpitem2,
storage.manaitem1,
storage.manaitem2
}) do
local healingmacro = macro(20, function ()
local hp = i <= 2 and player:getHealthPercent() or math.min(100, math.floor(100 * player:getMana() / player:getMaxMana()))
if hp <= healingInfo.max and healingInfo.min <= hp then
use(healingInfo.item)
end
end)
healingmacro.setOn(healingInfo.on)
UI.DualScrollItemPanel(healingInfo, function (widget, newParams)
healingInfo = newParams
healingmacro.setOn(healingInfo.on and healingInfo.item > 100)
end)
end
-- Macro específico para el ítem de 'power'
local powerMacro = macro(20, function()
local power = soul() -- Reemplaza con el método correcto para obtener el 'power'.
if power <= storage.powerItem.max and storage.powerItem.on then
use(storage.powerItem.item)
end
end)
powerMacro.setOn(storage.powerItem.on)
-- Interfaz de usuario para el ítem de 'power'
UI.DualScrollItemPanel(storage.powerItem, function(widget, newParams)
storage.powerItem = newParams
powerMacro.setOn(storage.powerItem.on and storage.powerItem.item > 100)
end)