Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Coding Corner
You last visited: Today at 22:20

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



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

Discussion on Generating random region,x,y and z using c#! within the SRO Coding Corner forum part of the Silkroad Online category.

Reply
 
Old   #1
 
Muhab*'s Avatar
 
elite*gold: 0
Join Date: Feb 2014
Posts: 885
Received Thanks: 1,419
Exclamation Generating random region,x,y and z using c#!

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.
Muhab* is offline  
Old 12/03/2014, 20:40   #2
 
elite*gold: 8
Join Date: Sep 2014
Posts: 625
Received Thanks: 178
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).
qqdev is offline  
Old 12/03/2014, 21:04   #3
 
elite*gold: 0
Join Date: Jan 2009
Posts: 314
Received Thanks: 686
@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.

DaxterSoul is offline  
Thanks
7 Users
Old 12/04/2014, 20:10   #4
 
elite*gold: 0
Join Date: Feb 2008
Posts: 962
Received Thanks: 650
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!
magicanoo is offline  
Reply


Similar Threads Similar Threads
Problem with generating minimap - WE
11/27/2014 - Metin2 Private Server - 2 Replies
Hi ;] I can't generate a proper minimap everytime there are some objects missing http://i.imgur.com/AgMS5zo.jpg http://i.imgur.com/ydbRmEu.jpg As you can see everytime i generate a new minimap there are so bits missing and if i go back to this place and generate a new minimap then somewhere else the objects will disappear.
Generating Headers per Packet[NETWORK]
12/23/2013 - General Coding - 1 Replies
I'm working on a project about sniffing packets and sending packets to the game server. I totally completed sniffing packets and decoding them but there is a problem that If I wanna send same packet to the server, it will disconnect me because I think its about headers. Every time I sent a packet, it changes header of the packet even it has got same datas. Example : When I send a messae on chat as "hello" Packet : 85 DC 80 25 55 9C 34 22 22 E3 39 47 22 E7 39 4E 22 E4 39 22 22
Seafight Generating Cannons [AGAIN 31.07.2012]
07/31/2012 - Seafight - 7 Replies
closed for now making script for automatic generating
Seafight Generating Cannons..
07/28/2012 - Seafight - 26 Replies
Underground CLOSED
Can someone tell m,e what is generating th following error??
11/21/2011 - CO2 Private Server - 9 Replies
I need guidance in understanding this errors and how to fix them, 1. This error occurs when i am hunting dont know what generates it http://i43.tinypic.com/6h2m2q.png 2 This error occurs when somebody tried to upgrade items in twin (his items vanished i think ) http://i43.tinypic.com/k1yvxj.png 3. When this error occurs you get disconnected http://i42.tinypic.com/mbhb4l.png 4. I saw this one and it appeared from no were as all previous error ,nothing in Visual studio said that...



All times are GMT +1. The time now is 22:20.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.