FallenOne Posted December 24, 2011 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 15 Reputation: 0 Joined: 11/23/11 Last Seen: February 29, 2012 Share Posted December 24, 2011 Hi! This is from eA and I am hoping rA can help as well. @warp/@go delay: http://www.eathena.ws/board/index.php?showtopic=263936&st=0 How do we make this snippet to work when attacked or used a skill? So, atm, there is just a cool down for using @warp or @go. How about it resets when attacked or used a skill? Thank You~ Quote Link to comment Share on other sites More sharing options...
maynard Posted January 15, 2012 Group: Members Topic Count: 44 Topics Per Day: 0.01 Content Count: 159 Reputation: 1 Joined: 12/21/11 Last Seen: April 20, 2014 Share Posted January 15, 2012 (edited) I re input many times and now I finally make it work, sorry my bad. Dont know what happen i just rebuild it in in compiling instead of build only.now it works in @go commands the delay. how can i make it also work in @warp? Its ok now, all have been working great now. @warp @go is working perfectly now. Thanks to all who help. The mod is good, the problem is in my side.it works in eathena also. Edited January 15, 2012 by maynard Quote Link to comment Share on other sites More sharing options...
sasuke Posted May 2, 2012 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 17 Reputation: 0 Joined: 01/28/12 Last Seen: January 14, 2013 Share Posted May 2, 2012 (edited) it doesn't work in 15097 3ceAM? all errors came from atcommand.c and unit.c Edited May 2, 2012 by sasuke Quote Link to comment Share on other sites More sharing options...
jharick Posted June 29, 2012 Group: Members Topic Count: 21 Topics Per Day: 0.00 Content Count: 77 Reputation: 3 Joined: 03/25/12 Last Seen: May 8, 2015 Share Posted June 29, 2012 (edited) its work to me Im using 3ceam revision 678. just follow JayPee and FatalEror. thanks for this script is very useful for a PK Server. add: how about if only the last damage recieve will have a delay. not the skill used. its possible? Edited June 29, 2012 by jharick Quote Link to comment Share on other sites More sharing options...
Cydh Posted September 5, 2012 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 748 Joined: 06/16/12 Last Seen: February 21 Share Posted September 5, 2012 Actually I think Vengeance's one doesn't need compiling for changing the delay, because the variable is stored in conf/battle/misc.conf. So you could simply do a @reloadbattleconf // Delay using @commands in seconds [Vengeance] warp_delay: 5 go_delay: 5 what svn did use that conf? eA or rA or 3ceAM..? XD Quote Link to comment Share on other sites More sharing options...
Sneaky Posted September 5, 2012 Group: Members Topic Count: 10 Topics Per Day: 0.00 Content Count: 392 Reputation: 47 Joined: 11/18/11 Last Seen: July 8, 2024 Share Posted September 5, 2012 what svn did use that conf? eA or rA or 3ceAM..? XD I believe you have to add it yourself. Quote Link to comment Share on other sites More sharing options...
Cydh Posted September 6, 2012 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 748 Joined: 06/16/12 Last Seen: February 21 Share Posted September 6, 2012 (edited) I believe you have to add it yourself. well I'll try to add it.. And I just added this below to gives no delay when use @go or @warp when player is dead inside pc_dead function in map\pc.c int pc_dead(struct map_session_data *sd,struct block_list *src) { ..... ..... //Reset "can log out" tick. if( battle_config.prevent_logout ) sd->canlog_tick = gettick() - battle_config.prevent_logout; return 1; } becomes int pc_dead(struct map_session_data *sd,struct block_list *src) { ..... ..... //Reset "can log out" tick. if( battle_config.prevent_logout ) sd->canlog_tick = gettick() - battle_config.prevent_logout; sd->warpgodelay_tick = tick; //This is the timer. warp go delay return 1; } =============== and btw, I used all source above, and the result, When player use skill like Raising Dragon (Sura) and Summon Spirit Ball (Earth/Water/Fire/Lighting), has delay when use @warp or @go. delay never ends how to disable it above? Edited September 22, 2012 by cydh Quote Link to comment Share on other sites More sharing options...
vijay30393 Posted September 19, 2012 Group: Members Topic Count: 35 Topics Per Day: 0.01 Content Count: 114 Reputation: 0 Joined: 05/10/12 Last Seen: April 18, 2020 Share Posted September 19, 2012 I believe you have to add it yourself. well I'll try to add it.. Update: Here are my edits that made my Map Server not to turn on so, I cannot really test the edit: src/map/pc.h unsigned int canuseitem_tick; // [skotlex] unsigned int canusecashfood_tick; Becomes like this: unsigned int canuseitem_tick; // [skotlex] unsigned int warpgodelay_tick; unsigned int canusecashfood_tick; src/map/pc.c sd->canuseitem_tick = tick; sd->canusecashfood_tick = tick; Becomes like this: sd->canuseitem_tick = tick; sd->warpgodelay_tick = tick; sd->canusecashfood_tick = tick; src/map/pc.c 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; Becomes like this: 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 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; src/map/atcommand.c ACMD_FUNC(go) { int i; int town; char map_name[MAP_NAME_LENGTH]; int m; Becomes like this: ACMD_FUNC(go) { unsigned int tick = gettick(); int i; int town; char map_name[MAP_NAME_LENGTH]; int m; src/map/atcommand.c }; nullpo_retr(-1, sd); if( map[sd->bl.m].flag.nogo && battle_config.any_warp_GM_min_level > pc_isGM(sd) ) { clif_displaymessage(sd->fd,"You can not use @go on this map."); return 0; } Becomes like this: }; nullpo_retr(-1, sd); if(DIFF_TICK(sd->warpgodelay_tick,tick)>0) { clif_displaymessage(fd,"There is a 5 seconds delay in using @go command"); return 0; } if( map[sd->bl.m].flag.nogo && battle_config.any_warp_GM_min_level > pc_isGM(sd) ) { clif_displaymessage(sd->fd,"You can not use @go on this map."); return 0; } src/map/atcommand.c ACMD_FUNC(mapmove) { unsigned int tick = gettick(); char map_name[MAP_NAME_LENGTH_EXT]; unsigned short mapindex; int x = 0, y = 0; int m = -1; Becomes like this: ACMD_FUNC(mapmove) { unsigned int tick = gettick(); char map_name[MAP_NAME_LENGTH_EXT]; unsigned short mapindex; int x = 0, y = 0; int m = -1; src/map/atcommand.c nullpo_retr(-1, sd); memset(map_name, '0', sizeof(map_name)); if (!message || !*message || Becomes like this: memset(map_name, '0', sizeof(map_name)); if(DIFF_TICK(sd->warpgodelay_tick,tick)>0) { clif_displaymessage(fd,"There is a 5 seconds delay in using @warp command"); return -1; } if (!message || !*message || src/map/unit.c int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, short skill_lv, int casttime, int castcancel) { struct unit_data *ud; struct status_data *tstatus; Becomes like this: int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, short skill_lv, int casttime, int castcancel) { int warpgodelaycd = 5000; //This is a delay in miliseconds struct unit_data *ud; struct status_data *tstatus; src/map/unit.c if (!src->prev) return 0; //Warped away! } if( casttime > 0 ) { ud->skilltimer = add_timer( tick+casttime, skill_castend_id, src->id, 0 ); if( sd && pc_checkskill(sd,SA_FREECAST) > 0 ) Becomes like this: if (!src->prev) return 0; //Warped away! } sd->warpgodelay_tick= tick+warpgodelaycd ;//The delay when they use skill if( casttime > 0 ) { ud->skilltimer = add_timer( tick+casttime, skill_castend_id, src->id, 0 ); if( sd && pc_checkskill(sd,SA_FREECAST) > 0 ) And I just added this below to gives no delay when use @go or @warp when player is dead inside pc_dead function in map\pc.c int pc_dead(struct map_session_data *sd,struct block_list *src) { ..... ..... //Reset "can log out" tick. if( battle_config.prevent_logout ) sd->canlog_tick = gettick() - battle_config.prevent_logout; return 1; } becomes int pc_dead(struct map_session_data *sd,struct block_list *src) { ..... ..... //Reset "can log out" tick. if( battle_config.prevent_logout ) sd->canlog_tick = gettick() - battle_config.prevent_logout; sd->warpgodelay_tick = tick; //This is the timer. warp go delay return 1; } =============== and btw, I used all source above, and the result, When player use skill like Raising Dragon (Sura) and Summon Spirit Ball (Earth/Water/Fire/Lighting), has delay when use @warp or @go. delay never ends how to disable it above? The map server crash's, is there any solution for that? Quote Link to comment Share on other sites More sharing options...
ICEROCK Posted December 13, 2012 Group: Members Topic Count: 46 Topics Per Day: 0.01 Content Count: 228 Reputation: 33 Joined: 11/15/12 Last Seen: July 22, 2016 Share Posted December 13, 2012 (edited) no errors but when i try to warp it already said i need to wait 5 seconds lol and i cannot warp everytime i try to warp it restricts me Edited December 13, 2012 by sQueeze Quote Link to comment Share on other sites More sharing options...
Cydh Posted December 13, 2012 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 748 Joined: 06/16/12 Last Seen: February 21 Share Posted December 13, 2012 no errors but when i try to warp it already said i need to wait 5 seconds lol and i cannot warp everytime i try to warp it restricts me and btw, I used all source above, and the result,When player use skill like Raising Dragon (Sura) and Summon Spirit Ball (Earth/Water/Fire/Lighting), has delay when use @warp or @go.delay never ends how to disable it above? Quote Link to comment Share on other sites More sharing options...
Famous Posted February 8, 2013 Group: Members Topic Count: 145 Topics Per Day: 0.03 Content Count: 455 Reputation: 3 Joined: 06/19/12 Last Seen: February 26, 2018 Share Posted February 8, 2013 (edited) http://rathena.org/b...lay/#entry67799 I tried this but I also got map crash on server I'm using rathena svn Problem solve Edited February 8, 2013 by zhen Quote Link to comment Share on other sites More sharing options...
Question
FallenOne
Hi! This is from eA and I am hoping rA can help as well.
@warp/@go delay: http://www.eathena.ws/board/index.php?showtopic=263936&st=0
How do we make this snippet to work when attacked or used a skill? So, atm, there is just a cool down for using @warp or @go. How about it resets when attacked or used a skill?
Thank You~
Link to comment
Share on other sites
35 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.