Jump to content
  • 0

java things


Question

Posted

hi.i want ta make a code,in wich if sb enter jail his karma will dissapear.

i created this..

if(player.isInJail())
		{
			setKarma = 0;
		}

i know its wrong.. ;p but could sb make the code and tell me where exactly i have to place it?

2 answers to this question

Recommended Posts

  • 0
Posted
Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java	(revision 403)
+++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -13504,6 +13504,8 @@
					// start the countdown
					_punishTask = ThreadPoolManager.getInstance().scheduleGeneral(new PunishTask(), _punishTimer);
					sendMessage("You are in jail for "+delayInMinutes+" minutes.");
+					if(getKarma() !=0)
+						setKarma(0);
				}

Guest
This topic is now closed to further replies.


×
×
  • 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