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  


Γ—