Dissidia Posted October 24, 2012 Group: Members Topic Count: 155 Topics Per Day: 0.03 Content Count: 535 Reputation: 23 Joined: 11/19/11 Last Seen: June 8, 2023 Share Posted October 24, 2012 (edited) 5 players in pvp without a party. 2 players are set to "set pvpteam_a,1;". and 3 players are set to "set pvpteam_b,1;". all players with set "set pvpteam_a,1;" cannot attack each other but they can attack team b. this modification is possible? Edited November 9, 2012 by Yurika Quote Link to comment Share on other sites More sharing options...
GmOcean Posted October 24, 2012 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 666 Reputation: 93 Joined: 04/27/12 Last Seen: August 17, 2015 Share Posted October 24, 2012 Yes, you should refer to faction system. I believe most use a variable to determine what faction they are apart of, and they are unable to attack their own faction, if a mapflag is set. All you have to do, is simple set the variable as they enter, and remove it when they leave. Quote Link to comment Share on other sites More sharing options...
Dissidia Posted October 24, 2012 Group: Members Topic Count: 155 Topics Per Day: 0.03 Content Count: 535 Reputation: 23 Joined: 11/19/11 Last Seen: June 8, 2023 Author Share Posted October 24, 2012 thanks.. now i will try the faction system. Quote Link to comment Share on other sites More sharing options...
Dissidia Posted November 4, 2012 Group: Members Topic Count: 155 Topics Per Day: 0.03 Content Count: 535 Reputation: 23 Joined: 11/19/11 Last Seen: June 8, 2023 Author Share Posted November 4, 2012 i cant patch the faction system, i only want what im posting in my 1st post. please someone help me. Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted November 6, 2012 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted November 6, 2012 Index: battle.c =================================================================== --- battle.c (revision 16860) +++ battle.c (working copy) @@ -5051,6 +5051,14 @@ } } + if ( s_bl->type == BL_PC && t_bl->type == BL_PC ) { + struct map_session_data *sd = BL_CAST(BL_PC, s_bl); + struct map_session_data *tsd = BL_CAST(BL_PC, t_bl); + if ( !strcmp( mapindex_id2name(sd->mapindex), "prontera" ) ) + if ( pc_readglobalreg( sd, "pvpteam" ) == pc_readglobalreg( tsd, "pvpteam" ) ) + return 0; + } + switch( target->type ) { // Checks on actual target case BL_PC: { struct status_change* sc = status_get_sc(src); Quote Link to comment Share on other sites More sharing options...
Dissidia Posted November 6, 2012 Group: Members Topic Count: 155 Topics Per Day: 0.03 Content Count: 535 Reputation: 23 Joined: 11/19/11 Last Seen: June 8, 2023 Author Share Posted November 6, 2012 many thanks AnnieRuru, i will try it now.. tnx Quote Link to comment Share on other sites More sharing options...
Dissidia Posted November 9, 2012 Group: Members Topic Count: 155 Topics Per Day: 0.03 Content Count: 535 Reputation: 23 Joined: 11/19/11 Last Seen: June 8, 2023 Author Share Posted November 9, 2012 AnnieRuru how it will work? not working in my server.. Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted November 9, 2012 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted November 9, 2012 if ( s_bl->type == BL_PC && t_bl->type == BL_PC ) { if the source and the target are both human players struct map_session_data *sd = BL_CAST(BL_PC, s_bl); struct map_session_data *tsd = BL_CAST(BL_PC, t_bl); call out the data if ( !strcmp( mapindex_id2name(sd->mapindex), "prontera" ) ) the condition only apply in prontera map if ( pc_readglobalreg( sd, "pvpteam" ) == pc_readglobalreg( tsd, "pvpteam" ) ) return 0; if both of them having the same "pvpteam" variable, they can't hit each other so set your script set pvpteam, 1; // they assign to team no.1 set pvpteam, 2; // they assign to team no.2 those with same variable cannot hit each other Quote Link to comment Share on other sites More sharing options...
Dissidia Posted November 10, 2012 Group: Members Topic Count: 155 Topics Per Day: 0.03 Content Count: 535 Reputation: 23 Joined: 11/19/11 Last Seen: June 8, 2023 Author Share Posted November 10, 2012 thank you so much AnnieRuru. Quote Link to comment Share on other sites More sharing options...
PewN Posted December 9, 2012 Group: Members Topic Count: 209 Topics Per Day: 0.04 Content Count: 892 Reputation: 27 Joined: 12/09/11 Last Seen: April 16, 2016 Share Posted December 9, 2012 (edited) if ( s_bl->type == BL_PC && t_bl->type == BL_PC ) { if the source and the target are both human players struct map_session_data *sd = BL_CAST(BL_PC, s_bl); struct map_session_data *tsd = BL_CAST(BL_PC, t_bl); call out the data if ( !strcmp( mapindex_id2name(sd->mapindex), "prontera" ) ) the condition only apply in prontera map if ( pc_readglobalreg( sd, "pvpteam" ) == pc_readglobalreg( tsd, "pvpteam" ) ) return 0; if both of them having the same "pvpteam" variable, they can't hit each other so set your script set pvpteam, 1; // they assign to team no.1 set pvpteam, 2; // they assign to team no.2 those with same variable cannot hit each other annie ruru how to add other map? Edited December 9, 2012 by TrojanWorm Quote Link to comment Share on other sites More sharing options...
Question
Dissidia
5 players in pvp without a party.
2 players are set to "set pvpteam_a,1;".
and
3 players are set to "set pvpteam_b,1;".
all players with set "set pvpteam_a,1;" cannot attack each other but they can attack team b.
this modification is possible?
Edited by YurikaLink to comment
Share on other sites
9 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.