Selamlar







1 lvl Charları Clanlardan Cıkarmak









Kod:

update userdata set Knights = '0'where Level = '1'

1 Kere Irk Seçme









Kod:

@nRet smallint OUTPUT



AS





DECLARE @Nation tinyint, @CharNum smallint

SET @Nation = 0

SET @CharNum = 0



DECLARE @pwd varchar(13)



SET @pwd = null



SELECT @pwd = strPasswd FROM [dbo].[TB_USER] WHERE strAccountID = @AccountID

IF @pwd IS null

BEGIN

SET @nRet = 0

RETURN

END



ELSE IF @pwd @Password

BEGIN

SET @nRet = 0

RETURN

END



SELECT @Nation = bNation, @CharNum = bCharNum FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID

IF @@ROWCOUNT = 0

BEGIN

SET @nRet = 1

RETURN

END

IF @CharNum = 0

BEGIN

SET @nRet = 1

RETURN

END

ELSE

BEGIN

SET @nRet = @Nation+1

RETURN

END

GO

Castle Siege War Kodu









Kod:

CREATE PROCEDURE UPDATE_SIAGE

@sCastleIndex smallint,

@sKnightsIndex smallint,

@byWarType tinyint,

@byWarDay tinyint,

@byWarTime tinyint,

@byWarMinute tinyint



AS

BEGIN

UPDATE KNIGHTS_SIEGE_WARFARE SET bySiegeType = @byWarType,

byWarDay = @byWarDay, byWarTime = @byWarTime, byWarMinute = @byWarMinute,

sChallengeList_1 = sMasterKnights, sChallengeList_2 = @sKnightsIndex, sChallengeList_3 = 0,

sChallengeList_4 = 0, sChallengeList_5 = 0, sChallengeList_6 = 0,

sChallengeList_7 = 0, sChallengeList_8 = 0, sChallengeList_9 = 0, sChallengeList_10 = 0

WHERE sCastleIndex = @sCastleIndex

END

GO

IIIlll Gibi Charları Oyuna Almama







Şimdi CRATE_NEW_CHAR prosedürüne gir.Aşağıdaki kodu bul..









Kod:

BEGIN TRAN

IF @index = 0

UPDATE ACCOUNT_CHAR SET strCharID1 = @CharID, bCharNum = bCharNum + 1 WHERE strAccountID = @AccountID

ELSE IF @index = 1

UPDATE ACCOUNT_CHAR SET strCharID2 = @CharID, bCharNum = bCharNum + 1 WHERE strAccountID = @AccountID

ELSE IF @index = 2

UPDATE ACCOUNT_CHAR SET strCharID3 = @CharID, bCharNum = bCharNum + 1 WHERE strAccountID = @AccountID

ELSE IF @index = 3

UPDATE ACCOUNT_CHAR SET strCharID4 = @CharID, bCharNum = bCharNum + 1 WHERE strAccountID = @AccountID

ELSE IF @index = 4

UPDATE ACCOUNT_CHAR SET strCharID5 = @CharID, bCharNum = bCharNum + 1 WHERE strAccountID = @AccountID

2. Adım:







1. Adımdaki kodun hemen üstüne aşağıdaki kodu yapıştır tamamdır!..









Kod:

DECLARE @Muhammeth varchar(250)

-- fnck

-- IlIl karakteri,açtırma ve banla..

-- bu kod Myst'ınkinden bayaa değişik..

select @ozal = strUserID from USERDATA where strUserID = @CharID

if @ozal like '%IlIlIl%'

begin

update userdata set authority ='255' where strUserID = @CharID --burda banlasın

Set @nRet = 0 --burdada oyuna sokmasın

end

Irk Değiştirme Kodları









Kod:

CREATE PROCEDURE [dbo].[ACCOUNT_NATION_CHANGE]

@strAccountID as varchar(40),

@Nation as tinyint

AS



DECLARE @strNation tinyint,@Class int,@Race int,@strCharID1 char(21), @strCharID2 char(21), @strCharID3 char(21)



SELECT @strNation = bNation,@strCharID1 = strCharID1,@strCharID2 = strCharID2,@strCharID3 = strCharID3 FROM ACCOUNT_CHAR WHERE strAccountID = @strAccountID



SET @Class = null

