Jump to content
  • 0

Regarding pvp mode


Mice

Question


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  12/24/18
  • Last Seen:  

Hello rathena community i just want to ask if possible to make script and pvpmode without warpout, example in normal pvp when you die 2x you will be warpout in your savepoint, in my request/ask is how can possible to make pvp without warpout, like when you resu kill in pvp mode you can't warpout in your savepoints, thank you very much more power !!

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   117
  • Joined:  12/10/16
  • Last Seen:  

You can't with that mapflag, but if you know how to recompile then you can do this.

pc.cpp, change:

	if( !battle_config.pk_mode && mapdata->flag[MF_PVP] && !mapdata->flag[MF_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 ) {
			add_timer(tick+1000, pc_respawn_timer,sd->bl.id,0);
			return 1|8;
		}
	}

to:

	if( !battle_config.pk_mode && mapdata->flag[MF_PVP] && !mapdata->flag[MF_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++;
		}
	}

With this change you can just use pvp mapflag instead of pvp_nocalcrank and players won't be respawned. The counter will also remain.

  • Love 1
Link to comment
Share on other sites

  • 1

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   117
  • Joined:  12/10/16
  • Last Seen:  

Yeah, with pvp_nocalcrank mapflag you'll avoid that.

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   117
  • Joined:  12/10/16
  • Last Seen:  

Use pvp_nocalcrank mapflag.

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  12/24/18
  • Last Seen:  

Thank you for your answer but i need is ,when pvp the map is pvp on, in the official behavior when you die 2x in pvp map like resu kill you will be warp out in your save point right?, in my case i want to disable this feature in certain map, so anyone can do resu kill in pvp mode map thanks

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  12/24/18
  • Last Seen:  

9 minutes ago, n0tttt said:

Yeah, with pvp_nocalcrank mapflag you'll avoid that.

Thanks it work. how to maintain the player counter in the lower right? it is possible?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  12/24/18
  • Last Seen:  

22 minutes ago, n0tttt said:

You can't with that mapflag, but if you know how to recompile then you can do this.

pc.cpp, change:


	if( !battle_config.pk_mode && mapdata->flag[MF_PVP] && !mapdata->flag[MF_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 ) {
			add_timer(tick+1000, pc_respawn_timer,sd->bl.id,0);
			return 1|8;
		}
	}

to:


	if( !battle_config.pk_mode && mapdata->flag[MF_PVP] && !mapdata->flag[MF_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++;
		}
	}

With this change you can just use pvp mapflag instead of pvp_nocalcrank and players won't be respawned. The counter will also remain.

Thanks man for your effort (Y) now its working,

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