Register for your free account! | Forgot your password?

You last visited: Today at 15:51

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

Advertisement



Creating X & Y for Cave

Discussion on Creating X & Y for Cave within the SRO Coding Corner forum part of the Silkroad Online category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2007
Posts: 20
Received Thanks: 0
Creating X & Y for Cave

Hello,

i'd like to know if it's possible to create x and y coords for the cave.
it seems like the standard formula isn't working.

thanks!
hausmeister13 is offline  
Old 08/18/2011, 00:10   #2
 
elite*gold: 0
Join Date: Sep 2010
Posts: 783
Received Thanks: 921
Quote:
public static float cavegamex(float x)
{
byte sector = 0;
return ((sector - 135) * 192 + (x / 10));// ############################## CAVE COORD FORMULAS ######################################
}
public static float cavegamey(float y)
{
byte sector = 0;
return ((sector - 92) * 192 + (y / 10));
}
public static float cavepacketx(float x)
{
byte sector = 0;
return ((x - ((sector) - 135) * 192) * 10);
}
public static float cavepackety(float y)
{
byte sector = 0;
return ((y - ((sector) - 92) * 192) * 10);
}
from SRX source
ÑõÑ_Ŝŧóp is offline  
Thanks
3 Users
Old 08/18/2011, 09:32   #3
 
elite*gold: 0
Join Date: Nov 2007
Posts: 959
Received Thanks: 602
lol'd at xsense..he created new functions,just to make sector == 0?that was funny.
these are the "standard" formulas,with sector = 0,so no difference at all

edit: I have no idea if these are working,but as far as I know,it should be working without those 0's..
vorosmihaly is offline  
Old 08/18/2011, 10:12   #4
 
elite*gold: 0
Join Date: Aug 2011
Posts: 39
Received Thanks: 8
Quote:
Originally Posted by vorosmihaly View Post
lol'd at xsense..he created new functions,just to make sector == 0?that was funny.
these are the "standard" formulas,with sector = 0,so no difference at all

edit: I have no idea if these are working,but as far as I know,it should be working without those 0's..
Yeap, it's the same.
let's assume X is set to 2000:
Quote:
((2000 - ((0) - 135) * 192) * 10) = 279200
Now without that 0:
Quote:
((2000 - -135 * 192) * 10) = 279200
You don't even need the outside brackets:
Quote:
(2000 - -135 * 192) * 10 = 279200
MyMindSail is offline  
Old 08/18/2011, 15:33   #5
 
elite*gold: 0
Join Date: Apr 2010
Posts: 30
Received Thanks: 18
Quote:
Originally Posted by vorosmihaly View Post
lol'd at xsense..he created new functions,just to make sector == 0?that was funny.
these are the "standard" formulas,with sector = 0,so no difference at all

edit: I have no idea if these are working,but as far as I know,it should be working without those 0's..
yes its working with 0 sector and working without 0 so whats the problem ? Xsesne write the emulator with own programming style, so he use this formula but working too so who care that he use ?
GSILKROAD is offline  
Old 08/18/2011, 16:24   #6
 
elite*gold: 0
Join Date: Nov 2007
Posts: 959
Received Thanks: 602
Quote:
Originally Posted by GSILKROAD View Post
yes its working with 0 sector and working without 0 so whats the problem ? Xsesne write the emulator with own programming style, so he use this formula but working too so who care that he use ?
I don't,but you know,it's pretty useless
vorosmihaly is offline  
Old 08/18/2011, 17:31   #7
 
npcdoom's Avatar
 
elite*gold: 0
Join Date: Jun 2009
Posts: 76
Received Thanks: 147
Well just for clarification about position formulas.

Assuming everyone understand what coordinate system is, if not google it =P.

Silkroad uses 3 types of coordinate system a global (used to display position in players screen with origin (0,0) at jangan city), another one to reference player position according to their current zone (used for movement related task outside areas with origin (0,0) at the bottom left corner of each zone this is done for precision issues with big float numbers and performing operations with them) and another one for dungeons witch atm this moment i dont know much about it because i never messed up with it (but i think their are at the center of the model).

So to calculate distance u need to calculate distance from where u are to origin, plain and simple theres no magic involved.

To calculate a "correct" dungeon position it would involve calculating the position from jangan to the dungeon, then adding the distance from your position to entrance (assuming its a 1 lv only cave like dw) if it got more then keep doing the same as before to each lv.
npcdoom is offline  
Reply


Similar Threads Similar Threads
JoB Cave
06/21/2011 - Silkroad Online - 1 Replies
Hello guys i heard i can farm fast sp in the job cave i am now lv 87 i want play with 0 gap but csro got the new update for hunter and thiefs i am able to enter the job cave or its now over ?=
How to bot in cave?
11/23/2010 - Silkroad Online - 2 Replies
should we set the radius of just the room and or entire level? i use sroking most important thing is; sometime party mobs pop up! how do i avoid that....
DB bot in cave !? What's going on ??
07/16/2010 - SRO Private Server - 11 Replies
Hi all cheaters ^.^ . I have a problem with my db bot, i wanna go grind to cave, but my bot attack only moobs which attack him before. When he killed them he run to wall. And don't move. If some1 can help me solve my problem ? Thx a lot of ! Btw. server ZSCZ !
Dragon Cave Eggs/Dragon Cave Eier
10/11/2008 - Main - 7 Replies
~~~~~~~~~~~~~~~~~~~~~GERMAN~~~~~~~~~~~~~~~~~~~~~ http://dragcave.net/image/jV4D.gifhttp://dragcave .net/image/33If.gifhttp://dragcave.net/image/Q8hE. gifhttp://dragcave.net/image/HH83.gifhttp://dragca ve.net/image/uysh.gif Dragon Cave - Enter the Cave registriert euch, es ist kostenlos ~~~~~~~~~~~~~~~~~~~~~ENGLISH~~~~~~~~~~~~~~~~~~~~~ ...



All times are GMT +1. The time now is 15:51.


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.