EXP Script?

ok so im really new at RPG maker, and im trying to redo an old nintendo game for my own deviseing. i would like to know how i have a shop keeper tell me what the total experince i need till the next level? is there a way to do it?
I've moved this thread to Script Requests. Please be sure to post your threads in the correct forum next time. Thank you.
In control variable, goto the script box at the bottom and type in this:


$game_actors[actor_id].exp_for_level(level_number)


actor_id = the id of the actor you wish to check


level_number = the level you wish to check


eg


check how many exp actor 2 need to get to level 10


use this:


$game_actors[2].exp_for_level(10)


when you add that to a variable, you can easily show it later in any message you wish using \v[variable_id] within a message.
ok great what about like a party situation? can u just add the same line to do multiple characters?
and how do i figure out what my actor id is?
Try not to double post, it's against the forum rules, you can always edit your last post if you wish to add more information.


The basic code is the same, how you pair it with other script calls / conditional branches is up to your dev skill. So the answer is yes, you can do multiple chars with that code, just need to add another script call to it, eg, replace actor_id with $game_variables[id] to make it able to react to game variables. You can then control that game variable to get which actor id you wish to use etc etc.

Original thread: https://forums.rpgmakerweb.com/threads/exp-script.59073/