- Joined
- Apr 8, 2007
- Messages
- 9
- Reaction score
- 3
I am aware that guides already got posted but none was really complete like no one ever said how to limit reborns or how to make you get more stat points each time you reborn
so here it goes :
Open your SQL manager and go to RanGame1 > Tables > ChaInfo
Rightclick dbo.ChaInfo and click Design Table
Go to the bottom of the list that appears
there at the Column name put "ChaReborn"
datatype : Smallint
allow "NULL"
when you're done save the edits and open the tree of dbo.ChaInfo and find "Trigger"
Rightclick Trigger and click "New Trigger"
and put this in :
CREATE TRIGGER [dbo].[Auto_Reborn] ON [dbo].[ChaInfo]
after update
as
BEGIN
Update [ChaInfo] set [ChaInfo].ChaReborn = 0,[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].ChaStRemain = (100*[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 - 2000000, -- Optional : Reborn cost 2m
[ChaInfo].ChaSkillPoint = (10*[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 = 300 -- Level to reborn
and [ChaInfo].ChaReborn < 10 -- 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 >= 2000000 -- Optional : Require 2m gold for reborn
End
How to make double reborn :
Change the first script a bit (at the lvs)
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 = (100*[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 - 2000000, -- Optional : Reborn cost 2m
[ChaInfo].ChaSkillPoint = (10*[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 >= 290 -- Level to 1x reborn
and [ChaInfo].ChaLevel < 295 -- Limitation of 1x Reborn
and [ChaInfo].ChaReborn < 10 -- 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 >= 2000000 -- Optional : Require 2m gold for reborn
and then add below this :
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 = (100*[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 - 4000000, -- Optional : Reborn cost 4m
[ChaInfo].ChaSkillPoint = (10*[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 >= 296 -- Level to 2x reborn
and [ChaInfo].ChaReborn < 10 -- 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 >= 4000000 -- Optional : Require 4m gold for double reborn
after that press the Red "!" to perform the compiling of the Trigger, and you're done!
To Reborn : Change Map / Relog
Note : To delete any of the changes when reborn like Skills delete, just delete that line and don't forget that ONLY the last thing to happen got NO comma at the end, any line needs a comma beside the last otherwise it won't work
You can use any value of your char to get changed or as requirement for reborn
even require to be in a certain Map with
[ChaInfo].ChaSaveMap
or even to have a certain guild nick (like nick : REBORN) to make ppl reborn at will and not by mistake
[ChaInfo].ChaGuName = 'REBORN'
To clear the guild nick after reborn add this line : [ChaInfo].ChaGuName = ' ' -- careful its 2 ' not 1 "
and don't forget the comma if its not the last thing to change
Note : If you need REBORN then Reborn will NOT work, its case sensitive and don't forget the '
Important : Don't try around too much with this code on an open server, if you change things wrong it could end up in making EVERY char of your server reborn each second without having to satisfy and requirement, please back up your server files first or make it on a separate server to avoid hard damage while trying to modify this code
Example for fatal mistake :
Update [ChaInfo] set [ChaInfo].ChaLevel=1
Update [ChaInfo] set [ChaInfo].ChaReborn=[ChaInfo].ChaReborn + 1, -- Reborn counter
Update [ChaInfo] set [ChaInfo].ChaStRemain = (100*[ChaInfo].ChaReborn)
Update [ChaInfo] set [ChaInfo].ChaMoney = [ChaInfo].ChaMoney -2000000
Where Inserted.ChaLevel = 300 -- Level to reborn
and [ChaInfo].ChaMoney > 2000000
THIS would make EVERY char in your server reborn for free every time they relog or move to other map!!!
Yea for FREE no -2m because the condition of lv 300 and 2m gold is ONLY for the last Update command, means you would have made this skirpt :
Change map or relog = Reborn
and
If Lv 300 and money 2m then Money -2m
DO NOT USE THIS
Edit : Edited it now I'm using a variable that is 0 when you make your char and stays 0 all the way, its not used by the game so I use it to make ChaReborn get 0 instead of NULL
but if anyone knows how to check if a variable is NULL tell me and I'll add it instead, cos if I make
Where Inserted.ChaReborn = NULL
it won't do anything, it will just cause your char to rollback any time instead of reborn X.x
so here it goes :
Open your SQL manager and go to RanGame1 > Tables > ChaInfo
Rightclick dbo.ChaInfo and click Design Table
Go to the bottom of the list that appears
there at the Column name put "ChaReborn"
datatype : Smallint
allow "NULL"
when you're done save the edits and open the tree of dbo.ChaInfo and find "Trigger"
Rightclick Trigger and click "New Trigger"
and put this in :
CREATE TRIGGER [dbo].[Auto_Reborn] ON [dbo].[ChaInfo]
after update
as
BEGIN
Update [ChaInfo] set [ChaInfo].ChaReborn = 0,[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].ChaStRemain = (100*[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 - 2000000, -- Optional : Reborn cost 2m
[ChaInfo].ChaSkillPoint = (10*[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 = 300 -- Level to reborn
and [ChaInfo].ChaReborn < 10 -- 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 >= 2000000 -- Optional : Require 2m gold for reborn
End
How to make double reborn :
Change the first script a bit (at the lvs)
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 = (100*[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 - 2000000, -- Optional : Reborn cost 2m
[ChaInfo].ChaSkillPoint = (10*[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 >= 290 -- Level to 1x reborn
and [ChaInfo].ChaLevel < 295 -- Limitation of 1x Reborn
and [ChaInfo].ChaReborn < 10 -- 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 >= 2000000 -- Optional : Require 2m gold for reborn
and then add below this :
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 = (100*[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 - 4000000, -- Optional : Reborn cost 4m
[ChaInfo].ChaSkillPoint = (10*[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 >= 296 -- Level to 2x reborn
and [ChaInfo].ChaReborn < 10 -- 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 >= 4000000 -- Optional : Require 4m gold for double reborn
after that press the Red "!" to perform the compiling of the Trigger, and you're done!
To Reborn : Change Map / Relog
Note : To delete any of the changes when reborn like Skills delete, just delete that line and don't forget that ONLY the last thing to happen got NO comma at the end, any line needs a comma beside the last otherwise it won't work
You can use any value of your char to get changed or as requirement for reborn
even require to be in a certain Map with
[ChaInfo].ChaSaveMap
or even to have a certain guild nick (like nick : REBORN) to make ppl reborn at will and not by mistake
[ChaInfo].ChaGuName = 'REBORN'
To clear the guild nick after reborn add this line : [ChaInfo].ChaGuName = ' ' -- careful its 2 ' not 1 "
and don't forget the comma if its not the last thing to change
Note : If you need REBORN then Reborn will NOT work, its case sensitive and don't forget the '
Important : Don't try around too much with this code on an open server, if you change things wrong it could end up in making EVERY char of your server reborn each second without having to satisfy and requirement, please back up your server files first or make it on a separate server to avoid hard damage while trying to modify this code
Example for fatal mistake :
Update [ChaInfo] set [ChaInfo].ChaLevel=1
Update [ChaInfo] set [ChaInfo].ChaReborn=[ChaInfo].ChaReborn + 1, -- Reborn counter
Update [ChaInfo] set [ChaInfo].ChaStRemain = (100*[ChaInfo].ChaReborn)
Update [ChaInfo] set [ChaInfo].ChaMoney = [ChaInfo].ChaMoney -2000000
Where Inserted.ChaLevel = 300 -- Level to reborn
and [ChaInfo].ChaMoney > 2000000
THIS would make EVERY char in your server reborn for free every time they relog or move to other map!!!
Yea for FREE no -2m because the condition of lv 300 and 2m gold is ONLY for the last Update command, means you would have made this skirpt :
Change map or relog = Reborn
and
If Lv 300 and money 2m then Money -2m
DO NOT USE THIS
Edit : Edited it now I'm using a variable that is 0 when you make your char and stays 0 all the way, its not used by the game so I use it to make ChaReborn get 0 instead of NULL
but if anyone knows how to check if a variable is NULL tell me and I'll add it instead, cos if I make
Where Inserted.ChaReborn = NULL
it won't do anything, it will just cause your char to rollback any time instead of reborn X.x
Last edited: