Jump to content
  • 0
Sign in to follow this  
Echoes

Avoid players to attack

Question

Hi.

Is there a way to avoid a player (actually, all the players involved) to attack monsters? I want the players to not be able to attack in a specific map, this would be done via a mapflag, but there is no such mapflag at the moment (like 'noattack' or something).
I don't even know if this is the right section for this question.

At the moment, I can avoid them to attack by making the monsters actual NPCs via script and so, but I want them to be alive and roam freely on the map I'm working on :(

 

Any help will be appreciated.

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Add a custom mapflag
http://herc.ws/wiki/Adding_New_Mapflag

And finally open battle.c, find:

switch (t_bl->type) {
			case BL_MOB: // Source => PC, Target => MOB
				if (pc_has_permission(s_sd, PC_PERM_DISABLE_PVM))

And replace for:

switch (t_bl->type) {
			case BL_MOB: // Source => PC, Target => MOB
				if (pc_has_permission(s_sd, PC_PERM_DISABLE_PVM) || map->list[m].flag.yourcustommapflag)

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.