Jump to content

Recommended Posts

Posted

        • First of all, I apologize if this has been posted previously, I couldnt find another thread after several searchs.
           
          Ok, this is my own npc buffer I coded long time ago. I was downloaded more than 2k times in l2j forums so I guess it is interesting :P
           
          It has several adds to any other common buffer. Whole information and feedback can be found here:
http://l2jserver.com/old-forum/thread.php?threadid=28853&page=1
 
This is a quotation of my own words:
 
Despite in lastest core revs, a core buffer has been committed as a mod I wanna share my own core buffer which works quite different from vanilla's. I have not tested vanilla's actually, but I think this add some interesting feature (based on irc comments).
 
 
Feature
 
  • Each player defines a personal buff scheme (aka pbs), that stores a list of skills. Then, when a player is about to receive his buffs, he will only have to press a button and all buffs' effects will be casted to him.
     
    This avoids wasting time choosing new buffs each time player dead. Obviously this increases performance to due to a considerable reduction at request bypass packets and their effects.
     
  • Admins can (and actually should) sort skills in different groups so that handling with pbs become easier. Adding skills is a very easy task, just an update sentence to database. This provide real-time modifications on available skills
     
  • Players will NOT loose their pbs on crashes, client restart, client exit or even server shutdown/restart. All pbs are stored in database.
     
  • Players can save more than one pbs (since rev3)
     
  • PBS are defined in real time in the same npc by each player using a framed interface that makes this really easy
     
  • Effects are given calling method getEffects(args), so there is no MP consumption or any kind of restriction as a consequence of using useMagic(args).
     
  • Effects can be casted to your pet too (since rev2)
     
  • Admin command to reload skills (since rev3)

 

Programming info

 

  • Code has been writen to achive these three objectives:
    1. Prevent database accesses
    2. Prevent packet's broadcasting
    3. Do not bleed vanilla code

    That is because in case this is committed, it would be as a mod and not bleeding code too much makes easier further improvements/updates for the system and for the rest of the code. Obviously preventing database access and packet's broadcasting are done so that general performance is not decreased.

     

    [*]There are three new class (files):

    1. BufferSkillsTable: a class to store info about available skills. Reads info from database (only at server startup) and stores skills' data sorted by groups
    2. CharSchemesTable: this class handles player <-> memory <-> database interactions. Loads pbs when player enters world and save pbs into database when at server shutdown.
    3. L2BufferInstance: finally this class handles player bypassrequestings: getting buffs, editting pbs, clearing pbs.

     

    [*]About external code: Config.java, EnterWorld.java, GameServer.java, Shutdown.java are the only ones editted files.

     

    [*]Due to "do not bleed vanilla code" and to provide a functional interface to interact bewteen pbs, some tasks are working in an "different" way, I hope general performance is not decreased.

     

    [*]There are some javadoc comments to help code understanding

 

Datapack side info

  • SQL. There are two new tables:
    1. mods_buffer_skills: this table stores info about available skills for npc buffer in four fields: id (skill id, primary key), level (skill level), skill_group (group of the skill) and adena (cost in adenas). Please notice that no null field is allowed
    2. mods_buffer_schemes: this table stores character's pbs. It contains three filds: ownerId (char object id), id (skill id) and level (skill level) and it works like character_skills or merchant_buylist

    [*]SQL. New NPC in npctable. Spawns are your work :P

     

    [*]HTML. Only two new files for giving support to core at .../data/html/custom/buffer/ (maybe I can remove this and hardcode it...)

 

Admin's step by step guide xD

  • First of all install core patch and get it compiled
  • Secondly execute datapack patch so new tables and new NPC are saved into your database.
  • Finally is time to introduce info to mods_buffer_skills and set which skills are available for players, set groups, etc. I  provide a default package with some skills but you'd better do by yourself. There are some restrictions and advices:
    1. Do not use "default" as a type
    2. Do not leave any field as null
    3. Do not overload one group with too many skills. This would decrease performance (the more skills are in a group, the larger is the iteration over it).

    [*]Now save info and restart your server (admin command to reload this table is not done yet)

    [*]Log in and spawn a new L2BufferInstance, default: "//spawn House" or "//spawn 90000"

    [*]Test and edit your pbs :)

 

