Avoid players to attack

Echoes

New member
Messages
68
Points
0
Age
33
Github
Maxitotito
Emulator
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.

 
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:

Code:
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)
 
Back
Top