Jump to content
  • 0

Spawn Protecion Effect


Question

Recommended Posts

  • 0
Posted

 

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

I think he cant find the right place to put the code..

  • 0
Posted

// Hate Mode ON

 

Look at this shit...

	/**
	 * Set _protectEndTime according settings.
	 * @param protect the new protection
	 */
	public void setProtection(final boolean protect)
	{
		if (Config.DEVELOPER && (protect || _protectEndTime > 0))
			LOGGER.info(getName() + ": Protection " + (protect ? "ON " + (GameTimeController.getGameTicks() + Config.PLAYER_SPAWN_PROTECTION * GameTimeController.TICKS_PER_SECOND) : "OFF") + " (currently " + GameTimeController.getGameTicks() + ")");
		
		if (isInOlympiadMode())
			return;
		
		_protectEndTime = protect ? GameTimeController.getGameTicks() + Config.PLAYER_SPAWN_PROTECTION * GameTimeController.TICKS_PER_SECOND : 0;
		
		if (protect)
			ThreadPoolManager.getInstance().scheduleGeneral(new TeleportProtectionFinalizer(this), (Config.PLAYER_SPAWN_PROTECTION - 1) * 1000);
	}
	
	/**
	 * Set _teleportProtectEndTime according settings.
	 * @param protect the new protection
	 */
	public void setTeleportProtection(final boolean protect)
	{
		if (Config.DEVELOPER && (protect || _teleportProtectEndTime > 0))
			LOGGER.warn(getName() + ": Tele Protection " + (protect ? "ON " + (GameTimeController.getGameTicks() + Config.PLAYER_TELEPORT_PROTECTION * GameTimeController.TICKS_PER_SECOND) : "OFF") + " (currently " + GameTimeController.getGameTicks() + ")");
		
		_teleportProtectEndTime = protect ? GameTimeController.getGameTicks() + Config.PLAYER_TELEPORT_PROTECTION * GameTimeController.TICKS_PER_SECOND : 0;
		
		if (protect)
			ThreadPoolManager.getInstance().scheduleGeneral(new TeleportProtectionFinalizer(this), (Config.PLAYER_TELEPORT_PROTECTION - 1) * 1000);
	}
	
	static class TeleportProtectionFinalizer implements Runnable
	{
		private final L2PcInstance _activeChar;
		
		TeleportProtectionFinalizer(final L2PcInstance activeChar)
		{
			_activeChar = activeChar;
		}
		
		@Override
		public void run()
		{
			try
			{
				if (_activeChar.isSpawnProtected())
					_activeChar.sendMessage("The effect of Spawn Protection has been removed.");
				else if (_activeChar.isTeleportProtected())
					_activeChar.sendMessage("The effect of Teleport Spawn Protection has been removed.");
				
				if (Config.PLAYER_SPAWN_PROTECTION > 0)
					_activeChar.setProtection(false);
				
				if (Config.PLAYER_TELEPORT_PROTECTION > 0)
					_activeChar.setTeleportProtection(false);
			}
			catch (final Throwable e)
			{
				if (Config.ENABLE_ALL_EXCEPTIONS)
					e.printStackTrace();
			}
		}
	}

Who the hell is the author of this piece of crap? And what's more important, who the hell will want to use such a crappy platform?

 

First: Two methods, doing exactly the same thing. These are probably used in different conditions, but... if you don't want to use something somewhere, simply don't use it there.

 

Second: Two completely useless if statements...

				if (Config.PLAYER_SPAWN_PROTECTION > 0)
					_activeChar.setProtection(false);
				
				if (Config.PLAYER_TELEPORT_PROTECTION > 0)
					_activeChar.setTeleportProtection(false);

If you are currently in this thread, you obviously use WHATEVER_PROTECTION > 0...

 

 

And finaly: This thing is probably written by an idiot...

			catch (final Throwable e)
			{
				if (Config.ENABLE_ALL_EXCEPTIONS)
					e.printStackTrace();
			}

// Hate Mode OFF

 

Don't use L2JFrozen, pls!

  • 0
Posted

// Hate Mode ON

 

Look at this shit...

 

