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

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


  • Posts

    • Discord         :  utchiha_market Telegram        : https://t.me/utchiha_market
    • Discord         :  utchiha_market Telegram        : https://t.me/utchiha_market
    • try to send the PID of l2.bin to active64.sys service and we will avoid to buy aac license xD. i will try it in the next days. 😄
    • 🤝 SocNet is looking for new partners and suppliers!  We are building a reliable partner network across all areas of online business.  If you're in digital, traffic, accounts, or media — let’s discuss collaboration opportunities.   📌 Open to:  — Webmasters and media buyers  — Telegram channel and website owners  — Sellers of accounts and auto-registered profiles  — Developers of digital services  — Marketing agencies and freelancers 💬 We value quality, transparency, and growth. If that resonates with you — get in touch!   📎 Our current list of partners:  🔗 https://socnet.bgng.io/partners   📦 Our key products:  🛒 Online Store: Click ✅  🤖 Telegram Bot: Click ✅  📲 SMM Panel: Click ✅   📩 Contact us:  💬 Telegram: https://t.me/solomon_bog  📱 WhatsApp: https://wa.me/79051904467  🎮 Discord: https://discord.gg/y9AStFFsrh  📧 Email: solomonbog@socnet.store   📢 Follow updates: https://t.me/accsforyou_shop ✅
    • 🤝 SocNet is looking for new partners and suppliers!  We are building a reliable partner network across all areas of online business.  If you're in digital, traffic, accounts, or media — let’s discuss collaboration opportunities. 📌 Open to:  — Webmasters and media buyers  — Telegram channel and website owners  — Sellers of accounts and auto-registered profiles  — Developers of digital services  — Marketing agencies and freelancers 💬 We value quality, transparency, and growth. If that resonates with you — get in touch! 📎 Our current list of partners:  🔗 https://socnet.bgng.io/partners 📦 Our key products:  🛒 Online Store: Click ✅  🤖 Telegram Bot: Click ✅  📲 SMM Panel: Click ✅ 📩 Contact us:  💬 Telegram: https://t.me/solomon_bog  📱 WhatsApp: https://wa.me/79051904467  🎮 Discord: https://discord.gg/y9AStFFsrh  📧 Email: solomonbog@socnet.store 📢 Follow updates: https://t.me/accsforyou_shop ✅
  • Topics

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