Jump to content
  • 0

disable friend fire pk map


VladimirCastro

Question


  • Group:  Members
  • Topic Count:  114
  • Topics Per Day:  0.03
  • Content Count:  298
  • Reputation:   4
  • Joined:  03/13/12
  • Last Seen:  

how can i off the friendly fire in pk map? i mean guild member can kill each other in pk map only

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  42
  • Reputation:   0
  • Joined:  08/22/12
  • Last Seen:  

Go to..

../conf/mapflag/pvp_noguild.txt

And add this line anywhere..

<mapname> mapflag pvp_noguild

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:  

then duplicate them all over the maps ... xD

open db\map_index.txt

use notepad++, Ctrl+F, select Regular Expression

Find

(.*)

replace with

\1 mapflag pvp_noguild

between mapflag and pvp_noguild is actual TAB, type it somewhere and copy paste

lol done so fast

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

Though if you're worried about script load times, you should probably do this with source.

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:  

:ani_swt3: that's just ... 800 lines ... and minus some maps that has gvg maps like castle maps

so actually just about 700 lines++

loading time just few seconds more ... no ?

battle.c

		if( flag&(BCT_GUILD|BCT_ENEMY) )
	{
		int s_guild = status_get_guild_id(s_bl);
		int t_guild = status_get_guild_id(t_bl);
		if( !(map[m].flag.pvp && map[m].flag.pvp_noguild) && s_guild && t_guild && (s_guild == t_guild || guild_isallied(s_guild, t_guild)) && (!map[m].flag.battleground || sbg_id == tbg_id) )
			state |= BCT_GUILD;
		else
			state |= BCT_ENEMY;
	}

just only have to remove

!(map[m].flag.pvp && map[m].flag.pvp_noguild)

nah ... more than that, but think you can solve it yourself

Edited by AnnieRuru
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...