View Single Post
  #1  
Old 11-24-2012, 06:25 AM
Drajor's Avatar
Drajor
Developer
 
Join Date: Nov 2012
Location: Halas
Posts: 355
Default TIP: Updating zone lines for custom servers.

Heyas,

This little piece of SQL will modify the zone lines of a specific zone so that players are returned to the lobby or a specific zone.

Code:
# This is the zone players will zone to.
SET @LobbyZone = "nexus";
SET @LobbyHeading = 130;

# This is the zone we are changing
SET @ZoneName = "crushbone";

UPDATE zone_points
SET
	target_zone_id = (SELECT zoneidnumber from zone where short_name = @LobbyZone),
	target_x = (SELECT safe_x from zone where short_name = @LobbyZone),
	target_y = (SELECT safe_y from zone where short_name = @LobbyZone),
	target_z = (SELECT safe_z from zone where short_name = @LobbyZone),
	target_heading = @LobbyHeading
WHERE zone = @ZoneName;
Reply With Quote