SphereCommunity
Disable PVP in houses (AREADEF/ROOMDEF etc.) - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Disable PVP in houses (AREADEF/ROOMDEF etc.) (/Thread-Disable-PVP-in-houses-AREADEF-ROOMDEF-etc)



Disable PVP in houses (AREADEF/ROOMDEF etc.) - Asavar - 04-12-2015 10:30 PM

Dear everyone,


I've been reading all I could find on the forums about AREADEF, ROOMDEF and events.

Basically, I want the houses in the game to be NO_PVP.

I read that all rooms in an area have the area flags.

I can't manage to disable PVP in houses at the moment. I've tried all I could find without any success.

I've read this topic but couldn't make an event work.

http://forum.spherecommunity.net/Thread-Areas-giving-events?highlight=areadef

I tried to create new areas but all I get is conflicts.


Any help would be appreciated.


RE: Disable PVP in houses (AREADEF/ROOMDEF etc.) - XuN - 04-13-2015 05:18 AM

Do you have any kind of event for the houses?

If yes: apply an event to players entering the house which blocks pvp, remove on leave

If no: check Add-on\mordaunts_housing_system.zip, you can find inside what you need.


RE: Disable PVP in houses (AREADEF/ROOMDEF etc.) - Asavar - 04-13-2015 08:31 AM

Thank you.

I'm using static housing. All the houses are in sphereregion.scp. It's like willing to set the bank in no_pvp without the Britain Area being no_pvp.

A real nightmare.

Therefore, I don't have events for the houses. I'm checking Mourdaunts housing system.


RE: Disable PVP in houses (AREADEF/ROOMDEF etc.) - XuN - 04-13-2015 04:51 PM

In this case, entering any building sets you statf_indoor so only a simple if (<flags>&statf_indoor) will do the job.