Page 1 of 1

How to make custom pk protection

Posted: Wed Sep 02, 2009 11:14 pm
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 :]

Re: How to make custom pk protection

Posted: Wed Sep 02, 2009 11:33 pm
by Charus
A simple way is to create custom over powered Guards near the zone need to protect.

Re: How to make custom pk protection

Posted: Wed Sep 02, 2009 11:38 pm
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    }}