Jump to content
  • 0
Sign in to follow this  
anjasoleil0

Disabling auto respawn on death in pvp maps.

Question

5 answers to this question

Recommended Posts

  • 0
int pc_dead(struct map_session_data *sd,struct block_list *src) {...	// pvp	// disable certain pvp functions on pk_mode [Valaris]	if( map->list[sd->bl.m].flag.pvp && !battle_config.pk_mode && !map->list[sd->bl.m].flag.pvp_nocalcrank ) {		sd->pvp_point -= 5;		sd->pvp_lost++;		if( src && src->type == BL_PC )		{			struct map_session_data *ssd = (struct map_session_data *)src;			ssd->pvp_point++;			ssd->pvp_won++;		}		if( sd->pvp_point < 0 )		{			timer->add(tick+1, pc->respawn_timer,sd->bl.id,0); // Comment this line if you want to disable respawning in PvP			return 1|8;		}	}	//GvG	if( map_flag_gvg2(sd->bl.m) ) {		timer->add(tick+1, pc->respawn_timer, sd->bl.id, 0); //Comment this line if you want to disable respawn in WoE		return 1|8;	} else if( sd->bg_id ) {		struct battleground_data *bgd = bg->team_search(sd->bg_id);		if( bgd && bgd->mapindex > 0 ) { // Respawn by BG			timer->add(tick+1000, pc->respawn_timer, sd->bl.id, 0); //Comment this line if you want to disable respawn in BG			return 1|8;		}	}...}

Comment the lines as told in src/map/pc.c. Untested, but i think it should work.

Edited by Garr

Share this post


Link to post
Share on other sites
  • 0

 

int pc_dead(struct map_session_data *sd,struct block_list *src) {...	// pvp	// disable certain pvp functions on pk_mode [Valaris]	if( map->list[sd->bl.m].flag.pvp && !battle_config.pk_mode && !map->list[sd->bl.m].flag.pvp_nocalcrank ) {		sd->pvp_point -= 5;		sd->pvp_lost++;		if( src && src->type == BL_PC )		{			struct map_session_data *ssd = (struct map_session_data *)src;			ssd->pvp_point++;			ssd->pvp_won++;		}		if( sd->pvp_point < 0 )		{			timer->add(tick+1, pc->respawn_timer,sd->bl.id,0); // Comment this line if you want to disable respawning in PvP			return 1|8;		}	}	//GvG	if( map_flag_gvg2(sd->bl.m) ) {		timer->add(tick+1, pc->respawn_timer, sd->bl.id, 0); //Comment this line if you want to disable respawn in WoE		return 1|8;	} else if( sd->bg_id ) {		struct battleground_data *bgd = bg->team_search(sd->bg_id);		if( bgd && bgd->mapindex > 0 ) { // Respawn by BG			timer->add(tick+1000, pc->respawn_timer, sd->bl.id, 0); //Comment this line if you want to disable respawn in BG			return 1|8;		}	}...}

Comment the lines as told in src/map/pc.c. Untested, but i think it should work.

 

It works! But, after my second respawn, I cannot get resurrected, Also i'd like to enable resurrection inside WoE Maps. Is it possible?

Share this post


Link to post
Share on other sites
  • 0

Try to comment these lines in src/map/skill.c:

int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) {...		case ALL_RESURRECTION:			/* if(sd && (map_flag_gvg2(bl->m) || map->list[bl->m].flag.battleground)) { // Comment starting here				//No reviving in WoE grounds!				clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);				break;			} */ // To here...}

 

Also, for PvP try to change all

return 1|8;

to

return 0;

after the commented lines. I think that should do the trick. Yet again, lazy to test ^_^

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.