Horus Posted April 14, 2009 Posted April 14, 2009 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.
Horus Posted April 14, 2009 Author Posted April 14, 2009 Use IP checks for that...This wont allow anyone..not only dualbox Thats the intention. If there is a Party Member that has the same IP as the Buffer then Buffing is NOT Allowed.
Vago Posted April 14, 2009 Posted April 14, 2009 Thats the intention. If there is a Party Member that has the same IP as the Buffer then Buffing is NOT Allowed. You didnt get what I posted above...THERE IS NO IP CHECK! YOU CANNOT BUFF A PARTY MEMBER EVEN IF ISNT A DUALBOX!!! Edit : Nevermind...I read just the first line of the ifs. You're right...Delete both of my posts someone please.
Horus Posted April 14, 2009 Author Posted April 14, 2009 You didnt get what I posted above...THERE IS NO IP CHECK! YOU CANNOT BUFF A PARTY MEMBER EVEN IF ISNT A DUALBOX!!! Edit : Nevermind...I read just the first line of the ifs. You're right...Delete both of my posts someone please. Ofc I'm right ;) lool.
Horus Posted April 15, 2009 Author Posted April 15, 2009 Dunno if I should add something as a recorder whilst the player is online,if he makes "X" attempts then he is punished or w/e. If you want anything else just request ^^
Horus Posted April 17, 2009 Author Posted April 17, 2009 hmm, where i can put this code? L2Character or UseMagic,deppends.
Horus Posted April 18, 2009 Author Posted April 18, 2009 working on IL? Ofc.If not just change the functions its pretty much the same
Belzebul Posted January 11, 2010 Posted January 11, 2010 And where i should add this? In what java file?
xAddytzu Posted January 11, 2010 Posted January 11, 2010 And where i should add this? In what java file? L2Character or UseMagic,deppends.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now