PDA

View Full Version : TIP: Updating zone lines for custom servers.


Drajor
11-24-2012, 06:25 AM
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.

# 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;