I not see "dbo.TSU_AddItemToUser

Results 1 to 6 of 6
  1. #1
    Apprentice nismo006 is offline
    MemberRank
    Aug 2011 Join Date
    6Posts

    I not see "dbo.TSU_AddItemToUser

    Sry I Can't not find "dbo.TSU_AddItemToUser" in Pangya_S4_TH and INI3Bill_DB


    Code:
    Originally Posted by terrorofdeath View Post
    7c. Give an Account a Single Item
    
        Open the PyServer Repack.v2.rar and open the folder Admin Procedures in it.
        Double click the Add Item Procedure.sql file. This opens a query in SMS.
        Execute the querry.
        Databases → Pangya_S4_TH → INI3Bill_DB → Stored Procedures
        Right Click on "dbo.TSU_AddItemToUser" and choose "Execute Stored Procedure..."
            @user_id: The user ID used to log into the game of the account you wish to add the item to.
            @item_id: The item ID of the item you wish to add.
                You can find a list of most items in your database.
                Pangya_S4_TH → Tables
                Right Click on "dbo.PANGYA_ITEM_TYPELIST" and choose "Select Top 100 Rows".
                A query will appear and execute. Change it to say "SELECT TOP 5000 [TYPEID]".
                Execute the procedure. A table will appear with item IDs and item descriptions you can use for reference.
            Hit OK to execute the procedure.

    I do not know where to find dbo.TSU_AddItemToUser

    Code:
    USE [Pangya_S4_TH]
    GO
    
    SET ANSI_NULLS ON
    GO
    
    SET QUOTED_IDENTIFIER ON
    GO
    
    
    CREATE PROC [dbo].[TSU_AddItemToUser] (
    	@user_id	varchar(32),
    	@item_id int
    )
    AS
    
    BEGIN
    	DECLARE @user_idx int
    	
    	SELECT @user_idx = [UID] FROM [Pangya_Member_Info]
    	WHERE [userid] = @user_id
    	
    	IF @@ROWCOUNT = 1
    	BEGIN
    		SELECT [TYPEID] AS [Item ID], [NAME] AS [Item Name] FROM [PANGYA_ITEM_TYPELIST]
    		WHERE TYPEID = @item_id
    		
    		IF @@ROWCOUNT = 1
    		BEGIN
    			INSERT INTO Pangya_Item_WareHouse ( [UID], [typeid], [valid], [regdate] )
    			VALUES ( @user_idx, @item_id, 1, GETDATE())
    			
    			RETURN @@ERROR
    		END
    		ELSE
    		BEGIN
    			PRINT N'Item does not exist!'
    			RETURN 1
    		END
    	END
    	ELSE
    	BEGIN
    		PRINT N'User does not exist!'
    		RETURN 1
    	END
    END
    GO

    msg

    Code:
    Msg 2714, Level 16, State 3, Procedure TSU_AddItemToUser, Line 36
    There is already an object named 'TSU_AddItemToUser' in the database.

    I use microsoft sql server 2008 r2
    Last edited by nismo006; 14-08-11 at 11:43 AM.


  2. #2
    DEV Twilight is offline
    MemberRank
    Dec 2004 Join Date
    RussiaLocation
    720Posts

    Re: I not see "dbo.TSU_AddItemToUser

    Open tree..
    Pangya_S4_TH ->Programability->Stored Procedures

    or

    Pangya_S4_TH -> Stored Procedures

  3. #3
    Apprentice nismo006 is offline
    MemberRank
    Aug 2011 Join Date
    6Posts

    Re: I not see "dbo.TSU_AddItemToUser

    Quote Originally Posted by Twilight View Post
    Open tree..
    Pangya_S4_TH ->Programability->Stored Procedures

    or

    Pangya_S4_TH -> Stored Procedures
    Thank you
    Last edited by nismo006; 14-08-11 at 12:28 PM.

  4. #4
    DEV Twilight is offline
    MemberRank
    Dec 2004 Join Date
    RussiaLocation
    720Posts

    Re: I not see "dbo.TSU_AddItemToUser

    use sql command example:

    USE Pangya_S4_TH;
    exec dbo.TSU_AddItemToUser 'userid',XXXX

    and open Pangya_Item_WareHouse table ..bcouse
    CREATE PROC [dbo].[TSU_AddItemToUser] (
    @user_id varchar(32),
    @item_id int
    )

    ....
    INSERT INTO Pangya_Item_WareHouse ( [UID], [typeid], [valid], [regdate] )
    VALUES ( @user_idx, @item_id, 1, GETDATE())


    ...

  5. #5
    Infraction Banned zakurams3 is offline
    MemberRank
    Jul 2011 Join Date
    53Posts

    Re: I not see "dbo.TSU_AddItemToUser

    bumpppppppppppppppppppppppp

  6. #6
    All CHAOS! X_Sarah_X is offline
    MemberRank
    Jul 2009 Join Date
    BeachLocation
    630Posts

    Re: I not see "dbo.TSU_AddItemToUser

    Closing thread since a solution is posted and people bump for no reason ;)



Advertisement