ID:150185
 
Ok, in my new game. in the towns you get attacked by monsters; note thats its random combat. Not from the demo a code i made. but how would i stop monsters from attacking people on the towns? please reply with a short little code i can add and alter to work for me, thanks.
- RaeKwon
I've never seen this system so it probably has some sort of turf/area you use, well you need to make an "noattack" area and place that in towns.
Come into my game, "Kemet". Its really EASY!!

All you do is make something like

mob/var PK = "No"

Then inside your combat system

if(PK = "No")
return
else
-- your battle code continues on here --

This should be the 1st thing in your attack mode it checks for, if it says your current state is NO then it returns and won't let you attack.

To make a PK Zone,
turf/PK_area
Entered(mob/M)
M.PK = "Yes"


Don't cut and paste as I just typed this in from here. But this works, also if you have like a larger map to outside or something make the location tile you send people to in the next map a PK_area turf. That way when they get there its on. and the rest of the turfs are just normal turfs. Also the location you send the player back to in the city, needs to be a
turf/NonPK_area
Exited(mob/M)
M.PK = "No"

LJR