• 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!

Monster [TFS 1.2] Summon Druid. Heals master and party members.

T

tejdi

Guest
Old script: https://otland.net/threads/summon-heal-master-and-party.118211/
By @leyendario edited by @tejdi with @zbizu s help.


#1 TFS 1.2 version spam heal version:
Druid.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Druid" nameDescription="a druid" race="blood" experience="0" speed="300" manacost="300">
    <health now="180" max="180"/>
    <look type="130" head="97" body="95" legs="25" feet="59" corpse="5995"/>
    <targetchange interval="4000" chance="50"/>
    <strategy attack="10" defense="90"/>
    <flags>
        <flag summonable="1"/>
        <flag attackable="1"/>
        <flag hostile="1"/>
        <flag illusionable="0"/>
        <flag convinceable="0"/>
        <flag pushable="1"/>
        <flag canpushitems="1"/>
        <flag canpushcreatures="0"/>
        <flag targetdistance="1"/>
        <flag runonhealth="0"/>
    </flags>

    <script>
        <event name="curar"/>
    </script>

    <attacks>
    </attacks>
    <defenses armor="20" defense="14">
    <defense name="healing" interval="2000" chance="12" min="10" max="30">
      <attribute key="areaEffect" value="blueshimmer"/>
    </defense>
    </defenses>
    <immunities>
        <immunity physical="0"/>
        <immunity energy="0"/>
        <immunity fire="0"/>
        <immunity poison="0"/>
        <immunity lifedrain="0"/>
        <immunity paralyze="1"/>
        <immunity outfit="1"/>
        <immunity drunk="1"/>
        <immunity invisible="1"/>
    </immunities>
    <voices interval="4000" chance="300">
        <voice sentence="Are you injured?" />
        <voice sentence="Exura Sio!" />
    </voices>
    <loot capacity="1900">
    </loot>
</monster>

creaturescript.xml:

Code:
<event type="think" name="curar" script="curar.lua"/>

curar.lua:
Code:
-- summon heal master v1.1
-- by leyendario edited by Tejdi with zbizus help.
    local config = {
    heal = 30,
    condition = "yes", -- put no if you dont want him to remove the conditions (fire, poison, etc).
    }
function onThink(cid, target)
    local master = getCreatureMaster(cid)
    if master then
        local conditions = {CONDITION_POISON, CONDITION_FIRE, CONDITION_ENERGY, CONDITION_PARALYZE, CONDITION_DRUNK, CONDITION_DROWN, CONDITION_CURSED}
        local party = getPartyMembers(master)
        local pos = getCreaturePosition(master)
        if not getPlayerParty(master) then
            doCreatureAddHealth(master, config.heal)
            doSendMagicEffect(pos, 12)
            if (config.condition == "yes") then
                for i, todos in ipairs(conditions) do
                    doRemoveCondition(master, todos)
                end
            end
            return true
        end
        for _, miembros in pairs(party) do
            doCreatureAddHealth(miembros, config.heal)
            pos = getCreaturePosition(miembros)
            doSendMagicEffect(pos, 12)
            if (config.contidion == "yes") then
                for i, todos in ipairs(conditions) do
                    doRemoveCondition(miembros, todos)
                end
            end
        end
    end
    return true
end

#2 TFS 1.2 version soft heal version:
Code:
-- summon heal master v1.1
-- by leyendario edited by Tejdi with zbizus help.
    local config = {
    heal = 30,
    condition = "yes", -- put no if you dont want him to remove the conditions (fire, poison, etc).
    }
function onThink(cid, target)
if math.random(1, 100) <= 12 then -- here you can edit chance of reciving heal, higher number than 12 = more heal chances
    local master = getCreatureMaster(cid)
    if master then
        local conditions = {CONDITION_POISON, CONDITION_FIRE, CONDITION_ENERGY, CONDITION_PARALYZE, CONDITION_DRUNK, CONDITION_DROWN, CONDITION_CURSED}
        local party = getPartyMembers(master)
        local pos = getCreaturePosition(master)
        if not getPlayerParty(master) then
            doCreatureAddHealth(master, config.heal)
            doSendMagicEffect(pos, 12)
            if (config.condition == "yes") then
                for i, todos in ipairs(conditions) do
                    doRemoveCondition(master, todos)
                end
            end
            return true
        end
        for _, miembros in pairs(party) do
            doCreatureAddHealth(miembros, config.heal)
            pos = getCreaturePosition(miembros)
            doSendMagicEffect(pos, 12)
            if (config.contidion == "yes") then
                for i, todos in ipairs(conditions) do
                    doRemoveCondition(miembros, todos)
                end
            end
        end
    end
    return true
end
end
 
Last edited by a moderator:
Code:
local config = {
    heal = {30, 40}, --heal {min, max}
    condition = "yes", -- put no if you dont want him to remove the conditions (fire, poison, etc).
}
doCreatureAddHealth(master, math.random(config.heal[1], config.heal[2]))
 
Last edited:
Back
Top