Ué, você configurou corretamente o nome do monstro no código (letras maiúsculas e minúsculas fazem diferença)? local config = { name = "xxx", --nome do monstro vocId = xxx, --vocation id } function onTarget(cid, target) if isMonster(cid) and isPlayer(target) then if getPlayerVocation(target) ~= conf
info
Grupo: Herói
Registrado: 20/09/12
Posts: 2.6k
Reputação: +1.1k
Gênero: Masculino
Ué, você configurou corretamente o nome do monstro no código (letras maiúsculas e minúsculas fazem diferença)?
local config = { name = "xxx", --nome do monstro vocId = xxx, --vocation id } function onTarget(cid, target) if isMonster(cid) and isPlayer(target) then if getPlayerVocation(target) ~= config.vocId then return false end elseif isPlayer(cid) and isMonster(target) then if getCreatureName(target) == config.name and getPlayerVocation(cid) ~= config.vocId then return doPlayerSendCancel(cid, "você não pode atacar esta criatura.") and false end end return true end function onStatsChange(cid, attacker, type, combat, value) if isMonster(attacker) and isPlayer(cid) then if getPlayerVocation(cid) ~= config.vocId then return false end elseif isPlayer(attacker) and isMonster(cid) and type == STATSCHANGE_HEALTHLOSS then if getCreatureName(cid) == config.name and getPlayerVocation(attacker) ~= config.vocId then return doPlayerSendCancel(attacker, "você não pode atacar esta criatura.") and false end end return true endEditado Junho 26 por zipter98