Jump to content
  • 0

Spawn Protecion Effect


Question

Recommended Posts

  • 0
Posted (edited)
Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(revision 5)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -221,6 +221,7 @@
 import net.sf.l2j.gameserver.scripting.Quest;
 import net.sf.l2j.gameserver.scripting.QuestState;
 import net.sf.l2j.gameserver.scripting.ScriptManager;
+import net.sf.l2j.gameserver.skills.AbnormalEffect;
 import net.sf.l2j.gameserver.skills.Env;
 import net.sf.l2j.gameserver.skills.Formulas;
 import net.sf.l2j.gameserver.skills.Stats;
@@ -3034,6 +3035,7 @@
 		{
 			if (_protectTask == null)
 				_protectTask = ThreadPoolManager.getInstance().scheduleGeneral(new ProtectTask(), Config.PLAYER_SPAWN_PROTECTION * 1000);
+			startAbnormalEffect(AbnormalEffect.STEALTH);
 		}
 		else
 		{
@@ -3053,6 +3055,7 @@
 		@Override
 		public void run()
 		{
+			stopAbnormalEffect(AbnormalEffect.STEALTH);
 			setProtection(false);
 			sendMessage("The spawn protection has ended.");
 		}

Just in case you don't want to pay... :D

Edited by Tessa
  • 0
Posted (edited)
Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(revision 5)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -221,6 +221,7 @@
 import net.sf.l2j.gameserver.scripting.Quest;
 import net.sf.l2j.gameserver.scripting.QuestState;
 import net.sf.l2j.gameserver.scripting.ScriptManager;
+import net.sf.l2j.gameserver.skills.AbnormalEffect;
 import net.sf.l2j.gameserver.skills.Env;
 import net.sf.l2j.gameserver.skills.Formulas;
 import net.sf.l2j.gameserver.skills.Stats;
@@ -3034,6 +3035,7 @@
 		{
 			if (_protectTask == null)
 				_protectTask = ThreadPoolManager.getInstance().scheduleGeneral(new ProtectTask(), Config.PLAYER_SPAWN_PROTECTION * 1000);
+			startAbnormalEffect(AbnormalEffect.STEALTH);
 		}
 		else
 		{
@@ -3053,6 +3055,7 @@
 		@Override
 		public void run()
 		{
+			stopAbnormalEffect(AbnormalEffect.STEALTH);
 			setProtection(false);
 			sendMessage("The spawn protection has ended.");
 		}

Just in case you don't want to pay... :D

 

 

 

i try it to

 

*import com.l2jfrozen.gameserver.model.L2Character;

 

 *if (protect)

   ThreadPoolManager.getInstance().scheduleGeneral(new TeleportProtectionFinalizer(this), (Config.PLAYER_SPAWN_PROTECTION - 1) * 1000);

   startAbnormalEffect(L2Character.ABNORMAL_EFFECT_IMPRISIONING_2);

 

{{{l2jfrozen}}}  

the effect its started but dont stoped 

 

*if (Config.PLAYER_SPAWN_PROTECTION > 0)

   stopAbnormalEffect(L2Character.ABNORMAL_EFFECT_IMPRISIONING_2);

   setProtection(false);

Edited by kingmert
  • 0
Posted

what bracketss :D where need ???

if (protect) {
    ThreadPoolManager.getInstance().scheduleGeneral(new TeleportProtectionFinalizer(this), (Config.PLAYER_SPAWN_PROTECTION - 1) * 1000);
    startAbnormalEffect(L2Character.ABNORMAL_EFFECT_IMPRISIONING_2);
}

This "{" and "}" are called a brackets (or curly brackets)...

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