masterzeus Posted September 29, 2022 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 62 Reputation: 1 Joined: 08/18/13 Last Seen: 7 hours ago Share Posted September 29, 2022 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? 1 Quote Link to comment Share on other sites More sharing options...
0 Takuyakii Posted September 29, 2022 Group: Members Topic Count: 41 Topics Per Day: 0.02 Content Count: 215 Reputation: 11 Joined: 08/30/19 Last Seen: March 6 Share Posted September 29, 2022 (edited) 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 September 29, 2022 by Takuyakii Quote Link to comment Share on other sites More sharing options...
0 Tokei Posted September 29, 2022 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 696 Reputation: 722 Joined: 11/12/12 Last Seen: 16 hours ago Share Posted September 29, 2022 (edited) 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 September 29, 2022 by Tokei Quote Link to comment Share on other sites More sharing options...
0 masterzeus Posted September 30, 2022 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 62 Reputation: 1 Joined: 08/18/13 Last Seen: 7 hours ago Author Share Posted September 30, 2022 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. Quote Link to comment Share on other sites More sharing options...
0 Tokei Posted September 30, 2022 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 696 Reputation: 722 Joined: 11/12/12 Last Seen: 16 hours ago Share Posted September 30, 2022 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. Quote Link to comment Share on other sites More sharing options...
0 masterzeus Posted September 30, 2022 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 62 Reputation: 1 Joined: 08/18/13 Last Seen: 7 hours ago Author Share Posted September 30, 2022 (edited) 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. Edited September 30, 2022 by masterzeus Quote Link to comment Share on other sites More sharing options...
0 Tokei Posted September 30, 2022 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 696 Reputation: 722 Joined: 11/12/12 Last Seen: 16 hours ago Share Posted September 30, 2022 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){ Quote Link to comment Share on other sites More sharing options...
0 masterzeus Posted September 30, 2022 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 62 Reputation: 1 Joined: 08/18/13 Last Seen: 7 hours ago Author Share Posted September 30, 2022 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! Quote Link to comment Share on other sites More sharing options...
Question
masterzeus
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?
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.