in src/map/pc.h
find
unsigned int canuseitem_tick; // [skotlex]
then add below
unsigned int warpgodelay_tick;
then go to the src/map/pc.c
find
sd->canuseitem_tick = tick;
then add below
sd->warpgodelay_tick = tick;
then
this is still in src/map/pc.c
find:(In the description it says this function is invoked when the player is receiving)
void pc_damage(struct map_session_data *sd,struct block_list *src,unsigned int hp, unsigned int sp)
inside the function add this:
unsigned int tick = gettick();
int warpgodelaycd = 5000; //This is the delay in milliseconds
sd->warpgodelay_tick = tick+warpgodelaycd; //This is the timer
then go now in map/atcommand.c
find
ACMD_FUNC(go)
then add this inside the function
unsigned int tick = gettick();
this is still in the (go) function
find below
nullpo_retr(-1, sd);
This is just below the list of maps in @go
then add below
if(DIFF_TICK(sd->warpgodelay_tick,tick)>0)
{
clif_displaymessage(fd,"There is a 5 seconds delay in using @go command");
return 0;
}
now for the @warp
find:
ACMD_FUNC(mapmove)
then add this inside the function
unsigned int tick = gettick();
now below
memset(map_name, '0', sizeof(map_name));
add this below
if(DIFF_TICK(sd->warpgodelay_tick,tick)>0)
{
clif_displaymessage(fd,"There is a 5 seconds delay in using @warp command");
return -1;
}
for the skill
edit src/map/unit.c
find:
int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, short skill_lv, int casttime, int castcancel)
then
add this inside the function
int warpgodelaycd = 5000; //This is a delay in miliseconds
then scroll down to the end of the function
you will see this
if( casttime > 0 )
{
ud->skilltimer = add_timer( tick+casttime, skill_castend_id, src->id, 0 );
if( sd && pc_checkskill(sd,SA_FREECAST) > 0 )
status_calc_bl(&sd->bl, SCB_SPEED);
}
else
skill_castend_id(ud->skilltimer,tick,src->id,0);
add this code above
sd->warpgodelay_tick= tick+warpgodelaycd ;//The delay when they use skill
Hope it helps. Merry XMAS