Jump to content
  • 0

Help, how to disable @warp @go delay when being hit by monster


budek

Question


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.01
  • Content Count:  46
  • Reputation:   2
  • Joined:  01/11/14
  • Last Seen:  

Help, how to disable @warp @go delay when being hit by monster
@warp @go delay is working when being hit by player and monster
i just want to remove the delay when being hit by the monster.
Please see my src.



atcommand.c

/*==========================================
* @go [city_number or city_name] - Updated by Harbin
*------------------------------------------*/
if( !pc_get_group_level(sd) && DIFF_TICK(gettick(),sd->canlog_tick) < 5000 ) {
clif_displaymessage(fd,"System Admin: @go cannot be issued since you were into battle recently");
return -1;
}
/*==========================================
* @rura, @warp, @mapmove
*------------------------------------------*/

if( !pc_get_group_level(sd) && DIFF_TICK(gettick(),sd->canlog_tick) < 5000 ) {
clif_displaymessage(fd,"System Admin: @warp cannot be issued since you were into battle recently");
return -1;
}

pc.c

/*==========================================
* 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)
{
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();

if( src->type == BL_PC ) {
((TBL_PC*)src)->canlog_tick = gettick();
sd->canlog_tick = gettick();
}


}

source: https://rathena.org/board/topic/61836-warp-go-damage-delay/

Edited by Emistry
Please use CODEBOX.
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  92
  • Reputation:   17
  • Joined:  08/11/12
  • Last Seen:  

You can do the inverse of this: https://rathena.org/wiki/@go_delay_when_hit
Or maybe something related to this: https://rathena.org/board/topic/107708-ressurection-and-go/?hl=prevent_logout#entry310175

Edited by _Okuz_
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...