Sql Script For 100 Job Change

Results 1 to 2 of 2
  1. #1
    Proficient Member josh2k7 is offline
    MemberRank
    Jun 2012 Join Date
    181Posts

    Sql Script For 100 Job Change

    ok i know nothing about sql im still a noob at this maybe one day ill be as good as bakey but till then i have to ask you guys for help but my issue is when u turn in the 100 job change quest sql fails to update with it i know its missing the script for it but as i said i know nothing about sql so i dont know where to add the script or what to name it or how to add it so if someone could take some time out of there day to teach me how to do this i would be gratefull and i would like someone to show me not do it for me im honestly trying to learn this stuff thank you to whom ever helps me

    ok guys i got it fixed on my own but im gonna post how i fixed it

    to fix the 100 job change use this in sql a new query and exacute it when u enter it in and save it as 100 job change in database folder in your 64 bit programs folder
    Just run the following Script in SQL:

    USE [World00_Character]
    GO
    /****** Object: StoredProcedure [dbo].[p_Char_Logout] Script Date: 10/08/2011 16:20:34 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER PROCEDURE [dbo].[p_Char_Logout]
    /*
    Character logout
    2004.6 By CJC
    Input:
    nCharNo = To be logout
    nPlayMin = Play minute at this time
    output:
    0 = error
    1 = work ok
    */
    @nCharNo int,
    @nPlayMin int,
    @nRet int OUTPUT
    AS
    SET NOCOUNT ON
    UPDATE tCharacter
    SET nPlayMin = nPlayMin + @nPlayMin
    WHERE nCharNo = @nCharNo
    SET @nRet = @@ROWCOUNT


    -- JobChange Script START

    IF (SELECT COUNT(*) FROM [World00_Character].[dbo].[tCharacter] WHERE [nCharNo] = @nCharNo AND nLevel >= 100 and (SELECT COUNT(*) from [World00_Character].[dbo].[tCharacterShape] where nCharNo = @nCharNo and (nClass = 3 or nClass = 10 or nClass = 17 or nClass = 24)) > 0) > 0
    BEGIN

    --Gladiator
    IF (SELECT COUNT(*) FROM [World00_Character].[dbo].[tQuest] WHERE [nCharNo] = @nCharNo AND [nQuestNo] = 739 AND [nStatus] = 2) > 0
    BEGIN
    UPDATE [World00_Character].[dbo].[tCharacterShape] SET nClass = 4 WHERE nCharNo = @nCharNo;
    END
    ELSE
    BEGIN

    --Knight
    IF (SELECT COUNT(*) FROM [World00_Character].[dbo].[tQuest] WHERE [nCharNo] = @nCharNo AND [nQuestNo] = 740 AND [nStatus] = 2) > 0
    BEGIN
    UPDATE [World00_Character].[dbo].[tCharacterShape] SET nClass = 5 WHERE nCharNo = @nCharNo;
    END
    ELSE
    BEGIN

    --HolyKnight
    IF (SELECT COUNT(*) FROM [World00_Character].[dbo].[tQuest] WHERE [nCharNo] = @nCharNo AND [nQuestNo] = 741 AND [nStatus] = 2) > 0
    BEGIN
    UPDATE [World00_Character].[dbo].[tCharacterShape] SET nClass = 11 WHERE nCharNo = @nCharNo;
    END
    ELSE
    BEGIN

    --Guardian
    IF (SELECT COUNT(*) FROM [World00_Character].[dbo].[tQuest] WHERE [nCharNo] = @nCharNo AND [nQuestNo] = 742 AND [nStatus] = 2) > 0
    BEGIN
    UPDATE [World00_Character].[dbo].[tCharacterShape] SET nClass = 12 WHERE nCharNo = @nCharNo;
    END
    ELSE
    BEGIN

    --Sharpshooter
    IF (SELECT COUNT(*) FROM [World00_Character].[dbo].[tQuest] WHERE [nCharNo] = @nCharNo AND ([nQuestNo] = 743 OR [nQuestNo] = 747) AND [nStatus] = 2) > 0
    BEGIN
    UPDATE [World00_Character].[dbo].[tCharacterShape] SET nClass = 18 WHERE nCharNo = @nCharNo;
    END
    ELSE
    BEGIN

    --Ranger
    IF (SELECT COUNT(*) FROM [World00_Character].[dbo].[tQuest] WHERE [nCharNo] = @nCharNo AND ([nQuestNo] = 744 OR [nQuestNo] = 748) AND [nStatus] = 2) > 0
    BEGIN
    UPDATE [World00_Character].[dbo].[tCharacterShape] SET nClass = 19 WHERE nCharNo = @nCharNo;
    END
    ELSE
    BEGIN

    --Warlock
    IF (SELECT COUNT(*) FROM [World00_Character].[dbo].[tQuest] WHERE [nCharNo] = @nCharNo AND [nQuestNo] = 745 AND [nStatus] = 2) > 0
    BEGIN
    UPDATE [World00_Character].[dbo].[tCharacterShape] SET nClass = 25 WHERE nCharNo = @nCharNo;
    END
    ELSE
    BEGIN

    --Wizard
    IF (SELECT COUNT(*) FROM [World00_Character].[dbo].[tQuest] WHERE [nCharNo] = @nCharNo AND [nQuestNo] = 746 AND [nStatus] = 2) > 0
    BEGIN
    UPDATE [World00_Character].[dbo].[tCharacterShape] SET nClass = 26 WHERE nCharNo = @nCharNo;
    END
    END
    END
    END
    END
    END
    END
    END
    END


    -- end


  2. #2
    Proficient Member xWhiteCore is offline
    MemberRank
    Jun 2012 Join Date
    193Posts

    Re: Sql Script For 100 Job Change

    Pls




Advertisement