Jump to content
  • 0

Spawn Protecion Effect


kingmert

Question

Recommended Posts

  • 0
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
Link to comment
Share on other sites

  • 0

1 code line = 1 euro.

 

Tessa, you won a total of 3€ :D

Thats 2 lines the other is just half line :p tessa wons 2.50€
Link to comment
Share on other sites

  • 0
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
Link to comment
Share on other sites

  • 0

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

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...