Jump to content

Orion Project - Server Files

Sign in to follow this  
SHKEd

The formula for calculating EXP as a percentage?

Recommended Posts

How do I calculate the percentages to move to the next level based on the correct EXP value from the database and xml.Β I need a calculation formula

(I apologize for the clumsy translation)

Share this post


Link to post
Share on other sites
55 minutes ago, SHKEd said:

How do I calculate the percentages to move to the next level based on the correct EXP value from the database and xml.Β I need a calculation formula

(I apologize for the clumsy translation)

Why you need something like that? What are you going to do?

Share this post


Link to post
Share on other sites
2 hours ago, Damon said:

Why you need something like that? What are you going to do?ο»Ώ

CMS module for website ?Β Β 

Share this post


Link to post
Share on other sites
41 minutes ago, SHKEd said:

CMS module for website ?Β Β 

I would like to see this php code then I could say something.

Share this post


Link to post
Share on other sites
11 minutes ago, Damon said:

I would like to see this php code then I could say something.

//Something like this =)

l1 =  $base->get_tolvl($char_lvl + 1); //GET XML LVL TO
l2 =  $base->get_exp_char($char); //GET CURRENT EXP CHAR FROM DB `characters.exp`


//JS VUE
procent(l1,l2){
  let m = (l1*100)/l2;
  return parseFloat(m).toFixed(2);
},

Β 

Share this post


Link to post
Share on other sites
3 minutes ago, SHKEd said:

//Something like this =)

l1 =  $base->get_tolvl($char_lvl + 1); //GET XML LVL TO
l2 =  $base->get_exp_char($char); //GET CURRENT EXP CHAR FROM DB `characters.exp`


//JS VUE
procent(l1,l2){
  let m = (l1*100)/l2;
  return parseFloat(m).toFixed(2);
},

Β 

So, probably your answer is here: game/data/xml/experience.xml

Share this post


Link to post
Share on other sites
3 minutes ago, Damon said:

So, probably your answer is here: game/data/xml/experience.xmlο»Ώ

This is the l1 variable from the code - yes. I take the value from there.Β 

But my percentage calculation formula does not work correctly. I would like to know how the game is calculated. I got 90 percent instead of 12 in the game.Β 
Β 

Share this post


Link to post
Share on other sites
4 minutes ago, SHKEd said:

This is the l1 variable from the code - yes. I take the value from there.Β 

But my percentage calculation formula does not work correctly. I would like to know how the game is calculated. I got 90 percent instead of 12 in the game.Β 
Β 

Don't forget you need to restart character if you want to see the real data from database.Β  It's not like you think that you can see exp in LIVE mode if you still are online and farming mobs.
I'll send you DM.

  • Like 1

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

  • Latest Posts

    • You must be signed in to view the link content in this post. Please Sign In or Sign Up.

      You must be signed in to view the link content in this post. Please Sign In or Sign Up. L2jOrion Server Files Updates (Changeset 30 | Revision 1087) All information about (Changeset #30 | Revision #1087):
      You must be signed in to view the link content in this post. Please Sign In or Sign Up.

      DataPack commits (all SVN changes) for this changeset:
      PART 1 -Β You must be signed in to view the link content in this post. Please Sign In or Sign Up.
      PART 2 -Β You must be signed in to view the link content in this post. Please Sign In or Sign Up.
      PART 3 -Β You must be signed in to view the link content in this post. Please Sign In or Sign Up. *** if you don't know how to use it or have any questionΒ - contact us.
      Let me know if you find any mistake. Thank you! Β  Submitter You must be signed in to view the link content in this post. Please Sign In or Sign Up. Submitted 03/20/24 Category You must be signed in to view the link content in this post. Please Sign In or Sign Up. Β 
    • BUGS / CORRECTIONS CORRECTED - Movement on bow attack (Like L2OFF). CORRECTED - Quest: Fate Whisper (Like L2OFF). CORRECTED - Quest: Seekers Of The Holy Grail (Like L2OFF). CORRECTED - A few creatures spawn location (Like L2OFF). ADDED - Missing drop itemΒ forΒ Dark Choir Captain (Like L2OFF). UPGRADES UPGRADED - Admin command: //reload. Added new reload features: class damages (for class balance),Β  achievements, skins andΒ faenor. UPGRADED - Castles sieges. Improved performance, decreased CPU usage and fixed a few more issues. UPGRADED - Geo engine stability and performance. UPGRADED - Spawn/Teleport protection. Fixed some important issues. UPGRADED - Dressme / Skins system: ADDED - Shield skins. ADDED - β€žBuy allβ€œ action for each type of skin (package's settings is in xml file). ADDED - β€žDeleteβ€œ skin permanently. ADDED - 2 new configs:Β AllowBuyTryWithoutWeapon andΒ AllowBuyTryWithoutShield. ADDED - Confirmation for Buy all and Delete. CHANGED - System removes skin if you try to change weapon <->Β shield. UPGRADED - Command. menu. Also, added more settings like shots / spiritshots effectΒ  and pvp / pk announcements -Β  on /off. ADDONS ADDED - New Rebirth System. (Big thanks to You must be signed in to view the link content in this post. Please Sign In or Sign Up.Β He paid for this new feature and allowed to share with you, guys) OPTIMIZATION IMPROVED - Server core performance and stability (database connections, code cleanΒ up/corrections). OTHER UPDATED - Server pack LIBS folder jar files (several most important). UPDATED - MySQL connection. From now server works with MySQL 5.x - 8.x versions without any issue.
    • Check that you are running a server with a normal amount of memory in the bat file. When there is little memory and the PvP zone is enabled. There is microlag when changing zones.
    • Hello,
      I just checked and it worked fine. Please double check your card data.
    • Help! read email pls!
  • Latest Topics


Γ—