Kod Tamamen Bana Ait.
- Kod:
[b][b][color=#000000][color=#0000BB]CREATE PROCEDURE [/color][color=#007700][[/color][color=#0000BB]dbo[/color][color=#007700]].[[/color][color=#0000BB]CREATE_KNIGHTS[/color][color=#007700]]
@[/color][color=#0000BB]nRet smallint OUTPUT[/color][color=#007700],
@[/color][color=#0000BB]index smallint[/color][color=#007700],
@[/color][color=#0000BB]nation tinyint[/color][color=#007700],
@[/color][color=#0000BB]community tinyint[/color][color=#007700],
@[/color][color=#0000BB]strName char[/color][color=#007700]([/color][color=#0000BB]21[/color][color=#007700]),
@[/color][color=#0000BB]strChief char[/color][color=#007700]([/color][color=#0000BB]21[/color][color=#007700])
AS
DECLARE @[/color][color=#0000BB]Row tinyint[/color][color=#007700], @[/color][color=#0000BB]knightsindex smallint[/color][color=#007700], @[/color][color=#0000BB]knightsname char[/color][color=#007700]([/color][color=#0000BB]21[/color][color=#007700])
[/color][color=#0000BB]SET [/color][color=#007700]@[/color][color=#0000BB]Row [/color][color=#007700]= [/color][color=#0000BB]0 SET [/color][color=#007700]@[/color][color=#0000BB]knightsindex [/color][color=#007700]= [/color][color=#0000BB]0 SET [/color][color=#007700]@[/color][color=#0000BB]knightsname [/color][color=#007700]= [/color][color=#DD0000]''
[/color][color=#0000BB]SELECT [/color][color=#007700]@[/color][color=#0000BB]Row [/color][color=#007700]= [/color][color=#0000BB]COUNT[/color][color=#007700](*) [/color][color=#0000BB]FROM KNIGHTS WHERE IDNum [/color][color=#007700]= @[/color][color=#0000BB]index [/color][color=#007700]or [/color][color=#0000BB]IDName [/color][color=#007700]= @[/color][color=#0000BB]strName
[/color][color=#007700]IF @[/color][color=#0000BB]Row [/color][color=#007700]> [/color][color=#0000BB]0 [/color][color=#007700]or @[/color][color=#0000BB]index [/color][color=#007700]= [/color][color=#0000BB]0
BEGIN
SET [/color][color=#007700]@[/color][color=#0000BB]nRet [/color][color=#007700]= [/color][color=#0000BB]3
[/color][color=#007700]RETURN
[/color][color=#0000BB]END
[/color][color=#007700]--[/color][color=#0000BB]SELECT [/color][color=#007700]@[/color][color=#0000BB]Row [/color][color=#007700]= [/color][color=#0000BB]COUNT[/color][color=#007700](*) [/color][color=#0000BB]FROM KNIGHTS WHERE IDName [/color][color=#007700]= @[/color][color=#0000BB]strName
[/color][color=#007700]--IF @[/color][color=#0000BB]Row [/color][color=#007700]> [/color][color=#0000BB]0
[/color][color=#007700]-- [/color][color=#0000BB]BEGIN
[/color][color=#007700]-- [/color][color=#0000BB]SET [/color][color=#007700]@[/color][color=#0000BB]nRet [/color][color=#007700]= [/color][color=#0000BB]3
[/color][color=#007700]--RETURN
-- [/color][color=#0000BB]END
[/color][color=#007700]-- [/color][color=#0000BB]EveryBodyFooL İllegal Clan Nickleri Fixed
[/color][color=#007700]IF @[/color][color=#0000BB]strName LIKE [/color][color=#DD0000]'%;%'
[/color][color=#007700]or @[/color][color=#0000BB]strName LIKE [/color][color=#DD0000]'% %'
[/color][color=#007700]or @[/color][color=#0000BB]strName LIKE [/color][color=#DD0000]'% %'
[/color][color=#007700]or @[/color][color=#0000BB]strName LIKE [/color][color=#DD0000]'%:%'
[/color][color=#007700]or @[/color][color=#0000BB]strName LIKE [/color][color=#DD0000]'%%'
[/color][color=#007700]or @[/color][color=#0000BB]strName LIKE [/color][color=#DD0000]'%%'
[/color][color=#007700]or @[/color][color=#0000BB]strName LIKE [/color][color=#DD0000]'%%'
[/color][color=#007700]or @[/color][color=#0000BB]strName LIKE [/color][color=#DD0000]'%%'
[/color][color=#007700]or @[/color][color=#0000BB]strName LIKE [/color][color=#DD0000]'%%'
[/color][color=#007700]or @[/color][color=#0000BB]strName like [/color][color=#DD0000]'%GM%'
[/color][color=#007700]or @[/color][color=#0000BB]strName like [/color][color=#DD0000]'%***'
[/color][color=#007700]or @[/color][color=#0000BB]strName like [/color][color=#DD0000]'***%'
[/color][color=#007700]or @[/color][color=#0000BB]strName like [/color][color=#DD0000]'%fuck%'
[/color][color=#007700]or @[/color][color=#0000BB]strName like [/color][color=#DD0000]'%pich%'
[/color][color=#007700]or @[/color][color=#0000BB]strName like [/color][color=#DD0000]'%p1c%'
[/color][color=#007700]or @[/color][color=#0000BB]strName like [/color][color=#DD0000]'%Sike%'
[/color][color=#007700]or @[/color][color=#0000BB]strName like [/color][color=#DD0000]'%Sikik%'
[/color][color=#007700]or @[/color][color=#0000BB]strName like [/color][color=#DD0000]'%Siki%'
[/color][color=#007700]or @[/color][color=#0000BB]strName like [/color][color=#DD0000]'%orospu%'
[/color][color=#007700]or @[/color][color=#0000BB]strName like [/color][color=#DD0000]'%yarak%'
[/color][color=#007700]or @[/color][color=#0000BB]strName like [/color][color=#DD0000]'%yarrak%'
[/color][color=#007700]or @[/color][color=#0000BB]strName like [/color][color=#DD0000]'%fahise%'
[/color][color=#007700]or @[/color][color=#0000BB]strName LIKE [/color][color=#DD0000]'%zzz%'
[/color][color=#007700]or @[/color][color=#0000BB]strName LIKE [/color][color=#DD0000]'%ooo%'
[/color][color=#007700]or @[/color][color=#0000BB]strName LIKE [/color][color=#DD0000]'%aaa%'
[/color][color=#007700]or @[/color][color=#0000BB]strName LIKE [/color][color=#DD0000]'%eee%'
[/color][color=#007700]or @[/color][color=#0000BB]strName LIKE [/color][color=#DD0000]'%ddd%'
[/color][color=#007700]or @[/color][color=#0000BB]strName LIKE [/color][color=#DD0000]'%fff%'
[/color][color=#007700]or @[/color][color=#0000BB]strName LIKE [/color][color=#DD0000]'%sss%'
[/color][color=#007700]or @[/color][color=#0000BB]strName LIKE [/color][color=#DD0000]'%kkk%'
[/color][color=#007700]or @[/color][color=#0000BB]strName LIKE [/color][color=#DD0000]'%uuu%'
[/color][color=#007700]or @[/color][color=#0000BB]strName LIKE [/color][color=#DD0000]'***%'
[/color][color=#007700]or @[/color][color=#0000BB]strName LIKE [/color][color=#DD0000]'%***'
[/color][color=#007700]or @[/color][color=#0000BB]strName LIKE [/color][color=#DD0000]'%333%'
[/color][color=#007700]or @[/color][color=#0000BB]strName LIKE [/color][color=#DD0000]'%111%'
[/color][color=#007700]or @[/color][color=#0000BB]strName LIKE [/color][color=#DD0000]'%222%'
[/color][color=#007700]or @[/color][color=#0000BB]strName LIKE [/color][color=#DD0000]'%xxxx%'
[/color][color=#007700]or @[/color][color=#0000BB]strName LIKE [/color][color=#DD0000]'%!_!_%' [/color][color=#0000BB]escape [/color][color=#DD0000]'!'
[/color][color=#0000BB]BEGIN
ROLLBACK TRAN
SET [/color][color=#007700]@[/color][color=#0000BB]nRet [/color][color=#007700]= [/color][color=#0000BB]3
[/color][color=#007700]RETURN
[/color][color=#0000BB]END
[/color][color=#007700]else
[/color][color=#0000BB]BEGIN TRAN
INSERT INTO KNIGHTS [/color][color=#007700]( [/color][color=#0000BB]IDNum[/color][color=#007700], [/color][color=#0000BB]Nation[/color][color=#007700], [/color][color=#0000BB]Flag[/color][color=#007700], [/color][color=#0000BB]IDName[/color][color=#007700], [/color][color=#0000BB]Chief [/color][color=#007700])
[/color][color=#0000BB]VALUES [/color][color=#007700](@[/color][color=#0000BB]index[/color][color=#007700], @[/color][color=#0000BB]nation[/color][color=#007700], @[/color][color=#0000BB]community[/color][color=#007700], @[/color][color=#0000BB]strName[/color][color=#007700], @[/color][color=#0000BB]strChief [/color][color=#007700])
[/color][color=#0000BB]INSERT INTO KNIGHTS_USER [/color][color=#007700]( [/color][color=#0000BB]sIDNum[/color][color=#007700], [/color][color=#0000BB]strUserID [/color][color=#007700])
[/color][color=#0000BB]VALUES [/color][color=#007700](@[/color][color=#0000BB]index[/color][color=#007700], @[/color][color=#0000BB]strChief [/color][color=#007700])
IF @@[/color][color=#0000BB]ERROR [/color][color=#007700]<> [/color][color=#0000BB]0
BEGIN
ROLLBACK TRAN
SET [/color][color=#007700]@[/color][color=#0000BB]nRet [/color][color=#007700]= [/color][color=#0000BB]6
[/color][color=#007700]RETURN
[/color][color=#0000BB]END
[/color][color=#007700]-- [/color][color=#0000BB]UPDATE USERDATA SET Knights [/color][color=#007700]= @[/color][color=#0000BB]index[/color][color=#007700], [/color][color=#0000BB]Fame [/color][color=#007700]= [/color][color=#0000BB]1 WHERE strUserId [/color][color=#007700]= @[/color][color=#0000BB]strChief [/color][color=#007700]-- [/color][color=#0000BB]1 [/color][color=#007700]== [/color][color=#0000BB]Chief Authority
[/color][color=#007700]IF @@[/color][color=#0000BB]ERROR [/color][color=#007700]<> [/color][color=#0000BB]0
BEGIN
ROLLBACK TRAN
SET [/color][color=#007700]@[/color][color=#0000BB]nRet [/color][color=#007700]= [/color][color=#0000BB]6
[/color][color=#007700]RETURN
[/color][color=#0000BB]END
COMMIT TRAN
SET [/color][color=#007700]@[/color][color=#0000BB]nRet [/color][color=#007700]= [/color][color=#0000BB]0
GO
[/color][/color][/b][/b]