• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved Problem to make summons invisible

XaviRd

New Member
Joined
Nov 22, 2015
Messages
15
Reaction score
3
I do not find a correct cast spell to creature make its own summons invisible, works with players, but I need it to make it invisible to its own summons too.

I leave my script.

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

local condition = createConditionObject(CONDITION_INVISIBLE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 3000)
setCombatCondition(combat, condition)

arr = {
{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0},
}

local area = createCombatArea(arr)
setCombatArea(combat, area)

function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
 
Last edited:
Solution
It will make all your summons invisible for 3s.

Code:
local condition = createConditionObject(CONDITION_INVISIBLE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 3000)

function onCastSpell(cid, var)
    local summons = getCreatureSummons(cid)
    if summons ~= nil and #summons > 0 then
        for i = 1, #summons do
            doAddCondition(summons[i], condition)
        end
    end
    return true
end

In spells.xml add selftarget="1"
It will make all your summons invisible for 3s.

Code:
local condition = createConditionObject(CONDITION_INVISIBLE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 3000)

function onCastSpell(cid, var)
    local summons = getCreatureSummons(cid)
    if summons ~= nil and #summons > 0 then
        for i = 1, #summons do
            doAddCondition(summons[i], condition)
        end
    end
    return true
end

In spells.xml add selftarget="1"
 
Solution
man u are a good man, thanks for quickly answer , i have no swords for tell you hoy much i thanks you, i was stuck for 5 hours on this today.
 
Last edited:
Back
Top