Jump to content

Recommended Posts

Posted (edited)

Event Demo 

 

 

 

Procure por commandname-e em seu sistema e adicione no final dele

115	114	register
116	115	unregister


 

/** restrictions for event */
  * Cannot Potion in Event.
  * Cannot Summon in Event.
  * Cannot Restart in Event.
  * Cannot Logout in Event.
  * Cannot attack same team.

 

code  v1  https://pastebin.com/YRaCbU9T


 

code v2 :

* added event prize name announcement. Thank you @StinkyMadness

CopyOnWriteArrayList  moved to  ConcurrentHashMap.newKeySet, for better performance. Thank you @Tryskell

TVT_DOOR_LIST  moved to getProperty and removed arrays. Thank you @Tryskell

* Removed useless calls

* added weather message for next event when coming into play. Thank you @ edusz93  for the idea

 

Código v2 : https://pastebin.com/raw/59jyZa14

 

Autor do novo evento Williams

Autor do código original DnR

Edited by Williams
  • Like 2
Posted
9 hours ago, DenArt Designs said:

it looks like it still needs updates for acis maybe ask some advices how to update it fully, also many it has many uneeded calls and 2 types of schedules but thank you for trying

Reward 6393,5 

Reward 57,10000

  • Like 1
  • 4 weeks later...
Posted
On 15/07/2019 at 03:58, DenArt Designs said:

Parece que ainda precisa de atualizações para acis talvez pedir alguns conselhos como atualizá-lo totalmente, também muitos tem muitas chamadas não atendidas e 2 tipos de horários, mas obrigado por tentar

what can i improve?

Posted
19 minutes ago, Williams said:

what can i improve?

 

To name few, after some look :

 

* eventTimer(int time) should be handled with a Future<?> task and ThreadPool.

* _originalCoordinates is (probably) redundant with _savedLocation, and the use of it is wrong (see _savedLocation usage to see correct)

* CopyOnWriteArrayList container should be avoid for performance reason, use ConcurrentHashMap.newKeySet instead.

+                   if (reward == null)
+                       continue;

can never be null, since you manipulate it from A TO Z.

* TVT_DOOR_LIST doesn't seem to be used and can use getProperty(final String name, final int[] defaultValue, final String delimiter) instead of self coded array manipulation.

  • Upvote 1
Posted
Thread.sleep(1);

I want add this in my signature and that it was shown to everyone in a forced manner.

 

P.S. This style of coding the guys with red eyes from C/C++. If you really likes this style then please use delay, at least 100 ms. Give for other processes more free time.

Posted
12 minutes ago, Tryskell said:

 

To name few, after some look :

 

 

 

Since you got bored developing the project you created why you even care replying everytime someone refers it's name  ? Just curious spoon guy

Posted (edited)
1 hour ago, Dev said:

 

Since you got bored developing the project you created why you even care replying everytime someone refers it's name  ? Just curious spoon guy

 

Care about your own shit, maybe ? It seems you got some brown left in your pants.

 

It's not because I don't do public release that it means I don't develop.I'm almost 100 commits ahead current public latest release - which is, in my world, almost 1.5 revision.

 

16m3mvs.png

Edited by Tryskell
  • Like 1
Posted
2 hours ago, Tryskell said:

 

Para citar alguns, depois de alguma olhada :

 

* eventTimer (int time) deve ser tratado com uma tarefa Future <?> e ThreadPool.

* _originalCoordinates é (provavelmente) redundante com _savedLocation e o uso dele está errado (consulte Uso de _savedLocation para ver correto)

* O contêiner CopyOnWriteArrayList deve ser evitado por motivos de desempenho, use ConcurrentHashMap.newKeySet.


                    
                       

nunca pode ser nulo, desde que você o manipule de A para Z.

* TVT_DOOR_LIST não parece ser usado e pode usar getProperty (final String name, int final [] defaultValue, final String delimiter) ao invés de auto manipulação de array codificada.

 

thank you very much, i will try to do what you say.

You do a great job with aCis.

Posted

a lot to redo so I did this makeover.

 

I removed

