Bir teşekkürü çok görmeyin..

KODLARI Q.A YAPISTIRIN


Update_siege

Kod:
CREATE PROCEDURE UPDATE_SIEGE
@sCastleIndex        smallint,
@sKnightsIndex        smallint,
@byWarType        tinyint,
@byWarDay        tinyint,
@byWarTime        tinyint,
@byWarMinute        tinyint
--Kullanım +siegewarfare
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
G

UPDATE_SIEGE_CHALLENGER
Kod:
CREATE PROCEDURE UPDATE_SIEGE_CHALLENGER
@sCastleIndex        smallint,
@strChallengerList    char(50)

AS


UPDATE KNIGHTS_SIEGE_WARFARE SET strChallengeList = @strChallengerList
     WHERE sCastleIndex = @sCastleIndex


GO

UPDATE_SIEGE_CHALLENGER2
Kod:
CREATE PROCEDURE UPDATE_SIEGE_CHALLENGER2
@sCastleIndex        smallint,
@sKnights_1        smallint,
@sKnights_2        smallint,
@sKnights_3        smallint,
@sKnights_4        smallint,
@sKnights_5        smallint,
@sKnights_6        smallint,
@sKnights_7        smallint,
@sKnights_8        smallint,
@sKnights_9        smallint,
@sKnights_10        smallint,
@strChallengerList    varchar(50)

AS


UPDATE KNIGHTS_SIEGE_WARFARE SET strChallengeList = @strChallengerList,
                           sRequestList_1 = @sKnights_1,  
                           sRequestList_2 = @sKnights_2,
                           sRequestList_3 = @sKnights_3,
                           sRequestList_4 = @sKnights_4,
                           sRequestList_5 = @sKnights_5,
                           sRequestList_6 = @sKnights_6,
                           sRequestList_7 = @sKnights_7,
                           sRequestList_8 = @sKnights_8,
                           sRequestList_9 = @sKnights_9,
                           sRequestList_10 = @sKnights_10
     WHERE sCastleIndex = @sCastleIndex


GO
UPDATE_SIEGE_DECIDE_CHALLENGER
Kod:
CREATE PROCEDURE UPDATE_SIEGE_DECIDE_CHALLENGER
@sCastleIndex        smallint,
@sKnights_1        smallint,
@sKnights_2        smallint,
@sKnights_3        smallint,
@sKnights_4        smallint,
@sKnights_5        smallint,
@sKnights_6        smallint,
@sKnights_7        smallint,
@sKnights_8        smallint,
@sKnights_9        smallint,
@sKnights_10        smallint

AS


UPDATE KNIGHTS_SIEGE_WARFARE SET sChallengeList_1 = @sKnights_1,  
                           sChallengeList_2 = @sKnights_2,
                           sChallengeList_3 = @sKnights_3,
                           sChallengeList_4 = @sKnights_4,
                           sChallengeList_5 = @sKnights_5,
                           sChallengeList_6 = @sKnights_6,
                           sChallengeList_7 = @sKnights_7,
                           sChallengeList_8 = @sKnights_8,
                           sChallengeList_9 = @sKnights_9,
                           sChallengeList_10 = @sKnights_10,
                           sRequestList_1 = 0,  
                           sRequestList_2 = 0,
                           sRequestList_3 = 0,
                           sRequestList_4 = 0,
                           sRequestList_5 = 0,
                           sRequestList_6 = 0,
                           sRequestList_7 = 0,
                           sRequestList_8 = 0,
                           sRequestList_9 = 0,
                           sRequestList_10 = 0,
                           strChallengeList = NULL    
     WHERE sCastleIndex = @sCastleIndex


GO
Knights_Siege_Warfare
Kod:
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[KNIGHTS_SIEGE_WARFARE]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[KNIGHTS_SIEGE_WARFARE]
GO