/**
	 * Set _protectEndTime according settings.
	 * @param protect the new protection
	 */
	public void setProtection(final boolean protect)
	{
		if (Config.DEVELOPER && (protect || _protectEndTime > 0))
			LOGGER.info(getName() + ": Protection " + (protect ? "ON " + (GameTimeController.getGameTicks() + Config.PLAYER_SPAWN_PROTECTION * GameTimeController.TICKS_PER_SECOND) : "OFF") + " (currently " + GameTimeController.getGameTicks() + ")");
		
		if (isInOlympiadMode())
			return;
		
		_protectEndTime = protect ? GameTimeController.getGameTicks() + Config.PLAYER_SPAWN_PROTECTION * GameTimeController.TICKS_PER_SECOND : 0;
		
		if (protect)
			ThreadPoolManager.getInstance().scheduleGeneral(new TeleportProtectionFinalizer(this), (Config.PLAYER_SPAWN_PROTECTION - 1) * 1000);
	}
	
	/**
	 * Set _teleportProtectEndTime according settings.
	 * @param protect the new protection
	 */
	public void setTeleportProtection(final boolean protect)
	{
		if (Config.DEVELOPER && (protect || _teleportProtectEndTime > 0))
			LOGGER.warn(getName() + ": Tele Protection " + (protect ? "ON " + (GameTimeController.getGameTicks() + Config.PLAYER_TELEPORT_PROTECTION * GameTimeController.TICKS_PER_SECOND) : "OFF") + " (currently " + GameTimeController.getGameTicks() + ")");
		
		_teleportProtectEndTime = protect ? GameTimeController.getGameTicks() + Config.PLAYER_TELEPORT_PROTECTION * GameTimeController.TICKS_PER_SECOND : 0;
		
		if (protect)
			ThreadPoolManager.getInstance().scheduleGeneral(new TeleportProtectionFinalizer(this), (Config.PLAYER_TELEPORT_PROTECTION - 1) * 1000);
	}
	
	static class TeleportProtectionFinalizer implements Runnable
	{
		private final L2PcInstance _activeChar;
		
		TeleportProtectionFinalizer(final L2PcInstance activeChar)
		{
			_activeChar = activeChar;
		}
		
		@Override
		public void run()
		{
			try
			{
				if (_activeChar.isSpawnProtected())
					_activeChar.sendMessage("The effect of Spawn Protection has been removed.");
				else if (_activeChar.isTeleportProtected())
					_activeChar.sendMessage("The effect of Teleport Spawn Protection has been removed.");
				
				if (Config.PLAYER_SPAWN_PROTECTION > 0)
					_activeChar.setProtection(false);
				
				if (Config.PLAYER_TELEPORT_PROTECTION > 0)
					_activeChar.setTeleportProtection(false);
			}
			catch (final Throwable e)
			{
				if (Config.ENABLE_ALL_EXCEPTIONS)
					e.printStackTrace();
			}
		}
	}
Who the hell is the author of this piece of crap? And what's more important, who the hell will want to use such a crappy platform?

 

First: Two methods, doing exactly the same thing. These are probably used in different conditions, but... if you don't want to use something somewhere, simply don't use it there.

 

Second: Two completely useless if statements...

if (Config.PLAYER_SPAWN_PROTECTION > 0)
					_activeChar.setProtection(false);
				
				if (Config.PLAYER_TELEPORT_PROTECTION > 0)
					_activeChar.setTeleportProtection(false);
If you are currently in this thread, you obviously use WHATEVER_PROTECTION > 0...

 

 

And finaly: This thing is probably written by an idiot...

catch (final Throwable e)
			{
				if (Config.ENABLE_ALL_EXCEPTIONS)
					e.printStackTrace();
			}
// Hate Mode OFF

 

Don't use L2JFrozen, pls!

And just he could use && idk nothink from frozen :p

 

P.s i will help him when i go home with team viewer just lock the topic

  • 0
Posted

And just he could use && idk nothink from frozen :p

P.s i will help him when i go home with team viewer just lock the topic

