Guild Skill Notification

Kuroe

New member
Messages
23
Points
0
Github
Kuroes
Emulator
Hello. I found this src edit on rathena by anacondaqq

// Blocks all guild skills which have a common delay time.
int guild_block_skill_end(int tid, unsigned int tick, int id, intptr_t data) {
struct guild *g;
char output[128];
int idx = battle_config.guild_skills_separed_delay ? (int)data - GD_SKILLBASE : 0;

if( (g = guild_search(id)) == NULL )
return 1;

if( idx < 0 || idx >= MAX_GUILDSKILL )
{
ShowError("guild_block_skill_end invalid skill_id %d.\n", (int)data);
return 0;
}

if( tid != g->skill_block_timer[idx] )
{
ShowError("guild_block_skill_end %d != %d.\n", g->skill_block_timer[idx], tid);
return 0;
}

HERE
---------->>>>> sprintf(output, "%s : Guild Skill %s Ready!!", g->name, skill_get_desc((int)data));
g
->skill_block_timer[idx] = INVALID_TIMER;
clif_guild_message
(g, 0, output, strlen(output));

return 1;
}

It notifies the guild master and members if the guild skill is ready to use and if not it'll display the time in minutes:seconds before it is available again.

May i request a plugin form of this thats working on the latest version of herc?

Thank you in advance :D

 
Last edited by a moderator:
static void guild_block_skill(struct map_session_data *sd, int time)
{
uint16 skill_id[] = { GD_BATTLEORDER, GD_REGENERATION, GD_RESTORE, GD_EMERGENCYCALL };
int i;
for (i = 0; i < 4; i++)
skill->blockpc_start(sd, skill_id, time);
}


hercules uses skill->blockpc_start and skill->blockpc_end to just set sd->blockskill[skill_id] = true:false;

so you can just hook to skill->blockpc_end to display the message for the guild master

to display the time left in min:sec, when guild master use the skill, run DIFF_TICK function

oh wait this is request section ....

 
Back
Top