[RELEASE] Negative Bounty Fix

Page 1 of 2 12 LastLast
Results 1 to 25 of 47
  1. #1
    Elite Member -Lambda- is offline
    Member +Rank
    Jan 2007 Join Date
    SpainLocation
    157Posts

    [RELEASE] Negative Bounty Fix

    Yeah, i release this fix :juggle:

    First, edit your spBuyBountyItem procedure

    You have this procedure:
    Code:
    CREATE PROCEDURE [dbo].[spBuyBountyItem]
        @nCID INT,
        @nItemID INT,
        @nPrice INT
    AS
    BEGIN
        SET NOCOUNT ON;
    
        UPDATE Character SET BP = BP-@nPrice 
        INSERT INTO Items
        VALUES(@nCID,@nItemID,NULL)
        SELECT 0 OrderCIID
    
    END
    Ok, the bug is in this line:

    Code:
    UPDATE Character SET BP = BP-@nPrice
    This line, set the ALL characters BP to negative but dont have a WHERE CID = @nCID

    This is a fixed procedure

    Code:
    CREATE PROCEDURE [dbo].[spBuyBountyItem]
        @nCID INT,
        @nItemID INT,
        @nPrice INT
    AS
    BEGIN
        SET NOCOUNT ON;
    
        UPDATE Character SET BP = BP-@nPrice WHERE CID = @nCID
        INSERT INTO Items
        VALUES(@nCID,@nItemID,NULL)
        SELECT 0 OrderCIID
    
    END
    Credits to me


  2. #2
    Sorcerer Supreme fsadario is offline
    Member +Rank
    Apr 2005 Join Date
    Formosa, Rep. ArgentinaLocation
    360Posts
    Yes!! I need test it now
    Thanks very much. Works really good
    Last edited by fsadario; 14-01-07 at 11:39 PM.

  3. #3
    Sorcerer Supreme emisand is offline
    Member +Rank
    Mar 2006 Join Date
    UruguayLocation
    330Posts
    WoW!

    Nice work lambda

    This is very helpful
    Thanks

  4. #4
    Banned MAXTRAXv3 is offline
    BannedRank
    Jan 2007 Join Date
    Perth, WesternLocation
    2,252Posts
    yer thanks alot!

  5. #5
    Member monkeyeed is offline
    MemberRank
    Dec 2006 Join Date
    94Posts
    thanks i really needed this =)

  6. #6
    Grand Master kochon is offline
    Grand MasterRank
    Nov 2006 Join Date
    MontrealLocation
    1,451Posts
    wondeful, i love you

  7. #7
    Newbie cronic123 is offline
    MemberRank
    Oct 2005 Join Date
    TurkeyLocation
    20Posts
    wooah great job man ;)

  8. #8
    Sorcerer Supreme mts is offline
    Member +Rank
    Dec 2006 Join Date
    354Posts
    Wowwwwwwwwwwwwww!!!! Excellent....

  9. #9
    Elite Member jer0m3 is offline
    Member +Rank
    Nov 2005 Join Date
    Sky?Heaven?Paradise?Location
    162Posts
    Finally!!!the fix for negative bounty,thx so much and nice work

  10. #10
    Elite Member LilHustLa is offline
    Member +Rank
    Jan 2007 Join Date
    NewYorkLocation
    134Posts
    YES!!! finally thx man =)

  11. #11
    Sorcerer Supreme frank is offline
    Member +Rank
    May 2004 Join Date
    franceLocation
    484Posts
    thx very good work ....

  12. #12
    RageZ Hell kekku500 is offline
    Grand MasterRank
    Nov 2006 Join Date
    EstoniaLocation
    672Posts
    tyyyyyyyy ^^^^^^^^^^

  13. #13
    Newbie Pp7 is offline
    MemberRank
    Jan 2007 Join Date
    17Posts
    awesome.

  14. #14
    Elite Member Avunari is offline
    Member +Rank
    Jan 2005 Join Date
    Somewhere.. There..Location
    133Posts
    Really nice man, Thanks alot.

  15. #15
    Grand Master dordort is offline
    Grand MasterRank
    Nov 2004 Join Date
    IsraelLocation
    635Posts
    I love you.

  16. #16
    Newbie 3ddy is offline
    MemberRank
    Jan 2007 Join Date
    3Posts
    dordort i thot u from GzN lol....orhhzzz i noe liao u take hacks from here and post in GzN to become a reg+ or a mod noob

  17. #17
    Newbie 3ddy is offline
    MemberRank
    Jan 2007 Join Date
    3Posts
    lol edit tis at where?Xml document?

  18. #18
    Elite Member jer0m3 is offline
    Member +Rank
    Nov 2005 Join Date
    Sky?Heaven?Paradise?Location
    162Posts
    Quote Originally Posted by 3ddy View Post
    lol edit tis at where?Xml document?
    Dude copy the procedure to your SQL not on XML file!don't be so newbie dude
    Last edited by jer0m3; 15-01-07 at 03:11 PM.

  19. #19
    Member Kawaii-ne is offline
    MemberRank
    Jan 2007 Join Date
    61Posts
    Quote Originally Posted by jer0m3 View Post
    Dude copy the procedure to your SQL not on XML file!don't be so newbie dude
    we are once a newbie too, though it is obvious that its not XML ...

  20. #20
    Newbie tozezao is offline
    MemberRank
    Jan 2007 Join Date
    7Posts
    I'm still having the same negative bounty problem...
    And i did everything alright...

  21. #21
    Elite Member -Lambda- is offline
    Member +Rank
    Jan 2007 Join Date
    SpainLocation
    157Posts
    Quote Originally Posted by tozezao View Post
    I'm still having the same negative bounty problem...
    And i did everything alright...

    mmm i dont have that problem..

    check all of procedures, that need to modify a Character table, and check if WHERE CID = @nCID (or similar) is in the procedure

  22. #22
    Member Vitto is offline
    MemberRank
    Jan 2007 Join Date
    99Posts
    Just a question
    Code:
    CREATE PROCEDURE [dbo].[spBuyBountyItem]
        @nCID INT,
        @nItemID INT,
        @nPrice INT
    AS
    BEGIN
        SET NOCOUNT ON;
    
        UPDATE Character SET BP = BP-@nPrice WHERE CID = @nCID
        INSERT INTO Items
        VALUES(@nCID,@nItemID,NULL)
        SELECT 0 OrderCIID
    
    END
    Why are you creating the tables, shouldn't it be ALTER PROCEDURE [dbo].[spBuyBountyItem]? Or am i just missing something here?

    This doesn't work for me neither.

  23. #23
    Elite Member toshiharu is offline
    Member +Rank
    May 2006 Join Date
    185Posts
    omg just delete the old 1 and execute that 1

    ffs

  24. #24
    Member Vitto is offline
    MemberRank
    Jan 2007 Join Date
    99Posts
    That was what i was thinking :)

  25. #25
    Member Tsukasa035 is offline
    MemberRank
    Sep 2005 Join Date
    Netherlands.Location
    33Posts
    Works like a charm. For everyone that's whining, just delete dbo.spBuyBountyItem and then create the procedure with the fixed entry.



Page 1 of 2 12 LastLast

Advertisement