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

    • TG Support: https://t.me/buyingproxysup | Channel: https://t.me/buyingproxycom Discord support: #buyingproxy | Server: Join the BuyingProxy Discord Server!  Create your free account here
    • Ave is trustworthy,fast  and reliable.His work is amazing!100% satisfied with his services!
    • SMMTOOL.ORG ТВОЙ ПРЯМОЙ ПОСТАВЩИК TG/YouTube/MAX ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ ПОЧЕМУ МЫ? • Свой софт — работаем без посредников и переплат. • Скорость до 50.000.000 в сутки. • Минимальный **** — всего ~5%. ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ Услуги Telegram ПРАЙС-ЛИСТ (ЗА 1000 ЕД.) ПОДПИСЧИКИ (LIFETIME) ➥ 1.2$ — RU База ➥ 1.2$ — Китай База ➥ 1$ — Ultra Fast Группа (~80₽) ➥ 1$ — Ultra Fast (~80₽) ➥ 0.99$ — Super Fast (~80₽) ➥ 0.8$ — Fast (~64₽) ➥ 0.55$ — Normal (~40₽) ➥ 0.44$ — 100K+ Only (~35₽) ПОДПИСЧИКИ (Дневные) ➥ 0.7$ — 60 дней РУ (~55₽) ➥ 0.5$ — 30 Дней РУ (~40₽) ➥ 0.7$ — 60 Дней Китай (~55₽) ➥ 0.5$ — 60 Дней Китай (~40₽) ОПТИМИЗАЦИЯ КАНАЛОВ И БОТОВ ➥ 1.5$ — Подписчики из Поиска Китай (~120₽) ➥ 1.5$ — Подписчики из Поиска РУ База (~120₽) ➥ 1$ — Подписчики из Поиска МИКС (~₽80) ➥ 0.8$ — Бот Старты из Поиска (~64₽) АКТИВНОСТЬ И БОТЫ ➥ 0.7$ — Реакции на Комменты (Позитивные) + Подписчики (Бонус) ➥ 0.7$ — Реакции на Комменты (Негативные) + Подписчики (Бонус) ➥ 0.08$ — Просмотры постов ➥ 0.08$ — Реакции (Любые) ➥ 0.18$ — Запуски ботов МИКС ➥ 0.4$ — Запуски ботов РУ ➥ 0.4$ — Запуски ботов Китай ➥ 0.18$ — Запуски ботов + сообщение (/settings) ➥ 0.5$ — Рефералы в боты ➥ 0.3$ — Репост Истории + просмотр ➥ 0.3$ — Лайк Истории + просмотр Услуги YouTube АКТИВНОСТЬ ➥ 8$ — Кастомные Комментарии Живые Юзеры ➥ 15$ — Кастом Позитивные Комментарии + Лайк + Просмотр Видео ➥ 10$ — Рандомные Позитивные Комментарии + Лайк + Просмотр Видео ➥ 0.55$ — Поделиться Видео Живые Юзеры ➥ 0.5$ — Зрители Эфира (15мин) Живые Юзеры ➥ 18$ — Живые Просмотры Видео 60мин+ Видео ➥ 5$ — Рандомные Позитивные Комментарии ➥ 0.5$ — Лайк под Видео ➥ 0.7$ — Просмотр Видео МИКС + Монетизация Услуги MAX ПОДПИСЧИКИ (LIFETIME) ➥ 22$ — Публичные Каналы ПОДПИСЧИКИ (Дневные) ➥ 15$ — 90 дней ➥ 12$ — 60 дней ➥ 8$ — 30 дней АКТИВНОСТЬ И БОТЫ ➥ 3.50$ — Просмотры на пост ➥ 7$ — Макс Репосты ➥ 8$ — Положительные Реакции ➥ 13$ — Реакция ➥ 13$ — Реакция ➥ 13$ — Реакция ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ БОНУСЫ И ОФФЕРЫ КЭШБЭК ДО 10% для крупных реселлеров API доступ для ваших панелей ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ ОПЛАТА: Crypto | LOLZ Market САЙТ: SMMTOOL.ORG Telegram: SMMTOOL_ORG
  • 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..