How to make custom pk protection

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
Lee
Posts: 102
Joined: Wed Sep 02, 2009 11:10 pm

How to make custom pk protection

Post by Lee »

So i tried to create something like this : If a player gets karma in a X zone he will be punished with a paralyze..
Well i got all ,files etc,but i can't resolve getKarma(); function ;/
Any suggestions?
Here's what i got till now :
in l2arenazone.java

Code: Select all

	@Override	protected void onEnter(L2Character character)	{		character.setInsideZone(L2Character.ZONE_PVP, true); 			if (getKarma() > 0)			{				punishments blabla			}
any ideas?
thanks :]
User avatar
Charus
L2j Veteran
L2j Veteran
Posts: 410
Joined: Thu Feb 16, 2006 1:24 pm

Re: How to make custom pk protection

Post by Charus »

A simple way is to create custom over powered Guards near the zone need to protect.
Lee
Posts: 102
Joined: Wed Sep 02, 2009 11:10 pm

Re: How to make custom pk protection

Post by Lee »

I know this way ,but i wanna make smth unique for my players :]
Also for now i got this.. (Thanx DrHouse <3)

Code: Select all

if (activeChar instanceof L2PcInstance){    L2PcInstance player = (L2PcInstance)activeChar;     if (player.getKarma() > 0)    {         // place here your actions    }}
Post Reply