Newbie Spellweaver
- Joined
- Apr 17, 2026
- Messages
- 19
- Reaction score
- 7
NATION SCRIPT
Server01 > New Query > Paste the code
Server01 > New Query > Paste the code
SQL:
FOR SCRIPT
CREATE TRIGGER trg_SetNationByAlz
ON dbo.cabal_character_table
AFTER UPDATE
AS
BEGIN
SET NOCOUNT ON;
UPDATE c
SET Nation =
CASE
WHEN i.ALz >= 1234562 THEN 2 -- Procyon
WHEN i.ALz >= 1234561 THEN 1 -- Capella
ELSE c.Nation
END
FROM dbo.cabal_character_table c
INNER JOIN inserted i
ON c.CharacterIdx = i.CharacterIdx
WHERE c.Nation = 0;
END

