wklejamy.pl website for sale. You are interested in. Please contact. wklejamy@gmail.com
Click to buy coffe
Untitled
Guest 105 7th Sep, 2023
function healSelf(parent)
panelName = "healSelf"
local ui = setupUI([[
Panel
height: 50
margin-top: 2
SmallBotSwitch
id: Regeneration
anchors.left: parent.left
anchors.right: parent.horizontalCenter
anchors.top: parent.top
text-align: center
margin-left: 3
margin-right: 3
HorizontalScrollBar
id: scroll
anchors.left: parent.horizontalCenter
anchors.right: parent.right
anchors.top: prev.top
margin-right: 2
margin-top: 2
minimum: 0
maximum: 100
step: 1
BotTextEdit
id: spellName
anchors.left: parent.left
anchors.right: parent.right
anchors.top: prev.bottom
margin-top: 3
]], parent)
ui:setId(panelName)
if not storage[panelName] then
storage[panelName] = {
min = 90,
spellName = "Regeneration",
}
end
ui.Regeneration:setOn(storage[panelName].enabled)
ui.Regeneration.onClick = function(widget)
storage[panelName].enabled = not storage[panelName].enabled
widget:setOn(storage[panelName].enabled)
end
local updateText = function()
ui.Regeneration:setText("Health < " .. storage[panelName].min .. "%")
end
ui.scroll.onValueChange = function(scroll, value)
storage[panelName].min = value
updateText()
end
ui.scroll:setValue(storage[panelName].min)
ui.spellName.onTextChange = function(widget, text)
storage[panelName].spellName = text
end
ui.spellName:setText(storage[panelName].spellName)
macro(1000, function()
if storage[panelName].enabled and storage[panelName].spellName:len() > 0 then
if hppercent() <= storage[panelName].min then
saySpell(storage[panelName].spellName)
end
end
end)
end
healSelf()
local distance = 2
local amountOfMonsters = 3
macro(1000, "Single/Multi Target Spell", function()
local specAmount = 0
local isSafe = true;
if not g_game.isAttacking() then
return
end
for i,mob in ipairs(getSpectators()) do
if (getDistanceBetween(player:getPosition(), mob:getPosition()) <= distance and mob:isMonster()) then
specAmount = specAmount + 1
end
if (mob:isPlayer() and player:getName() ~= mob:getName()) then
isSafe = false;
end
end
if (specAmount == amountOfMonsters and isSafe==true) then
say(storage.Spell2, 250)
else
say(storage.Spell1, 250)
end
end, batTab)
addTextEdit("Spell1", storage.Spell1 or "Single target", function(widget, text)
storage.Spell1 = text
end, batTab)
addTextEdit("Spell2", storage.Spell2 or "Multi target", function(widget, text)
storage.Spell2 = text
end)
To share this paste please copy this url and send to your friends
RAW Paste Data