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

A summon that heals it´s summoner

dhrsantan

A.K.A Lbakiller
Joined
Nov 27, 2014
Messages
94
Reaction score
10
Location
The netherlands
So I had this idea of making a summonable monster that would heal the player that has summoned it.
i.e like the exura sio spell for druids.

any thoughts on how this would be doable?
 
Mhmm I'm no scripter, but I'd say you should create a healing spell in mass like mas sio, then set an amount of mana for your summon, if it's possible, then a chance to cast this spell.

There is a problem on this thing, that the monster you're attacking will be healed aswell.

You could also create a healing spell that would work like an exori vis (I'm talking about 7.x verisons, so that the spell will be cast at the direction your summon is looking at), and as long as you stay there you'll be healed.

Notice that there is also a problem on this one, since the monster will walk with you, standing always 1 sqm away from you, if there isn't something blocking its way. The normal formulas will only keep your summon locked when you use the follow option.
 
Well, It has to be possible but I don't have much time left atm :p

This is how far I'm now:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="The helping hand" nameDescription="a helping hand" race="undead" experience="0" speed="500" manacost="0">
    <health now="115" max="115"/>
    <look type="294" corpse="6324"/>
    <targetchange interval="60000" chance="0"/>
    <strategy attack="100" defense="0"/>
    <flags>
        <flag summonable="1"/>
        <flag attackable="1"/>
        <flag hostile="1"/>
        <flag illusionable="0"/>
        <flag convinceable="1"/>
        <flag pushable="0"/>
        <flag canpushitems="1"/>
        <flag staticattack="15"/>
        <flag lightlevel="0"/>
        <flag lightcolor="0"/>
        <flag targetdistance="3"/>
        <flag runonhealth="0"/>
    </flags>
    <attacks>
    </attacks>
    <defenses armor="10" defense="15">
        <defense name="speed" interval="10000" chance="40" speedchange="600" duration="20000">
            <attribute key="areaEffect" value="greenshimmer"/>
        </defense>
        <defense name="healing" interval="5000" chance="60" min="25" max="75">
            <attribute key="areaEffect" value="blueshimmer"/>
        </defense>
        <defense name="Invisible" interval="4000" chance="0">
            <attribute key="areaEffect" value="blueshimmer"/>
        </defense>
    </defenses>
    <elements>
        <element energyPercent="-30"/>
        <element earthPercent="-80"/>
        <element deathPercent="-65"/>
    </elements>
    <immunities>
        <immunity paralyze="1"/>
        <immunity drunk="1"/>
    </immunities>
    <voices interval="2000" chance="5">
        <voice sentence="Crackle!"/>
        <voice sentence="Tsshh"/>
    </voices>
    <loot>
    </loot>
    <script>
    <event name="healer"/>
    </script>

</monster>
Code:
 <!-- HELPING HAND !--> <monster name="The helping hand" file="ghosts/The helping hand.xml"/>
Code:
<event type="think" name="healer" event="script" value="healer.lua"/>
Code:
-- Configure the healing here:
configHealer = {
healMin = 20, -- Minimum heal
healMax = 30, -- Maximum heal
distanceEffect = 9, -- Shoots this effect to the player it heals
magicEffect = 5, -- This effect is displayed at the healed unit's pos
storage = 50251, -- Some free storage value
speed = 6 -- The lesser the number, the faster the healing
}

function onThink(cid)
local counter = getPlayerStorageValue(cid, configHealer.storage)

if counter % configHealer.speed == 0 then
local master = getCreatureMaster(cid)
doSendMagicEffect(getThingPos(master), configHealer.magicEffect)
doSendDistanceShoot(getThingPos(cid), getThingPos(master), configHealer.distanceEffect)
doCreatureAddHealth(master, math.random(configHealer.healMin,configHealer.healMax))
end

setPlayerStorageValue(cid, configHealer.storage, counter+1)

return true
end

(Most of the scripts are made by Shadowsong)

Edit:

Works now.

07ce83637e129c48ca7cb825ddd1af7a.png
 
Last edited by a moderator:
What Tfs version did you test this on?
I think I'll try to make it work tonight when I've got some time to setup a development server :p

Thanks for the amazing work on it so far. It will give me more than just a headstart on this :)
 
Back
Top