1 Attachment(s)
[Share] Trigger Stat Reset (No Minus Gold)
This The Trigger,
Put This Trigger On RanGame1,dbo.ChaInfo
This The Code.
Quote:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <DonDonk Cuy,,>
-- Create date: <15-01-10,,>
-- Description: <Stat Reset Trigger Cost 50.000.000,,>
-- =============================================
ALTER TRIGGER [dbo].[Amend_AdStat] ON [dbo].[ChaInfo]
after update
as
BEGIN
UPDATE ChaInfo SET [ChaInfo].ChaGuName='RESETPOWFINISH',
[ChaInfo].ChaStRemain=[ChaInfo].ChaStRemain+([ChaInfo].ChaPower),
[ChaInfo].ChaPower=0,
[ChaInfo].ChaMoney=(([ChaInfo].ChaMoney)-50000000)-(([ChaInfo].ChaPower)*0)
From Inserted
WHERE Inserted.ChaGuName='RESETPOW'
and [ChaInfo].ChaMoney>=50000000
and [ChaInfo].ChaPower>=1
and [ChaInfo].ChaMoney>=(([ChaInfo].ChaPower)*0)
and Inserted.ChaName=[ChaInfo].ChaName
and Inserted.UserNum=[ChaInfo].UserNum
UPDATE ChaInfo SET [ChaInfo].ChaGuName='RESETVITFINISH',
[ChaInfo].ChaStRemain=[ChaInfo].ChaStRemain+([ChaInfo].ChaStrong),
[ChaInfo].ChaStrong=0,
[ChaInfo].ChaMoney=(([ChaInfo].ChaMoney)-50000000)-(([ChaInfo].ChaStrong)*0)
From Inserted
WHERE Inserted.ChaGuName='RESETVIT'
and [ChaInfo].ChaMoney>=50000000
and [ChaInfo].ChaStrong>=1
and [ChaInfo].ChaMoney>=(([ChaInfo].ChaStrong)*0)
and Inserted.ChaName=[ChaInfo].ChaName
and Inserted.UserNum=[ChaInfo].UserNum
UPDATE ChaInfo SET [ChaInfo].ChaGuName='RESETDEXFINISH',
[ChaInfo].ChaStRemain=[ChaInfo].ChaStRemain+([ChaInfo].ChaDex),
[ChaInfo].ChaDex=0,
[ChaInfo].ChaMoney=(([ChaInfo].ChaMoney)-50000000)-(([ChaInfo].ChaDex)*0)
From Inserted
WHERE Inserted.ChaGuName='RESETDEX'
and [ChaInfo].ChaMoney>=50000000
and [ChaInfo].ChaDex>=1
and [ChaInfo].ChaMoney>=(([ChaInfo].ChaDex)*0)
and Inserted.ChaName=[ChaInfo].ChaName
and Inserted.UserNum=[ChaInfo].UserNum
UPDATE ChaInfo SET [ChaInfo].ChaGuName='RESETINTFINISH',
[ChaInfo].ChaStRemain=[ChaInfo].ChaStRemain+([ChaInfo].ChaSpirit),
[ChaInfo].ChaSpirit=0,
[ChaInfo].ChaMoney=(([ChaInfo].ChaMoney)-50000000)-(([ChaInfo].ChaSpirit)*0)
From Inserted
WHERE Inserted.ChaGuName='RESETINT'
and [ChaInfo].ChaMoney>=50000000
and [ChaInfo].ChaSpirit>=1
and [ChaInfo].ChaMoney>=(([ChaInfo].ChaSpirit)*0)
and Inserted.ChaName=[ChaInfo].ChaName
and Inserted.UserNum=[ChaInfo].UserNum
UPDATE ChaInfo SET [ChaInfo].ChaGuName='RESETSTMFINISH',
[ChaInfo].ChaStRemain=[ChaInfo].ChaStRemain+([ChaInfo].ChaStrength),
[ChaInfo].ChaStrength=0,
[ChaInfo].ChaMoney=(([ChaInfo].ChaMoney)-50000000)-(([ChaInfo].ChaStrength)*0)
From Inserted
WHERE Inserted.ChaGuName='RESETSTM'
and [ChaInfo].ChaMoney>=50000000
and [ChaInfo].ChaStrength>=1
and [ChaInfo].ChaMoney>=(([ChaInfo].ChaStrength)*0)
and Inserted.ChaName=[ChaInfo].ChaName
and Inserted.UserNum=[ChaInfo].UserNum
UPDATE ChaInfo SET [ChaInfo].ChaGuName='RESETFAILED'
From Inserted
Where Inserted.ChaGuName='RESETPOW'
and [ChaInfo].ChaMoney<=50000000
UPDATE ChaInfo SET [ChaInfo].ChaGuName='RESETFAILED'
From Inserted
Where Inserted.ChaGuName='RESETDEX'
and [ChaInfo].ChaMoney<=50000000
UPDATE ChaInfo SET [ChaInfo].ChaGuName='RESETFAILED'
From Inserted
Where Inserted.ChaGuName='RESETINT'
and [ChaInfo].ChaMoney<=50000000
UPDATE ChaInfo SET [ChaInfo].ChaGuName='RESETFAILED'
From Inserted
Where Inserted.ChaGuName='RESETVIT'
and [ChaInfo].ChaMoney<=50000000
UPDATE ChaInfo SET [ChaInfo].ChaGuName='RESETFAILED'
From Inserted
Where Inserted.ChaGuName='RESETSTM'
and [ChaInfo].ChaMoney<=50000000
END
Quote:
Here The Command
RESETPOW
RESETINT
RESETDEX
RESETVIT
RESETSTM
PS. Need gold 50.000.000, If the character dont have enough gold, they can't reset the Stat. ahahahaa. . . LOL. . . :laugh::laugh:
If you got This Error
Quote:
Msg 208, Level 16, State 6, Procedure Amend_AdStat, Line 55
Invalid object name 'dbo.Amend_AdStat'.
Change ALTER to CREATE, Then Execute again.
Enjoy. . . !!! ^_^
Credit To.
- Me. . !!
Based On Thread.
- Yui_Ichigo
- phoenix717
Very Usefull if your CP Don't have Stat Reset Menu, ^_^
Re: [Share] Trigger Stat Reset (No Minus Gold)
anybody can try this trigger??
if 100% Sure
Re: [Share] Trigger Stat Reset (No Minus Gold)
Quote:
Originally Posted by
markjim
anybody can try this trigger??
if 100% Sure
100% working good on my server. . .
u must try it bro. . . :thumbup1::thumbup1:
Re: [Share] Trigger Stat Reset (No Minus Gold)
@mark
just try it!
here @ran online
trial and error! buddy,
Re: [Share] Trigger Stat Reset (No Minus Gold)
error when i run my query
Msg 208, Level 16, State 6, Procedure Amend_AdStat, Line 55
Invalid object name 'dbo.Amend_AdStat'.
Re: [Share] Trigger Stat Reset (No Minus Gold)
Quote:
Originally Posted by
bheybhee2008
error when i run my query
Msg 208, Level 16, State 6, Procedure Amend_AdStat, Line 55
Invalid object name 'dbo.Amend_AdStat'.
That mean you dont have dbo.Amend_AdStat on your DB.
here:
Code:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <DonDonk Cuy,,>
-- Create date: <15-01-10,,>
-- Description: <Stat Reset Trigger Cost 50.000.000,,>
-- =============================================
ALTER TRIGGER [dbo].[Amend_AdStat] ON [dbo].[ChaInfo]
after update
as
BEGIN
. . . . blablabla. .
Change ALTER to CREATE
:thumbup1:
Re: [Share] Trigger Stat Reset (No Minus Gold)
dodonk
try to make an guide how to put a trigger code! =D
this guide will help!
Re: [Share] Trigger Stat Reset (No Minus Gold)
Quote:
Originally Posted by
laklakbangi
dodonk
try to make an guide how to put a trigger code! =D
this guide will help!
I was edit my first post, hope that really give some help. . . .
i don't have any idea about give some tutorial. . . cz i dont know much about english, and where to start the tutorial. . .
forgive me guys. :(::(:
Re: [Share] Trigger Stat Reset (No Minus Gold)
Re: [Share] Trigger Stat Reset (No Minus Gold)
Guys How To Add This on My Database? Sorry For My Noob Question,,, Just A newbie... Thnx
Amend_AdStat
Re: [Share] Trigger Stat Reset (No Minus Gold)
Just Change the Alter into Create to be able to create a table
right..?
Re: [Share] Trigger Stat Reset (No Minus Gold)
ok". . . .
i'll try to make some tutorial about putting the trigger. . .
- Open the MSSQL Management.
- Expand RanGame1
- Expand dbo.ChaInfo
- Right Click on Triggers
- Choose New Triggers...
- Copy And Paste the trigger code On There, Then Press Execute. . .
If You Got
Code:
Msg 208, Level 16, State 6, Procedure Amend_AdStat, Line 55
Invalid object name 'dbo.Amend_AdStat'.
Change ALTER to CREATE
Hope this can help you out . . .
Try it. :thumbup1::thumbup1:
PS: If you done and success with this or got some error again, Please tell to me.
Just want to share to ragezoners, cz i'm nothing without ragezoners". . . LOL. . .:laugh::laugh:
Re: [Share] Trigger Stat Reset (No Minus Gold)
Nice Great Share Clicked Button =D
Re: [Share] Trigger Stat Reset (No Minus Gold)