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

[LUA] Killing certain Monster/Creature gives PK PZ-Lock

Athenuz

Owlz!
Joined
Oct 1, 2015
Messages
234
Reaction score
27
Location
México
Hello,

(TFS 1.x)

Can please someone help me to make this possible?
If you kill certain creature/monster it gives you pz-lock / PK as if you kill a player please? (Or even if its possible, configurable time)

I hope someone help <3
Thanks in advance
 
Code:
local monsters = {'demon'}
function onKill(creature, target)
    if Player(creature) then
        if isInArray(monsters, target:getName():lower()) then
            creature:addCondition(CONDITION_INFIGHT)
        end
    end
    return true
end

Not tested
 
Code:
local monsters = {'demon'}
function onKill(creature, target)
    if Player(creature) then
        if isInArray(monsters, target:getName():lower()) then
            creature:addCondition(CONDITION_INFIGHT)
        end
    end
    return true
end

Not tested

Sorry i didn't specify, is possible to make it add white skull? "creature:addCondition(CONDITION_INFIGHT)" adds skull or i need to add something else?

Thanks for your reply ^^
 
hmm,
Code:
creature:addCondition(condition[, force = false])
creature:setSkull(skull)
player:setSkullTime(skullTime)

as far as i know this is the functions you are going to use.
 
Back
Top