Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 02/19/19 in Posts

  1. 1 point
    AnnieRuru

    @blockexp

    #include "common/hercules.h" #include "map/pc.h" #include "common/nullpo.h" #include "plugins/HPMHooking.h" #include "common/HPMDataCheck.h" HPExport struct hplugin_info pinfo = { "blockexp", SERVER_TYPE_MAP, "0.1", HPM_VERSION, }; bool pc_authok_post( bool retVal, struct map_session_data *sd, int login_id2, time_t expiration_time, int group_id, const struct mmo_charstatus *st, bool changing_mapservers ) { if ( retVal == false ) return false; if ( pc_readglobalreg( sd, script->add_variable("blockexp") ) == true ) clif->message( sd->fd, "@blockexp turn ON." ); return true; } bool pc_gainexp_pre( struct map_session_data **sd, struct block_list **src, uint64 *base_exp, uint64 *job_exp, bool *is_quest ) { nullpo_ret(*sd); if ( *src == NULL && pc_readglobalreg( *sd, script->add_variable("blockexp") ) == true ) *base_exp = 0; return true; } void pc_calcexp_post( struct map_session_data *sd, uint64 *base_exp, uint64 *job_exp, struct block_list *src ) { if ( pc_readglobalreg( sd, script->add_variable("blockexp") ) == true ) *base_exp = 0; return; } ACMD(blockexp) { if ( pc_readglobalreg( sd, script->add_variable("blockexp") ) ) { clif->message( sd->fd, "@blockexp turn OFF." ); pc_setglobalreg( sd, script->add_variable("blockexp"), false ); } else { clif->message( sd->fd, "@blockexp turn ON." ); pc_setglobalreg( sd, script->add_variable("blockexp"), true ); } return true; } HPExport void plugin_init(void) { addHookPre( pc, gainexp, pc_gainexp_pre ); addHookPost( pc, calcexp, pc_calcexp_post ); addAtcommand( "blockexp", blockexp ); } //= the reason of using a script variable instead of creating a new SQL table, //= so server owner can also block exp gain for players from a script //= so just comment out the addAtcommand line ... @Crousti @kftof
  2. 1 point
    bWolfie

    [Guide] Mapcache Generation 2018

    Once you get used to it, the new way is far easier. Consider that most of us are running Hercules on Linux, which means we don't face the issues people running local servers on their Windows do (in terms of mapcache). A tl;dr guide is - Make the 'mapcache' plugin. - With the izlude map files you want to use in your /data/ folder, run: Linux ./map-server --load-plugin mapcache --map izlude Windows map-server.exe --load-plugin mapcache --map izlude The errors from those screenshots are happening because that person rebuilt their entire cache without having the required files that resnametable.txt was looking for. E.g. you ran ./map-server --load-plugin mapcache --rebuild-mapcache But you didn't have all the map files you needed in the /data/ folder or your GRFs. In this screenshot: https://prnt.sc/m4ep8n - pvp_y_1-4 is based on alberta, so you would need all the alberta map files when mapcache is being rebuilt. I should probably update that you shouldn't run the rebuild-mapcache option unless it's really necessary.
×
×
  • Create New...

Important Information

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