SP Bof problem

Results 1 to 10 of 10
  1. #1
    Proficient Member Chale001 is offline
    MemberRank
    Dec 2012 Join Date
    187Posts

    SP Bof problem

    Hello,
    I made Stored procedure BoF, I managed to get it working without any issues but I got 1 last problem here..
    If the armor I apply Bof to .. has Prideful for example... after relog the Prideful goes away.. why is that and how do I fix it so that after relog it doesnt remove the prideful aswell
    Thanks!
    Last edited by Chale001; 03-02-13 at 09:18 PM.


  2. #2
    Please STAHP! ASN is offline
    MemberRank
    Dec 2010 Join Date
    934Posts

    Re: SP Bof problem

    You need to add something like this at the end of procedure

    --Do the normal query
    UPDATE Item SET [Prefix] = @prefix WHERE [IID] = @iid
    end

  3. #3
    Proficient Member Chale001 is offline
    MemberRank
    Dec 2012 Join Date
    187Posts

    Re: SP Bof problem

    CREATE PROCEDURE SetPrefix

    @prefix int,
    @iid int

    AS

    declare @index int
    declare @bof_index int
    declare @bofindex1 int

    SET @index = (SELECT [Index] FROM [Item] WHERE [IID] = @iid)
    SET @bof_index = (SELECT [BofIndex] FROM [BofTable] WHERE [Index] = @index)

    IF (@prefix = 193)
    begin
    if(@bof_index > 1)
    SET @bofindex1 = @bof_index
    else
    SET @bofindex1 = @index

    UPDATE Item SET [Index] = @bofindex1 WHERE [IID] = @iid
    end
    GO
    ---------------------
    This is my stored procedure and it already has this line

  4. #4
    Member XiaOnline is offline
    MemberRank
    Feb 2009 Join Date
    GermanyLocation
    65Posts

    Re: SP Bof problem

    U Write bofindex1 and takethis write prefix, Check it out.

  5. #5
    Proficient Member Chale001 is offline
    MemberRank
    Dec 2012 Join Date
    187Posts

    Re: SP Bof problem

    First, I tried changing bofindex1 to prefix, it made the item totally disappear..
    Second, I tried just putting both bofindex and prefix in seperated lines.. and it gave me the stats of the prefix example I made which means that its not true.. Because it should not give me any new stats than the prideful..


    Because I think that it works like this, u put an item (bof) as an example or a sign for the stored procedure to change the item index into another item index while keeping the current prefix(and tods..etc) so.. this is what I get, it gives me the old ToD I put on armor + the BoF prefix... so it removed the prideful u know what i mean

  6. #6
    Please STAHP! ASN is offline
    MemberRank
    Dec 2010 Join Date
    934Posts

    Re: SP Bof problem

    I told you to now follow the released stored procedure if you can't understand how it works ;d I got different fix for this but I won't release it

    Here's another totally lame way to fix it

    ELSE IF (@prefix = 1)
    begin
    UPDATE Item SET [Prefix] = @prefix WHERE [IID] = @iid
    end

    and you have to copy this 92 times (@prefix = 2, @prefix = 3 till 92)

    But like I already said before, stored can be created as you only like, same as the fix for this "relog bug" ;p

  7. #7
    Proficient Member Chale001 is offline
    MemberRank
    Dec 2012 Join Date
    187Posts

    Re: SP Bof problem

    gives me errors, here is my SP:
    USE [kal_db]
    GO
    /****** Object: StoredProcedure [dbo].[SetPrefix] Script Date: 02/04/2013 00:46:30 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER PROCEDURE [dbo].[SetPrefix]

    @prefix int,
    @iid int

    AS

    declare @index int
    declare @bof_index int
    declare @bofindex1 int

    SET @index = (SELECT [Index] FROM [Item] WHERE [IID] = @iid)
    SET @bof_index = (SELECT [BofIndex] FROM [BofTable] WHERE [Index] = @index)

    IF (@prefix = 193)
    begin
    if(@bof_index > 1)
    SET @bofindex1 = @bof_index
    else
    SET @bofindex1 = @index

    UPDATE Item SET [Index] = @bofindex1 WHERE [IID] = @iid

    --Do the normal query
    UPDATE Item SET [Prefix] = @index WHERE [IID] = @iid
    ELSE IF (@prefix = 1)
    begin
    UPDATE Item SET [Prefix] = @prefix WHERE [IID] = @iid
    end
    _______
    I know I might have done something not smart hopefully you take a look at it, thanks in advance =)

  8. #8
    Please STAHP! ASN is offline
    MemberRank
    Dec 2010 Join Date
    934Posts

    Re: SP Bof problem

    gives me errors, here is my SP:
    USE [kal_db]
    GO
    /****** Object: StoredProcedure [dbo].[SetPrefix] Script Date: 02/04/2013 00:46:30 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER PROCEDURE [dbo].[SetPrefix]

    @prefix int,
    @iid int

    AS

    declare @index int
    declare @bof_index int
    declare @bofindex1 int

    SET @index = (SELECT [Index] FROM [Item] WHERE [IID] = @iid)
    SET @bof_index = (SELECT [BofIndex] FROM [BofTable] WHERE [Index] = @index)

    IF (@prefix = 193)
    begin
    if(@bof_index > 1)
    SET @bofindex1 = @bof_index
    else
    SET @bofindex1 = @index

    UPDATE Item SET [Index] = @bofindex1 WHERE [IID] = @iid
    end

    ELSE IF (@prefix = 1)
    begin
    UPDATE Item SET [Prefix] = @prefix WHERE [IID] = @iid
    end

    END

    And like I said before, you have to duplicate this:
    ELSE IF (@prefix = 1)
    begin
    UPDATE Item SET [Prefix] = @prefix WHERE [IID] = @iid
    end


    Till (@prefix = 92)

    //this fix can be done with just a 1 line of query, but this one is fine too :P

  9. #9
    kalonline.ovh R3volutioN is offline
    MemberRank
    Sep 2008 Join Date
    kalonline.ovhLocation
    229Posts

    Re: SP Bof problem

    Quote Originally Posted by takethis View Post
    Here's another totally lame way to fix it

    ELSE IF (@prefix = 1)
    begin
    UPDATE Item SET [Prefix] = @prefix WHERE [IID] = @iid
    end

    and you have to copy this 92 times (@prefix = 2, @prefix = 3 till 92)
    this will be enough
    "ELSE
    begin
    UPDATE Item SET [Prefix] = @prefix WHERE [IID] = @iid
    end"

    ----------------

    IF (@prefix = 193)
    begin
    if (@bof_index)
    SET @bofindex1 = @bof_index
    else
    SET @bofindex1 = @index
    end

    ELSE
    begin
    UPDATE Item SET [Prefix] = @prefix WHERE [IID] = @iid
    end

  10. #10
    Proficient Member Chale001 is offline
    MemberRank
    Dec 2012 Join Date
    187Posts

    Re: SP Bof problem

    Thanks for passing by but the following line gives me an error:
    if (@bof_index)

    bof_index gives me a boolean error.. it goes away when i put > 1 .. but still did not solve my problem that once I relog the top on the armor gets removed, thanks in advance =)



Advertisement