Jump to content

Recommended Posts

Posted (edited)

Nice idea!

 

BUT the implementation is not that nice..

Why didn't u wrote that as a DP sided script..

Also u're using thread-safe classes where u don't need to, and not thread-safe where u had to..

Using public variables to access from outside and methods to access inner vars is not so nice either.

Btw we use to add '_' (underscore) prefix to global variables not to local ones so you don't have to use explicit 'this.var = var'

Also we stopped using e.printStackTrace() because in windows it doesn't gets logged on log files, we use Logger for that (Same goes for System.out.println())

(new Thread(new RankPvpSystemPvpTask(player, target))).start();

 Why don't u simply use that instead.

ThreadPoolManager.getInstance().executeTask(new RankPvpSystemPvpTask(player, target));

It also executes the task in another thread without having to create new thread because there is already created a pool of threads used by the whole server.

 

Actually the code is really messed up (That's what we call spaghetti  code) that's why u have 20 pages of typo reports, i think u should start writing a bit more cleaner & safe.

Here i attach similar script i started some time ago, it doesn't supports most of the things u did but count it as an example of how i write things.

Note: This is an alpha version, totally not ready for use version, it may work but it still needs work to be done to consider it as a final version.

PvP.zip

Edited by UnAfraid
Posted (edited)

Thanks for this post UnAfraid, but like i sad some time ago i still learn java. I will try apply your clues in my system ;)

 

 

Why didn't u wrote that as a DP sided script

It is better for debug for me if it is in Core packages.

 

 

Also u're using thread-safe classes where u don't need to, and not thread-safe where u had to..

So where i should use thread-safe?

 

 

Using public variables to access from outside and methods to access inner vars is not so nice either.

I use that public variable only in L2PcInstance, reason: I don't want change original code too much (adding getter and setter will add too much code)

 

I use inner methods for obtain inner fields, because i think it's look better, and cleaner :)



_killersList.add(killer);
// or
getKillerList().add(killer);

...but now i think the first line looks better than third line.

 

 

 

ThreadPoolManager.getInstance().executeTask(new RankPvpSystemPvpTask(player, target));

It is applied right now.

 

About _ (underscore), yes i know this rule ;) but some code is auto-generated in eclipse, so mostly i don't look into this methods.

 

About e.printStackTrace(), it will be changed for Logger.

 

 

 

that's why u have 20 pages of typo reports,

Can you explain what do you mean?

 

 

i think u should start writing a bit more cleaner & safe

What mean safe?

 

 

Finally, thanks for check my work. I am really glad :)

Edited by matthewmaster04
Posted (edited)

Every time u need some Map/List which will be used only once to add and then only to read doesn't have to be FastMap/FastList (Javolution) they are thread-safe use HashMap (When order is not important LinkedHashMap when u need insert order) and ArrayList.

 

In case you have to use a Map/List to add/remove entries during run-time then u have to use thread-safe Map/List i'd rather use ConcurrentHashMap/CopyOnWriteArrayList (In case when insert order matters only then FastMap)

 

If you like to leave little fingerprints over the source i'd implement some event listeners.

With that you can create some interface bridge between your engine and every other l2j based server.

 

Debugging is easy within Core or DP it doesn't really matters eclipse's debugger works well on both sides equally.

Edited by UnAfraid
Posted (edited)

So in this case, standard Map/List will be correct and i can remove FastMap from this pack, i think.

 

ConcurrentHashMap & CopyOnWriteArrayList can be useful but now i am little confused what will be better for me (i need more knowledge).

 

Anyway thanks for help ;)

Edited by matthewmaster04
Posted (edited)

Codding safer means you should make sure your code is not going to cause any problems like exceptions (Mostly nulls), exploits..  as you write it.

Edited by UnAfraid
Posted (edited)

U also could do that 

for (Entry<Integer, KillerPvpStats> entry = getKillerPvpTable().entrySet())

instead of 

for (FastMap.Entry<Integer, KillerPvpStats> e = getKillerPvpTable().head(), end = getKillerPvpTable().tail(); (e = e.getNext()) != end;)

It looks way more cleaner and understandable also when u change the underlying implementation you'll not have to worry about rewriting all the loops u did in that way.

 

Also i'd use a bit more java 7 features like the ARM (Auto resource management), mostly for database queries look at current l2j sources to see how we handled them

Edited by UnAfraid
Posted (edited)

Thanks again, i will apply it in next rev. ;)

 

It should be like:

for (Map.Entry<Integer, Rank> e : rankList.entrySet())

And btw, is exist a Map what allows you add value on selected position?

Example:



_map.insert(position, key, value);
Edited by matthewmaster04
Posted

 

Thanks again, i will apply it in next rev. ;)

 

It should be like:

for (Map.Entry<Integer, Rank> e : rankList.entrySet())

And btw, is exist a Map what allows you add value on selected position?

Example:



_map.insert(position, key, value);

No, you must use comparator.

  • 2 weeks later...
Posted

i have a problem  

 

Buildfile: C:\workspace\L2J_Server\build.xml
checkRequirements:
getChangelogDateVersion:
     [exec] Result: 1
     [exec] Result: 1
init:
   [delete] Deleting directory C:\workspace\L2J_Server\build\bin
    [mkdir] Created dir: C:\workspace\L2J_Server\build\bin
dist:
     [sync] Removed 2 dangling files from C:\workspace\L2J_Server\build\dist
compile:
    [javac] Compiling 1692 source files to C:\workspace\L2J_Server\build\bin
    [javac] C:\workspace\L2J_Server\java\com\l2jserver\gameserver\handler\UserCommandHandler.java:24: error: cannot find symbol
    [javac] import com.l2jserver.gameserver.masteriopack.rankpvpsystem.IUserCommandHandlerPvpInfo;
    [javac]                                                           ^
    [javac]   symbol:   class IUserCommandHandlerPvpInfo
    [javac]   location: package com.l2jserver.gameserver.masteriopack.rankpvpsystem
    [javac] C:\workspace\L2J_Server\java\com\l2jserver\gameserver\handler\VoicedCommandHandler.java:24: error: cannot find symbol
    [javac] import com.l2jserver.gameserver.masteriopack.rankpvpsystem.IVoicedCommandHandlerPvpInfo;
    [javac]                                                           ^
    [javac]   symbol:   class IVoicedCommandHandlerPvpInfo
    [javac]   location: package com.l2jserver.gameserver.masteriopack.rankpvpsystem
    [javac] C:\workspace\L2J_Server\java\com\l2jserver\gameserver\GameServer.java:317: error: load() has private access in ServerSideImage
    [javac] ServerSideImage.getInstance().load();
    [javac]                             ^
    [javac] C:\workspace\L2J_Server\java\com\l2jserver\gameserver\handler\UserCommandHandler.java:41: error: cannot find symbol
    [javac] registerHandler(new IUserCommandHandlerPvpInfo());
    [javac]                    ^
    [javac]   symbol:   class IUserCommandHandlerPvpInfo
    [javac]   location: class UserCommandHandler
    [javac] C:\workspace\L2J_Server\java\com\l2jserver\gameserver\handler\VoicedCommandHandler.java:41: error: cannot find symbol
    [javac] registerHandler(new IVoicedCommandHandlerPvpInfo());
    [javac]                    ^
    [javac]   symbol:   class IVoicedCommandHandlerPvpInfo
    [javac]   location: class VoicedCommandHandler
    [javac] 5 errors
 
BUILD FAILED
C:\workspace\L2J_Server\build.xml:64: Compile failed; see the compiler error output for details.
 
Total time: 7 seconds
Posted (edited)

marik20001

Probably you try add this diff files into lower chronicle than H5 or other l2jserver.

 

You should check methods names and parameters what are overrided in command handlers.

 

IUserCommandHandlerPvpInfo should be correctly implemented from IUserCommandHandler interface.

 

valanths1990

You can restore the oryginal class from repo and then apply my patch. THat way is faster i think. (BTW I am too lazy ... ;))

Edited by >Masterio<
Posted (edited)

I will apply concurrent hashmap. do not download 3.7.5, new revision today.

 

PS. I will fit this code when I will finish H5 version. (soon)