for (Player blue : _blueTeam)
		{
			if (blue == null)
				continue;
			
			// Give rewards
			if (_state != EventState.INITIAL && (_blueTeamKills > _redTeamKills || _blueTeamKills == _redTeamKills && Config.REWARD_DIE))
			{
				for (IntIntHolder reward : Config.TVT_REWARDS)
				{
					if (reward == null)
						continue;
					
					blue.addItem("TvTReward", reward.getId(), reward.getValue(), null, true);
				}
				if (blue.isDead())
					blue.doRevive();
				
				removePlayer(blue);
				blue.teleportTo(blue.getOriginalCoordinates(), 0);
			}
		}
		
		for (Player red : _redTeam)
		{
			if (red == null)
				continue;
			
			// Give rewards
			if (_state != EventState.INITIAL && (_blueTeamKills < _redTeamKills || _blueTeamKills == _redTeamKills && Config.REWARD_DIE))
			{
				for (IntIntHolder reward : Config.TVT_REWARDS)
				{
					if (reward == null)
						continue;
					
					red.addItem("TvTReward", reward.getId(), reward.getValue(), null, true);
				}
				if (red.isDead())
					red.doRevive();
				
				removePlayer(red);
				red.teleportTo(red.getOriginalCoordinates(), 0);
			}
		}
		
		// Event ended in a tie and no rewards will be given
		if (_blueTeamKills == _redTeamKills && !Config.REWARD_DIE)
			World.announceToOnlinePlayers("TvT Event: Event ended in a Tie. No rewards will be given!", true);
		
		_blueTeam.clear();
		_redTeam.clear();
		_redTeamKills = 0;
		_blueTeamKills = 0;

I did like this:

 

// Check the winning team.
		TeamType teamWinner = TeamType.NONE;
		
		if (_state != EventState.INITIAL)
		{
			// Tied teams
			if (_blueTeamKills == _redTeamKills && !Config.REWARD_DIE)
				World.announceToOnlinePlayers("TvT Event: Event ended in a Tie. No rewards will be given!", true);
			else if (_blueTeamKills > _redTeamKills)
				teamWinner = TeamType.BLUE;
			else
				teamWinner = TeamType.RED;
			
			if (teamWinner == TeamType.NONE)
				World.announceToOnlinePlayers("TvT Event: The event ends in a draw!");
			else
			{
				for (Player player : World.getInstance().getPlayers())
				{
					if (player == null)
						continue;
					
					// Prizes are awarded to the winning team.
					if (player.getTeam() == teamWinner)
					{
						for (IntIntHolder reward : Config.TVT_REWARDS)
							player.addItem("TvTReward", reward.getId(), reward.getValue(), null, true);
						
						if (player.isDead())
							player.doRevive();
						
						removePlayer(player);
						player.teleToLocation(player.getOriginalCoordinates());
					}
				}
			}
		}
		
		_blueTeam.clear();
		_redTeam.clear();
		_blueTeamKills = 0;
		_redTeamKills = 0;

 

I will remove _redTeamKills, _blueTeamKills and move to Player.java etc...

 

about threadpool execution i don't know how i will do i will do more research on.

Posted
On 8/6/2019 at 9:30 PM, Williams said:

a lot to redo so I did this makeover.

 

I removed


for (Player blue : _blueTeam)
		{
			if (blue == null)
				continue;
			
			// Give rewards
			if (_state != EventState.INITIAL && (_blueTeamKills > _redTeamKills || _blueTeamKills == _redTeamKills && Config.REWARD_DIE))
			{
				for (IntIntHolder reward : Config.TVT_REWARDS)
				{
					if (reward == null)
						continue;
					
					blue.addItem("TvTReward", reward.getId(), reward.getValue(), null, true);
				}
				if (blue.isDead())
					blue.doRevive();
				
				removePlayer(blue);
				blue.teleportTo(blue.getOriginalCoordinates(), 0);
			}
		}
		
		for (Player red : _redTeam)
		{
			if (red == null)
				continue;
			
			// Give rewards
			if (_state != EventState.INITIAL && (_blueTeamKills < _redTeamKills || _blueTeamKills == _redTeamKills && Config.REWARD_DIE))
			{
				for (IntIntHolder reward : Config.TVT_REWARDS)
				{
					if (reward == null)
						continue;
					
					red.addItem("TvTReward", reward.getId(), reward.getValue(), null, true);
				}
				if (red.isDead())
					red.doRevive();
				
				removePlayer(red);
				red.teleportTo(red.getOriginalCoordinates(), 0);
			}
		}
		
		// Event ended in a tie and no rewards will be given
		if (_blueTeamKills == _redTeamKills && !Config.REWARD_DIE)
			World.announceToOnlinePlayers("TvT Event: Event ended in a Tie. No rewards will be given!", true);
		
		_blueTeam.clear();
		_redTeam.clear();
		_redTeamKills = 0;
		_blueTeamKills = 0;

