Jump to content

Recommended Posts

Posted

A Simple 1vs1 Event Manager (for FREYA)

(Ill post this before

Knipex does, and tries to claim it as his)

 

http://www.4shared.com/file/tlx5Btql/EventManager_Core.html

http://www.4shared.com/file/Jn_6BPqR/EventManager_DP.html

 

Prerequisites:

Highly Recommend to use Fence Mod with this (Fence Mod)

Highly Recommend to use Geodata with this

Must use inside a Combat, PvP , or AutoFlag Zone !!

If you change your NPCID for it in the eventmanager.properties you must also change data/html/default/70012.html to that same #

The NPC you use MUST be of 'type' -> 'L2Npc' , in your database

 

I made and used this specifically for the Coliseum. It's much easier than doing 1vs1's manually. 1 GM Can handle 200+ people with this.

If you use the Fences, which I highly recommend, you should spawn 2 of them. 1 Big for the Match Area, 1 Small for the Winner Box.

Here are the dimensions I use from my database:

1	2	149404	46725	-3413	1500	1000
2	2	149500	47778	-3413	1000	300

 

 

To begin:

TO begin you announce something like: "1vs1 Now in the Coliseum, 5 mins to participate!"

Spawn your NPC for it in the Coliseum also. You will need the NPC so ppl can sign up and to CONTROL THE EVENT!

Click on the NPC "Participation ON" and wait until people sign up.

I recommend waiting until you have an EVEN number of participating players, on the Participation List.

When you're ready to begin, click on "Participation OFF" !

 

 

Match Control:

  • To begin a match, simply click the "Match" button.
    If you see 'Not more than 1 player'...Click 'Match' again! (this means someone on the participation list logged off or d/c'd usually)
  • When someone dies, or you get tired of waiting click the "End Match" button.
    If nobody died, the person with the most damage will win.
     
  • The winner will get teleported to the winner location, specified in eventmanager.properties. (L2JConfig)
  • The loser will get teleported to the loser location ,specified in eventmanager.properties. (L2JConfig)
  • The loser will get REWARDED with the loser reward ,specified in eventmanager.properties. (L2JConfig)
     
  • Repeat this process, Match -> End Match, until you see on the NPC "Participants: 1" or "Participants: 0" !
  • When you get to that point, it is time for "Next Round". This will place all the winners back in to the partcipant list for round #2,3,4,5,6,7,8......etc

 

You keep repeating this process until you have only 1 player left, or until you get bored. The player(s) remaining is the winner(s).

The GM must REWARD the winner(s) with an item(s), MANUALLY, at the end of the FINAL ROUND!!!!

 

 

Q & A:

Q: Do match players have buffs?

A: Match players buffs are removed on teleport & they receive the TvT buffs you have specified in L2JConfig/L2JMods (also have time to self buff)

 

Q: Can match players use potions?

A: Most types of potions, and Scrolls of escape, are disabled by default in Server\gameserver\data\scripts\handlers\itemhandlers\ItemSkills.java

 

Q: What happens if a 'Participant' Disconnects or logs off while signed up?

A: When they are chosen for a 'Match' the gm will see a message 'Not more than 1 player',  and they will be removed from all lists. Just click Match again to pick new players for the next Match.

 

Q: What happens if a 'Winner" Disconnects or logs off?

A: Same as above.

 

Q: What happens if in a match someone clicks 'To nearest village/castle/clan hall'?

A: They can't.

 

Q: How are the matches chosen?

A: The match players are chosen completely random when the gm clicks 'Match' from the list of participants.

 

Q: Can people on the same IP participate?

A: Yes, this system checks participants WAN IP and LOCAL IP, so people in Net Cafes can all participate as long as they are on different Local IP's (computers)

 

Q: Can I use this without the Fence Mod?

A: Yes, in this case I suggest closing the Coliseum doors so losers can't get back inside, and telling the winners to stay on the side of the Coliseum.

 

Q: Is this hard to install and use?

A: The patches should go in no problems. It may seem overwhelming to learn to use, but really it is very simple to control once you play with it a little.

 

 

Misc:

Soon I will release my Auto Changing/Voting for Farming Zones code from L2Sonic-L2Noble, Farm Vote Manager, and Farm Zone Clan system so Knipex doesn't post it and try to claim he coded it also.

He can't code, only noobie stuff like htmls and gm commands he copies and pastes.

Posted
ExShowScreenMessage message1 = new ExShowScreenMessage(1,0,2,0,0,0,0,false,5000,1,msg);

 

 

I have problem with that line?

 

L2jServer stable last rev

 

 

public ExShowScreenMessage(int type, int messageId, int position, int unk1, int size, int unk2, int unk3, boolean showEffect, int time, boolean fade, String text, NpcStringId npcString)

Posted

 

I have problem with that line?

 

L2jServer stable last rev

 

 

public ExShowScreenMessage(int type, int messageId, int position, int unk1, int size, int unk2, int unk3, boolean showEffect, int time, boolean fade, String text, NpcStringId npcString)

 

Hi5 I assume?

 

You will need to make a new method in your gameserver.network.serverpackets ExShowScreenMessage.java.

Add this code , under the one that looks almost exactly like it.

 

public ExShowScreenMessage (int type, int messageId, int position, int unk1, int size, int unk2, int unk3,boolean showEffect, int time,boolean fade, String text, int npcString)
{
  _type = type;
  _sysMessageId = messageId;
  _unk1 = unk1;
  _unk2 = unk2;
  _unk3 = unk3;
  _fade = fade;
  _position = position;
  _text = text;
  _time = time;
  _size = size;
  _effect = showEffect;
  _npcString = npcString;
}

 

 

then on your eventmanager.java you will need to change the current 'private void SendScreenMsg' method to this.

 

	private void SendScreenMsg(L2PcInstance _play, String msg)
{
	ExShowScreenMessage message1 = new ExShowScreenMessage(1,0,2,0,0,0,0,false,5000,false,msg,-1);
	_play.sendPacket(message1);
}

 

Then it should work...

 

 

 

 

 

//true Doug

 

Anyway this code is the best.  And is 100% Midnight's code.

 

I dont understand why you attempted you rip my code dude..... that was totally not cool.......

 

Posted

great share...only missing is the automatic reward for the winner..if you do that will be perfect :)

 

