func void b_giveplayerxp(var int add_xp) {
var string concattext;
if(hero.level == 0) {
hero.exp_next = 500;
};
hero.exp += add_xp;
b_printxp(add_xp);
if(hero.exp >= hero.exp_next) {
hero.level += 1;
if(hero.level >= 70) {
hero.exp_next += hero.level + 1 * 850;
}
else if(hero.level >= 60) {
hero.exp_next += hero.level + 1 * 800;
}
else if(hero.level >= 50) {
hero.exp_next += hero.level + 1 * 750;
}
else if(hero.level >= 40) {
hero.exp_next += hero.level + 1 * 700;
}
else if(hero.level >= 30) {
hero.exp_next += hero.level + 1 * 650;
}
else if(hero.level >= 20) {
hero.exp_next += hero.level + 1 * 600;
}
else if(hero.level >= 10) {
hero.exp_next += hero.level + 1 * 550;
}
else {
hero.exp_next += hero.level + 1 * 500;
};
hero.attribute = hero.attribute[1];
hero.attribute[2] = hero.attribute[3];
if((hero.guild < gil_seperator_hum) && (hero.level <= 30)) {
if(hero.guild == gil_none) {
b_raiseattributequiet(hero, atr_hitpoints_max, hp_per_level);
b_raisestamina(1);
}
else if((hero.guild == gil_mil) || (hero.guild == gil_sld) || sektant_way_strag) {
b_raiseattributequiet(hero, atr_hitpoints_max, 4);
b_raisestamina(2);
}
else if((hero.guild == gil_nov) || (hero.guild == gil_ndw) || (hero.guild == gil_ndm) || sektant_way_guru) {
b_raiseattributequiet(hero, atr_hitpoints_max, 2);
b_raiseattributequiet(hero, atr_mana_max, 1);
}
else if(hero.guild == gil_djg) {
b_raiseattributequiet(hero, atr_hitpoints_max, 5);
}
else if(hero.guild == gil_pal) {
b_raiseattributequiet(hero, atr_hitpoints_max, 5);
b_raiseattributequiet(hero, atr_mana_max, 1);
}
else if(hero.guild == gil_tpl) {
b_raiseattributequiet(hero, atr_hitpoints_max, 5);
b_raiseattributequiet(hero, atr_mana_max, 2);
}
else if(hero.guild == gil_kdm) {
b_raiseattributequiet(hero, atr_hitpoints_max, 3);
b_raiseattributequiet(hero, atr_mana_max, 4);
}
else if(hero.guild == gil_kdf) {
b_raiseattributequiet(hero, atr_hitpoints_max, 3);
b_raiseattributequiet(hero, atr_mana_max, 3);
}
else if(hero.guild == gil_kdw) {
b_raiseattributequiet(hero, atr_hitpoints_max, 3);
b_raiseattributequiet(hero, atr_mana_max, 4);
}
else if(hero.guild == gil_gur) {
b_raiseattributequiet(hero, atr_hitpoints_max, 2);
b_raiseattributequiet(hero, atr_mana_max, 5);
};
if(nolimitinv == 2) {
maxinvperlvl(6);
};
}
else if(hero.guild > gil_seperator_hum) {
herotransformedhp += hp_per_level;
};
b_lpperlvl();
printscreen(print_levelup, -1, ypos_levelup, font_screen, 2);
snd_play(ÿ14934);
};
b_checklog();
};
func void b_giveplayerxpquiet(var int add_xp) {
var string concattext;
if(hero.level == 0) {
hero.exp_next = 500;
};
hero.exp += add_xp;
b_printxp(add_xp);
if(hero.exp >= hero.exp_next) {
hero.level += 1;
if(hero.level >= 70) {
hero.exp_next += hero.level + 1 * 850;
}
else if(hero.level >= 60) {
hero.exp_next += hero.level + 1 * 800;
}
else if(hero.level >= 50) {
hero.exp_next += hero.level + 1 * 750;
}
else if(hero.level >= 40) {
hero.exp_next += hero.level + 1 * 700;
}
else if(hero.level >= 30) {
hero.exp_next += hero.level + 1 * 650;
}
else if(hero.level >= 20) {
hero.exp_next += hero.level + 1 * 600;
}
else if(hero.level >= 10) {
hero.exp_next += hero.level + 1 * 550;
}
else {
hero.exp_next += hero.level + 1 * 500;
};
hero.attribute = hero.attribute[1];
hero.attribute[2] = hero.attribute[3];
if((hero.guild < gil_seperator_hum) && (hero.level <= 30)) {
if(hero.guild == gil_none) {
b_raiseattributequiet(hero, atr_hitpoints_max, hp_per_level);
b_raisestamina(1);
}
else if((hero.guild == gil_mil) || (hero.guild == gil_sld) || sektant_way_strag) {
b_raiseattributequiet(hero, atr_hitpoints_max, 4);
b_raisestamina(2);
}
else if((hero.guild == gil_nov) || (hero.guild == gil_ndw) || (hero.guild == gil_ndm) || sektant_way_guru) {
b_raiseattributequiet(hero, atr_hitpoints_max, 2);
b_raiseattributequiet(hero, atr_mana_max, 1);
}
else if(hero.guild == gil_djg) {
b_raiseattributequiet(hero, atr_hitpoints_max, 5);
}
else if(hero.guild == gil_pal) {
b_raiseattributequiet(hero, atr_hitpoints_max, 5);
b_raiseattributequiet(hero, atr_mana_max, 1);
}
else if(hero.guild == gil_tpl) {
b_raiseattributequiet(hero, atr_hitpoints_max, 5);
b_raiseattributequiet(hero, atr_mana_max, 2);
}
else if(hero.guild == gil_kdm) {
b_raiseattributequiet(hero, atr_hitpoints_max, 3);
b_raiseattributequiet(hero, atr_mana_max, 4);
}
else if(hero.guild == gil_kdf) {
b_raiseattributequiet(hero, atr_hitpoints_max, 3);
b_raiseattributequiet(hero, atr_mana_max, 3);
}
else if(hero.guild == gil_kdw) {
b_raiseattributequiet(hero, atr_hitpoints_max, 3);
b_raiseattributequiet(hero, atr_mana_max, 4);
}
else if(hero.guild == gil_gur) {
b_raiseattributequiet(hero, atr_hitpoints_max, 2);
b_raiseattributequiet(hero, atr_mana_max, 5);
};
if(nolimitinv == 2) {
maxinvperlvl(6);
};
}
else if(hero.guild > gil_seperator_hum) {
herotransformedhp += hp_per_level;
};
b_lpperlvl();
printscreen(print_levelup, -1, ypos_levelup, font_screen, 2);
snd_play(ÿ14935);
};
b_checklog();
};