I did like this:

 


// Check the winning team.
		TeamType teamWinner = TeamType.NONE;
		
		if (_state != EventState.INITIAL)
		{
			// Tied teams
			if (_blueTeamKills == _redTeamKills && !Config.REWARD_DIE)
				World.announceToOnlinePlayers("TvT Event: Event ended in a Tie. No rewards will be given!", true);
			else if (_blueTeamKills > _redTeamKills)
				teamWinner = TeamType.BLUE;
			else
				teamWinner = TeamType.RED;
			
			if (teamWinner == TeamType.NONE)
				World.announceToOnlinePlayers("TvT Event: The event ends in a draw!");
			else
			{
				for (Player player : World.getInstance().getPlayers())
				{
					if (player == null)
						continue;
					
					// Prizes are awarded to the winning team.
					if (player.getTeam() == teamWinner)
					{
						for (IntIntHolder reward : Config.TVT_REWARDS)
							player.addItem("TvTReward", reward.getId(), reward.getValue(), null, true);
						
						if (player.isDead())
							player.doRevive();
						
						removePlayer(player);
						player.teleToLocation(player.getOriginalCoordinates());
					}
				}
			}
		}
		
		_blueTeam.clear();
		_redTeam.clear();
		_blueTeamKills = 0;
		_redTeamKills = 0;

 

I will remove _redTeamKills, _blueTeamKills and move to Player.java etc...

 

about threadpool execution i don't know how i will do i will do more research on.

 

Tem um pequeno erro nesse código que faz com que somente o time ganhador seja teleportado de volta e removido do evento. 

 

Correção:

