Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

I not see "dbo.TSU_AddItemToUser

Status
Not open for further replies.
Initiate Mage
Joined
Aug 10, 2011
Messages
6
Reaction score
0
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:
Joined
Dec 22, 2004
Messages
513
Reaction score
162
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())


...
 
Status
Not open for further replies.
Back
Top