Jump to content

[Share] Simple Buff Restriction (Only inside towns)


Horus
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 ^^

Link to comment
Share on other sites

  • 8 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock