xVec 1 Posted May 24, 2018 Hi! I have a question, any of you know someting about the WoE Ranking implemented in eAmod in Hercules? I can pay for the implementation... Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted May 24, 2018 this one ? Quote Share this post Link to post Share on other sites
0 bWolfie 138 Posted May 24, 2018 (note: I have never used/experienced the system you're referring to) There are two parts to the woe ranking system: 1. src writes SQL data when certain actions take place. E.g. when a player kills somebody, perhaps the src would add 1 to kill_counter row. 2. Website has some sort of interaction with the game SQL database to display the data graphically. Lucky for you, eAmod became open source some time ago. You can view the SQL info here: https://github.com/zephyrus-cr/eamod/blob/master/sql-addons/main-extras_eAthena.sql A sample of what is happening in the SQL: CREATE TABLE `guild_rank` ( `guild_id` int(11) NOT NULL, `castle_id` int(11) NOT NULL, `capture` int(11) unsigned NOT NULL default '0', `emperium` int(11) unsigned NOT NULL default '0', `treasure` int(11) unsigned NOT NULL default '0', `top_eco` int(11) unsigned NOT NULL default '0', `top_def` int(11) unsigned NOT NULL default '0', `invest_eco` int(11) unsigned NOT NULL default '0', `invest_def` int(11) unsigned NOT NULL default '0', `offensive_score` int(11) unsigned NOT NULL default '0', `defensive_score` int(11) unsigned NOT NULL default '0', `posesion_time` int(11) unsigned NOT NULL default '0', `zeny_eco` int(11) unsigned NOT NULL default '0', `zeny_def` int(11) unsigned NOT NULL default '0', `skill_battleorder` int(11) unsigned NOT NULL default '0', `skill_regeneration` int(11) unsigned NOT NULL default '0', `skill_restore` int(11) unsigned NOT NULL default '0', `skill_emergencycall` int(11) unsigned NOT NULL default '0', `off_kill` int(11) unsigned NOT NULL default '0', `off_death` int(11) unsigned NOT NULL default '0', `def_kill` int(11) unsigned NOT NULL default '0', `def_death` int(11) unsigned NOT NULL default '0', `ext_kill` int(11) unsigned NOT NULL default '0', `ext_death` int(11) unsigned NOT NULL default '0', `ali_kill` int(11) unsigned NOT NULL default '0', `ali_death` int(11) unsigned NOT NULL default '0', PRIMARY KEY (`guild_id`,`castle_id`), KEY `castle_id` (`castle_id`) ) ENGINE=InnoDB; And then by searching the src repo, you can find snippets of the code. This quite complicated. To recreate it to work for Hercules would take a lot of work. of course you could just use Zephyrus' HercMod but I really don't recommend doing that. 1 xVec reacted to this Quote Share this post Link to post Share on other sites
0 xVec 1 Posted May 24, 2018 36 minutes ago, Myriad said: And then by searching the src repo, you can find snippets of the code. This quite complicated. To recreate it to work for Hercules would take a lot of work. of course you could just use Zephyrus' HercMod but I really don't recommend doing that. I already search in that repository but the Hercules section don't have the eAmod implementations. I just want fill the 'char_woe_log' and 'char_wstats' tables to display the char stats in woe. :/ 42 minutes ago, AnnieRuru said: this one ? No, I'm referring to woe stats like kills, skills used, etc... Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted May 24, 2018 I never play eamod, so I don't know any of the system you even say etc .... this doesn't work you should elaborate more Quote Share this post Link to post Share on other sites
0 xVec 1 Posted May 24, 2018 2 minutes ago, AnnieRuru said: I never play eamod, so I don't know any of the system you even say etc .... this doesn't work you should elaborate more Sorry... I mean something like that: https://www.gatheringro.ch/?module=ranking&action=woe Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted May 24, 2018 a lot of useless information ... kills/deaths ... can be done with scripting dmg vs players ... need OnPCAttackEvent: ... not recommended dmg vs buildings ... need OnPCAttackEvent or mobevent script command ... not implemented... support skills .... no idea what it is Total Healing ... need OnPCHealEvent: ?? Item consumed ... curious, why it doesn't list out ASPD potion like berserk potion or how much white potion used ? need OnPCUseItemEvent: ... I remember Emistry made this before Conclusion: yeah these things just make your server use up a lot more memory just to show a bunch of useless information... not interested Quote Share this post Link to post Share on other sites
0 xVec 1 Posted May 24, 2018 Its possible to get the Skill used when a character kill other char? Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted May 30, 2018 Spoiler #include "common/hercules.h" #include "map/map.h" #include "map/unit.h" #include "map/script.h" #include "common/HPMDataCheck.h" HPExport struct hplugin_info pinfo = { "getlastskill", SERVER_TYPE_MAP, "0_0", HPM_VERSION, }; BUILDIN(getlastskill) { struct block_list *bl = map->id2bl( script_hasdata(st, 3)? script_getnum(st, 2) : st->rid ); if ( !bl ) { script_pushint(st, -1); return false; } script_pushint( st, unit->bl2ud(bl)->skill_id ); // always return 0 // script_pushint( st, unit->bl2ud(bl)->dir ); // works return true; } HPExport void plugin_init (void) { addScriptCommand( "getlastskill", "?", getlastskill ); } hmm ... always shows 0 ... still possible but ... since the previous attempt doesn't work, then has to do something like OnPCUseSkillEvent stuffs every time someone use a skill, it will log the last skill ID used in a player variable instead, because ud->skill_id doesn't seems to work which ... I do admire zephirus sometimes, although his code looks very messy, but he really does put in a lot of effort Quote Share this post Link to post Share on other sites
0 4144 364 Posted May 30, 2018 unit->bl2ud some times may return NULL, and plugin may crash because this Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted June 1, 2018 (edited) On 5/31/2018 at 6:48 AM, 4144 said: unit->bl2ud some times may return NULL, and plugin may crash because this example ? I only tested it with player and npc maybe add another bl check like BL_PC, BL_MOB, BL_HOM, BL_MER, BL_ELEM, BL_PET_, BL_NPC ? Spoiler enum bl_type { BL_NUL = 0x000, BL_PC = 0x001, BL_MOB = 0x002, BL_PET = 0x004, BL_HOM = 0x008, BL_MER = 0x010, BL_ITEM = 0x020, BL_SKILL = 0x040, BL_NPC = 0x080, BL_CHAT = 0x100, BL_ELEM = 0x200, BL_ALL = 0xFFF, }; hmm ..... maybe ... Edited June 1, 2018 by AnnieRuru Quote Share this post Link to post Share on other sites
0 4144 364 Posted June 1, 2018 struct unit_data *ud = unit->bl2ud(bl); if (ud == NULL) return false; script_pushint( st, ud->skill_id ); // always return 0 //script_pushint( st, ud->dir ); // works something like this 1 AnnieRuru reacted to this Quote Share this post Link to post Share on other sites
Hi!
I have a question, any of you know someting about the WoE Ranking implemented in eAmod in Hercules?
I can pay for the implementation...
Share this post
Link to post
Share on other sites