and here is the stored procedure which you should add in lin2_world
Code:
/********************************************
lin_GetIdSetAmount
Set the adena amount for a user
INPUT
@char_name nvarchar(50)
@amount INT
OUTPUT
return
made by
DiAvOl
date
2005-04-25
DETAILS
Checks if the user provided is online, if not changes
will take effect, else an error message will be returned
********************************************/
CREATE PROCEDURE [DBO].[lin_GetIdSetAmmount] ( @char_name nvarchar(50), @amount INT)
AS
SET NOCOUNT ON
DECLARE @char_id INT
DECLARE @isonline INT
SET @isonline = (SELECT char_id FROM user_data WHERE login > logout AND char_name = @char_name)
IF @isonline IS NULL
BEGIN
SET @char_id = (SELECT TOP 1 char_id FROM user_data WHERE char_name = @char_name)
exec lin_AdenaChange @char_id, @amount
END
ELSE
BEGIN
print 'Character is Online, Cannot add adena right now'
END
GO