Added config option 'quest_exp_rate' to adjust exp gained by the 'getexp' script command (followup to r11165).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11171 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
7233562a1a
commit
562e687322
@ -3,6 +3,8 @@ Date Added
|
||||
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
|
||||
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
||||
|
||||
2007/09/10
|
||||
* Added config option to adjust exp gained by 'getexp' [ultramage]
|
||||
2007/09/09
|
||||
* Removed bonus bAddEffWhenHitShort as it is unneeded and unused.
|
||||
* Corrected getpetinfo so it actually returns "null" when there's no pet
|
||||
|
@ -1,5 +1,7 @@
|
||||
Date Added
|
||||
|
||||
2007/09/10
|
||||
* Added 'quest_exp_rate', adjusts exp gained by 'getexp' [ultramage]
|
||||
2007/09/05
|
||||
* Added 'nomemo' mapflags to some Cursed Abbey maps [Playtester]
|
||||
2007/08/19
|
||||
|
@ -55,6 +55,9 @@ exp_bonus_max_attacker: 12
|
||||
// MVP bonus exp rate. (Note 2)
|
||||
mvp_exp_rate: 100
|
||||
|
||||
// Rate of base/job exp given by NPCs. (Note 2)
|
||||
quest_exp_rate: 100
|
||||
|
||||
// The rate of job exp. from using Heal skill (100 is the same as the heal amount, 200 is double.
|
||||
// The balance of the exp. rate is best used with 5 to 10)
|
||||
heal_exp: 0
|
||||
|
@ -9,7 +9,7 @@
|
||||
//= Maeki Rika - A section on general concepts and lots of
|
||||
//= other updates and additions.
|
||||
//===== Version ===========================================
|
||||
//= 3.05.20070819
|
||||
//= 3.06.20070910
|
||||
//=========================================================
|
||||
//= 1.0 - First release, filled will as much info as I could
|
||||
//= remember or figure out, most likely there are errors,
|
||||
@ -82,6 +82,8 @@
|
||||
//= Fixed typo in 'areamonster' description (missing argument) [ultramage]
|
||||
//= 3.06 20070909
|
||||
//= Added 'gethominfo' description [Skotlex]
|
||||
//= 3.06.20070910
|
||||
//= Added info about the new behavior of 'getexp' [ultramage]
|
||||
//===== Description =======================================
|
||||
//= A reference manual for the eAthena scripting language,
|
||||
//= sorted out depending on their functionality.
|
||||
@ -3516,8 +3518,7 @@ There's good reasons to be very careful when using this command.
|
||||
*getexp <base xp>,<job xp>;
|
||||
|
||||
This command will give the invoking character a specified number of base and job
|
||||
experience points. Can be used as a quest reward. Negative amounts of experience
|
||||
were not tested but should work.
|
||||
experience points. Can be used as a quest reward. Negative values won't work.
|
||||
|
||||
getexp 10000,5000;
|
||||
|
||||
@ -3531,6 +3532,9 @@ You can also reduce the ammount of experience points:
|
||||
|
||||
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.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
*setlook <look type>,<look value>;
|
||||
|
@ -3691,6 +3691,7 @@ static const struct _battle_data {
|
||||
{ "mob_remove_delay", &battle_config.mob_remove_delay, 60000, 15000, INT_MAX, },
|
||||
{ "sg_miracle_skill_duration", &battle_config.sg_miracle_skill_duration, 3600000, 0, INT_MAX, },
|
||||
{ "hvan_explosion_intimate", &battle_config.hvan_explosion_intimate, 45000, 0, 100000, },
|
||||
{ "quest_exp_rate", &battle_config.quest_exp_rate, 100, 0, INT_MAX, },
|
||||
};
|
||||
|
||||
|
||||
|
@ -433,6 +433,7 @@ extern struct Battle_Config
|
||||
int hom_rename;
|
||||
int homunculus_show_growth ; //[orn]
|
||||
int homunculus_friendly_rate;
|
||||
int quest_exp_rate;
|
||||
} battle_config;
|
||||
|
||||
void do_init_battle(void);
|
||||
|
@ -7767,13 +7767,21 @@ BUILDIN_FUNC(getexp)
|
||||
{
|
||||
TBL_PC *sd = script_rid2sd(st);
|
||||
int base=0,job=0;
|
||||
double bonus;
|
||||
|
||||
nullpo_retr(0, sd);
|
||||
|
||||
base=script_getnum(st,2);
|
||||
job =script_getnum(st,3);
|
||||
if(base<0 || job<0)
|
||||
return 0;
|
||||
if(sd)
|
||||
pc_gainexp(sd,NULL,base,job);
|
||||
|
||||
// bonus for npc-given exp
|
||||
bonus = battle_config.quest_exp_rate / 100.;
|
||||
base = (int) cap_value(base * bonus, 0, INT_MAX);
|
||||
job = (int) cap_value(job * bonus, 0, INT_MAX);
|
||||
|
||||
pc_gainexp(sd, NULL, base, job);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user