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

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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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