kod1
Source code
CREATE TABLE [dbo].[baslangic] (
[class] [smallint] NULL ,
[stritem] [varchar](400) NULL ,
) ON [PRIMARY]
GO
kod2
Source code
ALTER PROCEDURE [dbo].[baslangicitem]
@account varchar(21)
AS
begin
declare @class smallint
SELECT @class = cast(substring(cast(class AS varchar(3)),2,2) AS varchar(2)) FROM userdata WHERE struserid=@account
IF @class=1 OR @class=5 OR @class=6
SET @class = 1 --War
IF @class=2 OR @class=7 OR @class=8
SET @class = 2 -- Rog
IF @class=3 OR @class=9 OR @class=10
SET @class = 3 --Mag
IF @class=4 OR @class=11 OR @class=12
SET @class = 4 -- Pri
UPDATE userdata SET stritem = (SELECT stritem FROM baslangic WHERE class=@class) WHERE struserid=@account
end
CREATE_NEW_CHAR
PROSEDÜRÜNDE, ALTTAKİ KODUN HEMEN ÜSTÜNE,
Source code
IF @@ERROR <> 0
BEGIN
ROLLBACK TRAN
SET @nRet = 4
RETURN
END
COMMIT TRAN
SET @nRet = 0
üstüne aşağıdaki kodu yapıştırıyoruz
Source code
exec baslangicitem @CharID
———————————————————————-
İNVENTORY EDİTOR İLE BİR WARRİOR KARAKTERE BAŞLANGIÇ İTEMLERİ EKLEYİP ÇIKIN.
KARAKTER ADI : Warrior
VE DAHA SONRA ALTTAKİ KODU QA DA UYGULAYIN
Kod:
Source code
UPDATE baslangic SET stritem = ( SELECT stritem FROM USERDATA WHERE struserid = 'Warrior' )
WHERE class = '1'
———————————————————————–
———————————————————————-
İNVENTORY EDİTOR İLE BİR ROGUE KARAKTERE BAŞLANGIÇ İTEMLERİ EKLEYİP ÇIKIN.
KARAKTER ADI : ROGUE
VE DAHA SONRA ALTTAKİ KODU QA DA UYGULAYIN
Kod:
Source code
UPDATE baslangic SET stritem = ( SELECT stritem FROM USERDATA WHERE struserid = 'ROGUE' )
WHERE class = '2'
———————————————————————–
———————————————————————-
İNVENTORY EDİTOR İLE BİR MAGE KARAKTERE BAŞLANGIÇ İTEMLERİ EKLEYİP ÇIKIN.
KARAKTER ADI : Mage
VE DAHA SONRA ALTTAKİ KODU QA DA UYGULAYIN
Kod:
Source code
UPDATE baslangic SET stritem = ( SELECT stritem FROM USERDATA WHERE struserid = 'Mage' )
WHERE class = '3'
———————————————————————–
———————————————————————-
İNVENTORY EDİTOR İLE BİR PRİEST KARAKTERE BAŞLANGIÇ İTEMLERİ EKLEYİP ÇIKIN.
KARAKTER ADI : Priest
VE DAHA SONRA ALTTAKİ KODU QA DA UYGULAYIN
Kod:
Source code
UPDATE baslangic SET stritem = ( SELECT stritem FROM USERDATA WHERE struserid = 'Priest' )
WHERE class = '4'
———————————————————————–
Source code
CREATE TABLE [dbo].[baslangic] (
[class] [smallint] NULL ,
[stritem] [varchar](400) NULL ,
) ON [PRIMARY]
GO
kod2
Source code
ALTER PROCEDURE [dbo].[baslangicitem]
@account varchar(21)
AS
begin
declare @class smallint
SELECT @class = cast(substring(cast(class AS varchar(3)),2,2) AS varchar(2)) FROM userdata WHERE struserid=@account
IF @class=1 OR @class=5 OR @class=6
SET @class = 1 --War
IF @class=2 OR @class=7 OR @class=8
SET @class = 2 -- Rog
IF @class=3 OR @class=9 OR @class=10
SET @class = 3 --Mag
IF @class=4 OR @class=11 OR @class=12
SET @class = 4 -- Pri
UPDATE userdata SET stritem = (SELECT stritem FROM baslangic WHERE class=@class) WHERE struserid=@account
end
CREATE_NEW_CHAR
PROSEDÜRÜNDE, ALTTAKİ KODUN HEMEN ÜSTÜNE,
Source code
IF @@ERROR <> 0
BEGIN
ROLLBACK TRAN
SET @nRet = 4
RETURN
END
COMMIT TRAN
SET @nRet = 0
üstüne aşağıdaki kodu yapıştırıyoruz
Source code
exec baslangicitem @CharID
———————————————————————-
İNVENTORY EDİTOR İLE BİR WARRİOR KARAKTERE BAŞLANGIÇ İTEMLERİ EKLEYİP ÇIKIN.
KARAKTER ADI : Warrior
VE DAHA SONRA ALTTAKİ KODU QA DA UYGULAYIN
Kod:
Source code
UPDATE baslangic SET stritem = ( SELECT stritem FROM USERDATA WHERE struserid = 'Warrior' )
WHERE class = '1'
———————————————————————–
———————————————————————-
İNVENTORY EDİTOR İLE BİR ROGUE KARAKTERE BAŞLANGIÇ İTEMLERİ EKLEYİP ÇIKIN.
KARAKTER ADI : ROGUE
VE DAHA SONRA ALTTAKİ KODU QA DA UYGULAYIN
Kod:
Source code
UPDATE baslangic SET stritem = ( SELECT stritem FROM USERDATA WHERE struserid = 'ROGUE' )
WHERE class = '2'
———————————————————————–
———————————————————————-
İNVENTORY EDİTOR İLE BİR MAGE KARAKTERE BAŞLANGIÇ İTEMLERİ EKLEYİP ÇIKIN.
KARAKTER ADI : Mage
VE DAHA SONRA ALTTAKİ KODU QA DA UYGULAYIN
Kod:
Source code
UPDATE baslangic SET stritem = ( SELECT stritem FROM USERDATA WHERE struserid = 'Mage' )
WHERE class = '3'
———————————————————————–
———————————————————————-
İNVENTORY EDİTOR İLE BİR PRİEST KARAKTERE BAŞLANGIÇ İTEMLERİ EKLEYİP ÇIKIN.
KARAKTER ADI : Priest
VE DAHA SONRA ALTTAKİ KODU QA DA UYGULAYIN
Kod:
Source code
UPDATE baslangic SET stritem = ( SELECT stritem FROM USERDATA WHERE struserid = 'Priest' )
WHERE class = '4'
———————————————————————–