Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Miscellaneous => Tutorials => Topic started by: Fyrion on May 13, 2012, 12:15:59 pm

Title: Calculate coordinates from Adt
Post by: Fyrion on May 13, 2012, 12:15:59 pm
To calculate your coordinates from your .Adt, follow these steps.

The formula, to calculate your coordinates is the following:

$Mapname_x_y = (X - 32) * 533 + 266
$Mapname_x_y = (Y - 32) * 533 + 266

For example we are using the (EK - 29_51 / Westfall) adt.
(Eastern Kingdoms, Westfall 29_51)

Insert the x and y coordinate into the formular.

---------------X---Y-----X----Y
$Mapname_29_51 = (29 - 32) * 533 + 266
$Mapname_29_51 = (51 - 32) * 533 + 266
´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´
$Mapname_29_51 = -3 * 533 + 266
$Mapname_29_51 = 19 * 533 + 266
´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´
$Mapname_29_51 = -1.599 + 266
$Mapname_29_51 = 10.127 + 266
´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´
$Mapname_29_51 = -1.333
$Mapname_29_51 = 10.393

Subsidiary the x coordinate gets the negativ value and y the positiv value. That means:

$Mapname_29_51 = -1.333 * (-1) ==> - + - = +
$Mapname_29_51 = 10.393 * (-1) ==> - + + = -
´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´
$Mapname_29_51 = 1.333
$Mapname_29_51 = -10.393

switch them and insert them into the go command. You've to change the z_height!

.go -10393 1333 z_height
Title: Re: Calculate coordinates from Adt
Post by: Eluo on May 13, 2012, 02:36:47 pm
:D kinda the same as i have here:
viewtopic.php?f=22&t=26&p=72#p72 (http://modcraft.io/viewtopic.php?f=22&t=26&p=72#p72" onclick="window.open(this.href);return false;)
At the end of the post in the spoilers.
Title: Re: Calculate coordinates from Adt
Post by: Fyrion on May 13, 2012, 05:05:57 pm
Ok ;) but i think, this is a practical evidence of working with.
Title: Re: Calculate coordinates from Adt
Post by: Steff on May 13, 2012, 08:48:05 pm
Or you just use noggit and read the cords :)

Or even use the function g that wirte the current pos into the ports.txt