Jump to content

Leaderboard


Popular Content

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

  1. 2 points
    AnnieRuru

    Stylist

    all right, I post up my custom stylist Download: 2.1 script this one use CSV format setd ".@"+ Job_Rune_Knight +"_"+ LOOK_CLOTHES_COLOR +"$[1]", "0-5,11-18,20-23"; setd ".@"+ Job_Summoner +"_"+ LOOK_CLOTHES_COLOR +"$[0]", "0-3"; This means, the ID range for Job_Rune_Knight at bodystyle number (1) is 0,1,2,3,4,5,11,12,13,14,15,16,17,18,20,21,22,23 2nd line means Summoner job can only use clothing range between 0 to 3, this prevent crash client due to human and doram race doesn't share the same palette From version 2.0 onwards, now you don't have to scratch your head about missing palette due to different bodystyle this script can handle that
  2. 2 points
    Well I've done few changes to this, I used same method as @AnnieRuru but as a plugin, first hercules provides us with the amazing status->pc_calc_additional which is meant for plugins, it's placed right after Equipment parse so it would not overwrite the value the plugin set, and then the plugin set the matk rate to 0, and tada! I've also changed map check to check the id of the map instead, this is simpler, faster and also allowed a run time check for if you accidentally put a wrong map name (check server_online function), and it's tested :3 works as charm! /** * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * * Copyright (C) 2013-2019 Hercules Dev Team * Copyright (C) Hemagx <[email protected]> * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ /// Zero Matk Hercules Plugin #include "common/hercules.h" /* Should always be the first Hercules file included! (if you don't make it first, you won't be able to use interfaces) */ #include "common/core.h" #include "common/mapindex.h" #include "map/map.h" #include "map/pc.h" #include "map/status.h" #include "plugins/HPMHooking.h" #include "common/HPMDataCheck.h" /* should always be the last Hercules file included! (if you don't make it last, it'll intentionally break compile time) */ HPExport struct hplugin_info pinfo = { "Zero MATK", // Plugin name SERVER_TYPE_MAP,// Which server types this plugin works with? "0.1", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated) }; const char *map_name = "prontera"; int16 map_id = -1; // init it with invalid value to make sure on failure it would always cause our check to fail. static void status_calc_pc_additional_post(struct map_session_data *sd, enum e_status_calc_opt opt) { if (sd == NULL) // I don'r prefer usage of nullpo in hooks, unless we're replacing a function multiaple nullpo reports can turn confusing. return; if (sd->bl.m != map_id) return; sd->matk_rate = 0; return; } /* run when server starts */ HPExport void plugin_init (void) { addHookPost(status, calc_pc_additional, status_calc_pc_additional_post); } HPExport void server_online (void) { unsigned short map_index; if ((map_index = mapindex->name2id(map_name)) == 0) { ShowError("%s:plugin_init: Failed to get map index for map %s the plugin would now fail to start\n", pinfo.name, map_name); core->runflag = CORE_ST_STOP; } if ((map_id = map->mapindex2mapid(map_index)) == -1) { ShowError("%s:plugin_init: Failed to get map id for map %s the plugin would now fail to start\n", pinfo.name, map_name); core->runflag = CORE_ST_STOP; } }
  3. 1 point
    AnnieRuru

    OnPCStatCalcEvent

    rathena already has this by default -> https://github.com/rathena/rathena/commit/27a0f3f someone else has tried to pull request in hercules, -> https://github.com/HerculesWS/Hercules/pull/351 but it was denied, so have to leave this as plugin UPDATE: rathena has taken out -> https://github.com/rathena/rathena/commit/b65443d8f564175196d57ef9bc1d000a5661fbdc Download : 2.1 plugin Tested with: conf\import\OnPCStatCalcEvent.conf both `@reloadscript` and `@reloadonpcstatcalcevent` command can reload conf\import\OnPCStatCalcEvent.conf file  `@reloadscript` = reload everything -> cause destruction on live server `@reloadonpcstatcalcevent` = only reload conf\import\OnPCStatCalcEvent.conf file , combine with `@reloadnpc` command -> not so destructive script: ( { // give GM permanent bonus ? OnPCStatCalcEvent: <" bonus bVit, 1234; end; "> }, { // for xxx event OnPCStatCalcEvent: <" skill TF_HIDING, 1; end; "> }, { // npc/custom/xxxevent.txt OnPCStatCalcEvent: <" if (@a) { bonus bStr, 1000; skill WZ_ICEWALL, 1; } end; "> }, ) script prontera,158,185,5 script djk2sfhsd 1_F_MARIA,{ @a ^= 1; mes "hmm..."; recalculatestat(); next; mes "what ?"; @a ^= 1; recalculatestat(); next; mes "maybe..."; @a ^= 1; recalculatestat(); next; mes "probably..."; @a ^= 1; recalculatestat(); next; mes "yeah..."; @a ^= 1; recalculatestat(); close; } yes, this actually works !! with version 2.0 onwards, no more spamming <npc name>::OnPCStatCalcEvent !! and even `*skill` working perfectly fine now
  4. 1 point
    AnnieRuru

    Lotti Girl

    There are MANY variations of Lotti Girl script, even me too, have made several of them so today I try to gather them all, and make a release with ALL features from all the topics gathered Download: script Feature no.1 -> show the percentage chance chinese government has a rule that all lottery system must show the percentage chance to the public hence the script should show the lottery chance in percent Feature no.2 -> Roll Repeatedly imagine if you have 500 tickets, and you want to spend them all, all other scripts available on rathena board will force the player to spend them 1 by 1 this script can roll up to 100 times on the fly, effectively save player's time Feature no.3 -> Lotti shop even if you spend a lot of tickets and still getting all the trash items, you still collecting points, and able buy them in Lotti Shop Feature no.4 -> Lotti ladder compete with other players and see who has the highest Lotti Rank ! oh and ... HULD compatible == rAthena members can't use this
×
×
  • Create New...

Important Information

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