Jump to content

@Warp / @Go Damage Delay


Ind

Recommended Posts


  • Group:  Members
  • Topic Count:  169
  • Topics Per Day:  0.04
  • Content Count:  1260
  • Reputation:   750
  • Joined:  11/19/11
  • Last Seen:  

index.php?app=downloads&module=display&section=screenshot&id=2356

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

  • Upvote 3
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  268
  • Reputation:   27
  • Joined:  12/06/11
  • Last Seen:  

Thanks the for the mod! ^_^

Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  98
  • Topics Per Day:  0.02
  • Content Count:  299
  • Reputation:   5
  • Joined:  04/05/12
  • Last Seen:  

i dont get this

what i will add when i want a delay when hit by a player and monster?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  122
  • Reputation:   11
  • Joined:  01/30/12
  • Last Seen:  

im getting this error:

src\map\atcommand.c(458) : warning C4013: 'pc_get_group_level' undefined; assuming extern returning int

im using eathena

Edited by Hyoru
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

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)

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  122
  • Reputation:   11
  • Joined:  01/30/12
  • Last Seen:  

Done! Thank you guys so much!

Edited by Hyoru
Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  177
  • Reputation:   8
  • Joined:  11/14/11
  • Last Seen:  

index.php?app=downloads&module=display&section=screenshot&id=2356

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 by CybeR
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  63
  • Reputation:   3
  • Joined:  07/12/12
  • Last Seen:  

make sure you have proper version of rathena that its compatible for

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  177
  • Reputation:   8
  • Joined:  11/14/11
  • Last Seen:  

where can i download rathena version?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   0
  • Joined:  07/09/12
  • Last Seen:  

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 by dudongwtf
Link to comment
Share on other sites

  • 11 months later...

  • Group:  Members
  • Topic Count:  68
  • Topics Per Day:  0.02
  • Content Count:  212
  • Reputation:   5
  • Joined:  01/24/12
  • Last Seen:  

is it compatible  eAthena??

Link to comment
Share on other sites

  • 3 weeks later...

  • Group:  Members
  • Topic Count:  64
  • Topics Per Day:  0.02
  • Content Count:  180
  • Reputation:   7
  • Joined:  12/19/12
  • Last Seen:  

|Have one problem whe player login he dont go use @go or @warp have this delay!

Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  25
  • Reputation:   0
  • Joined:  05/02/13
  • Last Seen:  

the scripts works fine for me but when i'm using skill i got 5seconds delay before warping again any solution for this?  /sob

Edited by Beastly
Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  192
  • Reputation:   9
  • Joined:  05/08/13
  • Last Seen:  

index.php?app=downloads&module=display&s

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

 

How to include @jump in this?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  103
  • Reputation:   1
  • Joined:  06/26/13
  • Last Seen:  


	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.

post-18342-0-82136100-1382972471_thumb.jpg

Link to comment
Share on other sites

  • 3 months later...

  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  168
  • Reputation:   0
  • Joined:  11/20/13
  • Last Seen:  

Sorry, you don't have permission for that!

 

why  when i clck the downl;oad file

Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  25
  • Reputation:   0
  • Joined:  05/02/13
  • Last Seen:  

i'm still having a problem on this script in the latest revision anyone knows how to fixed the skill warp delay?

Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  123
  • Topics Per Day:  0.03
  • Content Count:  640
  • Reputation:   82
  • Joined:  04/07/14
  • Last Seen:  

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;
	}
Link to comment
Share on other sites

  • 3 years later...

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  6
  • Reputation:   2
  • Joined:  03/03/18
  • Last Seen:  

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

 

  • Upvote 1
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
Reply to this topic...

×   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...