Jump to content
  • 0

Resurrection on PVP in MVP MAPS.


masterzeus

Question


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  58
  • Reputation:   1
  • Joined:  08/18/13
  • Last Seen:  

Hello, I think there is a problem.

I have this source activated and it works fine. But when I want to resurrect someone dead 2 times they don't resurrect.

The first time he dies I can resurrect but the second time it doesn't work.

How to fix them? 

 

  • Upvote 1
Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.02
  • Content Count:  206
  • Reputation:   10
  • Joined:  08/30/19
  • Last Seen:  

10 minutes ago, masterzeus said:

Hello, I think there is a problem.

I have this source activated and it works fine. But when I want to resurrect someone dead 2 times they don't resurrect.

The first time he dies I can resurrect but the second time it doesn't work.

How to fix them? 

 

because that's how pvp behavior is

Edited by Takuyakii
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  660
  • Reputation:   668
  • Joined:  11/12/12
  • Last Seen:  

Did you correctly apply the diff file?

-		if( sd->pvp_point < 0 ) {
+		if( sd->pvp_point < 0 && !mapdata->flag[MF_MAPMVP] ) {
 			sd->respawn_tid = add_timer(tick+1000, pc_respawn_timer,sd->bl.id,0);
 			return 1|8;
 		}

This is the part that respawns a character when they die on a PVP map. So a few possible options here:

  • Your map doesn't have the mapmvp flag (MF_MAPMVP). You do need to add those manually. You can see if the map has the mapflag with @mapflag while in-game.
  • The code "!mapdata->flag[MF_MAPMVP]" wasn't added to the pc_dead function from the diff file.
  • You didn't recompile your server.
Edited by Tokei
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  58
  • Reputation:   1
  • Joined:  08/18/13
  • Last Seen:  

14 hours ago, Tokei said:

Did you correctly apply the diff file?

-		if( sd->pvp_point < 0 ) {
+		if( sd->pvp_point < 0 && !mapdata->flag[MF_MAPMVP] ) {
 			sd->respawn_tid = add_timer(tick+1000, pc_respawn_timer,sd->bl.id,0);
 			return 1|8;
 		}

This is the part that respawns a character when they die on a PVP map. So a few possible options here:

  • Your map doesn't have the mapmvp flag (MF_MAPMVP). You do need to add those manually. You can see if the map has the mapflag with @mapflag while in-game.
  • The code "!mapdata->flag[MF_MAPMVP]" wasn't added to the pc_dead function from the diff file.
  • You didn't recompile your server.

I have checked the diff and it is correct.
I also tried adding @mapflag mvpmap 1 but that didn't work either.

Added mapflag to reload with reloadscript but no.

I still can't revive a dead character twice.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  660
  • Reputation:   668
  • Joined:  11/12/12
  • Last Seen:  

Hmm, can you show the flags of the map with "@mapflag"? There aren't many possible issues left beyond the ones posted above, so you'll probably need to set a breakpoint to see what is going on directly.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  58
  • Reputation:   1
  • Joined:  08/18/13
  • Last Seen:  

1 hour ago, Tokei said:

Hmm, can you show the flags of the map with "@mapflag"? There aren't many possible issues left beyond the ones posted above, so you'll probably need to set a breakpoint to see what is going on directly.

The diff was checked again and is correct. All well implemented.

I've tried to do other things but nothing... I still can't resurrect a character that has died 2 times on a map where PVP is active with the MVP.

The resurrection skill consumes the gem but does not resurrect and the ydrassil leaf is consumed but does not resurrect.

imagen_2022-09-30_102520362.png

imagen_2022-09-30_102549274.png

Edited by masterzeus
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  660
  • Reputation:   668
  • Joined:  11/12/12
  • Last Seen:  

Ah, I misunderstood your issue, my bad. The resurrection skill is blocked if your PVP points are below zero, which happens everytime you die too often in PVP. Change the condition in skill.cpp for the "case ALL_RESURRECTION:"

diff --git a/src/map/skill.cpp b/src/map/skill.cpp
index b48373392..f19c80142 100755
--- a/src/map/skill.cpp
+++ b/src/map/skill.cpp
@@ -7170,7 +7170,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 				break;
 			}
 
-			if (map_getmapflag(bl->m, MF_PVP) && dstsd && dstsd->pvp_point < 0)
+			if (map_getmapflag(bl->m, MF_PVP) && dstsd && dstsd->pvp_point < 0 && !map_getmapflag(bl->m, MF_MAPMVP))
 				break;
 
 			switch(skill_lv){

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  58
  • Reputation:   1
  • Joined:  08/18/13
  • Last Seen:  

1 hour ago, Tokei said:

Ah, I misunderstood your issue, my bad. The resurrection skill is blocked if your PVP points are below zero, which happens everytime you die too often in PVP. Change the condition in skill.cpp for the "case ALL_RESURRECTION:"

diff --git a/src/map/skill.cpp b/src/map/skill.cpp
index b48373392..f19c80142 100755
--- a/src/map/skill.cpp
+++ b/src/map/skill.cpp
@@ -7170,7 +7170,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 				break;
 			}
 
-			if (map_getmapflag(bl->m, MF_PVP) && dstsd && dstsd->pvp_point < 0)
+			if (map_getmapflag(bl->m, MF_PVP) && dstsd && dstsd->pvp_point < 0 && !map_getmapflag(bl->m, MF_MAPMVP))
 				break;
 
 			switch(skill_lv){

 

Don't worry, I use google translator, maybe I expressed myself wrong.

It works perfect, now i can give resurrection with Skill and ydrassil leaf ❤️ 
I will place a comment on the original post to make an update, thjanks!

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