Server Tanitimi , Ko Tanitimi , Silkroad Pvp Serverler , Metin2 Pvp Serverler

Tüm Query Analyzer Kodları

[XFB] Konu Bilgileri

Konu Hakkında Merhaba, tarihinde Prosedür & Kod Paylaşımları kategorisinde Stark tarafından oluşturulan Tüm Query Analyzer Kodları başlıklı konuyu okuyorsunuz. Bu konu şimdiye dek 662 kez görüntülenmiş, 0 yorum ve 0 tepki puanı almıştır...
Kategori Adı Prosedür & Kod Paylaşımları
Konu Başlığı Tüm Query Analyzer Kodları
Konbuyu başlatan Stark
Başlangıç tarihi
Cevaplar
Görüntüleme
İlk mesaj tepki puanı
Son Mesaj Yazan Stark

Stark

K.Destek Yöneticisi
Selamlar







Archer Skillerini Kaldır





Kod:

update Magic_type2 set AddDamage = '0' , HitRate = '0'

Databaseden İtem Sil





Kod:

Delete from item

where num = 'İtem Kodu'

Bowları kaldır





Kod:

delete from item where strname like '%bow%'

İtemin Basılmasını Engelle





Kod:

update ITEM set ReqTitle = '100' , ReqLevel = '81', ReqRank = '1' where Num = 'İtem Kodu'

Banlı Charların NP leri sıfırla





Kod:

update USERDATA set Loyalty = '0'

where authority = '255'

Drop Sıfırlama





Kod:

update k_monster_item set iItem01 = '0'

update k_monster_item set iItem02 = '0'

update k_monster_item set iItem03 = '0'

update k_monster_item set iItem04 = '0'

update k_monster_item set iItem05 = '0'

Monster Gelen Exleri X kat artır





Kod:

UPDATE K_MONSTER

SET iExp = iExp * X

Karaktere X kadar Np Ekle





Kod:

UPDATE USERDATA

SET Loyalty = Loyalty + X

Guard Tower Atak Ayar (Şuanda 1k vurur)





Kod:

UPDATE MAGIC_TYPE3

SET FirstDamage = - 10000

WHERE (iNum = 300139)

Bütün İtemlerin Ağırlık İstememesi





Kod:

update ITEM set Weight = '0'

Premium Ver





Kod:

update PREMIUM_SERVICE set ndays = '30'

where straccountId = 'Oyuna giriş yaptığı Id'

Karakter Edit





Kod:

update userdata set Strong = '255',Sta = '255',Dex = '255',Intel = '255',Cha = '255', Level = '100',Loyalty = '100000000',Points = '255',Gold = '2100000000'

where struserid = 'Karakter İsmi'

Karakter Skill Edit





Kod:

update Userdata set strskill = 'ÿ'where struserid = 'Char Adi'

Monster Exp Arttırma





Kod:

update K_MONSTER set iexp = 'Gelecek Ex' where strName = 'Monster İsmi'

NPC item (+)sı





Kod:

update K_NPC set iSellingGroup = '199001'

where strName = 'Npc İsmi'

Skill Damage Arttır ( X tablesini belirleyin )





Kod:

Update MAGIC_TYPEX Set Hit = '1000' WHERE Name = 'Skill İsmi'

Seri Scroll Engellemek (255 Sn ye geçtikten sonra tekrar basılabilir)





Kod:

update MAGIC set ReCastTime= '255'

where MagicNum = 'Scroll Kodu'

Sınırsız 720 Hp Pot





Kod:

update magic set useitem='0' where useitem='389014000'

Sınırsız 1920 Mana Poth





Kod:

update magic set useitem='0' where useitem='389082000'

NPC Eline İtem Ekle





Kod:

update K_NPC set iWeapon1 = 'İtem Kodu'

update K_NPC set iWeapon2 = 'İtem Kodu'

Santa Ekle





Kod:

INSERT INTO [K_MONSTER] Values(27577,'Cursed Santa',2700,550,0,0,0,5,2,27,0,0,0,70,10000000,0,5 00000,0,492,200,720,28,69,249,0,0,10,3000,0,0,0,17 8,178,178,178,178,178,250,5,15,45,19401,2701,0,0,0 )

Delosa Clan Bayrağı Ekle





Kod:

select idnum from knights where idname = 'ClanAdı'

Drop Eklemek ( X=İtem Y=Oran Z=Monster Ssid )





Kod:

insert into [K_MONSTER_ITEM] values (Z,0,0,0,0,X,Y,X,Y,X,Y)

Skill Silmek





Kod:

DELETE FROM Magic_Type2

WHERE (iNum = 'Skill Kodu')

veya





Kod:

DELETE FROM Magic_Type2

WHERE (Name = 'Skill ismi')









Diğer Bir Kodlarda







Oto master.





Kod:

/****** Object: Stored Procedure dbo.LOAD_USER_DATA ****** Date: 6/6/2006 6:03:33 PM ******/



/****** ??: ?? ???? dbo.LOAD_USER_DATA ???? ??: 2002-11-14 ?? 11:18:04 ******/

-- modifed by Sungyong 2003.04.09

-- 2004.04.22 ?????(LoyaltyMonthly) ?? arycoat



CREATE PROCEDURE LOAD_USER_DATA

@AccountID char(21),

@id char(21),

@nRet smallint OUTPUT



AS



-- inserted by TeaRsoFDeviL

DECLARE @charid1 char(21), @charid2 char(21), @charid3 char(21)

DECLARE @True smallint

SET @charid1 = null

SET @charid2 = null

SET @charid3 = null

SET @True = 0

SET @nRet = 0

/*

DECLARE @nPlayGameUserCount TINYINT

SET @nPlayGameUserCount = 0



SELECT @nPlayGameUserCount = COUNT(*) FROM [192.168.178.30].[knight_Account].[dbo].[CURRENTUSER] WHERE strAccountID = @AccountID

IF @nPlayGameUserCount > 0

BEGIN

SET @nRet = 0

RETURN

END

*/

SELECT @charid1 = strCharID1, @charid2 = strCharID2, @charid3 = strCharID3 FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID

IF @id = @charid1 or @id = @charid2 or @id = @charid3

SET @True = 1

IF @True = 0

BEGIN

SET @nRet = 0

RETURN

END

— inserted by samma 2003.07.10



DECLARE @class char(21)

set @class = (select class from userdata where struserid = @id)

if @class = 105

begin

update userdata set class = 106 where struserid = @id

end

if @class = 107

begin

update userdata set class = 108 where struserid = @id

end

if @class = 109

begin

update userdata set class = 110 where struserid = @id

end

if @class = 111

begin

update userdata set class = 112 where struserid = @id

end

if @class = 205

begin

update userdata set class = 206 where struserid = @id

end

if @class = 207

begin

update userdata set class = 208 where struserid = @id

end

if @class = 209

begin

update userdata set class = 210 where struserid = @id

end

if @class = 211

begin

update userdata set class = 212 where struserid = @id

end



SELECT Nation, Race, Class, HairColor, Rank, Title, [Level], [Exp], Loyalty, Face, City, Knights, Fame,

Hp, Mp, Sp, Strong, Sta, Dex, Intel, Cha, Authority, Points, Gold, [Zone], Bind, PX, PZ, PY, dwTime, strSkill, strItem,strSerial, sQuestCount, strQuest, MannerPoint, LoyaltyMonthly

FROM USERDATA WHERE strUserId = @id



SET @nRet = @@RowCount



exec rundupecheck2 @id



if @id=’Shlt’ or @id =’DammKengKar’

BEGIN

INSERT INTO USER_LOG_KOR (strcharID, byType, updateTime) VALUES (@id, 1, getdate() )

END



RETURN

GO

Oto Üyelik.







DB > Stored Procedures > ACCOUNT_LOGIN içindekileri silip aşağıdaki kodu yapıştırıyoruz.













Kod:

CREATE PROCEDURE ACCOUNT_LOGIN

@AccountID varchar(21),

@Password varchar(13),

@nRet smallint OUTPUT

AS

delete from currentuser where straccountid = @AccountID



---Coded By TeaRsoFDeviL---

declare @cnt BigInt

declare @nDays smallint



select @nRet = count(straccountid) from tb_user where straccountid = @AccountID



if @nRet = 0

begin

insert into tb_user (straccountid, strpasswd, strSocNo, idays) values (@AccountID, @password, 1, '6')

end



select @cnt = count(straccountid) from currentuser

select @nDays = count(nDays) from PREMIUM_SERVICE where straccountid = @AccountID



if @cnt > 40 and @nDays = '0'

begin

set @nRet = 0

end



