eboni001 Posted July 7, 2013 Posted July 7, 2013 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 Quote
2 Skorm Posted July 11, 2013 Posted July 11, 2013 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(); } 2 Quote
0 Skorm Posted July 10, 2013 Posted July 10, 2013 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 Quote
0 Vale Posted March 27, 2020 Posted March 27, 2020 Hello, this doesn't work anymore with the latest git Quote
-2 skymia Posted April 13, 2018 Posted April 13, 2018 how about to use flywing or butterflywing does it delay of teleporting somewhere else if been hit by any mobs or characters? Quote
eboni001 Posted July 10, 2013 Author Posted July 10, 2013 @go_delay_when_hit 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. Quote
Emistry Posted July 10, 2013 Posted July 10, 2013 then show your custom source mod...we dont know how you implement ur own custom src mod for this =='' Quote
eboni001 Posted July 10, 2013 Author Posted July 10, 2013 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. Quote
Skorm Posted July 10, 2013 Posted July 10, 2013 Have you tried changing- int warpgodelaycd = 5000; In src/map/pc.c to something like- int warpgodelaycd = 0; Quote
eboni001 Posted July 10, 2013 Author Posted July 10, 2013 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. Quote
eboni001 Posted July 10, 2013 Author Posted July 10, 2013 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. Quote
Skorm Posted July 10, 2013 Posted July 10, 2013 (edited) 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 July 10, 2013 by Skorm Quote
eboni001 Posted July 10, 2013 Author Posted July 10, 2013 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; } } } Quote
Skorm Posted July 10, 2013 Posted July 10, 2013 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. 1 Quote
eboni001 Posted July 10, 2013 Author Posted July 10, 2013 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 . Quote
eboni001 Posted July 11, 2013 Author Posted July 11, 2013 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!! Quote
Question
eboni001
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
17 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.