going to test it

 

Sooner, or later, I wanted to make it a press 1 button deal(gm only), to start it and sit back and let it run.

It will probably be later, rather than sooner though.

 

The gm has to reward the winner(s) at the end of  the FINAL round. But still as it is, clicking buttons is A LOT easier than trying to do one of

these 1vs1 events in the coliseum without this.. ;D

Posted

i have one error ! on game side !

 

i use your method for Hi5 Server L2J - Server and all works Perfect on Eclipse

 

and when i create one NPC at game i cant see NPC Name and normal Player Can Target them !

 

i change npc id cause 70012 it's too high for normal NPC and of course i am using Custom Table's and nothing :S

Posted

i have one error ! on game side !

 

i use your method for Hi5 Server L2J - Server and all works Perfect on Eclipse

 

and when i create one NPC at game i cant see NPC Name and normal Player Can Target them !

 

i change npc id cause 70012 it's too high for normal NPC and of course i am using Custom Table's and nothing :S

 

Did you install the dp patch?

Did you change your npcid in L2JConfig->Eventmanager settings? If you did change the event manager npcid make sure you also change

the html filename in gameserver/data/html/default/70012.htm to whatever NPCID you are using.

 

So if you are using NPCID # 4001 , gameserver/data/html/default/70012.htm must be changed to 4001.htm.

 

this is my npc entry from my database, I use custom_npc (table) also. (FREYA database)

