Noticias:

No tienes permiso para ver los enlaces. Para poder verlos Registrate o Conectate.

Menú Principal

Teleport Random

Iniciado por Swarlog, Jun 25, 2025, 09:23 PM

Tema anterior - Siguiente tema

Swarlog

Si queremos que no todo el mundo aparezca en el mismo punto, os dejo este codigo para que podais añadir más posiciones de teleport para liberar lag y que se vea todo algo mas bonito :P

1- Indicar las coordenadas:

// Random Locations
	private static int[] _zone_x =
	{
		11551,
		10999,
		10401
	};
	private static int[] _zone_y =
	{
		-24264,
		-23576,
		-24030
	};
	private static int[] _zone_z =
	{
		-3644,
		-3651,
		-3660
	};

2- Añadir el teleport:

int r = Rnd.get(3);
player.teleToLocation(_zone_x[r], _zone_y[r], _zone_z[r]);

Y listo, ya tenemos nuestro teleport aleatorio.