Quantcast
Channel: OTLand
Viewing all articles
Browse latest Browse all 32043

Prevent monsters to hit other monsters

$
0
0
Hello,

I am using this script to prevent monsters to hit other monsters.
Lua:
function onStatsChange(cid, attacker, type, combat, value)
    -- This should block all damage monster cause on eachother expect player summons
    if isMonster(cid) and isMonster(attacker) then
        local master = getCreatureMaster(cid)
        if not master or not isPlayer(master) then
            return false
        end
    end

    return true
end
The good thing,
It is working for monsters vs...

Prevent monsters to hit other monsters

Viewing all articles
Browse latest Browse all 32043

Trending Articles