Jump to content

Sio script


Smthre

Recommended Posts

  • 1 month later...

I'm not sure what problem you're running into, but here's something that might help.

I don't have a druid at the moment, so it's only been able to tested through the console.

 

------------------------------------
-- 	Heal Friend with Spell
--		 by Tokumei
------------------------------------
-- 	  Version 1.0 (21/10/2021)
------------------------------------


-- Edit this part --
local friendName = "Tokumei"  	-- insert your friends name here
local healPercent = 70			-- the % of HP you want to heal your friend at (eg 70%)
local spell = 'Exura sio "'		-- Spell to use for healing your friend
local spellCD = 1000			-- what is the internal cooldown of the spell (1000 = 1second)

-- Don't edit this unless you know what you're doing --
local friend  
local friendHP
local creatures = g_game.getCreatures()

friendHeal = function(s, f)
	g_game.talk(spell..friendName)
end

friendCheck = function(pN, m)
	for v,k in pairs(creatures) do
		if k:getName() == friendName and k:isPlayer() then
			friend = k:getName()
			friendHP = k:getHealthPercent()
			friend = true
			break
		else
			friend = false
		end
	end
	return friend 
end

if friendCheck(friendName, creatures) then 
	if friendHP <= healPercent then 
		friendHeal(spell, friendName)
		sleep(spellCD, spellCD+100)
	end
end

auto(100,150)

 

This script is a persistent script that should run and check if your friend need a heal every 0.1 to 0.15 seconds. I don't know what the internal cooldown of sio is for you so left that as a variable.

Let me know if it works well.

- Tokumei

Link to comment
Share on other sites

×
×
  • Create New...