Knight Online Başlangıç İtem Npcsi 18xx 19xx 20xx Sürümlerde Geçerli.
Başlangıç İtem Npcsi Luasını Açıp Dilediğiniz Gibi Vereceği İtemleri Değiştirebilirsiniz.
Link
18xx, 19xx, 20xx, Başlangıc İtemleri Değiştirmek İsteyenler
Kod:
CREATE_NEW_CHAR Procedürü
USE [kn_online]
GO
/****** Object: StoredProcedure [dbo].[CREATE_NEW_CHAR] Script Date: 09.09.2013 22:01:54 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[CREATE_NEW_CHAR]
@nRet smallint OUTPUT,
@AccountID varchar(21),
@index tinyint,
@CharID varchar(21),
@Race tinyint,
[MENTION=2874]class[/MENTION] smallint,
@Hair int,
@Face tinyint,
@Str tinyint,
@Sta tinyint,
@Dex tinyint,
@Intel tinyint,
@Cha tinyint
AS
DECLARE @Row tinyint, @Nation tinyint, [MENTION=2982]zone[/MENTION] tinyint, @PosX int, @PosZ int, @PosY int
SET @Row = 0 SET @Nation = 0 SET [MENTION=2982]zone[/MENTION] = 21 SET @PosX = 0 SET @PosZ = 0 SET @PosY = 0
SELECT @PosX = InitX, @PosZ = InitZ, @PosY = InitY from ZONE_INFO where ZoneNo = 21
SELECT @Nation = bNation, @Row = bCharNum FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID
IF @Row >= 3 SET @nRet = 1
IF @Nation = 1 AND @Race > 10 SET @nRet = 2
ELSE IF @Nation = 2 AND @Race < 10 SET @nRet = 2
ELSE IF @Nation <>1 AND @Nation <> 2 SET @nRet = 2
IF @nRet > 0
RETURN
SELECT @Row = COUNT(*) FROM USERDATA WHERE strUserId = @CharID
IF @Row > 0
BEGIN
SET @nRet = 3
RETURN
END
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
BEGIN
ROLLBACK TRAN
RETURN
END
INSERT INTO USERDATA (strUserId, Nation, Race, Class, HairRGB, Face, Strong, Sta, Dex, Intel, Cha, Zone, PX, PZ)
VALUES (@CharID, @Nation, @Race, [MENTION=2874]class[/MENTION], @Hair, @Face, @Str, @Sta, @Dex, @Intel, @Cha, [MENTION=2982]zone[/MENTION], @PosX, @PosZ)
/* Başlangıç İtemleri */
/*DECLARE @bClass tinyint
SET @bClass = SUBSTRING(RTRIM(LTRIM(STR [MENTION=2874]class[/MENTION]))),3,1)
DECLARE @bLevel int
DECLARE @bExp bigint
DECLARE @bStrong smallint
DECLARE @bDex smallint
DECLARE @bIntel smallint
DECLARE @bCha smallint
DECLARE @bSta smallint
DECLARE @bSkill varchar(10)
DECLARE @bGold int
DECLARE @bstrItem binary(584)
DECLARE @bWarehouseData binary(1536)
DECLARE @bLoyalty int
DECLARE @bPoints smallint
SELECT @bLevel = Level, @bExp = Exp,@bStrong = Strong,@bDex = Dex, @bIntel = Intel, @bCha = Cha, @bSta = Sta,@bSkill = Skill,@bGold = Gold, @bstrItem = strItem,@bWarehouseData = WarehouseData, @bLoyalty = Loyalty,@bPoints = Points FROM BEGINNER_ITEM WHERE Class = @bClass
IF @bStrong = 0 SET @bStrong = @Str
IF @bDex = 0 SET @bDex = @Dex
IF @bIntel = 0 SET @bIntel = @Intel
IF @bCha = 0 SET @bCha = @Cha
IF @bSta = 0 SET @bSta = @Sta
UPDATE USERDATA SET Level = @bLevel,Exp = @bExp,Strong = @bStrong,Dex = @bDex,Intel = @bIntel,Cha = @bCha,Sta = @bSta,strSkill = @bSkill,Gold = @bGold,strItem = @bstrItem,Loyalty = @bLoyalty,Points = @bPoints WHERE strUserId = @CharID
UPDATE WAREHOUSE SET WarehouseData = @bWarehouseData WHERE strAccountID = @AccountID
UPDATE USERDATA SET Class = Class + 5 WHERE strUserId = @CharID AND @bClass = 1
UPDATE USERDATA SET Class = Class + 6 WHERE strUserId = @CharID AND @bClass = 2
UPDATE USERDATA SET Class = Class + 7 WHERE strUserId = @CharID AND @bClass = 3
UPDATE USERDATA SET Class = Class + 8 WHERE strUserId = @CharID AND @bClass = 4
/* Başlangıç İtemleri */*/
exec GIVE_BEGINNER_ITEM @CharID
IF @@ERROR <> 0
BEGIN
ROLLBACK TRAN
SET @nRet = 4
RETURN
END
COMMIT TRAN
SET @nRet = 0
Kod:
IF EXISTS (SELECT * FROM [dbo].[sysobjects] WHERE id = object_id(N'[dbo].[BEGINNER_ITEM]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
DROP TABLE [dbo].[BEGINNER_ITEM]
GO
Kod:
IF EXISTS (SELECT * FROM [dbo].[sysobjects] WHERE id = object_id(N'[dbo].[GIVE_BEGINNER_ITEM]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[GIVE_BEGINNER_ITEM]
GO
Kod:
CREATE TABLE [dbo].[BEGINNER_ITEM](
[iClass] [smallint] NOT NULL,
[strClass] [char](10) NULL,
[Gold] [bigint] NOT NULL,
[strItem] [varchar](1200) NULL,
[strItem1] [binary](1200) NULL
) ON [PRIMARY]
GO
Kod:
INSERT INTO [BEGINNER_ITEM] VALUES ( 1, 'Warrior', 0, ':ø~',NULL);
INSERT INTO [BEGINNER_ITEM] VALUES ( 2, 'Rogue', 0, ':ø~',NULL );
INSERT INTO [BEGINNER_ITEM] VALUES ( 3, 'Magician', 0, ':ø~',NULL );
INSERT INTO [BEGINNER_ITEM] VALUES ( 4, 'Priest', 0, ':ø~',NULL );
UPDATE BEGINNER_ITEM SET strItem1 = CONVERT(binary(600), strItem)
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
Kod:
CREATE PROCEDURE [dbo].[GIVE_BEGINNER_ITEM]
@strUserId varchar(21)
AS
BEGIN
DECLARE [MENTION=2874]class[/MENTION] smallint
SELECT [MENTION=2874]class[/MENTION] = Cast(SubString(Cast(Class as varchar(3)), 2, 2) as smallint) FROM USERDATA WHERE strUserId = @strUserId
IF [MENTION=2874]class[/MENTION] = 1 OR [MENTION=2874]class[/MENTION] = 5 OR [MENTION=2874]class[/MENTION] = 6
SET [MENTION=2874]class[/MENTION] = 1
IF [MENTION=2874]class[/MENTION] = 2 OR [MENTION=2874]class[/MENTION] = 7 OR [MENTION=2874]class[/MENTION] = 8
SET [MENTION=2874]class[/MENTION] = 2
IF [MENTION=2874]class[/MENTION] = 3 OR [MENTION=2874]class[/MENTION] = 9 OR [MENTION=2874]class[/MENTION] = 10
SET [MENTION=2874]class[/MENTION] = 3
IF [MENTION=2874]class[/MENTION] =4 OR [MENTION=2874]class[/MENTION] = 11 OR [MENTION=2874]class[/MENTION] = 12
SET [MENTION=2874]class[/MENTION] = 4
UPDATE USERDATA SET strItem = (SELECT strItem1 FROM BEGINNER_ITEM WHERE iClass = [MENTION=2874]class[/MENTION]), Gold = (SELECT Gold FROM BEGINNER_ITEM WHERE iClass = [MENTION=2874]class[/MENTION]) WHERE strUserId = @strUserId
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
Uygulamanız Gerekmektedir..
Editörle Itemi Eklediniz Son Olarak REST Atarmış gibi Bu Kodu Uygulamanız Gerekmektedir..
İçerik Açılmıştır Teşekkürler
Kod:
UPDATE BEGINNER_ITEM SET strItem1 = CONVERT(binary(600), strItem)
Son Olarak
Rogue Baslangıc
Priest Başalangıç
Başlangıç İtem Npcsi Luasını Açıp Dilediğiniz Gibi Vereceği İtemleri Değiştirebilirsiniz.
Link
18xx, 19xx, 20xx, Başlangıc İtemleri Değiştirmek İsteyenler
Kod:
CREATE_NEW_CHAR Procedürü
USE [kn_online]
GO
/****** Object: StoredProcedure [dbo].[CREATE_NEW_CHAR] Script Date: 09.09.2013 22:01:54 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[CREATE_NEW_CHAR]
@nRet smallint OUTPUT,
@AccountID varchar(21),
@index tinyint,
@CharID varchar(21),
@Race tinyint,
[MENTION=2874]class[/MENTION] smallint,
@Hair int,
@Face tinyint,
@Str tinyint,
@Sta tinyint,
@Dex tinyint,
@Intel tinyint,
@Cha tinyint
AS
DECLARE @Row tinyint, @Nation tinyint, [MENTION=2982]zone[/MENTION] tinyint, @PosX int, @PosZ int, @PosY int
SET @Row = 0 SET @Nation = 0 SET [MENTION=2982]zone[/MENTION] = 21 SET @PosX = 0 SET @PosZ = 0 SET @PosY = 0
SELECT @PosX = InitX, @PosZ = InitZ, @PosY = InitY from ZONE_INFO where ZoneNo = 21
SELECT @Nation = bNation, @Row = bCharNum FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID
IF @Row >= 3 SET @nRet = 1
IF @Nation = 1 AND @Race > 10 SET @nRet = 2
ELSE IF @Nation = 2 AND @Race < 10 SET @nRet = 2
ELSE IF @Nation <>1 AND @Nation <> 2 SET @nRet = 2
IF @nRet > 0
RETURN
SELECT @Row = COUNT(*) FROM USERDATA WHERE strUserId = @CharID
IF @Row > 0
BEGIN
SET @nRet = 3
RETURN
END
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
BEGIN
ROLLBACK TRAN
RETURN
END
INSERT INTO USERDATA (strUserId, Nation, Race, Class, HairRGB, Face, Strong, Sta, Dex, Intel, Cha, Zone, PX, PZ)
VALUES (@CharID, @Nation, @Race, [MENTION=2874]class[/MENTION], @Hair, @Face, @Str, @Sta, @Dex, @Intel, @Cha, [MENTION=2982]zone[/MENTION], @PosX, @PosZ)
/* Başlangıç İtemleri */
/*DECLARE @bClass tinyint
SET @bClass = SUBSTRING(RTRIM(LTRIM(STR [MENTION=2874]class[/MENTION]))),3,1)
DECLARE @bLevel int
DECLARE @bExp bigint
DECLARE @bStrong smallint
DECLARE @bDex smallint
DECLARE @bIntel smallint
DECLARE @bCha smallint
DECLARE @bSta smallint
DECLARE @bSkill varchar(10)
DECLARE @bGold int
DECLARE @bstrItem binary(584)
DECLARE @bWarehouseData binary(1536)
DECLARE @bLoyalty int
DECLARE @bPoints smallint
SELECT @bLevel = Level, @bExp = Exp,@bStrong = Strong,@bDex = Dex, @bIntel = Intel, @bCha = Cha, @bSta = Sta,@bSkill = Skill,@bGold = Gold, @bstrItem = strItem,@bWarehouseData = WarehouseData, @bLoyalty = Loyalty,@bPoints = Points FROM BEGINNER_ITEM WHERE Class = @bClass
IF @bStrong = 0 SET @bStrong = @Str
IF @bDex = 0 SET @bDex = @Dex
IF @bIntel = 0 SET @bIntel = @Intel
IF @bCha = 0 SET @bCha = @Cha
IF @bSta = 0 SET @bSta = @Sta
UPDATE USERDATA SET Level = @bLevel,Exp = @bExp,Strong = @bStrong,Dex = @bDex,Intel = @bIntel,Cha = @bCha,Sta = @bSta,strSkill = @bSkill,Gold = @bGold,strItem = @bstrItem,Loyalty = @bLoyalty,Points = @bPoints WHERE strUserId = @CharID
UPDATE WAREHOUSE SET WarehouseData = @bWarehouseData WHERE strAccountID = @AccountID
UPDATE USERDATA SET Class = Class + 5 WHERE strUserId = @CharID AND @bClass = 1
UPDATE USERDATA SET Class = Class + 6 WHERE strUserId = @CharID AND @bClass = 2
UPDATE USERDATA SET Class = Class + 7 WHERE strUserId = @CharID AND @bClass = 3
UPDATE USERDATA SET Class = Class + 8 WHERE strUserId = @CharID AND @bClass = 4
/* Başlangıç İtemleri */*/
exec GIVE_BEGINNER_ITEM @CharID
IF @@ERROR <> 0
BEGIN
ROLLBACK TRAN
SET @nRet = 4
RETURN
END
COMMIT TRAN
SET @nRet = 0
Kod:
IF EXISTS (SELECT * FROM [dbo].[sysobjects] WHERE id = object_id(N'[dbo].[BEGINNER_ITEM]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
DROP TABLE [dbo].[BEGINNER_ITEM]
GO
Kod:
IF EXISTS (SELECT * FROM [dbo].[sysobjects] WHERE id = object_id(N'[dbo].[GIVE_BEGINNER_ITEM]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[GIVE_BEGINNER_ITEM]
GO
Kod:
CREATE TABLE [dbo].[BEGINNER_ITEM](
[iClass] [smallint] NOT NULL,
[strClass] [char](10) NULL,
[Gold] [bigint] NOT NULL,
[strItem] [varchar](1200) NULL,
[strItem1] [binary](1200) NULL
) ON [PRIMARY]
GO
Kod:
INSERT INTO [BEGINNER_ITEM] VALUES ( 1, 'Warrior', 0, ':ø~',NULL);
INSERT INTO [BEGINNER_ITEM] VALUES ( 2, 'Rogue', 0, ':ø~',NULL );
INSERT INTO [BEGINNER_ITEM] VALUES ( 3, 'Magician', 0, ':ø~',NULL );
INSERT INTO [BEGINNER_ITEM] VALUES ( 4, 'Priest', 0, ':ø~',NULL );
UPDATE BEGINNER_ITEM SET strItem1 = CONVERT(binary(600), strItem)
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
Kod:
CREATE PROCEDURE [dbo].[GIVE_BEGINNER_ITEM]
@strUserId varchar(21)
AS
BEGIN
DECLARE [MENTION=2874]class[/MENTION] smallint
SELECT [MENTION=2874]class[/MENTION] = Cast(SubString(Cast(Class as varchar(3)), 2, 2) as smallint) FROM USERDATA WHERE strUserId = @strUserId
IF [MENTION=2874]class[/MENTION] = 1 OR [MENTION=2874]class[/MENTION] = 5 OR [MENTION=2874]class[/MENTION] = 6
SET [MENTION=2874]class[/MENTION] = 1
IF [MENTION=2874]class[/MENTION] = 2 OR [MENTION=2874]class[/MENTION] = 7 OR [MENTION=2874]class[/MENTION] = 8
SET [MENTION=2874]class[/MENTION] = 2
IF [MENTION=2874]class[/MENTION] = 3 OR [MENTION=2874]class[/MENTION] = 9 OR [MENTION=2874]class[/MENTION] = 10
SET [MENTION=2874]class[/MENTION] = 3
IF [MENTION=2874]class[/MENTION] =4 OR [MENTION=2874]class[/MENTION] = 11 OR [MENTION=2874]class[/MENTION] = 12
SET [MENTION=2874]class[/MENTION] = 4
UPDATE USERDATA SET strItem = (SELECT strItem1 FROM BEGINNER_ITEM WHERE iClass = [MENTION=2874]class[/MENTION]), Gold = (SELECT Gold FROM BEGINNER_ITEM WHERE iClass = [MENTION=2874]class[/MENTION]) WHERE strUserId = @strUserId
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
Uygulamanız Gerekmektedir..
Editörle Itemi Eklediniz Son Olarak REST Atarmış gibi Bu Kodu Uygulamanız Gerekmektedir..
İçerik Açılmıştır Teşekkürler
Kod:
UPDATE BEGINNER_ITEM SET strItem1 = CONVERT(binary(600), strItem)
Son Olarak
Rogue Baslangıc
Priest Başalangıç