Potion Editavel

Descrição

Potion editavel facilmente

Autor:

                
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
UI.Separator() if type(storage.hpitem1) ~= "table" then storage.hpitem1 = {on=false, title="HP%", item=266, min=51, max=90} end if type(storage.hpitem2) ~= "table" then storage.hpitem2 = {on=false, title="HP%", item=3160, min=0, max=50} end if type(storage.manaitem1) ~= "table" then storage.manaitem1 = {on=false, title="MP%", item=268, min=51, max=90} end if type(storage.manaitem2) ~= "table" then storage.manaitem2 = {on=false, title="MP%", item=3157, min=0, max=50} end 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 healingInfo.max >= hp and hp >= healingInfo.min then if TargetBot then TargetBot.useItem(healingInfo.item, healingInfo.subType, player) else local thing = g_things.getThingType(healingInfo.item) local subType = g_game.getClientVersion() >= 860 and 0 or 1 if thing and thing:isFluidContainer() then subType = healingInfo.subType end g_game.useInventoryItemWith(healingInfo.item, player, subType) end end end) healingmacro.setOn(healingInfo.on) UI.DualScrollItemPanel(healingInfo, function(widget, newParams) healingInfo = newParams healingmacro.setOn(healingInfo.on and healingInfo.item > 100) end) end if g_game.getClientVersion() < 780 then UI.Label("In old tibia potions & runes work only when you have backpack with them opened") end UI.Separator()