• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 0.X Monster heals another monster

Joined
Apr 11, 2015
Messages
102
Reaction score
6
Hello again. Today I'm trying to do some monster' spells and I'm stuck in this one.

Its simple. One monster will heal another monster (in range) if the name is in the script. The problem is, i copied a script that i use to heal summons, and can't find another way to replace this function "
Lua:
for _, sid in ipairs(getCreatureSummons(cid)) do
".
It is in this part of the script:

Lua:
function doHealingCreatureOrc(cid, target)
            for _, sid in ipairs(getCreatureSummons(cid)) do
                    if string.lower(getCreatureName(sid)) == string.lower("orc") then
            if target == sid then
                local min = 50
                local max = 100
            return doTargetCombatHealth(cid, target, COMBAT_HEALING, min, max, CONST_ME_MAGIC_BLUE, false)
            end
            end
    end
    return false
end

Thank you.
 
Solution
so remove that:
Lua:
function doHealingCreatureOrc(cid, target)
     if string.lower(getCreatureName(target)) == string.lower("orc") then      
                local min = 50
                local max = 100
         return doTargetCombatHealth(cid, target, COMBAT_HEALING, min, max, CONST_ME_MAGIC_BLUE, false)
        end
    return false
end
so remove that:
Lua:
function doHealingCreatureOrc(cid, target)
     if string.lower(getCreatureName(target)) == string.lower("orc") then      
                local min = 50
                local max = 100
         return doTargetCombatHealth(cid, target, COMBAT_HEALING, min, max, CONST_ME_MAGIC_BLUE, false)
        end
    return false
end
 
Solution
Back
Top