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:
Code:
declare @credits int
Under Selection:
Code:
SELECT @credits= credits FROM MEMB_CREDITS where memb___id = @uid
Under Calculation of Online Hours ->CSPoints
UPDATE [dbo].[MEMB_CREDITS]
SET credits= credits + (@OnlineHours * 10)
WHERE memb___id = @uid
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!