Hello guyz,
Fresh asked me about this script, i know its kinda stupid, but if someone need this, feel free to use.
Q: What this shit doin' Mrs Erexo?
Actually, you dont deal any damage to player who you dont have targeted. So, it deal damage to player, who u actually targeting (lul).
Monsters works as usual, u can hit them always, but if you wanna hit player, you must target him.
Here we go!
../creaturescripts/scripts/AntiAOE.lua
../creaturescripts/scripts/login.lua {end of file before "return TRUE"}
../creaturescripts/creaturescripts.xml
Have fun and enjoy,
Erexo.
Fresh asked me about this script, i know its kinda stupid, but if someone need this, feel free to use.
Q: What this shit doin' Mrs Erexo?
Actually, you dont deal any damage to player who you dont have targeted. So, it deal damage to player, who u actually targeting (lul).
Monsters works as usual, u can hit them always, but if you wanna hit player, you must target him.
Here we go!
../creaturescripts/scripts/AntiAOE.lua
Lua:
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
../creaturescripts/scripts/login.lua {end of file before "return TRUE"}
Lua:
registerCreatureEvent(cid, "AntiAOE")
registerCreatureEvent(cid, "AntiAOE2")
../creaturescripts/creaturescripts.xml
XML:
<event type="statschange" name="AntiAOE" event="script" value="AntiAOE.lua"/>
<event type="combat" name="AntiAOE2" event="script" value="AntiAOE.lua"/>
Have fun and enjoy,
Erexo.