Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[req] auto reborn script

Custom Title Activated
Member
Joined
Dec 16, 2012
Messages
1,125
Reaction score
93
can someone share a autoreborn script.. the script will wipe all the stats and recieve 30 free stats per rb thanks

try use this

max level to reborn is 250
max reborn is 200
gained stat per rb is 30

hope its help and dont forget to press like ^_^

CREATE TRIGGER [dbo].[Auto_Reborn] ON [dbo].[ChaInfo]
after update
as
BEGIN

Update [ChaInfo] set [ChaInfo].ChaTribe = 1
from Inserted
Where Inserted.ChaTribe = 0

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].ChaStartMap=22, -- MarketPlace
[ChaInfo].ChaStartGate=0, -- MarketPlace
[ChaInfo].ChaSavePosX=0.847706, -- X coordinates
[ChaInfo].ChaSavePosY=0.299, -- Y coordinates
[ChaInfo].ChaSaveMap=22, -- MarketPlace
[ChaInfo].ChaSavePosZ=0.345514, -- X coordinates
[ChaInfo].ChaReturnMap=22, -- MarketPlace
[ChaInfo].ChaReturnPosX=0.847706, -- X coordinates
[ChaInfo].ChaReturnPosY=0.299, -- Y coordinates
[ChaInfo].ChaReturnPosZ=0.345514, -- Z coordinates
[ChaInfo].ChaStRemain = (30*[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 - 1000000, -- Optional : Reborn cost 5m
[ChaInfo].ChaSkillSlot = NULL -- Optional : Delete shortcut list of skills
From Inserted
Where Inserted.ChaLevel = 250 -- Level to reborn
and [ChaInfo].ChaReborn < 200 -- 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 >= 1000000 -- Optional : Require 5m gold for reborn

End
 
Upvote 0
Joined
Jan 28, 2010
Messages
401
Reaction score
42
try use this

max level to reborn is 250
max reborn is 200
gained stat per rb is 30

hope its help and dont forget to press like ^_^

CREATE TRIGGER [dbo].[Auto_Reborn] ON [dbo].[ChaInfo]
after update
as
BEGIN

Update [ChaInfo] set [ChaInfo].ChaTribe = 1
from Inserted
Where Inserted.ChaTribe = 0

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].ChaStartMap=22, -- MarketPlace
[ChaInfo].ChaStartGate=0, -- MarketPlace
[ChaInfo].ChaSavePosX=0.847706, -- X coordinates
[ChaInfo].ChaSavePosY=0.299, -- Y coordinates
[ChaInfo].ChaSaveMap=22, -- MarketPlace
[ChaInfo].ChaSavePosZ=0.345514, -- X coordinates
[ChaInfo].ChaReturnMap=22, -- MarketPlace
[ChaInfo].ChaReturnPosX=0.847706, -- X coordinates
[ChaInfo].ChaReturnPosY=0.299, -- Y coordinates
[ChaInfo].ChaReturnPosZ=0.345514, -- Z coordinates
[ChaInfo].ChaStRemain = (30*[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 - 1000000, -- Optional : Reborn cost 5m
[ChaInfo].ChaSkillSlot = NULL -- Optional : Delete shortcut list of skills
From Inserted
Where Inserted.ChaLevel = 250 -- Level to reborn
and [ChaInfo].ChaReborn < 200 -- 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 >= 1000000 -- Optional : Require 5m gold for reborn

End

its not compatible with my database it always getting have problem when i execute it
 
Upvote 0
Initiate Mage
Joined
Jan 24, 2013
Messages
51
Reaction score
0
"its not compatible with my database it always getting have problem when i execute it" dont copy all just start copying
CREATE TRIGGER [dbo].[Auto_Reborn] ON [dbo].[ChaInfo]
after update
as
BEGIN

Update [ChaInfo] set [ChaInfo].ChaTribe = 1
from Inserted
Where Inserted.ChaTribe = 0

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].ChaStartMap=22, -- MarketPlace
[ChaInfo].ChaStartGate=0, -- MarketPlace
[ChaInfo].ChaSavePosX=0.847706, -- X coordinates
[ChaInfo].ChaSavePosY=0.299, -- Y coordinates
[ChaInfo].ChaSaveMap=22, -- MarketPlace
[ChaInfo].ChaSavePosZ=0.345514, -- X coordinates
[ChaInfo].ChaReturnMap=22, -- MarketPlace
[ChaInfo].ChaReturnPosX=0.847706, -- X coordinates
[ChaInfo].ChaReturnPosY=0.299, -- Y coordinates
[ChaInfo].ChaReturnPosZ=0.345514, -- Z coordinates
[ChaInfo].ChaStRemain = (30*[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 - 1000000, -- Optional : Reborn cost 5m
[ChaInfo].ChaSkillSlot = NULL -- Optional : Delete shortcut list of skills
From Inserted
Where Inserted.ChaLevel = 250 -- Level to reborn
and [ChaInfo].ChaReborn < 200 -- 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 >= 1000000 -- Optional : Require 5m gold for reborn

End
 
Upvote 0
Custom Title Activated
Member
Joined
Dec 16, 2012
Messages
1,125
Reaction score
93
its working dude im using this my server .. please make it sure you dont have existing trigger in your database .. and read the error if what is say.


CREATE TRIGGER [dbo].[Auto_Reborn] ON [dbo].[ChaInfo]
after update
as
BEGIN

Update [ChaInfo] set [ChaInfo].ChaTribe = 1
from Inserted
Where Inserted.ChaTribe = 0

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].ChaStartMap=22, -- MarketPlace
[ChaInfo].ChaStartGate=0, -- MarketPlace
[ChaInfo].ChaSavePosX=0.847706, -- X coordinates
[ChaInfo].ChaSavePosY=0.299, -- Y coordinates
[ChaInfo].ChaSaveMap=22, -- MarketPlace
[ChaInfo].ChaSavePosZ=0.345514, -- X coordinates
[ChaInfo].ChaReturnMap=22, -- MarketPlace
[ChaInfo].ChaReturnPosX=0.847706, -- X coordinates
[ChaInfo].ChaReturnPosY=0.299, -- Y coordinates
[ChaInfo].ChaReturnPosZ=0.345514, -- Z coordinates
[ChaInfo].ChaStRemain = (30*[ChaInfo].ChaReborn), -- how many stat points you get per reborn

[ChaInfo].ChaMoney = [ChaInfo].ChaMoney - 1000000, -- Optional : Reborn cost 5m
[ChaInfo].ChaSkillSlot = NULL -- Optional : Delete shortcut list of skills
From Inserted
Where Inserted.ChaLevel = 250 -- Level to reborn
and [ChaInfo].ChaReborn < 200 -- 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 >= 1000000 -- Optional : Require 5m gold for reborn

End

if not working try to change the CREATE to ALTER then pres sexecute
 
Upvote 0
Skilled Illusionist
Joined
Mar 28, 2012
Messages
302
Reaction score
26
well, if you having problem to execute the script . just check your database i think that you already executed it.
 
Upvote 0
Back
Top