Jump to content

Recommended Posts

Posted

Hey everybody,

 

One habit I have is creating a lot of stuff for Lineage 2 (java at least) and deleting it after I'm done with it. As I've recently been working on a project related to L2 with a friend I decided instead to release building blocks of my code that people can use to implement in their own solutions.

 

So part of my project involves a custom character creation process via a web user interface. One of the things I wanted to implement was a hexagonal style chart displaying the spread of statistical points.

YtYOr7v.jpg

 

Live test example of my objects in use: http://www.qzmpox.nl/l2/hexagon/hexagontest.php

 

So, I made it! And because I love all you guys so much (not really, most of you release the same pvp buffers over and over again and ask the same inane java questions, but oh well) I decided to release the building blocks I'm using to create the above image. So, let me explain:

 

- This requires a knowledge of PHP Programming

- This requires object oriented knowledge.

- This requires basic trigonometry knowledge.

 

Firstly, let me explain what this isn't:

This isn't code that will effect your gameserver. This isn't code that will have an impact on your data. This isn't a final solution to ready to be deployed. This also isn't the graphical information you see above in the picture.

 

Ok, then what is it?

Building block objects, provided to help you easily implement this style of solution in your own forum/website/project.

 

Then why is this useful?

Versatility! These objects have been built to be used with each other but also these objects can be use independently in projects even outside of Lineage 2! Perhaps you're even just curious and would like to see the code how it's done.

 

- CVector2.php

This is a general 2 dimensional vector object. You have an X and Y value. This object also includes static helper functions for doing mathematical operations upon vectors easily without having to pull their individual X and Y values out from the object. This can be used in all applications that involve some points in a coordinate system.

 

- CHexagon.php

This is a general hexagon calculated within a unit circle. An offset can be provided to this class since images in browsers are calculated with the origin of (0,0) being the top left corner instead of in the center. This hexagon can also be scaled to whichever size fits your application the best.

 

I'm not sure how Lineage 2 is involved.

No problem, because there are more objects!

 

- CL2StatsRepository.php

Following Domain Driven Design this object is responsible for pulling up information regarding the different classes which are defined in a seperate file (classes.json, but we'll talk about that in a bit). This repository will collect information from the JSON file, create instances of domain objects (CL2Stats) and place them in an array.

 

- CL2Stats.php

Following Domain Driven Design still this object contains all the information about a particular class. This object also calculates the scalar values for each statistic. The scalar value is a percentage of the actual stat value versus the max possible stat value. I originally had Interlude in mind but I know the later chronicles have higher values so I left this value adjustable.

 

- classes.json

A json string that contains information about avaliable classes. If your server features custom classes or you've removed some than this list is adjustable whenever so it's no problem! The inside hexagon points will be calculated automatically for the new class.

 

You said earlier theres no graphics, how do you use it then?

However you want! The geometrical information describing the entire picture is already completed for you. How you choose to draw or present these to players is left up to you using whichever graphical library you'd like to use. Maybe you don't even want to use in the same sense as I do. This can be applied to statistical things regarding L2 as well. There is an example of how I did it which you can see via files hexagontext.php and hexagonpng.php.

 

I know this one isn't very fantastic for most of you guys, but I'll be releasing my work as I go along. So perhaps I'll have some nice goodies in the future.

Download: http://www.qzmpox.nl/l2/hexagon/L2Hexagon.zip

Guest
This topic is now closed to further replies.


  • Posts

    • Tired of frantically switching between windows trying to find that specific Warlock who should be casting saves? Forgot which server you left your Warsmith on? This mod solves these problems! What it does: Turns the boring window title into an information panel: Server Name - Character Name [Class] Real-life examples: - ServerName - HardcoreFarm [Spoilerr] (who's been spoiling for 3 months already) - ServerName - ClericHelper [Buffer] (eternal buffer on standby) - ServerName - MainChar [Gladiator] (main character who's always AFK) Why you need this: For multiboxers - to avoid confusing where the DD is and where the healer is For the forgetful - if your memory is like a goldfish For streamers - viewers immediately see who's on screen For adults - when playing at work and need to quickly hide the window DLL only - no Interface files needed Installation (more complicated than making tea): 1. Download the DLL 2. Drop it into the System folder 3. Launch the client 4. Be amazed how you lived without this before! Purchase Conditions: Price: 100$ Payment Method: USDT. How to Buy: Contact me on Telegram: @kiselevwv for a quick response. I will answer all your questions and provide additional information if needed. I guarantee functionality at the moment of sale and prompt assistance with setup after purchase.
    • I agree, l2damage crap to compare to l2java which was the father of pvp servers and till this days people playing there for good time.
    • 📝 Registration — Account Registration Creating a new player account. Usually includes: login password password confirmation email Result: a new record is created in the accounts table (loginserver). 🔑 Change Password — Password Change The player changes the password knowing the current one. Required: current password new password new password confirmation Result: the password field is updated in the accounts table. ♻️ Password Recovery — Password Reset If the player forgot the password. Implementation only via email: the player enters their login, email the system sends an email with a link or code the player opens the link / enters the code sets a new password Result: the password is updated in the accounts table.   All fields are validated (required, format, length, uniqueness, security checks).   Price: 80$   and i can rewrite script for PTS server.   Contacts:   Telegram Discord
    • So dont plat that waste time&money server.   GM promises pie in the sky, but does nothing. It's all about money, money, money. And wipe.   SCAM server!
  • 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..