01-22-2022, 04:25 AM
i need a script to heal my friend but only when my life is safe i found one searching the forum but it seems to be bugged now !
local FRIENDS = { 'knight one', 'friend to heal', 'another friend' } -- Players to sio.
local FRIENDS_HEALTH = 50 -- If hp% is lower than this then cast sio on friend.
local SAFE_HEALTH = 80 -- It will only cast sio if YOUR HP% is higher or equal than this. If you wanna ignore your hp, just setup as 0.
if connected() and cancast() and hppc() >= SAFE_HEALTH then
table.lower(FRIENDS)
local creatures = getcreatures('pfs')
for _, creature in ipairs(creatures) do
if creature.hppc <= FRIENDS_HEALTH and table.find(FRIENDS, creature.name:lower()) ~= nil then
cast('exura sio "' .. creature.name)
wait(200, 400)
break
end
end
end
reporting this error 01:22:26 - Core:Lua:ExecuteScript alt="Big Grin" title="Big Grin" class="smilie smilie_4" />oString:SIO EK: 8: '<name>' expected near ','
local FRIENDS = { 'knight one', 'friend to heal', 'another friend' } -- Players to sio.
local FRIENDS_HEALTH = 50 -- If hp% is lower than this then cast sio on friend.
local SAFE_HEALTH = 80 -- It will only cast sio if YOUR HP% is higher or equal than this. If you wanna ignore your hp, just setup as 0.
if connected() and cancast() and hppc() >= SAFE_HEALTH then
table.lower(FRIENDS)
local creatures = getcreatures('pfs')
for _, creature in ipairs(creatures) do
if creature.hppc <= FRIENDS_HEALTH and table.find(FRIENDS, creature.name:lower()) ~= nil then
cast('exura sio "' .. creature.name)
wait(200, 400)
break
end
end
end
reporting this error 01:22:26 - Core:Lua:ExecuteScript