Generating random region,x,y and z using c#!

12/03/2014 18:23 Muhab*#1
As title says, I would like to generate random Region ID, PosX, PosY and PosZ using c#.
however that may happen by generating x & y coords and converting them into r,x,y,z or just generate them directly.

P.S. Those those points should be non-safe zone area.
Thanks in advance.
12/03/2014 20:40 qqdev#2
I don't think that you will find someone because it is not a 5-minute-task. RegionID is bound to X,Y,Z (if I am not wrong) + you have to avoid the save zone area's (not sure where they are defined).
12/03/2014 21:04 DaxterSoul#3
@qqdev: those in-game X-/Y-Coordinates are calculated through RegionID (X-/Y-Sector) and X-/Y-Offsets

_RefRegion contains information about a region safezone or not (isBattleField).

So you can pick a region randomly and again X,Y,Z offsets (0-1920) but you get a pretty high chance of landing right within an object. Navmesh could help you here but can get your solution complex really quickly.

The easiest approach that comes to my mind when searching for safe positions across the whole map are spawn positions for monsters. Tab_RefNest contains ~16563 positions that I assume to be not within an object. npcpos.txt might work as well.

[Only registered and activated users can see links. Click Here To Register...]
12/04/2014 20:10 magicanoo#4
Quote:
Originally Posted by DaxterSoul View Post
The easiest approach that comes to my mind when searching for safe positions across the whole map are spawn positions for monsters. Tab_RefNest contains ~16563 positions that I assume to be not within an object. npcpos.txt might work as well.
Brilliant!