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

Solved Avoid damage from own summons

demon088

#088 in the Horde
Joined
Jun 17, 2009
Messages
250
Solutions
3
Reaction score
30
Location
Hell
Hello OtLand!
I need help with this: Is there a way to avoid summons hurting the owner of the summon? I have a vocation based on summons and they can get killed by their own summons.
Thanks for the help!
 
Solution
no fuckin clue why that function would be executing for stuff like potions but
Lua:
function Creature:onTargetCombat(target)
    if not self then
        return RETURNVALUE_NOERROR
    end
    local master = self:getMaster()
    if master and master == target then
        return RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER
    end

    if self:isPlayer() and target:isPlayer() then
        local party = self:getParty()
        if party then
            local targetParty = target:getParty()
            if targetParty and targetParty == party then
                return RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER
            end
        end
    end
    return RETURNVALUE_NOERROR
end
Last edited:
Back
Top