"To Do" feature list

  • Make this configurable Done in rev. 2
  • Creating some admins command to handle adding and removing skills from available skill list so that can be modified or even build in real time with a friendly interface (similar to merchant_buylist) Partially done in rev. 3
  • Adding some system messages to inform users. Done in rev. 3
  • Adding some info to log
  • Support for adena reduction, for now ther isn't any kind of fee or cost :DDone in rev. 3
  • Some esthetical changes for general interface Done in rev. 2
  • Add default stuff so lazy admins don't have to work :P Done in rev 2.

 

I have tested this in local, not in a live server so I have no info about performance. (However my high rates server has been working with a very similar system (based on this) for more than 4 moths and we have not found any problem. When I have some free time I will add missing feature from TODO list, specially if you like this.

 

Please, feel free of reportting back any kind of impressions, bugs, etc. I need feedback to improve this.

 

Version history

  • Rev 1. Initial work
  • Rev 2.
    1. Fixing some "typpo" bugs.
    2. Added new feature: now you will be able to buff your pet
    3. System is now configurable at l2jmods
    4. Fixing some esthetical issues
      [/list=a]
    5. Rev 3.

      1. Multiple scheme system fully implemented
      2. Some changes in general menu
      3. Some changes in edit scheme interface
      4. Max schemes per player configurable
      5. Max skills per scheme configurable
      6. Saving schemes to DB configurable
      7. Support for handling adena fee: by SQL or at config
      8. Admin command to reload NPC BufferSkillsTable
      9. Initial support for change skills available per group using admin commands (shift click npc and you'll see)
      10. Partial rewrite of L2BufferInstance.java to highly improve performance (do not set full collections anymor or duplicate into a local variable to handle)
      11. Commenting out L2BufferInstance.java class so that ca be easily understood
      12. Moving dp html to data/html/mods/buffer
      13. Changes in SQL datatables
        [/list=a]

     

    To upgrade to rev 3, be carefull due to new html paths and changes in SQL tables (I strongly recommend full rebuild)

     

    Yeah... many things can be improved, I did it before I joint dev team (I had free time to develop stuff like this ;D) . I promised community a new release but I didnt have a chance to work on it yet :P possibly on next L2J release I will try to improve it and put it on a item too.

     

    Hope you like it  ;D

     

    Download link: http://www.megaupload.com/?d=F8WW2PA5

     

    PS: Moving it to l2jfree/l2emu/l2j**** or any revision should be really easy

     

     

Posted

thats why the old l2j forum is still impressive :D

 

yeh +1 xD

 

nice share mate. thnx

 

but just a question... you are DrHouse From L2JForums?

Posted

yeh +1 xD

 

nice share mate. thnx

 

but just a question... you are DrHouse From L2JForums?

 

yes he is L2J invades Maxcheaters :D

Posted

House would you mind attaching some Screenies to it ?

Haven't actually tested it nor read its source, but based on your Features List and our Member's feedback seems to be a great buffer.

Posted

House would you mind attaching some Screenies to it ?

Haven't actually tested it nor read its source, but based on your Features List and our Member's feedback seems to be a great buffer.

 

you naapie dont tell me you dont know the scheme buffer :P

Posted

you naapie dont tell me you dont know the scheme buffer :P

Not this one I guess, I use one that savor made. Love him, he always shares everything (Except for my work from our SVN :o).

Posted

Main screen

http://img23.imageshack.us/i/shot00001bfw.jpg/

 

First of all you have to create an scheme in "manage my schemes" (I created a new one called MaxCheaters)

http://img23.imageshack.us/i/shot00002yvo.jpg/

 

Now go to "edit my schemes". An NpcHtmlMessage similar to this one will appear, with the groups the admin had defined. Click on the scheme you want to edit (MaxCheaters)

http://img166.imageshack.us/i/shot00003d.jpg/

 

Click on any group

http://img23.imageshack.us/i/shot00004ihm.jpg/

 

Start adding skills from any group by clicking on them. You'll notice a new list in the end with the skills you have already choosen

http://img166.imageshack.us/i/shot00005n.jpg/

http://img404.imageshack.us/i/shot00006t.jpg/

http://img404.imageshack.us/i/shot00007l.jpg/

 

Finally go back to main screen and select either buff to you or your pet. Then choose the scheme and you'll have all the buffs for you or your pet

http://img401.imageshack.us/i/shot00008x.jpg/

 

PS: Weird... guys you made me work :P

Guest
This topic is now closed to further replies.



  • Posts

    • From Salvation onwards I think you need a patched nwindow.dll that allows such modifications, try to see if you get what you need here: https://drive.google.com/drive/u/1/folders/1LLbQFGf8KlR-O0Iv5umfF-pwZgrDh9bd
    • hello everyone! I am wanting to save the files (Ini. - Data - ) of the EP5 Client: Salvation... But they generate the error "corrupt files"... I tried several versions of L2FileEditor without good results. I need help! Thank you!
    • Opening December 6th at 19:00 (GMT +3)! Open Beta Test from November 30th!   https://l2soe.com/   🌟 Introducing L2 Saga of Eternia: A Revolution in Lineage 2 High Five! 🌟   Dear Lineage 2 enthusiasts, Prepare to witness the future of private servers! L2 Saga of Eternia is not just another High Five project—it’s a game-changing experience designed to compete with the giants of the Lineage 2 private server scene. Built for the community, by the community, we’re here to raise the bar in quality, innovation, and longevity. What Sets Us Apart? 💎 No Wipes, Ever Say goodbye to the fear of losing your progress. Our server is built to last and will never close. Stability and consistency are our promises to you. ⚔️ Weekly New Content Our dedicated development team ensures fresh challenges, events, and updates every week. From custom quests to exclusive features, there will always be something exciting to explore. 💰 No Pay-to-Win Skill and strategy matter most here. Enjoy a balanced gameplay environment where your achievements come from effort, not your wallet. 🌍 A Massive Community With 2000+ players expected, join a vibrant and active community of like-minded adventurers ready to conquer the world of Aden. 🏆 Fair and Competitive Gameplay Our systems are designed to promote healthy competition while avoiding abusive mechanics and exploits. 🔧 Professional Development From advanced bug fixes to carefully curated content, we pride ourselves on smooth performance, no lag, and unparalleled server quality. Key Features Chronicle: High Five with unique interface Rate: Dynamic x10 rates Class Balance: Carefully fine-tuned for a fair experience PvP Focused: PvP Ranking & aura display effect for 3 Top PvPers every week Custom Events: Seasonal and permanent events to keep you engaged Additional Features:   Custom Endgame Content: Introduce unique dungeons, raids, or zones unavailable in other servers. Player-Driven Economy: Implement a strong market system and avoid overinflated drops or rewards. Epic Siege Battles: Announce special large-scale sieges and PvP events. Incentives for Streamers and Clans: Attract influencers and big clans to boost server publicity. Roadmap Transparency: Share a public roadmap of planned updates to build trust and excitemen   Here you can read all the features: https://l2soe.com/features   Video preview: Join the Revolution! This is your chance to be part of something legendary. L2 Saga of Eternia is not just a server; it’s a movement to redefine what Lineage 2 can be. Whether you’re a seasoned veteran or a newcomer to the world of Aden, we invite you to experience Lineage 2 at its finest.   Official Launch Date: December 6th 2024 Website: https://l2soe.com/ Facebook: https://www.facebook.com/l2soe Discord: https://discord.com/invite/l2eternia   Let’s build the ultimate Lineage 2 experience together. See you in-game! 🎮
    • That's like a tutorial on how to run l2 on MacOS Xd but good job for the investigation. 
  • Topics

×
×
  • Create New...