Jump to content
  • 0

How to disable this delay


eboni001

Question


  • Group:  Members
  • Topic Count:  79
  • Topics Per Day:  0.02
  • Content Count:  327
  • Reputation:   4
  • Joined:  06/22/13
  • Last Seen:  

helo guys does somebody know how to disable the @warp and @go delay when facing mobs? i only want it enable for pvp but this is desperating when i get hitted by a mob and i cant warp out, please somebody help me with this :(

Link to comment
Share on other sites

17 answers to this question

Recommended Posts

  • 2

  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   381
  • Joined:  02/03/12
  • Last Seen:  

now is working, thanks for your help, you are really Awesome ^_^, Power to you, there's any way to apply this delay when you inflict damage to another player too? because this delay is working only when you receive damage from another players ^_^.

 

 

I imagine there are better ways of doing this but whatever works right.

void pc_damage(struct map_session_data *sd,struct block_list *src,unsigned int hp, unsigned int sp)
{
	unsigned int tick = gettick(); 
	int warpgodelaycd = 5000; //This is the delay in milliseconds you can set what ever delay you want 
	struct map_session_data *md = (struct map_session_data *)src;

	if (sp) clif_updatestatus(sd,SP_SP);
	if (hp) clif_updatestatus(sd,SP_HP);
	else return;

	if( !src || src == &sd->bl )
		return;

	if(src->type == BL_PC) {
		sd->warpgodelay_tick = tick+warpgodelaycd; //This is the timer 
		md->warpgodelay_tick = tick+warpgodelaycd; //This is the timer 
	}

	if( pc_issit(sd) )
	{
		pc_setstand(sd);
		skill_sit(sd,0);
	}

	if( sd->progressbar.npc_id )
		clif_progressbar_abort(sd);

	if( sd->status.pet_id > 0 && sd->pd && battle_config.pet_damage_support )
		pet_target_check(sd,src,1);

	if( sd->status.ele_id > 0 )
		elemental_set_target(sd,src);

	sd->canlog_tick = gettick();
}
  • Upvote 2
Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   381
  • Joined:  02/03/12
  • Last Seen:  

ok i tried but now the delay has been removed in pvp too, i want the delay when you hit or hited for another player, but i want you can warp if you are facing only mobs.

 

Oh I didn't know that's what you wanted.

 

In pc.c

 

After:

int warpgodelaycd = 5000; //This is the delay in milliseconds you can set what ever delay you want

Make sure you change that back to 5000...

 

Replace:

sd->warpgodelay_tick = tick+warpgodelaycd; //This is the timer

 

With:

	if(src->type == BL_PC)
		sd->warpgodelay_tick = tick+warpgodelaycd; //This is the timer 
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  46
  • Reputation:   1
  • Joined:  03/16/20
  • Last Seen:  

Hello, this doesn't work anymore with the latest git ?

Link to comment
Share on other sites

  • -2

  • Group:  Members
  • Topic Count:  62
  • Topics Per Day:  0.02
  • Content Count:  296
  • Reputation:   4
  • Joined:  02/19/17
  • Last Seen:  

how about to use flywing or butterflywing does it delay of teleporting somewhere else if been hit by any mobs or characters?

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  79
  • Topics Per Day:  0.02
  • Content Count:  327
  • Reputation:   4
  • Joined:  06/22/13
  • Last Seen:  

bump

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  79
  • Topics Per Day:  0.02
  • Content Count:  327
  • Reputation:   4
  • Joined:  06/22/13
  • Last Seen:  

this guide is to enable the delay, but i need to know how to disable delay when facing mobs, i only want it works for pvp.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

then show your custom source mod...we dont know how you implement ur own custom src mod for this ==''

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  79
  • Topics Per Day:  0.02
  • Content Count:  327
  • Reputation:   4
  • Joined:  06/22/13
  • Last Seen:  

then show your custom source mod...we dont know how you implement ur own custom src mod for this ==''

sry sir emistry im newbie in this im not sure about what mods are you talking about. :( to enable @warp and @go delay i just follow steps in this guide @go_delay_when_hit. but now people complaining they can't warp when a mob hit them.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   381
  • Joined:  02/03/12
  • Last Seen:  

Have you tried changing-

int warpgodelaycd = 5000;

In src/map/pc.c

 

to something like-

int warpgodelaycd = 0;
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  79
  • Topics Per Day:  0.02
  • Content Count:  327
  • Reputation:   4
  • Joined:  06/22/13
  • Last Seen:  

Have you tried changing-

 

int warpgodelaycd = 5000;

In src/map/pc.c

 

to something like-

 

int warpgodelaycd = 0;

ok i tried but now the delay has been removed in pvp too, i want the delay when you hit or hited for another player, but i want you can warp if you are facing only mobs.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  79
  • Topics Per Day:  0.02
  • Content Count:  327
  • Reputation:   4
  • Joined:  06/22/13
  • Last Seen:  

ok i tried but now the delay has been removed in pvp too, i want the delay when you hit or hited for another player, but i want you can warp if you are facing only mobs.

 

Oh I didn't know that's what you wanted.

 

In pc.c

 

After:

 

int warpgodelaycd = 5000; //This is the delay in milliseconds you can set what ever delay you want

Make sure you change that back to 5000...

 

Replace:

 

sd->warpgodelay_tick = tick+warpgodelaycd; //This is the timer

 

With:

	if(src->type == BL_PC)
		sd->warpgodelay_tick = tick+warpgodelaycd; //This is the timer 

i did it, but now when i try to use any skill or try to pvp server get disconected and when i try to log in, server rejected me, to can log in i have to restart my server.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   381
  • Joined:  02/03/12
  • Last Seen:  

i did it, but now when i try to use any skill or try to pvp server get disconected and when i try to log in, server rejected me, to can log in i have to restart my server.

 

Post the code from pc.c not the whole file though just the parts you edited, and tell me if the compliler has an errors.

 

Edit:

 

Move:

	if(src->type == BL_PC)
		sd->warpgodelay_tick = tick+warpgodelaycd; //This is the timer 

 

Below:

	if( !src || src == &sd->bl )
		return;

 

Or else command that do damage like @heal -1 or @die will crash the map server.

Edited by Skorm
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  79
  • Topics Per Day:  0.02
  • Content Count:  327
  • Reputation:   4
  • Joined:  06/22/13
  • Last Seen:  

i did it, but now when i try to use any skill or try to pvp server get disconected and when i try to log in, server rejected me, to can log in i have to restart my server.

 

Post the code from pc.c not the whole file though just the parts you edited, and tell me if the compliler has an errors.

 

Edit:

 

Move:

	if(src->type == BL_PC)
		sd->warpgodelay_tick = tick+warpgodelaycd; //This is the timer 

 

Below:

	if( !src || src == &sd->bl )
		return;

 

Or else command that do damage like @heal -1 or @die will crash the map server.

 

this is my code, when i add this, recompile in putty said my compile may be incomplete:

 

/*==========================================
 * Invoked when a player has received damage
 *------------------------------------------*/
void pc_damage(struct map_session_data *sd,struct block_list *src,unsigned int hp, unsigned int sp)
{
	unsigned int tick = gettick();
	int warpgodelaycd = 5000; //This is the delay in milliseconds you can set what ever delay you want
    if(src->type == BL_PC)
        sd->warpgodelay_tick = tick+warpgodelaycd; //This is the timer 	 

	if (sp) clif_updatestatus(sd,SP_SP);
	if (hp) clif_updatestatus(sd,SP_HP);
	else return;

	if( !src || src == &sd->bl )
		return;

	if( pc_issit(sd) ) {
		pc_setstand(sd);
		skill_sit(sd,0);
	}

	if( sd->progressbar.npc_id )
		clif_progressbar_abort(sd);

	if( sd->status.pet_id > 0 && sd->pd && battle_config.pet_damage_support )
		pet_target_check(sd,src,1);

	if( sd->status.ele_id > 0 )
		elemental_set_target(sd,src);

	sd->canlog_tick = gettick();
}

int pc_close_npc_timer(int tid, unsigned int tick, int id, intptr_t data)
{
	TBL_PC *sd = map_id2sd(id);
	if(sd) pc_close_npc(sd,data);
	return 0;
}
/*
 *  Method to properly close npc for player and clear anything related
 * @flag == 1 : produce close button
 * @flag == 2 : directly close it
 */
void pc_close_npc(struct map_session_data *sd,int flag)
{
	nullpo_retv(sd);

	if (sd->npc_id || sd->npc_shopid) {
		if (sd->state.using_fake_npc) {
			clif_clearunit_single(sd->npc_id, CLR_OUTSIGHT, sd->fd);
			sd->state.using_fake_npc = 0;
		}

		if (sd->st) {
			if(sd->st->state == RUN){ //wait ending code execution
				add_timer(gettick()+500,pc_close_npc_timer,sd->bl.id,flag);
				return;
			}
			sd->st->state = ((flag==1 && sd->st->mes_active)?CLOSE:END);
			sd->st->mes_active = 0;
		}
		sd->state.menu_or_input = 0;
		sd->npc_menu = 0;
		sd->npc_shopid = 0;
#ifdef SECURE_NPCTIMEOUT
		sd->npc_idle_timer = INVALID_TIMER;
#endif
		clif_scriptclose(sd,sd->npc_id);
		if(sd->st && sd->st->state == END ) {// free attached scripts that are waiting
			script_free_state(sd->st);
			sd->st = NULL;
			sd->npc_id = 0;
		}
	}
}


Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   381
  • Joined:  02/03/12
  • Last Seen:  

this is my code, when i add this, recompile in putty said my compile may be incomplete:

 

 

void pc_damage(struct map_session_data *sd,struct block_list *src,unsigned int hp, unsigned int sp)
{
    unsigned int tick = gettick();
    int warpgodelaycd = 5000; //This is the delay in milliseconds you can set what ever delay you want

    if (sp) clif_updatestatus(sd,SP_SP);
    if (hp) clif_updatestatus(sd,SP_HP);
    else return;

    if( !src || src == &sd->bl )
        return;

    if(src->type == BL_PC)
        sd->warpgodelay_tick = tick+warpgodelaycd; //This is the timer

    if( pc_issit(sd) )
    {
        pc_setstand(sd);
        skill_sit(sd,0);
    }

    if( sd->progressbar.npc_id )
        clif_progressbar_abort(sd);

    if( sd->status.pet_id > 0 && sd->pd && battle_config.pet_damage_support )
        pet_target_check(sd,src,1);

    if( sd->status.ele_id > 0 )
        elemental_set_target(sd,src);

    sd->canlog_tick = gettick();
}

 

If that doesn't work perhaps the problem is somewhere else. :)

 

Make sure your servers are all closed before recompiling etc etc.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  79
  • Topics Per Day:  0.02
  • Content Count:  327
  • Reputation:   4
  • Joined:  06/22/13
  • Last Seen:  

this is my code, when i add this, recompile in putty said my compile may be incomplete:

 

 

 

void pc_damage(struct map_session_data *sd,struct block_list *src,unsigned int hp, unsigned int sp)
{
    unsigned int tick = gettick();
    int warpgodelaycd = 5000; //This is the delay in milliseconds you can set what ever delay you want

    if (sp) clif_updatestatus(sd,SP_SP);
    if (hp) clif_updatestatus(sd,SP_HP);
    else return;

    if( !src || src == &sd->bl )
        return;

    if(src->type == BL_PC)
        sd->warpgodelay_tick = tick+warpgodelaycd; //This is the timer

    if( pc_issit(sd) )
    {
        pc_setstand(sd);
        skill_sit(sd,0);
    }

    if( sd->progressbar.npc_id )
        clif_progressbar_abort(sd);

    if( sd->status.pet_id > 0 && sd->pd && battle_config.pet_damage_support )
        pet_target_check(sd,src,1);

    if( sd->status.ele_id > 0 )
        elemental_set_target(sd,src);

    sd->canlog_tick = gettick();
}

 

If that doesn't work perhaps the problem is somewhere else. :)

 

Make sure your servers are all closed before recompiling etc etc.

now is working, thanks for your help, you are really Awesome ^_^, Power to you, there's any way to apply this delay when you inflict damage to another player too? because this delay is working only when you receive damage from another players ^_^.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  79
  • Topics Per Day:  0.02
  • Content Count:  327
  • Reputation:   4
  • Joined:  06/22/13
  • Last Seen:  

now is working, thanks for your help, you are really Awesome ^_^, Power to you, there's any way to apply this delay when you inflict damage to another player too? because this delay is working only when you receive damage from another players ^_^.

 

 

I imagine there are better ways of doing this but whatever works right.

void pc_damage(struct map_session_data *sd,struct block_list *src,unsigned int hp, unsigned int sp)
{
	unsigned int tick = gettick(); 
	int warpgodelaycd = 5000; //This is the delay in milliseconds you can set what ever delay you want 
	struct map_session_data *md = (struct map_session_data *)src;

	if (sp) clif_updatestatus(sd,SP_SP);
	if (hp) clif_updatestatus(sd,SP_HP);
	else return;

	if( !src || src == &sd->bl )
		return;

	if(src->type == BL_PC) {
		sd->warpgodelay_tick = tick+warpgodelaycd; //This is the timer 
		md->warpgodelay_tick = tick+warpgodelaycd; //This is the timer 
	}

	if( pc_issit(sd) )
	{
		pc_setstand(sd);
		skill_sit(sd,0);
	}

	if( sd->progressbar.npc_id )
		clif_progressbar_abort(sd);

	if( sd->status.pet_id > 0 && sd->pd && battle_config.pet_damage_support )
		pet_target_check(sd,src,1);

	if( sd->status.ele_id > 0 )
		elemental_set_target(sd,src);

	sd->canlog_tick = gettick();
}

You Are Awesome, Really Thanks!!

Link to comment
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.   Paste as plain text instead

  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.

×
×
  • Create New...