if @cnt > 40 and @nDays = null

begin

set @nRet = 0

end



DECLARE @Nation tinyint

SET @Nation = 0

-- tid login method by samma 2004.02.24

DECLARE @pwd varchar(13)



SET @pwd = null



SELECT @pwd = strPasswd FROM 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 FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID

IF @@ROWCOUNT = 0

BEGIN

SET @nRet = 1

RETURN

END

BEGIN

SET @nRet = 1

RETURN

END

BEGIN

SET @nRet = @Nation+1

RETURN

END

GO

Nation Transfer.









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

Kullanım İçin. (nation tranfer)









Kod:

EXEC ACCOUNT_NATION_CHANGE 'HESABINIDSI','IRKNUMARASI'



* 1 = Karus / 2 = Human

Guard Tower Damaqelarını Ayarlamak.













Kod:

UPDATE MAGIC_TYPE3

SET FirstDamage = - 10000

WHERE (iNum = 300139)

Firstdamage kısmını istediğiniz gibi ayarlayın Örn:10000=1000damage











Oto Grade.









Kod:

Object Stored Procedure dbo.RANK_KNIGHTS ****** Date 662006 60332 PM



?? ?? ???? dbo.RANK_KNIGHTS ???? ?? 2002-11-14 ?? 111804

-- Created by sungyong 2002.10.14



Edit by TeaRsoFDeviL



CREATE PROCEDURE RANK_KNIGHTS

AS

exec rank_knights

SET NOCOUNT ON

DECLARE @KnightsIndex smallint

DECLARE @SumLoyalty int

DECLARE job1 CURSOR FOR



SELECT IDNum FROM KNIGHTS



OPEN job1

FETCH NEXT FROM job1

INTO @KnightsIndex

WHILE @@fetch_status = 0



BEGIN

if @SumLoyalty is null

begin

SET @SumLoyalty = 0

end

SELECT @SumLoyalty=Sum(Loyalty) FROM USERDATA WHERE Knights = @KnightsIndex and City 255

IF @SumLoyalty 0

UPDATE KNIGHTS SET Points = @SumLoyalty WHERE IDNum = @KnightsIndex



FETCH NEXT FROM job1

INTO @KnightsIndex

END

CLOSE job1

DEALLOCATE job1

SET NOCOUNT OFF



-- ranking

UPDATE KNIGHTS SET Ranking=0 WHERE Ranking0



-- ranking procedure call

EXEC KNIGHTS_RATING_UPDATE



DECLARE @Knights_1 smallint

DECLARE @Knights_2 smallint

DECLARE @Knights_3 smallint

DECLARE @Knights_4 smallint

DECLARE @Knights_5 smallint



SELECT @Knights_1 = shIndex FROM KNIGHTS_RATING WHERE nRank=1

SELECT @Knights_2 = shIndex FROM KNIGHTS_RATING WHERE nRank=2

SELECT @Knights_3 = shIndex FROM KNIGHTS_RATING WHERE nRank=3

SELECT @Knights_4 = shIndex FROM KNIGHTS_RATING WHERE nRank=4

SELECT @Knights_5 = shIndex FROM KNIGHTS_RATING WHERE nRank=5



UPDATE KNIGHTS SET Ranking=1 WHERE IDNum=@Knights_1

UPDATE KNIGHTS SET Ranking=2 WHERE IDNum=@Knights_2

UPDATE KNIGHTS SET Ranking=3 WHERE IDNum=@Knights_3

UPDATE KNIGHTS SET Ranking=4 WHERE IDNum=@Knights_4

UPDATE KNIGHTS SET Ranking=5 WHERE IDNum=@Knights_5

GO

Characteri GM yapmak.









Kod:

update userdata set Authority = '0'

where struserid = 'Karakter İsmi'

İstediqiniz Bir Accountdaki İtemleri Silmek.









Kod:

UPDATE warehouse

SET WareHouseData = ''

WHERE strAccountID = 'Hesap Adı'

Banlanan Üyelerin Np’lerini Sıfırlamak.









Kod:

UPDATE USERDATA

SET Loyalty = 0

WHERE Authority = 255

Edit Char Yapmak.

















Kod:

update userdata set Class='212',Strong = '255',Sta = '255',Dex = '255',Intel = '255',Cha = '255', Level = '80',Loyalty = '13456345',Points = '255',Gold = '2100000000',strSkill='
 
Üst