How to get a buffer's buffs from xml instead of DB?!

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
sponer
Posts: 86
Joined: Sat Jul 02, 2011 6:02 am

How to get a buffer's buffs from xml instead of DB?!

Post by sponer »

Hello guys :)

I am about to create a new buffer for High Five (latest trunk stable version).
So my plan is to make a java script buffer (just to prevent things like Heal during in pvp etc.).
It's a html-based buffer (except heal, auto buff and remove buffs).
So what i want to do, is to place all the buffer's buffs, into an xml file because i don't want to give a database usage to this because it shall perform really badly. (imagine a server with 100+ players that they are gettings buffs whole time... hard traffic.)

So i want to make 3-4 xml files (all buffs, fighter buffs, mage buffs, archer buffs etc.) and get the buffs from there instead of the database... Do you guys know how can i do that? Actually i want to tell me how exactly can i make it in java and in html files (bypass -h npc_%ObjectId%........) to read from this xml file and how am i suppossed to write the xml file to get the informations inside?

I would really appreciate your help... <3


EDIT:
I have made it with .xsd, .xml files and with the java part that is getting these infos... my problem now is...
What call i have to put in html file to give a buff and what code should i place here:

Code: Select all

case "AutoBuffs":{        if (ValidateUse(player))        {               // TODO: Add Auto Buffs        }        break; }
in case to get the buffs I want?
Last edited by sponer on Fri Nov 14, 2014 8:44 pm, edited 1 time in total.
User avatar
HappyLDE
Posts: 123
Joined: Tue Sep 10, 2013 6:22 pm
Location: Belgium
Contact:

Re: How to get a buffer's buffs from xml instead of DB?!

Post by HappyLDE »

Hello, first is it gonna be scheme buffer or just presets and hand pick from list? Without scheme buffs a server nowadays is shouted to be N0obs.

If scheme buffer then you need the database. Also if you don't want to access db for each person to get the auto-buffs, then on the first access you store it in memory (the list, because you would store it from xml in memory anyway).

To read XML, check server core when it parses xml for skills etc.
Thank you for making L2JServer happen! :D
"If you believe you will fail or succeed, in both ways you are right." - Henry Ford
User avatar
sponer
Posts: 86
Joined: Sat Jul 02, 2011 6:02 am

Re: How to get a buffer's buffs from xml instead of DB?!

Post by sponer »

Unfortunately i have to disaggree with you sir.
servers without a scheme buffer are not these "noob" servers...
my plan is to put 4-5 auto buffs (like fighter, mage, evasion, dagger, tank etc.)
so the players doesn't need to create a scheme... if the auto buffs doesn't meet their requirments... they can easily add the buffs they want... (1-4 extra buffs...) so it's kinda good and database-less :D

whatever.. I know i will store it in memory but i want to get these buffs from a custom xml with my buff's id and level.. :)
Sdw
L2j Veteran
L2j Veteran
Posts: 855
Joined: Mon May 03, 2010 8:38 am
Location: France

Re: How to get a buffer's buffs from xml instead of DB?!

Post by Sdw »

You got buffer class, that's all you need :D
User avatar
sponer
Posts: 86
Joined: Sat Jul 02, 2011 6:02 am

Re: How to get a buffer's buffs from xml instead of DB?!

Post by sponer »

Sdw wrote:You got buffer class, that's all you need :D
catched you bro... i found it...
I will try to make it happen and i will reply here if i have any problem :D
User avatar
sponer
Posts: 86
Joined: Sat Jul 02, 2011 6:02 am

Re: How to get a buffer's buffs from xml instead of DB?!

Post by sponer »

Hello guys again.. :)

I have made it with .xsd, .xml files and with the java part that is getting these infos... my problem now is...
What call i have to put in html file to give a buff and what code should i place here:

Code: Select all

case "AutoBuffs":            {                if (ValidateUse(player))                {                    // TODO: Add Auto Buffs                }                break;            }
in case to get the buffs I want?
User avatar
HappyLDE
Posts: 123
Joined: Tue Sep 10, 2013 6:22 pm
Location: Belgium
Contact:

Re: How to get a buffer's buffs from xml instead of DB?!

Post by HappyLDE »

Check this topic to give him the buffs.
Thank you for making L2JServer happen! :D
"If you believe you will fail or succeed, in both ways you are right." - Henry Ford
User avatar
sponer
Posts: 86
Joined: Sat Jul 02, 2011 6:02 am

Re: How to get a buffer's buffs from xml instead of DB?!

Post by sponer »

HappyLDE wrote:Check this topic to give him the buffs.
Sorry bro but this is an unrelated topic...
I can't find a way to get the buffs from the xml file and give the buffs to players..
I remind you that the buffer will have auto buffs (the buffs i want to give in auto buffs)
and 1 by 1 buffs that the html will get the buff id and level and will give it to the player...
Post Reply