SphereCommunity
NOT MOUNTING ON DUNGEON REGION? - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: NOT MOUNTING ON DUNGEON REGION? (/Thread-NOT-MOUNTING-ON-DUNGEON-REGION)



NOT MOUNTING ON DUNGEON REGION? - kn4tseb - 08-13-2014 04:25 AM

hi there, i want to know if there's a better way to specify if player is entering a dungeon area/region than the fallowing one.

Code:
ON=@RegionEnter
IF (<SRC.ISPLAYER>) && !(<SRC.ISGM>)
IF STRMATCH(*R_DUNGEON*,<SRC.REGION.RESOURCES>)
   IF (<SRC.FINDLAYER.LAYER_HORSE>)
   SRC.SYSMESSAGE @07a1,,1 You cant ride on this place.
   SRC.DISMOUNT
   ENDIF
ENDIF
ENDIF

Thank you very much.


RE: NOT MOUNTING ON DUNGEON REGION? - Rizz - 08-13-2014 04:31 AM

mmm don't know, maybe
PHP Code:
(<src.region.flags>&region_flag_underground

?


RE: NOT MOUNTING ON DUNGEON REGION? - darksun84 - 08-13-2014 04:34 AM

Most of dungeons have the flag region_undeground, so you can check it.

I think that the best way is to create a new regiontype for dungeons and add it in the event property of the dungeons areadef.

In this way you can check if a region is a dungeon or not by using region.isevent.regiontype_defname


RE: NOT MOUNTING ON DUNGEON REGION? - Skul - 08-13-2014 04:37 AM

Looks like you're using r_dungeon. Why not add the trigger to r_dungeon (in sphere_region.scp)
Code:
on=@enter
if (<src.findlayer.25>)
  src.dismount
endif



RE: NOT MOUNTING ON DUNGEON REGION? - kn4tseb - 08-13-2014 04:41 AM

gonna try it with @enter to r_dungeon, thx skul ^^

but i got the idea rizz and darksun, i think i know what ill do later on.. Thank you all!