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

Res Monster

Slafesko

New Member
Joined
Jan 6, 2016
Messages
101
Reaction score
2
I am using TFS 0.4, Is there a way to summon a monster that makes exeta res on him? Like i'll summon the monster then it will start to extra res them on target.
 
U can edit .xml of monster and add exeta res command , aswell how fast its gonna to repeat
By default, summoned monsters cannot summon more monsters.
I think he wants
Main creature -> summons monster
summoned monster -> summons more monsters.

-------
I dunno if doConvinceCreature works for monsters.. I dunno if it's even required either. :p

but try this I guess.

place in monster
XML:
<script>
    <event name="onThink_summonCreature"/>
</script>
creaturescripts.xml
XML:
<event type="think" name="onThink_summonCreature" event="script" value="onThink_summonCreature.lua"/>
onThink_summonCreature.lua
Lua:
function onThink(cid, interval)
    if getCreatureName(cid):lower() == "whatever your monsters name is" then
        if #getCreatureSummons(cid) < 2 then -- edit 2 for max amount of summons
            local summon = doSummonMonster("monster you want to summon name is", getThingPosition(cid))
            doConvinceCreature(cid, summon)
        end
    end
    return true
end
 
By default, summoned monsters cannot summon more monsters.
I think he wants
Main creature -> summons monster
summoned monster -> summons more monsters.

-------
I dunno if doConvinceCreature works for monsters.. I dunno if it's even required either. :p

but try this I guess.

place in monster
XML:
<script>
    <event name="onThink_summonCreature"/>
</script>
creaturescripts.xml
XML:
<event type="think" name="onThink_summonCreature" event="script" value="onThink_summonCreature.lua"/>
onThink_summonCreature.lua
Lua:
function onThink(cid, interval)
    if getCreatureName(cid):lower() == "whatever your monsters name is" then
        if #getCreatureSummons(cid) < 2 then -- edit 2 for max amount of summons
            local summon = doSummonMonster("monster you want to summon name is", getThingPosition(cid))
            doConvinceCreature(cid, summon)
        end
    end
    return true
end
this one to create a new monster, But this isn't what i wanted to do.
I wanted to do monster that make exeta res only.
 
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)
setCombatArea(combat, createCombatArea(AREA_SQUARE1X1))

function onTargetCreature(cid, target) return doChallengeCreature(cid, target) end
setCombatCallback(combat, CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature")

function onCastSpell(cid, var)
    local pos = getThingPos(cid)
    local maxSummons = 1
    local creatureName = 'Wolf'
  
    if(#getCreatureSummons(cid) >= maxSummons) then
        doPlayerSendCancel(cid, 'You are unable to summon more.')
        return false
    end

    local v = doSummonCreature(creatureName, pos)
    doConvinceCreature(cid, v)
    doSendMagicEffect(getThingPos(v), CONST_ME_TELEPORT)
    doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
  
    doCombat(cid, combat, numberToVariant(v))
    return true
end

Something like that should be enough
 
Back
Top