PinoyDevForum
Would you like to react to this message? Create an account in a few clicks or log in to continue.


 
HomeLatest imagesSearchRegisterLog in

 

 [help]about reborn script

Go down 
4 posters
AuthorMessage
edilon09
Member
Member
edilon09


Number of posts : 50
Age : 32
Location : bagong silang cal.city
What Development you are good? : Ran ONline
Registration date : 2008-09-30

[help]about reborn script Empty
PostSubject: [help]about reborn script   [help]about reborn script Icon_minitimeWed Oct 01, 2008 5:07 pm

i cant execute this reborn script in my ep4 db..

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].ChaQuest = NULL -- Optional : Delete quest list (need restart all quests) after reborn
From Inserted
Where Inserted.ChaLevel = 259 -- Level to reborn
and [ChaInfo].ChaReborn < 100 -- 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

cuz this error "Msg 8197, Level 16, State 4, Procedure Auto_Reborn, Line 1
Object 'dbo.ChaInfo' does not exist or is invalid for this operation.


always appear,...please help me how to solve this please..
Back to top Go down
Seifer13
Administrator
Administrator
Seifer13


Number of posts : 372
Age : 29
Location : Guma0k Central, SJDM, Bulacan
What Development you are good? : RaN ONline
Registration date : 2008-09-27

[help]about reborn script Empty
PostSubject: Re: [help]about reborn script   [help]about reborn script Icon_minitimeWed Oct 01, 2008 5:12 pm

use this:

Use [RANGAME1]
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].ChaQuest = NULL -- Optional : Delete quest list (need restart all quests) after reborn
From Inserted
Where Inserted.ChaLevel = 259 -- Level to reborn
and [ChaInfo].ChaReborn < 100 -- 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
Back to top Go down
http://omegarebirth.net63.net/
SeraphiPod
Member
Member
SeraphiPod


Number of posts : 115
Age : 27
Location : Not Interested
What Development you are good? : Not Interested
Registration date : 2008-09-27

[help]about reborn script Empty
PostSubject: Re: [help]about reborn script   [help]about reborn script Icon_minitimeWed Oct 01, 2008 6:02 pm

it does not work because you don't got:
this line: Use [RANGAME1]
Back to top Go down
edilon09
Member
Member
edilon09


Number of posts : 50
Age : 32
Location : bagong silang cal.city
What Development you are good? : Ran ONline
Registration date : 2008-09-30

[help]about reborn script Empty
PostSubject: Re: [help]about reborn script   [help]about reborn script Icon_minitimeWed Oct 01, 2008 6:38 pm

well....after using seifer's reborn script...this is the error occur

Msg 111, Level 15, State 1, Line 2
'CREATE TRIGGER' must be the first statement in a query batch.
Back to top Go down
mabait
Tenderfoot
Tenderfoot



Number of posts : 12
Age : 32
Location : manila
What Development you are good? : ran online
Registration date : 2008-09-28

[help]about reborn script Empty
PostSubject: Re: [help]about reborn script   [help]about reborn script Icon_minitimeMon Oct 06, 2008 10:37 pm

USE [RanGame1]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
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].ChaQuest = NULL -- Optional : Delete quest list (need restart all quests) after reborn
From Inserted
Where Inserted.ChaLevel = 259 -- Level to reborn
and [ChaInfo].ChaReborn < 100 -- 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
Back to top Go down
Sponsored content





[help]about reborn script Empty
PostSubject: Re: [help]about reborn script   [help]about reborn script Icon_minitime

Back to top Go down
 
[help]about reborn script
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
PinoyDevForum :: MMORPG servers :: Help And Requests-
Jump to: