sorry here it is..
USE [RanGame1]
GO
/****** Object: Trigger [dbo].[Auto_Reborn] Script Date: 03/09/2008 13:53:24 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
ALTER TRIGGER [dbo].[Auto_Reborn] ON [dbo].[ChaInfo]
after update
as
BEGIN
Update [ChaInfo] set [ChaInfo].ChaLevel=1, -- Level that you get after reborn
[ChaInfo].ChaReborn=[ChaInfo].ChaReborn + 1, -- Reborn counter
[ChaInfo].ChaExp=0, -- Set Exp back to 0
[ChaInfo].ChaStRemain = (200*[ChaInfo].ChaReborn), -- how many stat points you get per reborn
[ChaInfo].ChaPower = 0, -- Set the number of Pow you added to 0
[ChaInfo].ChaStrong = 0, -- Set the number of Vit you added to 0
[ChaInfo].ChaStrength = 0, -- Set the number of Stm you added to 0
[ChaInfo].ChaSpirit = 0, -- Set the number of Int you added to 0
[ChaInfo].ChaDex = 0, -- Set the number of Dex you added to 0
[ChaInfo].ChaMoney = [ChaInfo].ChaMoney - 100000000, -- Optional : Reborn cost 100m
[ChaInfo].ChaSkillPoint = (20*[ChaInfo].ChaReborn), -- Set the Skillpoints per reborn
[ChaInfo].ChaSkills = NULL, -- Optional : Forget all skills after reborn
[ChaInfo].ChaSkillSlot = NULL, -- Optional : Delete shortcut list of skills
[ChaInfo].ChaQuest = NULL -- Optional : Delete quest list (need restart all quests) after reborn
From Inserted
Where Inserted.ChaLevel >= 230 -- Level to 1x reborn
and [ChaInfo].ChaLevel < 300 -- Limitation of 1x Reborn
and [ChaInfo].ChaReborn < 25 -- Max Reborn number
and [ChaInfo].ChaName=inserted.ChaName
and [ChaInfo].UserNum =inserted.UserNum
and [ChaInfo].ChaBright >= 0 -- Optional : Require 0 or more attr for reborn
and [ChaInfo].ChaMoney >= 100000000 -- Optional : Require 100m gold for reborn
Update [ChaInfo] set [ChaInfo].ChaLevel=1, -- Level that you get after reborn
[ChaInfo].ChaReborn=[ChaInfo].ChaReborn + 2, -- Reborn counter -- NO need to change anything beside of THIS you get automatically more stat points if you put the reborn counter +2
[ChaInfo].ChaExp=0, -- Set Exp back to 0
[ChaInfo].ChaStRemain = (200*[ChaInfo].ChaReborn), -- how many stat points you get per reborn
[ChaInfo].ChaPower = 0, -- Set the number of Pow you added to 0
[ChaInfo].ChaStrong = 0, -- Set the number of Vit you added to 0
[ChaInfo].ChaStrength = 0, -- Set the number of Stm you added to 0
[ChaInfo].ChaSpirit = 0, -- Set the number of Int you added to 0
[ChaInfo].ChaDex = 0, -- Set the number of Dex you added to 0
[ChaInfo].ChaMoney = [ChaInfo].ChaMoney - 100000000, -- Optional : Reborn cost 100m
[ChaInfo].ChaSkillPoint = (20*[ChaInfo].ChaReborn), -- Set the Skillpoints per reborn
[ChaInfo].ChaSkills = NULL, -- Optional : Forget all skills after reborn
[ChaInfo].ChaSkillSlot = NULL, -- Optional : Delete shortcut list of skills
[ChaInfo].ChaQuest = NULL -- Optional : Delete quest list (need restart all quests) after reborn
From Inserted
Where Inserted.ChaLevel >= 230 -- Level to 2x reborn
and [ChaInfo].ChaLevel < 300 -- Limitation of 2x Reborn
and [ChaInfo].ChaReborn < 25 -- Max reborn number
and [ChaInfo].ChaName=inserted.ChaName
and [ChaInfo].UserNum =inserted.UserNum
and [ChaInfo].ChaBright >= 0 -- Optional : Require 0 or more attr for reborn
and [ChaInfo].ChaMoney >= 100000000 -- Optional : Require 100m gold for double reborn
END