Log in

View Full Version : IMPROVED SIO SCRIPT



tainerd420
06-27-2016, 01:12 AM
Hello guys, I need a "sio friend" script that goes like this:

self healing:

exura = 90% hp,
exura gran = 70% hp,
exura sio "myself" = 50% hp.

EK healing:

- if EK hp percentage is lower than 70% & my hp percentage is lower than 50%, heal myself with sio before EK.
- if EK hp percentage is lower than 70% & my hp percentage is between 50% and 70%, heal EK than myself with exura gran.
- if EK hp percentage is lower than 70% & my hp percentage is between 70% and 90%, heal EK than myself with exura.



I could also do it by myself and than release it if someone wants to "guide" me.

tainerd420
06-27-2016, 01:47 AM
local targets = {}
targets[#targets + 1] = { name = "MYSELF", hp = 50 }
targets[#targets + 1] = { name = "KNIGHT", hp = 70 }
targets[#targets + 1] = { name = "MYSELF", hp = 70, spell = "exura gran" }
targets[#targets + 1] = { name = "MYSELF", hp = 90, spell = "exura" }

Module("ssSio", function(module)
for k,v in ipairs(targets) do
local player = Creature(v.name)
if player:isOnScreen(false) and (player:HealthPercent() <= v.hp) then
if Self.CanCastSpell("exura") and (Self.Mana() > 100) then
if (v.spell) and (v.name == Self.Name()) then
Self.Cast(v.spell)
else
Self.Cast("exura sio "" .. v.name)
end
end
end
end
end, false)

function onSpeak(chat, msg)
chat:SendYellowMessage(Self.Name(), msg)
if (msg == "start") then
Module("ssSio"):Start()
chat:SendOrangeMessage("ssSio", "ssSio has started.")
elseif (msg == "stop") then
Module("ssSio"):Stop()
chat:SendOrangeMessage("ssSio", "ssSio has stopped.")
else
targets[#targets + 1] = { name = msg, hp = 80 }
chat:SendOrangeMessage("ssSio", "Added " .. msg .. " to the healing list.")
end
end

function onClose() end

local chat = Channel("ssSio", onSpeak, onClose)

should work? copied from another script from the forum. it said the order in the list would be the priority of healing.

EDIT: tested it by myself WITHOUT ek (solo hunt) and it heals me perfectly fine. just gotta test with EK now.