// Check the winning team.
		TeamType teamWinner = TeamType.NONE;
		
		if (_state != EventState.INITIAL)
		{
			// Tied teams
			if (_blueTeamKills == _redTeamKills && !Config.REWARD_DIE)
				World.announceToOnlinePlayers("TvT Event: Event ended in a Tie. No rewards will be given!", true);
			else if (_blueTeamKills > _redTeamKills)
				teamWinner = TeamType.BLUE;
			else
				teamWinner = TeamType.RED;
			
			if (teamWinner == TeamType.NONE)
				World.announceToOnlinePlayers("TvT Event: The event ends in a draw!");
			else
			{
				for (Player player : World.getInstance().getPlayers())
				{
					if (player == null)
						continue;
					
					// Prizes are awarded to the winning team.
					if (player.getTeam() == teamWinner)
					{
						for (IntIntHolder reward : Config.TVT_REWARDS)
							player.addItem("TvTReward", reward.getId(), reward.getValue(), null, true);
					}
				}
			}
			
			for (Player player : World.getInstance().getPlayers())
			{
				if (player.isDead())
					player.doRevive();
				
				removePlayer(player);
				player.teleToLocation(player.getOriginalCoordinates());
			}
		}
	
	_blueTeam.clear();
	_redTeam.clear();
	_blueTeamKills = 0;
	_redTeamKills = 0;
	}

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



  • Posts

    • Auto Farm System  100% functional  Fully configurable (zones, skills, behavior)   Interesting, I'd like to see it.
    • 🔥 L2Ext Custom Interlude VANG – 2026 Release High-End Extender for Lineage 2 Interlude by L2Devs   🎯 About L2Devs L2Devs is a production-ready custom extender for Lineage 2 Interlude, designed for stable long-term servers that require performance, security, balance and flexibility. Developed and battle-tested for more than 6 years on live servers, the 2026 Release represents a major evolution, focusing not only on new features but also on stability, configurability and abuse prevention. This extender is aimed at serious server owners, not experimental or low-quality projects.   🚀 What’s New in 2026 Temporary Fake Hero System Fully configurable (duration, visuals, effects) Visual Weapons System Client-side visual weapons without stat impact Visual Armor by Zone System Fully configurable per zone Advanced Balance System Fully configurable per class, skill and scenario Armor Enchant Bonus System Extra bonuses at +7 / +8 / +9 (fully configurable) Enchant Stats System Full control of stats per enchant level Damage Cap System Fully configurable damage limits Champion System with Rewards Custom champions with configurable rewards Item Percentage Steal by Zone Fully configurable zone-based system Raid Boss HP Percentage Announce Last Hit Announce System (Raid / Boss) Pet Sales via Multisell Auto Farm System ✔️ 100% functional ✔️ Fully configurable (zones, skills, behavior) Auto Potion System Configurable by Item ID, HP/MP %, reuse delay New Captcha Mod v4 (2026) Improved bot detection & automation prevention New Event Modes TvT – Last Man Standing (LMS) KTB – Kill The Boss Fully configurable ⚙️ Core Features General Systems Cached Extended IOBuffer (8192kb) Hair2Slot Cache Item Bid Auctioner for Clan Halls Offline Shops & Buffers restore after restart (fixed location) Offline Buffer System ALT+B Augmentation House Shift+Click Drop/Spoil List Auto Learn Skills Scheme Buffer Global Trade Chat Global Vote Reward System Achievements System Custom Subclass (Accumulative) Change Name Color / Title Color Change Gender / Change Race (Skin) VIP Systems (chat, autoloot, features) Command .menu fully configurable Command .hero enable/disable aura PvP / PK / War PvP Auto Announce System (rebuilt, configurable) PvP Reward / PK Reward / War Reward Epic Items Rank Raid Boss Points Rank Global PvP Rankings Anti abuse validations Olympiad Olympiad Season Rank Pages Restore Stats on Fight Start Olympiad Second Time System Last 10 Minutes Entry Third Class Summons Control Castle / Siege Castle Announce Time Castle Standby Time Siege-related optimizations Disable SSQ System after Castle Siege Drops & Enchants Fully configurable drop system (min/max level, all mobs, RBs, individual mobs) Spellbook Drop enable/disable Custom Cancel Effects (min/max) Blessed Enchant Rates (armor & weapons) Enchant restrictions & protections Quality of Life Fix Spiritshot Delay Fast NPC loading fix Show Mob Level Show NPC Clan Flag Use Any Dyes No Drop on Death (configurable) No Sell / No Private Buy Items Min Level Trade Soulshot no system message Spawn Protection System 🎮 Events Engine Team vs Team Capture The Flag Death Match Last Man Standing Destroy The Base Korean Style Events Castle Siege Events Happy Hour Event (reworked) AFK Time Control Reset Reuse Skills Reset Buffs on Finish Firework Effects Win/Loss Rewards Custom Team Titles & Colors Kill Counter in Title Open Door / Wall System Balance Bishops Disconnect Recovery Validation 🔁 Reload Systems (Live Reload) EnterWorld HTML Donate Shop Offline Buffer Champion NPC AntiBot VIP System Auction System AutoLoot Castle Siege Manager Character Lock Clan PvP Status Auto Learn Clan Reputation Rank Clan Systems Skill Data Door Data Deco Data Multisell Drop List Custom Config Files 🛡️ Security & Stability Anti-Bot & Captcha v4 Anti-Exploit & Anti-Abuse protections Safe enchant & item handling Crash-safe routines Tested on live servers for 3+ years 📊 Performance Optimized thread usage Reduced database load Improved packet handling Designed for high concurrency environments 💼 License & Support Price: 450 USDT per IP / initial installation License: One server / one IP / 30 USDT monthly Payments: Crypto only Included Support Extender installation Extender configuration support Not Included Script configuration (consult separately) Custom MOD development (available on request) Source code not included, please inquire for pricing 📩 Contact Telegram: @L2Devs Discord: .unknownsoldier Website: https://l2devs.com
    • Prices added, sorry for the inconvenience.   Greetings!!
    • There is a big difference when somebody ''use some brand names'' with a role of his discord to ensure that people will trust him. Here is MXC and not  your friends discord. Read the rules before you post, and read the rules before you buy.
  • 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..