Log in

View Full Version : scripts sio



yaraforce
06-12-2016, 11:07 PM
need scripts sio

yaraforce
06-12-2016, 11:10 PM
Why not work
Anyone can modify and adjust the fix




local healType = "sio" -- How would you like to heal your friends? ("sio", "ih" or "uh")

local minMana = 500 -- If your mana is below you will not heal your friends
local minManaRandomPC = 0 -- Randomize your minMana by x percent

local minHealth = 200 -- If your health is below you will not heal your friends
local minHealthRandomPC = 0 -- Randomize your minHealth by x percent

local healKnights = true -- Do you want to heal knights from your list?
local healPaladins = true -- Do you want to heal paladins from your list?
local healMages = true -- Do you want to heal mages from your list?

local healList = {
healthRandomPC = 0, -- Randomize the health percent to start healing your friends

KNIGHTS = {
defaultHealthPC = 80, -- The default health percent to heal knights at (will be ignored if the player has an own value set)
["noob"] = 80,
["noob"] = 97,
["noob"] = 0,
["noob"] = 0,
["noob"] = 0
},

PALADINS = {
defaultHealthPC = 80, -- The default health percent to heal paladins at (will be ignored if the player has an own value set)
["noob"] = 81,
["noob"] = 0,
["noob"] = 0
},

MAGES = {
defaultHealthPC = 50, -- The default health percent to heal mages at (will be ignored if the player has an own value set)
["noob"] = 50
}
}

local printActions = true -- Would you like to know what the script is currently doing? (mainly for testing)

--DO NOT EDIT BELOW!!!
if (not table.contains({"sio", "ih", "uh"}, healType:lower())) then
print("ERROR: Could not recognise healType.")
return false
end

function Self.HealWithRune(creature, rune)
if (rune == "ih") then
runeid = Item.GetID("intense healing rune")
elseif (rune == "uh") then
runeid = Item.GetID("ultimate healing rune")
end
if (Self.GetSpellCooldown("exura") <= math.random(0, 100)) then
if (printActions) then
print("Healing " .. creature:Name() .. " with " .. rune:upper() .. ". (" .. creature:HealthPercent() .. "% of health)")
end
Self.UseItemWithCreature(runeid, creature:ID())
end
end

function Self.HealWithSio(name)
if (Self.GetSpellCooldown("exura") <= math.random(0, 100)) then
if (printActions) then
print("Healing " .. name .. " with EXURA SIO. (" .. Creature(name):HealthPercent() .. "% of health)")
end
Self.Say("exura sio "" .. name)
end
end

function Self.HealFriends()
local minMana = math.max(0, math.min(Self.MaxMana(), minMana + math.random(((minMana / 100) * minManaRandomPC) * -1, (minMana / 100) * minManaRandomPC)))
local minHealth = math.max(0, math.min(Self.MaxHealth(), minHealth + math.random(((minHealth / 100) * minHealthRandomPC) * -1, (minHealth / 100) * minHealthRandomPC)))
for name, creature in Creature.iPlayers(7) do
local healthPCtoHeal = 0
if (healKnights and type(healList.KNIGHTS[""..name]) ~= "nil") then
if (healList.KNIGHTS[""..name] > 0) then
healthPCtoHeal = math.min(100, math.random(healList.KNIGHTS[""..name], healList.KNIGHTS[""..name] + healList.healthRandomPC))
else
healthPCtoHeal = math.min(100, math.random(healList.KNIGHTS.defaultHealthPC, healList.KNIGHTS.defaultHealthPC + healList.healthRandomPC))
end
elseif (healPaladins and type(healList.PALADINS[""..name]) ~= "nil") then
if (healList.PALADINS[""..name] > 0) then
healthPCtoHeal = math.min(100, math.random(healList.PALADINS[""..name], healList.PALADINS[""..name] + healList.healthRandomPC))
else
healthPCtoHeal = math.min(100, math.random(healList.PALADINS.defaultHealthPC, healList.PALADINS.defaultHealthPC + healList.healthRandomPC))
end
elseif (healMages and type(healList.MAGES[""..name]) ~= "nil") then
if (healList.MAGES[""..name] > 0) then
healthPCtoHeal = math.min(100, math.random(healList.MAGES[""..name], healList.MAGES[""..name] + healList.healthRandomPC))
else
healthPCtoHeal = math.min(100, math.random(healList.MAGES.defaultHealthPC, healList.MAGES.defaultHealthPC + healList.healthRandomPC))
end
end
if (healthPCtoHeal > 0 and creature:HealthPercent() <= healthPCtoHeal) then
if (healType:lower() == "sio") then
Self.HealWithSio(name)
else
Self.HealWithRune(creature, healType:lower())
end
break
end
end
end

while (true) do
Self.HealFriends()
wait(100, 200)
end

Trykon
06-12-2016, 11:50 PM
local friends = {
["Name"] = 70
--add how many you need}
while true do
for name, hp in friends do
local player = Creature.New(name)
If (player:HealthPercent()<hp) then
Self.Say('Exura Sio "'.. name)
Wait(1000) --spell cd
End
End
Wait(20) --for stability, increase if your fps go low
End

Should work :) im on my phone and I cannot check it. There may be problems with brackets, big letters etc, cuz of autocorrect