70012	32567	Event Manager	1	Participation	1	LineageNPC2.disciple_silen_b	15.75	25.73	70	female	L2Npc	40	2444.468190000000000	1345.800000000000000	7.500000000000000	2.700000000000000	40	43	30	21	20	20	0	0	688.86373	295.91597	470.40463	216.53847	253	4	0	333	0	0	0	50	160	1	1	0	1

 

 

 

nice share

sounds good for pvp servers

Thank you, it really is a pretty fun little thing. I can't stress enough of how much easier this makes it for a single GM to do 1vs1 Events in the coliseum. After doing a couple of 1vs1 events with an event gm on a past server of mine, I said to myself, faaaaaaak that, I will make something to help with this, it was too crazy and hard to control 200+ ppl. Then it was made and grew from there..

 

I hope some people use and enjoy it.

Posted

 

and when i create one NPC at game i cant see NPC Name and normal Player Can Target them !

 

i change npc id cause 70012 it's too high for normal NPC and of course i am using Custom Table's and nothing :S

 

In H5 u need to register new npc in npcaidata table respectively in custom_npcaidata in order to see its name....

Posted

Did you install the dp patch?

Did you change your npcid in L2JConfig->Eventmanager settings? If you did change the event manager npcid make sure you also change

the html filename in gameserver/data/html/default/70012.htm to whatever NPCID you are using.

 

So if you are using NPCID # 4001 , gameserver/data/html/default/70012.htm must be changed to 4001.htm.

 

this is my npc entry from my database, I use custom_npc (table) also. (FREYA database)

70012	32567	Event Manager	1	Participation	1	LineageNPC2.disciple_silen_b	15.75	25.73	70	female	L2Npc	40	2444.468190000000000	1345.800000000000000	7.500000000000000	2.700000000000000	40	43	30	21	20	20	0	0	688.86373	295.91597	470.40463	216.53847	253	4	0	333	0	0	0	50	160	1	1	0	1

 

 

