Jump to content

[Share] Simple Buff Restriction (Only inside towns)


Horus

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.



  • Posts

    • totally agree, the problem started with professionals who made easy to open a server, specially interlude has been abused unstoppably since you can open a server with few clicks now days making fewer players for many servers, while back in time when "compile" was a secret and opening a server was going max players but true things are changing and this has become a job but dont lie everyone knows what is going on, lying is showing desperation, better go and work. i've worked with lots of people with kids that invest huge amounts of money into this and fail while they needed the money its an addiction.
    • well,we all know that everyone is doing it for money. And it's acceptable since you put much more effort than the usual admins. If you're proffesional on l2 servers,i don't find a reason to not see it as a job. Ofc it's job,but all jobs has their own prides. I'll talk about me,i'm a guy that working 10 +/- hours per day. I have 2-3 free hours on my daily activity and sometimes i enjoy playing Lineage because nostalgia hits me everyday. If you are many years on scene,u'll understand that lineage will never be the same like old days. Days that we was gathering at internet cafes,and the battle was daily. Anyway, some people perfer to pay big clans and provide them black market with special prices and benefits that a casual player wont have. Also big clans means big wars,so server will have population even if you have zero quality. And there is some projects that wont pay those d1ckheads,so they wont join them and project need to find other ways to increase the population. So,i'm a player that i'll donate 20-40-50 euros on every server i play,and usually i'm getting "scammed" since they re-open their server every 2 months. And the problem is that,i personally don't mind to donate few money every 2 months for my joy,but the majority of owners has zero knowledge about L2 gaming. That's why they can't fix a sh1t,and when the problems pile up,they slowly close the server and starting advertising for another one. Actually,on high rate scene mostly,is the same guy that doing it everytime. He opens his project for 1-2 months,he close it and before he shut down the server,he has already started the advertising on his next server with different name. It's just crazy and that part shouldn't be acceptable. So yes,i perfer to support a project with honest admin team,and somewhere they have the knowledge to implent things. Business is business,but at least as community,we should enjoy our game that we love, cheers. 
    • thanks for sharing !! any guide to install this? it would be great!!
  • Topics

×
×
  • Create New...