I just little bit drunken, but I hope I understood your question anyway.
You have to get the position where the village should be create! (Like: Nord-East(ne), Nord-West (nw), South-West (sw), South-East (se)).
So if you get this information you can create a random number for the X and Y coordinates.
For example you got a map with coords between -50|50.
So the Script would be like this one:
I hope, I could helped you :')
Sorry for bad english
so far
Yannici
You have to get the position where the village should be create! (Like: Nord-East(ne), Nord-West (nw), South-West (sw), South-East (se)).
So if you get this information you can create a random number for the X and Y coordinates.
For example you got a map with coords between -50|50.
So the Script would be like this one:
PHP Code:
$position = $_GET['position'];
if($position == "ne")
{
$x = rand(0, 50);
$y = rand(0, 50);
}
elseif($position == "nw")
{
$x = rand(-50, 0);
$y = rand(0, 50);
}
elseif($position == "sw")
{
$x = rand(-50, 0);
$y = rand(0, -50);
}
elseif($position == "se")
{
$x = rand(0, 50);
$y = rand(0, -50);
}
else // If random position
{
$x = rand(-50, 50);
$y = rand(-50, 50);
}
create_village($x, $y);
I hope, I could helped you :')
Sorry for bad english
so far
Yannici
Manchmal denke ich: