Jump to content
  • 0
Sign in to follow this  
Kuroe

Guild Skill Notification

Question

Hello. I found this src edit on rathena by anacondaqq

Quote

// 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

Edited by Kuroe

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0
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[i], 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 ....

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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