Leaderboard


Popular Content

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

  1. 2 points
    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
  2. 1 point
    hemagx

    How to make MATK = 1 in status_calc_pc_ ?

    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

    Stylist

    all right, I post up my custom stylist Download: 1.4 script this one use CSV format .list$[LOOK_HAIR] = "0-5,11-18,20-23"; .list$[Job_Summoner + LOOK_CLOTHES_COLOR] = "0-1"; This means, the ID range for hair style 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 0 and 1, this prevent crash client
  4. 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 Download : plugin Tested with: prontera,155,185,4 script Test 1_F_MARIA,{ @a ^= 1; mes "hmm..."; close2; recalculatestat(); // if player under a dialog, MUST use close2; then only recalculate end; OnPCStatCalcEvent: if ( @a ) bonus bStr, 1000; end; } OnPCStatCalcEvent can't run during npc dialog, and spam map-server error along with it during the npc dialog, keep change the equipment, you'll lose the str bonus and map-server spam error [Warning]: npc_event: player's event queue is full, can't add event 'Test::OnPCStatCalcEvent' ! conf/map/battle/items.conf // Enable all NPC to allow changing of equipments while interacting? (Note 1) // Script commands 'enable_items/disable_items' will not be override. (see doc/script_commands.txt) // Default: true (official) item_enabled_npc: true change this to false should stop it but none the less, its still a great feature