Jump to content
  • 0
Sign in to follow this  
Kuroyama

hit-delay plugin

Question

Does anyone knows how to enable enter portal while being attacked? I try any alternatives but I got no luck. Hit-delay is also affecting ecall and emperium break warp out. I really really wanted to use this hit-delay because its so smooth to use and helpful but I got no choice but to disable it because of these further issues. I hope someone could help me with this.

 

image.png.18ddd32df5653e250db4b70ffd04154a.png

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 1
2 minutes ago, Kuroyama said:

Got this message:

image.png.7edf98a8419aec29df3264c570b3e126.png

Sorry didn't see it was a Pre hook

 

void pc_damage_received(struct map_session_data **sd, struct block_list **src, unsigned int *hp, unsigned int *sp)
{
	struct warp_delay_tick *delay_data;

	if ((map_flag_gvg((*sd)->bl.m)) || (map_flag_gvg2((*sd)->bl.m))) {
		return;
	}

	if ((delay_data = getFromMSD(*sd, 0)) == NULL) {
		CREATE(delay_data,struct warp_delay_tick,1);
		addToMSD(*sd,delay_data,0,true);
	}
	delay_data->last_hit = timer->gettick();
	if (*src)
		delay_data->who_hit = (*src)->type;
	else
		delay_data->who_hit = BL_NUL;
	return;

}

 

Share this post


Link to post
Share on other sites
  • 0
23 hours ago, Kuroyama said:

Does anyone knows how to enable enter portal while being attacked? I try any alternatives but I got no luck. Hit-delay is also affecting ecall and emperium break warp out. I really really wanted to use this hit-delay because its so smooth to use and helpful but I got no choice but to disable it because of these further issues. I hope someone could help me with this.

 

image.png.18ddd32df5653e250db4b70ffd04154a.png

maybe add a mapflag check that hit-delay will not work in gvg maps

Share this post


Link to post
Share on other sites
  • 0
2 hours ago, Kuroyama said:

That's a great idea. Can you help me how to?

 

Try this, haven't tested yet

 

void pc_damage_received(struct map_session_data **sd, struct block_list **src, unsigned int *hp, unsigned int *sp)
{
	struct warp_delay_tick *delay_data;

	if ((map_flag_gvg(sd->bl.m)) || (map_flag_gvg2(sd->bl.m))) {
		return;
	}

	if ((delay_data = getFromMSD(*sd, 0)) == NULL) {
		CREATE(delay_data,struct warp_delay_tick,1);
		addToMSD(*sd,delay_data,0,true);
	}
	delay_data->last_hit = timer->gettick();
	if (*src)
		delay_data->who_hit = (*src)->type;
	else
		delay_data->who_hit = BL_NUL;
	return;

}

 

Replace the pc_damage_received function with that.

 

Back it up first before replacing.

 

Share this post


Link to post
Share on other sites
  • 0
2 minutes ago, Samuel said:

 

Try this, haven't tested yet

 

void pc_damage_received(struct map_session_data **sd, struct block_list **src, unsigned int *hp, unsigned int *sp) { struct warp_delay_tick *delay_data; if ((map_flag_gvg(sd->bl.m)) || (map_flag_gvg2(sd->bl.m))) { return; } if ((delay_data = getFromMSD(*sd, 0)) == NULL) { CREATE(delay_data,struct warp_delay_tick,1); addToMSD(*sd,delay_data,0,true); } delay_data->last_hit = timer->gettick(); if (*src) delay_data->who_hit = (*src)->type; else delay_data->who_hit = BL_NUL; return; }


void pc_damage_received(struct map_session_data **sd, struct block_list **src, unsigned int *hp, unsigned int *sp)
{
	struct warp_delay_tick *delay_data;

	if ((map_flag_gvg(sd->bl.m)) || (map_flag_gvg2(sd->bl.m))) {
		return;
	}

	if ((delay_data = getFromMSD(*sd, 0)) == NULL) {
		CREATE(delay_data,struct warp_delay_tick,1);
		addToMSD(*sd,delay_data,0,true);
	}
	delay_data->last_hit = timer->gettick();
	if (*src)
		delay_data->who_hit = (*src)->type;
	else
		delay_data->who_hit = BL_NUL;
	return;

}

 

Replace the pc_damage_received function with that.

 

Back it up first before replacing.

 

Got this message:

image.png.7edf98a8419aec29df3264c570b3e126.png

Share this post


Link to post
Share on other sites
  • 0
11 minutes ago, Samuel said:

Sorry didn't see it was a Pre hook

 

void pc_damage_received(struct map_session_data **sd, struct block_list **src, unsigned int *hp, unsigned int *sp) { struct warp_delay_tick *delay_data; if ((map_flag_gvg((*sd)->bl.m)) || (map_flag_gvg2((*sd)->bl.m))) { return; } if ((delay_data = getFromMSD(*sd, 0)) == NULL) { CREATE(delay_data,struct warp_delay_tick,1); addToMSD(*sd,delay_data,0,true); } delay_data->last_hit = timer->gettick(); if (*src) delay_data->who_hit = (*src)->type; else delay_data->who_hit = BL_NUL; return; }


void pc_damage_received(struct map_session_data **sd, struct block_list **src, unsigned int *hp, unsigned int *sp)
{
	struct warp_delay_tick *delay_data;

	if ((map_flag_gvg((*sd)->bl.m)) || (map_flag_gvg2((*sd)->bl.m))) {
		return;
	}

	if ((delay_data = getFromMSD(*sd, 0)) == NULL) {
		CREATE(delay_data,struct warp_delay_tick,1);
		addToMSD(*sd,delay_data,0,true);
	}
	delay_data->last_hit = timer->gettick();
	if (*src)
		delay_data->who_hit = (*src)->type;
	else
		delay_data->who_hit = BL_NUL;
	return;

}

 

IT WORKS LIKE MAGIC. OMYSWEETJESUS! THANK YOU SO MUCH FOR THIS. :bawling:

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.