Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local c = {
- tempo = 45, -- Em segundos ficará PZ e Skull
- }
- local condition_infight = createConditionObject(CONDITION_INFIGHT)
- setConditionParam(condition_infight, CONDITION_PARAM_TICKS, -1)
- function onAttack(cid, target)
- if not isPlayer(cid) or not isPlayer(target) then
- return true
- end
- if getCreatureSkullType(cid) == false then
- if getCreatureSkullType(target) >= SKULL_WHITE then
- doCreatureSetSkullType(cid, SKULL_YELLOW)
- doAddCondition(cid, condition_infight)
- doPlayerSetPzLocked(cid, true)
- addEvent(function()
- doRemoveCondition(cid, CONDITION_INFIGHT)
- doCreatureSetSkullType(cid, SKULL_NONE)
- doPlayerSetPzLocked(cid, false)
- end, c.tempo * 1000)
- end
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement