Management Karbust 4884 Posted July 13, 2017 Management Share Posted July 13, 2017 Hello How can I disable only the PvP on some maps? Like PvM maps, I some players stronger killing others from different kingdoms... Thanks Link to comment Share on other sites More sharing options...
Aliremawi 9 Posted July 13, 2017 Share Posted July 13, 2017 open the map with world editor choose no pvp and chose the area where you need no_pvp Link to comment Share on other sites More sharing options...
Management Karbust 4884 Posted July 13, 2017 Author Management Share Posted July 13, 2017 Just now, Aliremawi said: open the map with world editor choose no pvp and chose the area where you need no_pvp First: I want to disable on the whole map... Second: That option doesn't block every kind of attack? I want something done on source... Link to comment Share on other sites More sharing options...
Aliremawi 9 Posted July 13, 2017 Share Posted July 13, 2017 i dont know about this.... but when when i think about this you should make python tool that edit the map in your play with click all map_no_pvp but you need source so i sure there is some one will help you Link to comment Share on other sites More sharing options...
Management Karbust 4884 Posted July 15, 2017 Author Management Share Posted July 15, 2017 BUMP Link to comment Share on other sites More sharing options...
Den 46 Posted July 15, 2017 Share Posted July 15, 2017 Server src: battle.cpp function bool battle_is_attackable(LPCHARACTER ch, LPCHARACTER victim) Client src: InstanceBase.cpp function bool CInstanceBase::IsAttackableInstance(CInstanceBase& rkInstVictim) 1 Link to comment Share on other sites More sharing options...
Management Karbust 4884 Posted July 15, 2017 Author Management Share Posted July 15, 2017 I tried the server src option and know I can't even attack on the maps index specified... Link to comment Share on other sites More sharing options...
Den 46 Posted July 15, 2017 Share Posted July 15, 2017 3 minutes ago, charparodar said: I tried the server src option and know I can't even attack on the maps index specified... How did you edit the function? Link to comment Share on other sites More sharing options...
Management Karbust 4884 Posted July 15, 2017 Author Management Share Posted July 15, 2017 bool battle_is_attackable(LPCHARACTER ch, LPCHARACTER victim) { switch(ch->GetMapIndex()) { case 113: case 219: case 240: case 351: case 352: return false; } Link to comment Share on other sites More sharing options...
Den 46 Posted July 15, 2017 Share Posted July 15, 2017 2 hours ago, charparodar said: bool battle_is_attackable(LPCHARACTER ch, LPCHARACTER victim) { switch(ch->GetMapIndex()) { case 113: case 219: case 240: case 351: case 352: return false; } Try bool battle_is_attackable(LPCHARACTER ch, LPCHARACTER victim) { // »ó´ëąćŔĚ Á׾úŔ¸¸é Áß´ÜÇŃ´Ů. if (victim->IsDead()) return false; switch(ch->GetMapIndex()) { case 113: case 219: case 240: case 351: case 352: { if (victim->IsPC()) return false; } } ... 1 Link to comment Share on other sites More sharing options...
Management Karbust 4884 Posted July 17, 2017 Author Management Share Posted July 17, 2017 On 16/07/2017 at 0:14 AM, Den said: Try bool battle_is_attackable(LPCHARACTER ch, LPCHARACTER victim) { // »ó´ëąćŔĚ Á׾úŔ¸¸é Áß´ÜÇŃ´Ů. if (victim->IsDead()) return false; switch(ch->GetMapIndex()) { case 113: case 219: case 240: case 351: case 352: { if (victim->IsPC()) return false; } } ... Like this monsters doesn't attack the players... Link to comment Share on other sites More sharing options...
Solution Den 46 Posted July 18, 2017 Solution Share Posted July 18, 2017 22 hours ago, charparodar said: Like this monsters doesn't attack the players... Try if (victim->IsPC() && ch->IsPC()) 1 Link to comment Share on other sites More sharing options...
Management Karbust 4884 Posted July 19, 2017 Author Management Share Posted July 19, 2017 Solved! Thank you Link to comment Share on other sites More sharing options...
Premium North 1175 Posted July 20, 2017 Premium Share Posted July 20, 2017 20 hours ago, charparodar said: Solved! Thank you Then post the solution for everyone. Link to comment Share on other sites More sharing options...
Management Karbust 4884 Posted July 20, 2017 Author Management Share Posted July 20, 2017 Just now, Fleon said: Then post the solution for everyone. Are you seriously? Did you read the whole post? Have you seen Den's posts? Have you seen the top answer? Thought soo... Link to comment Share on other sites More sharing options...
Premium North 1175 Posted July 20, 2017 Premium Share Posted July 20, 2017 2 minutes ago, charparodar said: Are you seriously? Did you read the whole post? Have you seen Den's posts? Have you seen the top answer? Thought soo... It`s not for me, i dont care. But if you get into the solution then posting your code is a must for the others. (the whole func) Link to comment Share on other sites More sharing options...
Management Karbust 4884 Posted July 20, 2017 Author Management Share Posted July 20, 2017 On 16/07/2017 at 0:22 AM, Den said: Try bool battle_is_attackable(LPCHARACTER ch, LPCHARACTER victim) { // »ó´ëąćŔĚ Á׾úŔ¸¸é Áß´ÜÇŃ´Ů. if (victim->IsDead()) return false; switch(ch->GetMapIndex()) { case 113: case 219: case 240: case 351: case 352: { if (victim->IsPC()) return false; } } ... This code with the top answer is the solution... Link to comment Share on other sites More sharing options...
Premium North 1175 Posted July 20, 2017 Premium Share Posted July 20, 2017 6 minutes ago, charparodar said: This code with the top answer is the solution... A typical user doesnt read that far, he goes to the bottom of the page to see if it`s solved or not, it`s a common behavior. Thanks for sharing, at least i hope now this question will not be spammed for at least 1/2 week Link to comment Share on other sites More sharing options...
xDiiZeRx 40 Posted November 21, 2017 Share Posted November 21, 2017 Hi! How to solved, to attack the mobs? Link to comment Share on other sites More sharing options...
Management Karbust 4884 Posted November 21, 2017 Author Management Share Posted November 21, 2017 12 minutes ago, xDiiZeRx said: Hi! How to solved, to attack the mobs? Have you seen my last post on this topic? Link to comment Share on other sites More sharing options...
xDiiZeRx 40 Posted November 21, 2017 Share Posted November 21, 2017 They will not attack me. 18/ Link to comment Share on other sites More sharing options...
Management Karbust 4884 Posted November 21, 2017 Author Management Share Posted November 21, 2017 32 minutes ago, xDiiZeRx said: They will not attack me. 18/ if (victim->IsPC() && ch->IsPC()) Link to comment Share on other sites More sharing options...
Paulo 6 Posted July 1, 2021 Share Posted July 1, 2021 Não estou conseguindo alguém pode me ajudar ? identifier "ch" is undefined identifier "victim" is undefined Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now