Yes i already do this ! :/

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

    • I can see that the admins arent taking any action, yet they still seem willing to share information about various other people names and IP addresses. But when it comes to scams, no one reacts.      
    • Server Info Chronicle:  Interlude                                                                                                                                    XP: 100x | SP: 100x | Drop: 50x | Adena: 75x Enchant: Safe +3 |  Max +21 Website: Website Link Discord: Discord Link   WHY? When I was a teenager I had this idea. Build my own Lineage 2 server. My own rules. My own world. I wasn't a programmer. I had no idea how any of it worked. I tried, hit a wall, and quit. But the idea never left. I came back years later. Got further. Quit again. Watched friends try similar things. The idea stayed stuck in my head for fifteen years. I'm a developer now. I finally finished it. Not because I suddenly had more time - I have a full-time job and real responsibilities. An hour before bed if I'm lucky. That's actually exactly why I finished it.   The problem I kept running into I still love this game. But every server I tried as an adult made that one hour feel worthless. Log in, kill a few mobs, make no real progress, log out frustrated. The game was designed for someone with unlimited time. That person doesn't exist in my life anymore. I looked around. Everyone I used to play with has the same problem. Same love for the game. Same lack of time. Jobs, families, maybe an hour late at night. So I stopped waiting for someone else to build it.           WHAT? Custom starting zone in Gludin (up until 2nd profession start) Talent system - rebirth at level 80 and choose your talents Bounty hunter system - daily tasks to kill random monsters to receive great reward! Potion crafting system - custom HP/MP potions and recipes Custom 1st & 2nd class quests (shorter) Scheme buffer Shop until C grade   Visit our website to get more info: Website Link   The philosophy 95% of the game is completely soloable. No clan required. No raid schedules. No guilt when you have to log off. You are the solo director of your own session. Log in, pursue your goal for an hour, log out on your own terms. When you've conquered what you wanted - you stop naturally. A new season drops with fresh Talent Tree changes and you come back to build something completely different. No endless stretched grind. No pay-to-win. No shady admin decisions. No surprise wipes. I'm one developer who built this because I love it.                                          This is the server I needed fifteen years ago. Glad I finally had the skills to build it. Come see what I made. [Forever Lineage]
    • Hello MaxCheaters community! We’ve all been there: you spend months customizing your NPCs, balancing classes, and setting up the perfect farm zones. You launch your server, the hype is real, and suddenly you hit 200 players—and the "delay" starts. The mobs stop reacting, the Olympiad matches stutter, and your players start complaining on Discord. Many "newbie" admins think the solution is just throwing more RAM at the VPS. While hardware matters, Java is a finicky beast. If you don't tune your JVM (Java Virtual Machine) and your core code, you’ll lag even on a NASA supercomputer. Today, I’m sharing a deep dive into optimizing your L2 server for maximum performance. 1. The Myth of "More RAM" The biggest mistake people make is assigning 32GB of RAM to a server that only needs 8GB. In Java, if your Heap size is too large, the "Garbage Collector" (GC) has to work much harder. When the GC runs a "Full GC" cycle on a massive heap, it performs a "Stop-the-World" event. This literally freezes your server threads for 1–3 seconds to clear memory. Recommendation: For a mid-rate server with 500 players, 6GB to 8GB of Xmx (Max Heap) is usually the sweet spot. Use G1GC (Garbage First Garbage Collector) instead of the old ParallelGC. It handles large heaps much more gracefully by breaking memory into regions. 2. JVM Startup Flags (The Secret Sauce) Don't just run java -jar l2jserver.jar. You need specific flags to ensure the CPU prioritizes the right tasks. Try adding these to your start.sh or start.bat: Bash   -Xms6G -Xmx6G -XX:+UseG1GC -XX:MaxGCPauseMillis=50 -XX:+OptimizeStringConcat -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:+TieredCompilation MaxGCPauseMillis=50: This tells Java, "Try not to freeze the server for more than 50ms at a time." It makes the gameplay feel much smoother for the end-user. 3. Geodata and Pathfinding Optimization Geodata is the biggest CPU killer in Lineage 2. Every time a mob moves or a player clicks, the server calculates "Can I see this target?" and "Is there a wall in the way?". The Fix: Use a "Pathfinding Cache." If 100 players are running from the Giran Gate to the Luxury Shop, the server shouldn't calculate that path 100 times. Check your Geodata format: Ensure you are using the .l2j or .dat formats optimized for your specific core. If your console is flooded with "Pathfind node limit reached," increase your node limit in the geo.properties file, but be prepared for higher RAM usage. 4. Database Pooling (HikariCP vs. C3P0) If your server freezes for a split second every time someone saves their character or buys an item, your Database Connection Pool is the bottleneck. Most old L2J cores use C3P0, which is outdated and slow. Switch to HikariCP: It is significantly faster and handles "dead" connections much better. Also, ensure your characters and items tables are indexed correctly in MySQL. Running a VACUUM or OPTIMIZE TABLE once a week can prevent those annoying "saving player data" spikes. 5. Network Threading In your server settings, look for "Network" or "Thread" configurations. Usually, you’ll see SelectorThreads and WorkerThreads. Selector Threads: Should be equal to the number of physical CPU cores. Worker Threads: This is where the logic happens (skills, movement). If this is too low, actions will "queue up," creating a delay even if your ping is low. 6. Community Board (BBS) Optimization On MaxCheaters, we love fancy Community Boards. However, if your Buffer or Shop script is poorly coded, it might be reloading the entire HTML from the hard drive every time a player clicks a button. The Fix: Ensure your scripts cache the HTML in the RAM. Reading from an SSD is fast, but reading from RAM is thousands of times faster. Conclusion Optimization isn't a "one-click" fix; it’s about finding the balance between your hardware and your software. Start with your JVM flags, clean up your Geodata settings, and make sure your Database isn't choking on old logs. If you found this helpful, leave a comment or a "Thank You" below! If you have specific lag issues with a certain core (aCis, L2Emu, etc.), post your server.properties and I’ll try to help you tune it.
  • 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..