AnnieRuru 957 Posted December 28, 2015 (edited) I saw a lot of methods on how to stop players from gaining exp after certain level but all of them have flaws, so I release mine, its from my google drive Download: 1.3plugin Full Description of what this plugin DO stop players gain exp through killing monsters, mvp exp, or share party experience allows to gain exp by *getexp script command or BaseExp++ / JobExp++ allows players to pay guild tax exp after they hit your capped level value if your server has heal_exp, resurrection_exp or shop_exp enable, they will stop gain exp from these action after they hit your cap level if the player do SA_LEVELUP ( a random skill from Hocos-Pocus ) after the cap level, they can't gain exp if it doesn't follow this list, then this is bug there is a small issue with this plugin, Quote without this plugin, which follow the official server rule when the sage already hit the capped level, sage class can use 1 of the skill from hocus-pocus' SA_LEVELUP to pay huge exp to the guild as tax Quote after install this plugin, when the sage already hit the capped level in the config, sage class hocus-pocus' SA_LEVELUP is broken, no exp gain, and cannot pay exp to the guild using this skill everything else in the above list will still works, don't worry, tested 0.2 - topic - reset BaseExp gain after certain level 1.0 - plugin - stop BaseExp/JobExp gain after certain level 1.1 - plugin - fixed an issue that when player hit that cap level, they are unable to pay guild tax exp - fixed an issue that player should've stop earning exp, but they are actually gain 1 exp --- blame to the cap_value command inside pc_calcexp function 1.1a - fixed player can still gain exp by spamming hocus-pocus skill, SA_LEVELUP to be exact 1.2 - plugin -- fixed an issue that when player hit that cap level, they are unable to pay guild tax exp ... again ... 1.3 - plugin -- update to latest revision, thanks to Dastgir for upkeeping Edited October 27, 2020 by AnnieRuru 7 Easycore, Jezu, Ehwaz and 4 others reacted to this Quote Share this post Link to post Share on other sites
Jezu 25 Posted December 29, 2015 +1 rep for this very useful plugin (and not a script or src based) :no1: Quote Share this post Link to post Share on other sites
REKT 10 Posted December 29, 2015 +1 rep for this very useful plugin (and not a script or src based) :no1: LOL, its still a src based. 1 Triedge reacted to this Quote Share this post Link to post Share on other sites
AnnieRuru 957 Posted January 1, 2016 (edited) 1.1 - fixed an issue that when player hit that cap level, they are unable to pay guild tax exp - fixed an issue that player should've stop earning exp, but they are actually gain 1 exp --- blame to the cap_value command inside pc_calcexp function 1.1a plugin - fixed player can still gain exp by spamming hocus-pocus skill, SA_LEVELUP to be exact Edited January 1, 2016 by AnnieRuru 1 REKT reacted to this Quote Share this post Link to post Share on other sites
AnnieRuru 957 Posted January 1, 2016 (edited) ... fix the guild exp tax gain, hocus-pocus broken then I fix hocus-pocus, guild exp tax NOW break again ... these 2 seems to hate each other haiz ... have to make a decision 1.2 plugin - fixed an issue that when player hit that cap level, they are unable to pay guild tax exp ... again ... .. there is an issue with this plugin, without this plugin, which follow the official server rule when the sage already hit the capped level, sage class can use 1 of the skill from hocus-pocus' SA_LEVELUP to pay huge exp to the guild as tax after install this plugin, when the sage already hit the capped level in the config, sage class hocus-pocus' SA_LEVELUP is broken, no exp gain, and cannot pay exp to the guild using this skill in other words, SA_LEVELUP skill from hocus-pocus is nullify after the player hit the cap levelin order to make experience tax to the guild from killing normal monster works everything else at the above list will still works, don't worry, tested if somebody has a better idea how to fix this rare bug, always welcome any suggestion Edited January 1, 2016 by AnnieRuru Quote Share this post Link to post Share on other sites
Dduwsmitt 4 Posted October 30, 2016 (edited) Hello this happens when compiling in windows. what should i do? 1>------ Build started: Project: MaxLvExpGain, Configuration: Debug Win32 ------ 1> MaxLvExpGain.c 1>..\src\plugins\MaxLvExpGain.c(104): warning C4003: not enough actual parameters for macro 'addBattleConf' 1>..\src\plugins\MaxLvExpGain.c(104): error C2059: syntax error : ')' 1>..\src\plugins\MaxLvExpGain.c(105): warning C4003: not enough actual parameters for macro 'addBattleConf' 1>..\src\plugins\MaxLvExpGain.c(105): error C2059: syntax error : ')' 1>..\src\plugins\MaxLvExpGain.c(109): warning C4013: 'addHookPre' undefined; assuming extern returning int 1>..\src\plugins\MaxLvExpGain.c(110): warning C4013: 'addHookPost' undefined; assuming extern returning int ========== Build: 0 succeeded, 1 failed, 8 up-to-date, 0 skipped ========== Edited October 30, 2016 by devilz33 Quote Share this post Link to post Share on other sites
Khazou 12 Posted November 11, 2016 Change to this: HPExport void server_preinit (void) { addBattleConf( "max_blv_exp_gain", battle_config_setting, return_battle_config, false ); addBattleConf( "max_jlv_exp_gain", battle_config_setting, return_battle_config, false ); } HPExport void plugin_init (void) { addHookPre( pc, gainexp, pc_gainexp_pre ); addHookPost( pc, calcexp, pc_calcexp_post ); } But be careful, i tried it, and it blocks exp gain for all player regardless of my battle conf. I still don't know why x) Quote Share this post Link to post Share on other sites
Dastgir 1246 Posted November 11, 2016 Change these 2 lines for the meantime: int max_blv_exp_gain = 5; // when player reach this BaseLevel, they stop gain BaseExp int max_jlv_exp_gain = 5; // when player reach this JobLevel, they stop gain JobExp I just learned that addBattleConf needs some changes so that it can read from battle folder. 1 Legend reacted to this Quote Share this post Link to post Share on other sites
Easycore 31 Posted November 12, 2016 Change to this: HPExport void server_preinit (void) { addBattleConf( "max_blv_exp_gain", battle_config_setting, return_battle_config, false ); addBattleConf( "max_jlv_exp_gain", battle_config_setting, return_battle_config, false ); } HPExport void plugin_init (void) { addHookPre( pc, gainexp, pc_gainexp_pre ); addHookPost( pc, calcexp, pc_calcexp_post ); } But be careful, i tried it, and it blocks exp gain for all player regardless of my battle conf. I still don't know why x) I get the follow error: 1>------ Build started: Project: proyecto: MaxLvExpGain, Configuration: Debug Win32 ------ 1> MaxLvExpGain.c 1>..\src\plugins\MaxLvExpGain.c(109): warning C4013: 'addHookPre' undefined; It is assumed that extern returns as int result 1>..\src\plugins\MaxLvExpGain.c(109): error C2065: 'gainexp' : undeclared identifier 1>..\src\plugins\MaxLvExpGain.c(110): warning C4013: 'addHookPost' undefined; It is assumed that extern returns as int result 1>..\src\plugins\MaxLvExpGain.c(110): error C2065: 'calcexp' : undeclared identifier ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== I'm using the latest Herc. :s Quote Share this post Link to post Share on other sites
Khazou 12 Posted November 12, 2016 Ups forget to tell you to also import the HPM Hooking system Add this: #include "plugins/HPMHooking.h" so it looks like this: #include "common/hercules.h" #include <stdio.h> #include <string.h> #include <stdlib.h> #include "map/pc.h" #include "common/memmgr.h" #include "common/nullpo.h" #include "plugins/HPMHooking.h" #include "common/HPMDataCheck.h" Quote Share this post Link to post Share on other sites
AnnieRuru 957 Posted February 19, 2019 (edited) 1.3 .... plugin well just copy paste from Dastgir's topic and split 2 posts from this topic for the "@blockexp" request Edited February 24, 2019 by AnnieRuru Quote Share this post Link to post Share on other sites