Bring enough EXP to character and level up?

I need a script for VX ace where you bring exp to a certain character like when you beat enemies, bosses and such you earn exp. But it goes into your menu or whatever. And you need like 1000 or something to level up to level 2 the guy can be wherever in a house, forest through out places...Like in a dungeon he is somewhere and in a village...Thanks in advance! 
double post
So like some sort of training center type of NPC where you have to meet exp requireements and may have to spend money to level up?
If I understand correctly, the ability to take away some of the player's gained EXP value to "give" to an event for the same amount? (using variable work, and storing the given amount as a variable) And then things happen when that variable is a certain amount?
Something like the picture, then it like calls script or maybe variables...And if you don't have enough obviously you can't level up. It goes higher each time it's hard to explain though... 

Ace script.png
Hey Monkey, this is an interesting idea!

I had a couple of thoughts that could possibly be viable without much scripting (since I am not too familiar with scripting myself). 

The first solution is an item based solution that requires 1 script.

The second is based on variables, this requires 1 scripts, and possibly another for menu display.

Spoiler
1. Item Version

    - In the enemy data base have each monster give 0 experience (this eliminates the usual level gaining functionality)

    - Each enemy should also be set to drop with 1/1 probability the appropriate number of Experience Coins or whatever for level gaining

          ~ I'd suggest the item be a key item that is non consumable

    - Have an event with the level up NPC

          ~ Set a variable to the number of Experience Coins in inventory (Experience Inventory)

          ~ Have some dialogue like: "Who is interested in leveling up?"

          ~ Show choices of the party members in your party (this can be simple or complicated depending on the way parties work in your game)

                   + An alternative is going BoF3 style and have each character have a specific Master they must go to for leveling.

          ~ After selecting a party member run a conditional check.

                   + Set a variable to the characters level. (Actor Level)

                   + Set a variable equal to the cost of leveling (Level Cost)

                             - something along the lines of  Level Cost = Actor Level * 100

                             - this way you dont have to enter the amount for each level separately.

                   + Check the variable that is set to the number of Experience Coins in inventory and compare if it meets the amount required for level up.

                             - if Experience Inventory >= Level Cost 

                   + If criterion is met then offer to level up

                   + If player accepts, then remove Level Cost Variable number of Experience Coins from inventory and add 1 level to the actor.

This is a VERY simple system, and requires a static equation for the amount of Experience Coins required for each level depending on the level itself, so you will lose some flexibility there. It is possible that the equations can seem dynamic, like the conversion of temperature, Fahrenheit to Celcius (Celcius * 9/5 + 32 = Fahrenheight).  This will also require a script that allows for more than 99 of an item to be held by the party.
Spoiler
2. Variable Version

    - In the enemy data base have each monster give 0 experience (this eliminates the usual level gaining functionality)

    - Set up a variable (Party Experience)

    - Each enemy should be set with a common event upon their death. (This will require a death common event script)

          ~ This common event will add the appropriate =amount of "Experience" to the variable Party Experience.

    - If you want the player to see how much experience they have you will need to have a menu display the variable. (possible script)

    - Have an event with the level up NPC

          ~ Have some dialogue like: "Who is interested in leveling up?"

          ~ Show choices of the party members in your party (this can be simple or complicated depending on the way parties work in your game)

                   + An alternative is going BoF3 style and have each character have a specific Master they must go to for leveling.

          ~ After selecting a party member run a conditional check.

                   + Set a variable to the characters level. (Actor Level)

                   + Set a variable equal to the cost of leveling (Level Cost)

                             - something along the lines of  Level Cost = Actor Level * 100

                             - this way you dont have to enter the amount for each level separately.

                   + Check the variable Party Experience and compare if it meets the amount required for level up.

                             - if Party Experience >= Level Cost 

                   + If criterion is met then offer to level up

                   + If player accepts, then remove Level Cost Variable number from Party Experience variable and add 1 level to the actor.

This is a VERY simple system, and requires a static equation for the amount of Experience Coins required for each level depending on the level itself, so you will lose some flexibility there. It is possible that the equations can seem dynamic, like the conversion of temperature, Fahrenheit to Celcius (Celcius * 9/5 + 32 = Fahrenheight).  This will also require 2 scripts: Death State Events & Menu fix to display variable
Hope this idea helps. I am sure an actual script would be more efficient, but I am an eventer at heart so thought I'd offer this solution =D

~ Dinhbat

Original thread: https://forums.rpgmakerweb.com/threads/bring-enough-exp-to-character-and-level-up.25360/