SET @Race = null



IF @Nation = 1 and @strNation = 2

BEGIN

SELECT @Class = Class,@Race = Race FROM USERDATA WHERE strUserID = @strCharID1

IF @Class = 201 OR @Class = 205 OR @Class = 206

BEGIN

SET @Race = 1

END



IF @Class = 202 OR @Class = 207 OR @Class = 208

BEGIN

SET @Race = 2

END



IF @Class = 203 OR @Class = 209 OR @Class = 210

BEGIN

SET @Race = 3

END



IF @Class = 204 OR @Class = 211 OR @Class = 211

BEGIN

IF @Race = 12

BEGIN

SET @Race = 4

END

ELSE

BEGIN

SET @Race = 2

END

END

UPDATE USERDATA SET Nation = @Nation,Race = @Race,Class = @Class - 100 WHERE strUserID = @strCharID1

DELETE FROM KNIGHTS_USER WHERE strUserID = @strCharID1





SELECT @Class = Class,@Race = Race FROM USERDATA WHERE strUserID = @strCharID2

IF @Class = 201 OR @Class = 205 OR @Class = 206

BEGIN

SET @Race = 1

END



IF @Class = 202 OR @Class = 207 OR @Class = 208

BEGIN

SET @Race = 2

END



IF @Class = 203 OR @Class = 209 OR @Class = 210

BEGIN

SET @Race = 3

END



IF @Class = 204 OR @Class = 211 OR @Class = 211

BEGIN

IF @Race = 12

BEGIN

SET @Race = 4

END

ELSE

BEGIN

SET @Race = 2

END

END

UPDATE USERDATA SET Nation = @Nation,Race = @Race,Class = @Class - 100 WHERE strUserID = @strCharID2

DELETE FROM KNIGHTS_USER WHERE strUserID = @strCharID2



SELECT @Class = Class,@Race = Race FROM USERDATA WHERE strUserID = @strCharID3

IF @Class = 201 OR @Class = 205 OR @Class = 206

BEGIN

SET @Race = 1

END



IF @Class = 202 OR @Class = 207 OR @Class = 208

BEGIN

SET @Race = 2

END



IF @Class = 203 OR @Class = 209 OR @Class = 210

BEGIN

SET @Race = 3

END



IF @Class = 204 OR @Class = 211 OR @Class = 211

BEGIN

IF @Race = 12

BEGIN

SET @Race = 4

END

ELSE

BEGIN

SET @Race = 2

END

END

UPDATE USERDATA SET Nation = @Nation,Race = @Race,Class = @Class - 100 WHERE strUserID = @strCharID3

DELETE FROM KNIGHTS_USER WHERE strUserID = @strCharID3



UPDATE ACCOUNT_CHAR SET bNation = @Nation WHERE strAccountID = @strAccountID

END



IF @Nation = 2 and @strNation = 1

BEGIN



SELECT @Class = Class,@Race = Race FROM USERDATA WHERE strUserID = @strCharID1

IF @Class = 101 OR @Class = 105 OR @Class = 106

BEGIN

SET @Race = 12

END



IF @Class = 102 OR @Class = 107 OR @Class = 108

BEGIN

SET @Race = 12

END



IF @Class = 103 OR @Class = 109 OR @Class = 110

BEGIN

SET @Race = 12

END



IF @Class = 104 OR @Class = 111 OR @Class = 111

BEGIN

IF @Race = 4

BEGIN

SET @Race = 12

END

ELSE

BEGIN

SET @Race = 13

END

END

UPDATE USERDATA SET Nation = @Nation,Race = @Race,Class = @Class + 100 WHERE strUserID = @strCharID1

DELETE FROM KNIGHTS_USER WHERE strUserID = @strCharID1



SELECT @Class = Class,@Race = Race FROM USERDATA WHERE strUserID = @strCharID2

IF @Class = 101 OR @Class = 105 OR @Class = 106

BEGIN

SET @Race = 12

END



IF @Class = 102 OR @Class = 107 OR @Class = 108

BEGIN

SET @Race = 12

END



IF @Class = 103 OR @Class = 109 OR @Class = 110

BEGIN

SET @Race = 12

END



IF @Class = 104 OR @Class = 111 OR @Class = 111

BEGIN

IF @Race = 4

