Jump to content
  • 0

Warp and Go Delay


Hyoru

Question


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

There is some patch that works on updated rAthena?

 

I need a @warp and @go delay for getting hit or hitting other players. If someone can, help me please!

Thanks in Advanced.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  77
  • Reputation:   11
  • Joined:  08/19/12
  • Last Seen:  

I did this now, but i think that can solve.

atcommand.c

ACMD_FUNC(mapmove)
{
char map_name[MAP_NAME_LENGTH_EXT];
unsigned short mapindex;
short x = 0, y = 0;
int16 m = -1;
 
nullpo_retr(-1, sd);
 
memset(map_name, '\0', sizeof(map_name));
 
+if(sd->state.nowarp > (gettimetick()+TIMETICKINMILISECODS)) {
+clif_displaymessage(fd, "Wait 10s out of battle to warp");
+return 0;
+}
 

 

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;
 
if( !src || src == &sd->bl )
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,src,1);
 
if( sd->status.ele_id > 0 )
elemental_set_target(sd,src);
+sd->state.nowarp = gettimetick();

 

 

pc.h

unsigned int changemap : 1;
unsigned int callshop : 1; // flag to indicate that a script used callshop; on a shop
short pmap; // Previous map on Map Change
unsigned short autoloot;
unsigned short autolootid[AUTOLOOTITEM_SIZE]; // [Zephyrus]
unsigned short autoloottype;
unsigned int autolooting : 1; //performance-saver, autolooting state for @alootid

+unsigned int nowarp;

 

Do the same fo @go.

Edited by Cold
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
Answer this question...

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