Ind Posted April 16, 2012 Posted April 16, 2012 File Name: @Warp / @Go Damage Delay File Submitter: Ind File Submitted: 16 Apr 2012 File Category: Source Modifications Made this modification based on a user request http://rathena.org/board/topic/61753-warp-delay/ This modification allows you to setup a delay in milliseconds between last received / issued player damage and a use of @warp/@go. By default it ships with a 5 second (5000 milliseconds) delay, and it won't work on GMs Customizing: - Changing @go delay You'll find this in atcommand.c if( !pc_get_group_level(sd) && DIFF_TICK(gettick(),sd->canlog_tick) < 5000 ) { clif_displaymessage(fd,"@go cannot be issued since you were into battle recently"); return -1; } Change the 5000ms (5s) to your desired value. - Changing @warp delay You'll find this in atcommand.c if( !pc_get_group_level(sd) && DIFF_TICK(gettick(),sd->canlog_tick) < 5000 ) { clif_displaymessage(fd,"@warp cannot be issued since you were into battle recently"); return -1; } Change the 5000ms (5s) to your desired value. - Make it not count if player was damaged by monster You'll find this in pc.c sd->canlog_tick = gettick(); if( src->type == BL_PC ) ((TBL_PC*)src)->canlog_tick = gettick(); Change to if( src->type == BL_PC ) { ((TBL_PC*)src)->canlog_tick = gettick(); sd->canlog_tick = gettick(); } so that the delay will only count when damaged vs a player / when a player damages each other. Click here to download this file 3 Quote
Jhosef Posted July 3, 2012 Posted July 3, 2012 i dont get this what i will add when i want a delay when hit by a player and monster? Quote
Hyoru Posted July 8, 2012 Posted July 8, 2012 (edited) im getting this error: src\map\atcommand.c(458) : warning C4013: 'pc_get_group_level' undefined; assuming extern returning int im using eathena Edited July 8, 2012 by Hyoru Quote
Euphy Posted July 8, 2012 Posted July 8, 2012 Group levels are rAthena only, you'll want to do a GM level check instead: battle_config.any_warp_GM_min_level > pc_isGM(sd) 1 Quote
Hyoru Posted July 8, 2012 Posted July 8, 2012 (edited) Done! Thank you guys so much! Edited July 9, 2012 by Hyoru Quote
CybeR Posted July 17, 2012 Posted July 17, 2012 (edited) File Name: @Warp / @Go Damage Delay File Submitter: Ind File Submitted: 16 Apr 2012 File Category: Source Modifications Made this modification based on a user request http://rathena.org/b...753-warp-delay/ This modification allows you to setup a delay in milliseconds between last received / issued player damage and a use of @warp/@go. By default it ships with a 5 second (5000 milliseconds) delay, and it won't work on GMs Customizing: - Changing @go delay You'll find this in atcommand.c if( !pc_get_group_level(sd) && DIFF_TICK(gettick(),sd->canlog_tick) < 5000 ) { clif_displaymessage(fd,"@go cannot be issued since you were into battle recently"); return -1; } Change the 5000ms (5s) to your desired value. - Changing @warp delay You'll find this in atcommand.c if( !pc_get_group_level(sd) && DIFF_TICK(gettick(),sd->canlog_tick) < 5000 ) { clif_displaymessage(fd,"@warp cannot be issued since you were into battle recently"); return -1; } Change the 5000ms (5s) to your desired value. - Make it not count if player was damaged by monster You'll find this in pc.c sd->canlog_tick = gettick(); if( src->type == BL_PC ) ((TBL_PC*)src)->canlog_tick = gettick(); Change to if( src->type == BL_PC ) { ((TBL_PC*)src)->canlog_tick = gettick(); sd->canlog_tick = gettick(); } so that the delay will only count when damaged vs a player / when a player damages each other. Click here to download this file how can i add this. then i find the code cannot be found Edited July 17, 2012 by CybeR Quote
PokemonRO Posted July 17, 2012 Posted July 17, 2012 make sure you have proper version of rathena that its compatible for Quote
dudongwtf Posted July 19, 2012 Posted July 19, 2012 (edited) How to apply the .patch files? Do I have to open it in notepad and then paste to my server files? Like in my atcommand.c? Sorry for the very noob question. Edited July 19, 2012 by dudongwtf Quote
brunoshp Posted July 18, 2013 Posted July 18, 2013 |Have one problem whe player login he dont go use @go or @warp have this delay! Quote
Beastly Posted September 24, 2013 Posted September 24, 2013 (edited) the scripts works fine for me but when i'm using skill i got 5seconds delay before warping again any solution for this? Edited September 24, 2013 by Beastly Quote
TiMz Posted October 27, 2013 Posted October 27, 2013 File Name: @Warp / @Go Damage DelayFile Submitter: Ind File Submitted: 16 Apr 2012 File Category: Source Modifications Made this modification based on a user request http://rathena.org/board/topic/61753-warp-delay/ This modification allows you to setup a delay in milliseconds between last received / issued player damage and a use of @warp/@go. By default it ships with a 5 second (5000 milliseconds) delay, and it won't work on GMs Customizing: - Changing @go delay You'll find this in atcommand.c if( !pc_get_group_level(sd) && DIFF_TICK(gettick(),sd->canlog_tick) < 5000 ) { clif_displaymessage(fd,"@go cannot be issued since you were into battle recently"); return -1; } Change the 5000ms (5s) to your desired value.- Changing @warp delay You'll find this in atcommand.c if( !pc_get_group_level(sd) && DIFF_TICK(gettick(),sd->canlog_tick) < 5000 ) { clif_displaymessage(fd,"@warp cannot be issued since you were into battle recently"); return -1; } Change the 5000ms (5s) to your desired value.- Make it not count if player was damaged by monster You'll find this in pc.c sd->canlog_tick = gettick(); if( src->type == BL_PC ) ((TBL_PC*)src)->canlog_tick = gettick(); Change to if( src->type == BL_PC ) { ((TBL_PC*)src)->canlog_tick = gettick(); sd->canlog_tick = gettick(); } so that the delay will only count when damaged vs a player / when a player damages each other.Click here to download this file How to include @jump in this? Quote
Noire Posted October 28, 2013 Posted October 28, 2013 sd->canlog_tick = gettick(); if( src->type == BL_PC ) ((TBL_PC*)src)->canlog_tick = gettick(); Change to if( src->type == BL_PC ) { ((TBL_PC*)src)->canlog_tick = gettick(); sd->canlog_tick = gettick(); } I'm having a trouble/error in this part while compiling it, currently using SVN 17200 need a little help Indi. Quote
CursorX Posted February 26, 2014 Posted February 26, 2014 Sorry, you don't have permission for that! why when i clck the downl;oad file Quote
Beastly Posted March 28, 2014 Posted March 28, 2014 i'm still having a problem on this script in the latest revision anyone knows how to fixed the skill warp delay? Quote
Gidz Cross Posted June 7, 2014 Posted June 7, 2014 Is there a new version? It seems that the atcommand.c is already changed. Since i cannot find the if( !pc_get_group_level(sd) && DIFF_TICK(gettick(),sd->canlog_tick) < 5000 ) { clif_displaymessage(fd,"@go cannot be issued since you were into battle recently"); return -1; } and the if( !pc_get_group_level(sd) && DIFF_TICK(gettick(),sd->canlog_tick) < 5000 ) { clif_displaymessage(fd,"@warp cannot be issued since you were into battle recently"); return -1; } Quote
Fuse Posted March 20, 2018 Posted March 20, 2018 This Codes Works On Mine. But The Problem Is When I log in the @go/@warp delay wont refresh. it needs to take an action like doing skill and attack before the delay second's refresh is there any way to fix that problem? Any One Can Help? Heres My Code Spoiler /*========================================== * @rura, @warp, @mapmove *------------------------------------------*/ } if( !pc_get_group_level(sd) && DIFF_TICK(gettick(),sd->canlog_tick) < 5000 ) { clif_displaymessage(fd,"@warp cannot be issued since you were into battle recently"); return -1; } /*========================================== * @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,"@go cannot be issued since you were into battle recently"); return -1; } /*========================================== * 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) return; if( pc_issit(sd) ) { pc_setstand(sd, true); 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->pd,src,1); if( src->type == BL_PC ) { ((TBL_PC*)src)->canlog_tick = gettick(); sd->canlog_tick = gettick(); } if( sd->status.ele_id > 0 ) elemental_set_target(sd,src); if(battle_config.prevent_logout_trigger&PLT_DAMAGE) { sd->canlog_tick = gettick(); } Hope you Guys Have Solution. Thanks in Advance 1 Quote
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.