Today ,like most shares I make, a friend asked me to make him a small simple Script which I decided to share since its usefull and simple.
Basically this Script makes sure that people do not use Healers, Buffers ,globally, AIOs outside towns on their own Characters.In other words,this prevents players from Dual Boxing with a Buffer / Healer within its party.
if((skill.getSkillType() == L2SkillType.BUFF || skill.getSkillType() == L2SkillType.HEAL ||skill.getSkillType() == L2SkillType.HEAL_PERCENT ) && skill.getTargetType() == skill.getTargetType().TARGET_PARTY || skill.getTargetType() == skill.getTargetType().TARGET_ONE || skill.getTargetType() == skill.getTargetType().TARGET_PARTY_MEMBER && !isInsideZone(L2Zone.FLAG_PEACE))
{
L2PcInstance player = ((L2PlayableInstance) this).getActingPlayer();
if(player.isInParty())
{
for(L2PcInstance partymember : getParty().getPartyMembers())
{ if(partymember.getClient().getHostAddress().equals(player.getClient().getHostAddress()))
{
player.sendMessage("You cannot Buff your own Character unless you are inside a Town Area.");
return false;
}
}
}
}
The code is pretty simple and self explanatory.
Hope you find it usefull.