I'm not talking about his problem... it's all about how bad the whole L2JFrozen project is designed (I'm not sure if they actually know how to design a project), and why using it is a bad idea. Seriously, it lacks basic programming principles... just read something about coupling and cohesion, and then look at L2JFrozen's source.
  • 0
Posted

I'm not talking about his problem... it's all about how bad the whole L2JFrozen project is designed (I'm not sure if they actually know how to design a project), and why using it is a bad idea. Seriously, it lacks basic programming principles... just read something about coupling and cohesion, and then look at L2JFrozen's source.

Im using l2jacis so i dont care about frozen..but i mean about this 2 checks about spawn protection...can be done with a better way or drop once

  • 0
Posted

it's all about how bad the whole L2JFrozen project is designed

That's mostly russian style and Shyla/Nefer coding style is also.. ugly m5TqppM.png

 

People don't care about quality, is it working? I take it  :happyforever:

  • 0
Posted

That's mostly russian style and Shyla/Nefer coding style is also.. ugly m5TqppM.png

 

People don't care about quality, is it working? I take it  :happyforever:

As i have read thats true :p

Sweets you can lock this topic i will help him later..we have already speak on skype

Guest
This topic is now closed to further replies.


  • Posts

    • Your options are , 1. pay for files like lucera 2. pay for a dev to create what u need 3. learn how to code and u do it urself 4. find the old discontinued interlude classic source from mobius and work with that.  5. there are some heavily modded interlude files on other forums that offer what u asking ( interface , classic/essence style etc)
    • Since ur interested on the latest client(s) Your best bet is l2jmobius.  Their free repo is more than enough to get you started. They also offer a subscription of 100$ in order to access the latest sources. A big + is the community there is pretty active and helpful.
    • Hey chatgpt. Make me a website for my private l2jserver called l2karma. Make no mistakes.
    • Server Description L2 Karma is a permanent Interlude 1x server built on L2J with retail-like mechanics and a long-term vision — not a seasonal reset or wipe server. We focus on competitive longevity, fair play, and a community where every player matters. Core Features ✔ True x1 Experience (XP / SP / Adena / Drop / Spoil) ✔ Retail mechanics — no forced progression shortcuts ✔ Single-box only (1 client per player — no multi-boxing advantage) ✔ No Pay-to-Win & strict anti-RMT policy ✔ Already live and active with players progressing ✔ Long-term commitment — 3-year guarantee ✔ Designed for meaningful PvP and community cohesion 📏 Server Rules No Multi-Boxing Advantage — Only one client per account is allowed. No Pay-to-Win Items or Services — VIP runes are optional and do not lock content. No Bots, Scripts, or Automation — Zero tolerance. Suspicious accounts will be banned. No Exploit Abuse — Reporting exploits immediately avoids penalties. No RMT / Real Money Trading — Strict enforcement — economy integrity matters. Fair Play Only — Harassment and racism are not allowed in chat or Discord. Respect Admin Decisions — Official rulings are final to keep the server stable. 📥 How to Join 🔗 Website: https://l2karma.org 🔗 Discord: https://discord.gg/VV9RAfmnth Chronicle: Interlude Rates: x1 (Classic) Box Limit: Single Box 🧠 What Makes Us Different ✔ Permanent World — No resets ever ✔ Designed for players tired of wipe-cycle servers ✔ Community-centric growth — not rinse-and-repeat launches ✔ Competitive but fair environment ✔ Events, structured seasons, and ongoing content support
    • A widespread proxy service, operating through hijacked devices, has been shut down in a cross-industry effort led by Google. The network, known as IPIDEA, functioned by secretly converting millions of personal devices into proxies for malicious actors. The Mechanism of the Scheme The operation distributed hidden code within seemingly legitimate free apps and VPN services. Once installed, this code enrolled the user’s device into a pool of residential IP addresses. These addresses were then sold anonymously, primarily to cybercriminal and state-sponsored groups, to mask the origin of attacks, fraud, and espionage. Key impacts of the network included: Facilitating operations for more than 550 identified threat actors. Exposing unsuspecting device owners to potential legal and security risks by associating their IP addresses with criminal traffic. The Takedown Strategy Google and its partners disrupted the service by: Seizing core operational domains. Using Google Play Protect to detect and remove malicious applications. Coordinating with infrastructure providers to prevent the network from reestablishing itself. The action highlights the necessity of continuous user awareness, developer diligence in code reviews, and proactive industry cooperation to maintain cybersecurity. Front Companies Associated with IPIDEA IPIDEA masked its activities under various brand names, such as: Proxy Brands: 360 Proxy, 922 Proxy, Luna Proxy, IP2World, ABC Proxy. VPN Brands: Door VPN, Radish VPN, Galleon VPN. SDK Brands: PacketSDK, HexSDK (the toolkits used to embed proxy code).   Choosing Ethical Proxy Services Alternatives For lawful purposes like market research, ad verification, or data aggregation, selecting a transparent and consensual provider is essential. Reputable services obtain explicit user permission for their networks and enforce strict compliance measures. Examples of Established Providers: Bright Data: A leading, consent-based residential proxy network. Oxylabs: Provides large-scale proxy solutions for enterprise needs. MoMoProxy: Maintains a large pool of residential IPs for tasks like web scraping.   Only $850/1TB.  https://momoproxy.com   Identifying a Legitimate Provider: A trustworthy service will typically demonstrate: Informed Consent: Networks are built with the clear agreement of participants. Robust Compliance: Proactive systems to prevent abuse and respect website terms. Operational Transparency: Public-facing policies, identifiable corporate structure, and genuine customer support. Conduct thorough due diligence. Opt for providers that are clear about their IP sources and maintain strong anti-abuse policies, ensuring your legitimate activities do not inadvertently support harmful operations.
  • Topics

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