* Refactor pc_setparam for SP_BASEEXP and SP_JOBEXP.

* Added script command `getexp2` for safety usage of `set BaseExp,n;` and `set JobExp,n` usages.
* Cleanup exp lost functionto `pc_lostexp`.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
This commit is contained in:
Cydh Ramdh
2016-03-20 12:31:44 +07:00
parent 9ebf59c37b
commit 09b2ea06ee
9 changed files with 114 additions and 102 deletions

View File

@@ -4185,25 +4185,26 @@ the character will also have their skills reset upon 'changecharsex'.
---------------------------------------
*getexp <base xp>,<job xp>{,<char_id>};
*getexp <base_exp>,<job_exp>{,<char_id>};
This command will give the invoking character a specified number of base and job
experience points. Can be used as a quest reward. Negative values won't work.
experience points. Used for a quest reward. Negative values won't work.
The EXP values are adjustted by 'quest_exp_rate' config value, VIP bonus, Guild
Tax and EXP boost items such Battle Manual, Bubble Gum, or items that have
SC_EXPBOOST or SC_ITEMBOOST.
getexp 10000,5000;
You can also use the "set" command with the constants defined in 'db/const.txt':
---------------------------------------
// These 2 combined has the same effect as the above command
set BaseExp,BaseExp+10000;
set JobExp,JobExp+5000;
*getexp2 <base_exp>,<job_exp>{,<char_id>};
You can also reduce the amount of experience points:
This command is safety version of 'set' command for BaseExp and JobExp. If using
'set' while the BaseExp or JobExp value is more than 2,147,483,647 (INT_MAX) will
causing overflow error.
set BaseExp,BaseExp-10000;
Note that 'getexp' is now subject to the 'quest_exp_rate' config option, which
adjusts the gained value. If you want to bypass this, use the 'set' method.
Unlike 'getexp', this command ignores the adjustment factors!
---------------------------------------