Edited by >Masterio<
Guest
This topic is now closed to further replies.



  • Posts

    • Why proofs are obtainable only through DM and not posted in topic?
    • ⚔️ JOIN US – L2CLASSIC.GLOBAL – DISCORD.GG/L2CLASSICGLOBAL - TEASER   ━━━━━━━━━━━━━━━━━━ 🔥 SERVER CONCEPT A lot of people want to play, but they don't have the same amount of time available in the spring & summer as they do in the winter. That’s why we created a  High Rate Server focused on PvP. 🎯 Obtain items by playing PvP - not by autofarming mobs or using bots ⚔️ Progress through PvP, events, sieges, and real competition ⏳ Farming still exists, but it’s optional and balanced 🚀 Fast-paced progression – reach full gear in a short time This server is built for action. ━━━━━━━━━━━━━━━━━━ 🎮 WHY LINEAGE II CLASSIC? We chose Lineage II Classic to maximize your gameplay experience: 🎥 Modern damage & heal indicators 🖥️ Improved video rendering options with🛠️ Major bug fixes 🧩 Huge potential for unique custom content & ⚙️ Stable and optimized performance ⚔️ Client: Lineage II Classic / Skilltree: Interlude (C6) ━━━━━━━━━━━━━━━━━━ ⚙️ SERVER SETTINGS ⚡ XP 800x / SP 800x / Adena 800x 🎒 Unique Auto Farm system ⏳ Buff duration: 3 Hours 🎉 Automatic Events (TVT, CTF, DM, RACE, DUNGEONS & HIGHRATE) 👥 Maximum 3 Clients per PC 🎯 Max 28 buffs (including dances & songs) 💰 Auto Loot for monsters / Manual Loot for Raid Bosses 🧬 Custom Rebirth & PvP Skills 👑 Custom Noblesse & subclass System 📜 Customized Community Board (ALT+B) ━━━━━━━━━━━━━━━━━━ 🎭 Enchant System 🛡️ Max Enchant on armor is +12 and safe is +3 ⚔️ Max Enchant on weapons is +21 and safe is +3 ⚡ Normal Enchant Scrolls Chance is 65% ⚡ Blessed Enchant scrolls Chance is 75%) ⚡ Ancient Enchant scroll Chance is 85% (If the enchant fails, the enchant value remains unchanged)     ━━━━━━━━━━━━━━━━━━ 🎯 Implemented PvP Name & Title Color 🎨 Your name will glow based on your strenght.   ━━━━━━━━━━━━━━━━━━ 🏰 NEW MAIN TOWN – SUMMER GIRAN CASTLE TOWN All characters spawn in the new Summer Giran Castle Town. Fully prepared for battle from the start. ✅ All NPCs located in Main Town ✅ AIO Buffer (3-hour buffs, free) ✅ Global Gatekeeper (free teleport) ✅ Class Changer – Carola ✅ Event Shop – Dianne (Event Medals rewards) ✅ Free consumables – Misc Shop Harvana ✅ A/S Non-Custom Weapons, Armors, Shields & Jewelry – Mantra Mannager ✅ Apella, Elegia armors & Vesper, Dusk Weapons - Custom Shop Start fast. No wasted time. ━━━━━━━━━━━━━━━━━━ 💎 CUSTOM PROGRESSION SYSTEM 🛡️ ARMOR REFINING SYSTEM On L2CLASSIC.GLOBAL, refining gives you a real PvP advantage. You start with S Grade armor at 100% available on shop. Upgrade Path: S Grade → Apella → Elegia ✔ No failure chance when refining ✔ Enchant remains after refine ✔ Entire set must be refined equally to activate Set Bonus ✔ Materials dropped from Raid Bosses Refinement increases your PvP power significantly.   ━━━━━━━━━━━━━━━━━━ ⚔️ WEAPON TIERS 🔹 Vesper Weapons – Tier 1 🔹 Dusk Weapons – Tier 2 – Upgraded Vesper (materials from Raid Bosses) 🔹 Dusk Weapons & Shields – also from Raid Boss drops Dusk weapons include additional bonus stats.  -  ━━━━━━━━━━━━━━━━━━ 👑 CUSTOM NOBLESSE SYSTEM To become Noblesse, collect items from the raid bosses (Each raid drop 2 to 3 crowns): • Death Lord Hallate / Kernon / Longhorn Golkonda / Shilen's Messenger Cabrio ( 2h respawn time) Noblesse Manager: Eddy Wally (Main Town, near church entrance) ━━━━━━━━━━━━━━━━━━ 🧩 CUSTOM SUBCLASS SYSTEM To unlock Subclass, collect items from bosses: • Gariott Pudge / Death Prophet / Priest Slardar located in Elven Ruins ( 2h respawn time) Subclass Manager: Klaus (beside Noblesse Manager) ✔ Up to 3 subclasses ✔ 2nd and 3rd subclass are free ━━━━━━━━━━━━━━━━━━ 🧬 REBIRTH SYSTEM When you collect 50 PvP Runes, visit Rebirth Manager Selenor. ✔ Maximum 3 Rebirths ✔ 1 Book of Rebirth per chosen skill ✔ Additional unique PvP skills available   Available Rebirth Skills include: Rebirth Acumen                                 Rebirth Agility Rebirth Empower                               Rebirth Focus Rebirth Guidance                               Rebirth Haste Rebirth Heal                                       Rebirth Might Rebirth Magic Barrier                         Rebirth Mana PvP Resurrection                                PvP Medusa PvP Return                                          PvP Dash PvP Arcane Frenzy ━━━━━━━━━━━━━━━━━━ 👹 High Rate event & items No restrictions. The High Rate Event will take place in the catacombs twice per week. During this event,you will encounter monsters with drop rates 5times higher than in normal zones. You will also face two famous RaidBosses in the world of LINEAGE2: Anakim & Lilith. These bosses will drop a special tattoo called the Adennian Tatto. This tattoo accupies a separate slot, diferent from the regular tattoo slot. The Adennian Tattoo will be visibly displayed on your character's skin and will make a real diference in PvP. ━━━━━━━━━━━━━━━━━━ ⚡ The Adventurer's Bracelet The Adventurer's Bracelet has been added to our gameplay.(You can obtain it from Raid Bosses with a 25% chance drop rate. You will buy the Talismans from Harvana in the main town and they are consumable and will disappear when their mana runs out. ━━━━━━━━━━━━━━━━━━ 🏆 OLYMPIAD SYSTEM  & SPECIAL GLOW No restrictions. Best gear wins. And for the strongest competitors we have ✨ Unique “True Hero” Glow. Players who achieve Hero multiple times will receive exclusive visual glow. ━━━━━━━━━━━━━━━━━━ 🧨 CHAOTIC PvP ZONE A completely new chaotic zone: ⚔️ Free-for-all combat 👁️ No identity visibility 🔥 Everyone vs Everyone New Item: Chaos Fragment Obtained only through PvP inside Chaotic Zone & Used at Laena Buffer to obtain special buffs. You can choose: 3 Attack Buffs & 3 Defense Buffs (15 Chaos Fragments per buff) ⚠️ Only 1 Attack + 1 Defense buff active at the same time. ━━━━━━━━━━━━━━━━━━ 🌍 RAID BOSSES Many additional Raid Bosses added at original spawn locations. ✔ Only Lv 76+ Raid Bosses Including Ant Queen, Core, Orfen Raid Bosses drop: • Custom Jewelry • Gold Weapons • Refining Materials • Attribute Stones • Subclass & Noblesse Items   ━━━━━━━━━━━━━━━━━━ 🔥 ATTRIBUTE SYSTEM Six elements: 🔥 Fire /💧 Water /🌪 Wind /🌍 Earth /✨ Holy /🌑 Dark ✔ 50% chance success (cannot downgrade) ✔ Attack attribute +5 on weapon ✔ Defense attribute +6 on armor ✔ Max level 3 & Max 1 attack element + 3 defense elements Attribute Stones drop from: ⚔️ Raid Bosses 👹 Ancient Giants (Giants Cave 3) 👑 Baylor Monsters (random spawn hourly) When engaging Baylor → you become flagged. ━━━━━━━━━━━━━━━━━━ 🛠 ADDITIONAL SYSTEMS 📜 Community Board (ALT+B) includes: • PvP/PvE/Pk Ranking • Raid Points & Raid Status Ranking • Online Ranking & Fame Ranking • Clan & Premium + Advanced Drop Search 🎯 Daily Missions (retail-like + custom) & Attendance Check System ⚙️ .menu command: Disable/Enable animations, AutoPotions, Refusal Mode. 🩸 PK Manager – Redemption Sphere allows you to Remove PK's. 🎭 Custom Accessories: Hats, masks, agathions, pets, monsters — PvP unlock based. 🎨 Custom Appearance Costumes & Restore Stone available if removed.   ━━━━━━━━━━━━━━━━━━ ⚡ JOIN US NOW: BETA IS ANNOUNCED DAY 20FEB,2026. Fast progression / PvP-focused gameplay / No pointless grind /Real competition. Welcome to the new era of Lineage II : L2CLASSIC.GLOBAL     
    • 🚀 Client Optimization Sources — High Five (H5) — $3,500 After a long internal development cycle, my Client Optimization System for Lineage 2 High Five is ready. This is NOT a “config tweak” pack. This is a real performance + stability optimization system, delivered as FULL SOURCE CODE. ✅ What you get Full Sources (not a license, not binaries-only) Optimizations focused on FPS consistency, stutter reduction, and heavy PvP / crowded zones Real work done at the engine/client level (not placebo “ini magic”) Clean structure, ready to integrate into your own client-side project Documentation / notes included so you understand what you’re applying 🎯 Intended results (typical scenarios) Smoother gameplay in towns / sieges / mass PvP Reduced frame drops when many characters/effects are on screen More stable client behavior under heavy load 💼 Delivery model You receive full sources No license system (you own the code you receive) Private delivery + support for integration guidance (basic) 💲 Price ✅ High Five (H5) Sources: $3,500 USD 📩 DM me for details / proof / integration requirements. 🔥 Next Release — Client Optimization Sources — Classic 166EU — $3,500 The same optimization line is being adapted for Lineage 2 Classic 166EU. ✅ Release: Next week ✅ Full Sources ✅ Same goal: stability, FPS consistency, heavy-load performance 💲 Classic 166EU Sources: $3,500 USD Serious buyers only If you run a real project and you care about real client performance, message me and I’ll share what’s included, compatibility notes, and delivery terms. 📩 DM to buy / reserve your copy  
  • 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..