BEGIN

SET @Race = 12

END

ELSE

BEGIN

SET @Race = 13

END

END

UPDATE USERDATA SET Nation = @Nation,Race = @Race,Class = @Class + 100 WHERE strUserID = @strCharID2

DELETE FROM KNIGHTS_USER WHERE strUserID = @strCharID2



SELECT @Class = Class,@Race = Race FROM USERDATA WHERE strUserID = @strCharID3

IF @Class = 101 OR @Class = 105 OR @Class = 106

BEGIN

SET @Race = 12

END



IF @Class = 102 OR @Class = 107 OR @Class = 108

BEGIN

SET @Race = 12

END



IF @Class = 103 OR @Class = 109 OR @Class = 110

BEGIN

SET @Race = 12

END



IF @Class = 104 OR @Class = 111 OR @Class = 111

BEGIN

IF @Race = 4

BEGIN

SET @Race = 12

END

ELSE

BEGIN

SET @Race = 13

END

END

UPDATE USERDATA SET Nation = @Nation,Race = @Race,Class = @Class + 100 WHERE strUserID = @strCharID3

DELETE FROM KNIGHTS_USER WHERE strUserID = @strCharID3



UPDATE ACCOUNT_CHAR SET bNation = @Nation WHERE strAccountID = @strAccountID

END

GO

DİKKAT ALTTAKİNİ EKLEMEYİN







Exec ACCOUNT_NATION_CHANGE 'Oyuna Giriş ID'si','ORC : 1 Human 2'



İsim Değiştirme Kodları









Kod:

GO

/****** Object: StoredProcedure [dbo].[ACCOUNT_CHAR_NAME_CHANGE] Script Date: 06/10/2008 04:12:14 ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE procedure [dbo].[ACCOUNT_CHAR_NAME_CHANGE]

(@strOldUserId varchar(30),@StrNewUserId varchar(30))

AS

DECLARE @strCheckOldUserID varchar(30),@strCheckNewUserID varchar(30)

BEGIN TRAN

SELECT @strCheckOldUserID = Count(strUserId) FROM USERDATA WHERE strUserId = @strOldUserId

IF @strCheckOldUserID = 0

BEGIN

PRINT 'Veritabanında ' + @strOldUserId + ' Adında Karakter Bulunamadı.'

END

ELSE

BEGIN

SELECT @strCheckNewUserID = Count(strUserId) FROM USERDATA WHERE strUserId = @StrNewUserId

IF @strCheckNewUserID = 0

BEGIN

UPDATE ACCOUNT_CHAR set strCharID1 = @StrNewUserId WHERE strCharID1 = @strOldUserId

UPDATE ACCOUNT_CHAR set strCharID2 = @StrNewUserId WHERE strCharID2 = @strOldUserId

UPDATE ACCOUNT_CHAR set strCharID3 = @StrNewUserId WHERE strCharID3 = @strOldUserId

UPDATE USERDATA SET strUserId = @StrNewUserId WHERE strUserId = @strOldUserId

UPDATE KNIGHTS_USER SET strUserId = @StrNewUserId WHERE strUserId = @strOldUserId

UPDATE KNIGHTS SET Chief = @StrNewUserId WHERE Chief = @strOldUserId

UPDATE KNIGHTS SET ViceChief_1 = @StrNewUserId WHERE ViceChief_1 = @strOldUserId

UPDATE KNIGHTS SET ViceChief_2 = @StrNewUserId WHERE ViceChief_2 = @strOldUserId

UPDATE KNIGHTS SET ViceChief_3 = @StrNewUserId WHERE ViceChief_3 = @strOldUserId

UPDATE KING_SYSTEM SET strKingName = @StrNewUserId WHERE strKingName = @strOldUserId

UPDATE KING_ELECTION_LIST SET strName = @StrNewUserId WHERE strName = @strOldUserId

PRINT @strOldUserId + ' Olan Karakter Adı ' + @strNewUserId + ' Olarak Değiştirilmiştir.'

END

ELSE

BEGIN

PRINT @StrNewUserId + ' Karakter Adı Kullanımdadır, Lütfen Başka Bir Karakter Adı Yazınız.'

END

END



Kod:

Exec NameChange 'EskiIsim', 'YeniIsim'

Alıntı + Düzenleme