Jump to content
  • 0

PvP request


Dissidia

Question


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  535
  • Reputation:   23
  • Joined:  11/19/11
  • Last Seen:  

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 Yurika
Link to comment
Share on other sites

9 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  535
  • Reputation:   23
  • Joined:  11/19/11
  • Last Seen:  

thanks.. now i will try the faction system. /thx

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  535
  • Reputation:   23
  • Joined:  11/19/11
  • Last Seen:  

i cant patch the faction system, i only want what im posting in my 1st post. please someone help me. /thx

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

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);

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  535
  • Reputation:   23
  • Joined:  11/19/11
  • Last Seen:  

many thanks AnnieRuru, i will try it now.. tnx /thx

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  535
  • Reputation:   23
  • Joined:  11/19/11
  • Last Seen:  

AnnieRuru how it will work? not working in my server..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

	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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  535
  • Reputation:   23
  • Joined:  11/19/11
  • Last Seen:  

thank you so much AnnieRuru.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  209
  • Topics Per Day:  0.05
  • Content Count:  892
  • Reputation:   27
  • Joined:  12/09/11
  • Last Seen:  

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