Lua:
function onAttack(cid, target)
local mages, warriors = {1, 2}, {3, 4}
if isMonster(target) or isMonster(cid) then
return true
end
if(isInArray(mages, getPlayerVocation(cid)) and isInArray(warriors, getPlayerVocation(target)) or (isInArray(warriors, getPlayerVocation(cid)) and isInArray(mages, getPlayerVocation(target)))) then
doPlayerSendCancel(cid, "You can not attack this player.")
return false
end
return true
end
that script that you received wont protect from area attacks ex. runes