sirlvl don`t work

Results 1 to 1 of 1
  1. #1
    Apprentice ThrillerDerKill is offline
    MemberRank
    Jun 2008 Join Date
    13Posts

    sirlvl don`t work

    Hey guys I have tried to make a new sirlvl system but it don`t work now so I hope you could help me with this
    Code:
    CREATE PROCEDURE sirlvl
    
    @Level tinyint,
    @Specialty tinyint,
    @Contribute smallint,
    @Exp bigint,
    @GRole tinyint,
    @Strength tinyint,
    @Health tinyint,
    @Intelligence tinyint,
    @Wisdom tinyint,
    @Dexterity tinyint,
    @CurHP smallint,
    @CurMP smallint,
    @PUPoint smallint,
    @SUPoint smallint,
    @Killed tinyint,
    @Map tinyint,
    @X int,
    @Y int,
    @Z int,
    @Rage int,
    @Reborn tinyint,
    @PID int
    
    AS
    
    DECLARE @itemid int
    DECLARE @class tinyint
    
    UPDATE Player SET [Level] = @Level, [Specialty] = @Specialty, [Contribute] = @Contribute, [Exp] = @Exp, [GRole] = @GRole, [Strength] = @Strength, [Health] = @Health, [Intelligence] = @Intelligence, [Wisdom] = @Wisdom, [Dexterity] = @Dexterity, [CurHP] = @CurHP, [CurMP] = @CurMP, [PUPoint] = @PUPoint, [SUPoint] = @SUPoint, [Killed] = @Killed, [Map] = @Map, [X] = @X, [Y] = @Y, [Z] = @Z, [Rage] = @Rage, [Reborn] = @Reborn WHERE [PID] = @PID
    
    
    IF (@Reborn = 1) -- Wenn Spieler Reborn 1 hat erhält er Item
    Begin
       SET @itemid =(select max([IID]) from Item) + 1
       SET @class = (select [Class] from Player WHERE [PID] = @PID)
    
       IF (@class = 0) --knight
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1949, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
    	 INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1950, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
    	 INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1951, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
    	 INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1952, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
    	 INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1953, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
       ELSE IF (@class = 1) --mage
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1959, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1960, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1961, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1962, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1963, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
       ELSE IF (@class = 2) --archer
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1954, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1955, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1956, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1957, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1958, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
    
    IF (@Reborn = 2) -- Wenn Spieler Reborn 2 hat erhält er Item
    Begin
       SET @itemid =(select max([IID]) from Item) + 1
       SET @class = (select [Class] from Player WHERE [PID] = @PID)
    
       IF (@class = 0) --knight
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1579, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
       ELSE IF (@class = 1) --mage
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1579, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
       ELSE IF (@class = 2) --archer
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1579, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
    
    IF (@Reborn = 3) -- Wenn Spieler Reborn 3 hat erhält er Item
    Begin
       SET @itemid =(select max([IID]) from Item) + 1
       SET @class = (select [Class] from Player WHERE [PID] = @PID)
    
       IF (@class = 0 AND @Specialty = 7) --Vagabound
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1995, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
       ELSE IF (@class = 0 AND @Specialty = 11) --Commander
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1994, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1998, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
       ELSE IF (@class = 0 AND @Specialty = 4) --GoD of Sword
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1995, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
       ELSE IF (@class = 0 AND @Specialty = 5) --General
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1994, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1998, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
       ELSE IF (@class = 1) --mage
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1997, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
       ELSE IF (@class = 2) --archer
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1996, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
    
    IF (@Reborn = 4) -- Wenn Spieler Reborn 4 hat erhält er Item
    Begin
       SET @itemid =(select max([IID]) from Item) + 1
       SET @class = (select [Class] from Player WHERE [PID] = @PID)
    
       IF (@class = 0) --knight
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1964, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
    	 INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1965, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
    	 INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1966, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
    	 INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1967, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
    	 INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1968, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
       ELSE IF (@class = 1) --mage
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1974, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1975, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1976, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1977, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1978, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
       ELSE IF (@class = 2) --archer
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1969, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1970, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1971, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1972, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1973, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
    IF (@Reborn = 5) -- Wenn Spieler Reborn 5 hat erhält er Item
    Begin
       SET @itemid =(select max([IID]) from Item) + 1
       SET @class = (select [Class] from Player WHERE [PID] = @PID)
    
       IF (@class = 0) --knight
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1578, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
       ELSE IF (@class = 1) --mage
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1578, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
       ELSE IF (@class = 2) --archer
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1578, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
    IF (@Reborn = 6) -- Wenn Spieler Reborn 6 hat erhält er Item
    Begin
       SET @itemid =(select max([IID]) from Item) + 1
       SET @class = (select [Class] from Player WHERE [PID] = @PID)
    
       IF (@class = 0 AND @Specialty = 7) --Vagabound
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 2000, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
       ELSE IF (@class = 0 AND @Specialty = 11) --Commander
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1999, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 2003, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
       ELSE IF (@class = 0 AND @Specialty = 4) --GoD of Sword
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 2000, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
       ELSE IF (@class = 0 AND @Specialty = 5) --General
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1999, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 2003, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
       ELSE IF (@class = 1) --mage
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 2002, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
       ELSE IF (@class = 2) --archer
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 2001, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
    IF (@Reborn = 7) -- Wenn Spieler Reborn 7 hat erhält er Item
    Begin
       SET @itemid =(select max([IID]) from Item) + 1
       SET @class = (select [Class] from Player WHERE [PID] = @PID)
    
       IF (@class = 0) --knight
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1979, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
    	 INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1980, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
    	 INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1981, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
    	 INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1982, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
    	 INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1983, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
       ELSE IF (@class = 1) --mage
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1994, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1995, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1996, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1997, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1998, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
       ELSE IF (@class = 2) --archer
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1984, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1985, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1986, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1987, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 1988, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
    IF (@Reborn = 8) -- Wenn Spieler Reborn 5 hat erhält er Item
    Begin
       SET @itemid =(select max([IID]) from Item) + 1
       SET @class = (select [Class] from Player WHERE [PID] = @PID)
    
       IF (@class = 0) --knight
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 2023, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 2024, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 2025, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
       ELSE IF (@class = 1) --mage
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 2020, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 2021, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 2022, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
       ELSE IF (@class = 2) --archer
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 2026, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 2027, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 2028, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
    IF (@Reborn = 9) -- Wenn Spieler Reborn 9 hat erhält er Item
    Begin
       SET @itemid =(select max([IID]) from Item) + 1
       SET @class = (select [Class] from Player WHERE [PID] = @PID)
    
       IF (@class = 0 AND @Specialty = 7) --Vagabound
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 2005, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
       ELSE IF (@class = 0 AND @Specialty = 11) --Commander
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 2004, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 2008, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
       ELSE IF (@class = 0 AND @Specialty = 4) --GoD of Sword
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 2005, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
       ELSE IF (@class = 0 AND @Specialty = 5) --General
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 2004, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 2008, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
       ELSE IF (@class = 1) --mage
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 2007, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
       ELSE IF (@class = 2) --archer
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 2006, 0, 128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
    IF (@Reborn = 10) -- Wenn Spieler Reborn 10 hat erhält er Item
    Begin
       SET @itemid =(select max([IID]) from Item) + 1
       SET @class = (select [Class] from Player WHERE [PID] = @PID)
    
       IF (@class = 0) --knight
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 2030, 0, 128, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
       ELSE IF (@class = 1) --mage
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 2030, 0, 128, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
       ELSE IF (@class = 2) --archer
          begin
             INSERT INTO Item ( [PID], [IID], [Index], [Prefix], [Info], [Num], [MaxEnd], [CurEnd], [SetGem], [XAttack], [XMagic], [XDefense], [XHit], [XDodge], [Protect], [UpgrLevel], [UpgrRate]) VALUES ( @PID, @itemid, 2030, 0, 128, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
          end
    End
    And thanks for any help :D




Advertisement