Em creaturescripts.xml cole a tag:
<event type="target" name="AttackVocation" event="script" value="attackvocation.lua"/>
Por fim no seu arquivo login.lua na pasta script, antes do último return true cole:
registerCreatureEvent(cid, "AttackVocation")
vai na pasta data/creaturescripts/scripts, duplica um arquivo e nomeia para "attackvocation" e cola o código dentro.
vocation = {
[1] = {5, 2}, -- vocação 1 não pode atacar a vocação 5 e 2
[2] = {4, 1},
}
function onTarget(cid, target)
if isPlayer(target) then
if isInArray(vocation[getPlayerVocation(cid)], getPlayerVocation(target)) then
doPlayerSendCancel("Você não pode atacar essa vocação")
return false
end
end
return true
end
pode adicionar quantas vocação quiser {5, 2, 4, 3, 1} etc ...
tbem criar outras verificações:
[1] = {5, 2}, vocação 1 não pode atacar a vocação 5 e 2
[3] = {4, 1},
[5] = {4, 1, 3},
[2] = {4, 1, 2},