- Joined
- Feb 20, 2006
- Messages
- 214
- Reaction score
- 3
how is possible to fix this error
I use 4.5 files
Last edited:
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!For Webshop Credits and PCPoints, it's actually quite similar.
Assuming you are using MUCore, the location of Webshop Credits should locate at MEMB_CREDITS, thus, you add these lines:
under the declaration:
Under Selection:Code:[B]declare @credits int[/B]
Code:[B]SELECT @credits= credits FROM MEMB_CREDITS where memb___id = @uid[/B] Under Calculation of Online Hours ->CSPoints [B] UPDATE [dbo].[MEMB_CREDITS] SET credits= credits + (@OnlineHours * 10) WHERE memb___id = @uid[/B]
PCPoints are similar, assuming you are using the TitanTech Packages, it should be located at SCFPCPoints under Characters table:
declare @SCFPCPoints int
SELECT @SCFPCPoints= SCFPCPoints FROM Character where AccountID = @uid
UPDATE [dbo].[Character]
SET SCFPCPoints= SCFPCPoints + (@OnlineHours * 1)
WHERE AccountID = @uid
These should work.
Notice that the commands must go to their sections! If you paste them together there WILL be an error. My Completed scripts are here:
Code:BEGIN TRANSACTION SET NOCOUNT ON Declare @find_id varchar(10) declare @OnlineHours real declare @SCFVipMoney int declare @SCFPCPoints int declare @credits int SELECT @SCFVipMoney= SCFVipMoney FROM MEMB_INFO where memb___id = @uid SELECT @SCFPCPoints= SCFPCPoints FROM Character where AccountID = @uid SELECT @credits= credits FROM MEMB_CREDITS where memb___id = @uid IF EXISTS ( SELECT memb___id FROM MEMB_STAT WITH (READUNCOMMITTED) WHERE memb___id = @uid ) Begin UPDATE MEMB_STAT SET DisConnectTM = (getdate()), connectstat = 0,OnlineHours = @SCFVipMoney/10+(DATEDIFF(hh,ConnectTM,getdate())) WHERE memb___id = @uid SELECT @OnlineHours =OnlineHours FROM MEMB_STAT WHERE memb___id = @uid UPDATE [dbo].[MEMB_INFO] SET SCFVipMoney= SCFVipMoney + (@OnlineHours * 1) WHERE memb___id = @uid UPDATE [dbo].[Character] SET SCFPCPoints= SCFPCPoints + (@OnlineHours * 1) WHERE AccountID = @uid UPDATE [dbo].[MEMB_CREDITS] SET credits= credits + (@OnlineHours * 0) WHERE memb___id = @uid End
Again, don't outright copy it! No two databases are the same!
CREATE PROCEDURE [dbo].[WZ_DISCONNECT_MEMB]
@memb___id varchar(10)
AS
Begin
set nocount on
Declare [USER=1333416677]Find[/USER]_id varchar(10)
Declare [USER=1333459481]Connects[/USER]tat tinyint
declare [USER=27501]OnLine[/USER]Hours real
declare @cspoints int
Set [USER=1333459481]Connects[/USER]tat = 0
Set [USER=1333416677]Find[/USER]_id = 'NOT'
select [USER=1333416677]Find[/USER]_id = S.memb___id from MEMB_STAT S INNER JOIN MEMB_INFO I ON S.memb___id = I.memb___id
where I.memb___id = @memb___id
if( [USER=1333416677]Find[/USER]_id <> 'NOT' )
begin
SELECT @cspoints= CSPoints FROM MEMB_INFO where memb___id = @memb___id
update MEMB_STAT set ConnectStat = [USER=1333459481]Connects[/USER]tat, DisConnectTM = getdate(), OnlineHours = @cspoints/10+(DATEDIFF(hh,ConnectTM,getdate()))
where memb___id = @memb___id
SELECT [USER=27501]OnLine[/USER]Hours =OnlineHours FROM MEMB_STAT WHERE memb___id = @memb___id
UPDATE [dbo].[MEMB_INFO]
SET CSPoints= CSPoints + [USER=27501]OnLine[/USER]Hours * 10)
WHERE memb___id = @memb___id
end
end
GO
SELECT @cspoints= CSPoints FROM MEMB_INFO where memb___id = @memb___id
update MEMB_STAT set ConnectStat = [USER=1333459481]Connects[/USER]tat, DisConnectTM = getdate(), OnlineHours = @cspoints/10+(DATEDIFF(hh,ConnectTM,getdate()))