Skylinx
Game Programmer
Hello. I'm using an Anti-AOE creatureevent script by Erexo that's supposed to only deal damage to players you are targeting using AOE spells.
(Doesn't apply to creatures)
The script:
I really like this feature. It's something I'd like to add in, except I get this error.
I get this error whenever I use a spell and it hits a player, OR whenever I try attacking a player. I basically cannot PVP. Whenever I try targeting a player, it says sorry not possible and sends that error.
Any help would be appreciated, I've looked at the script a few times and I can't seem to figure out why.
Thanks
(Doesn't apply to creatures)
The script:
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 false
end
end
return true
end
--By Erexo (hail OTLand)
function onCombat(cid, target)
if(target and isPlayer(target) and getCreatureName(getCreatureTarget(cid)) ~= getCreatureName(target)) then
return false
end
return true
end
Code:
[17/05/2013 09:29:22] [Error - CreatureScript Interface]
[17/05/2013 09:29:22] data/creaturescripts/scripts/AntiAOE.lua:onCombat
[17/05/2013 09:29:22] Description:
[17/05/2013 09:29:22] (luaGetCreatureName) Creature not found
I get this error whenever I use a spell and it hits a player, OR whenever I try attacking a player. I basically cannot PVP. Whenever I try targeting a player, it says sorry not possible and sends that error.
Any help would be appreciated, I've looked at the script a few times and I can't seem to figure out why.
Thanks
Last edited: