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

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..