beliar34
Member
- Joined
- Feb 28, 2012
- Messages
- 307
- Solutions
- 7
- Reaction score
- 11
Hello
I think you understand, that happens if somebody try to mark somebody or hit with aoe spell, anyway script work in 50% cuz players dont hit each other with aoe spells but i dont have PVP on server
Code:
Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/AntiAOE.lua:onCombat
luaGetCreatureName(). Creature not found
Code:
function onStatsChange(cid, attacker, type, combat, value)
if(attacker and isPlayer(attacker) and (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) and getCreatureName(getCreatureTarget(attacker)) ~= getCreatureName(cid)) then
if combat ~= COMBAT_HEALING then
return doPlayerSendCancel(cid, 'You must mark player.') and false
end
end
return true
end
function onCombat(cid, target)
if(target and isPlayer(target) and getCreatureName(getCreatureTarget(cid)) ~= getCreatureName(target)) then
return doPlayerSendCancel(cid, 'You must mark player.') and false
end
return true
end
I think you understand, that happens if somebody try to mark somebody or hit with aoe spell, anyway script work in 50% cuz players dont hit each other with aoe spells but i dont have PVP on server