CREATE TABLE [dbo].[KNIGHTS_SIEGE_WARFARE] (
    [sCastleIndex] [smallint] NOT NULL ,
    [sMasterKnights] [smallint] NOT NULL ,
    [bySiegeType] [tinyint] NOT NULL ,
    [byWarDay] [tinyint] NOT NULL ,
    [byWarTime] [tinyint] NOT NULL ,
    [byWarMinute] [tinyint] NOT NULL ,
    [sChallengeList_1] [smallint] NOT NULL ,
    [sChallengeList_2] [smallint] NOT NULL ,
    [sChallengeList_3] [smallint] NOT NULL ,
    [sChallengeList_4] [smallint] NOT NULL ,
    [sChallengeList_5] [smallint] NOT NULL ,
    [sChallengeList_6] [smallint] NOT NULL ,
    [sChallengeList_7] [smallint] NOT NULL ,
    [sChallengeList_8] [smallint] NOT NULL ,
    [sChallengeList_9] [smallint] NOT NULL ,
    [sChallengeList_10] [smallint] NOT NULL ,
    [byWarRequestDay] [tinyint] NOT NULL ,
    [byWarRequestTime] [tinyint] NOT NULL ,
    [byWarRequestMinute] [tinyint] NOT NULL ,
    [byGuerrillaWarDay] [tinyint] NOT NULL ,
    [byGuerrillaWarTime] [tinyint] NOT NULL ,
    [byGuerrillaWarMinute] [tinyint] NOT NULL ,
    [strChallengeList] [char] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
    [sMoradonTariff] [smallint] NOT NULL ,
    [sDellosTariff] [smallint] NOT NULL ,
    [nDungeonCharge] [int] NOT NULL ,
    [nMoradonTax] [int] NOT NULL ,
    [nDellosTax] [int] NOT NULL ,
    [sRequestList_1] [smallint] NOT NULL ,
    [sRequestList_2] [smallint] NOT NULL ,
    [sRequestList_3] [smallint] NOT NULL ,
    [sRequestList_4] [smallint] NOT NULL ,
    [sRequestList_5] [smallint] NOT NULL ,
    [sRequestList_6] [smallint] NOT NULL ,
    [sRequestList_7] [smallint] NOT NULL ,
    [sRequestList_8] [smallint] NOT NULL ,
    [sRequestList_9] [smallint] NOT NULL ,
    [sRequestList_10] [smallint] NOT NULL 
) ON [PRIMARY]
GO
Kod:
INSERT INTO [knights_siege_warfare] VALUES ('1','15003','5','3','5','54','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','NULL','20','20','0','0','0','0','0','0','0','0','0','0','0','0','0');

Update_knights_war
Kod:
ALTER PROCEDURE [dbo].[UPDATE_KNIGHTS_WAR]
@byType        tinyint,
@shWhite        smallint,
@shBlue        smallint

AS
/*CPU*/
DECLARE @strWhiteName char(21)
DECLARE @strBlueName char(21)

SET @strWhiteName = NULL
SET @strBlueName = NULL

IF @byType = 1
BEGIN
    SELECT @strWhiteName = IDName FROM KNIGHTS WHERE IDNum = @shWhite
    SELECT @strBlueName = IDName FROM KNIGHTS WHERE IDNum = @shBlue
    UPDATE KNIGHTS SET nWarEnemyID = @shBlue, strEnemyName = @strBlueName WHERE IDNum = @shWhite
    UPDATE KNIGHTS SET nWarEnemyID = @shWhite, strEnemyName = @strWhiteName WHERE IDNum = @shBlue
END
ELSE IF @byType = 2
BEGIN
    UPDATE KNIGHTS SET byOldWarResult = 2, nLose = nLose+1, nWarEnemyID = 0 WHERE IDNum = @shWhite    -- lose team
    UPDATE KNIGHTS SET byOldWarResult = 1, nVictory = nVictory+1, nWarEnemyID = 0 WHERE IDNum = @shBlue    -- victory team
END

Tüm forumdan rastgele konular:

  • » Server Checker 1.02 (server açık mı...
  • » Baphomet homeko şimdi açildi item yok...
  • » 19xx HERO300 - JAPKO VERSİYON USKO...
  • » ►miffu-game◄ ★1299 62/1 ardream pk...
  • » DataBase (DB) Editör..
  • » Kuzey Mt2 - Droplar x1000 Yeni açıLdı...
  • » 2009-2010 Euro-Ko Kurucusundan 1299...
  • » S.a hocam konu acamıyorum up...
  • » 55-105 Orta Emek★ Betalı★Abartısız★21...
  • » Pwp Sw Lerde GM link YAPILIR 13 . Saat...

Aynı kategoriden rastgele konular:

  • » Ronark Land, Ardream, Ronark Land Base...
  • » 1299 sorunsuz kale Şavasi ( csw ) q.a...
  • » Arkadaşlar team kuruyoruz beklerizzzz
  • » TS3NOKTASİ.Com |KnightOnline –...
  • » | 1280x1024 | USKO SKİN UZUN DAMAGEBAR...
  • » Sexyko satılık item ve clan
  • » Ronark Land, Ardream, Ronark Land Base...
  • » Ko-Cuce.Gen.tr Farkıyla] Oyun İçi Clan...
  • » Süreli GM Sistemi
  • » Oto Üyelikte Türkçe Karakter Düpesini...