Jump to content
AnnieRuru

MaxLvExpGain

Recommended Posts

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.3
plugin

 

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 by AnnieRuru

Share this post


Link to post
Share on other sites

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 by AnnieRuru

Share this post


Link to post
Share on other sites

:swt3:

... 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 level

in 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 by AnnieRuru

Share this post


Link to post
Share on other sites

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 ==========
 

post-4706-0-24974700-1477822838_thumb.png

Edited by devilz33

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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"

Share this post


Link to post
Share on other sites

1.3 .... plugin
well just copy paste from Dastgir's topic

and split 2 posts from this topic for the "@blockexp" request

Edited by AnnieRuru

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.