Register for your free account! | Forgot your password?

You last visited: Today at 00:41

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[HELP] AP Bugged?

Discussion on [HELP] AP Bugged? within the Shaiya PServer Development forum part of the Shaiya Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2014
Posts: 110
Received Thanks: 11
[HELP] AP Bugged?

Hello, my AP get bugged or ? Because, first, all peoples has created a new char. It's okay, but when I go to my database, I see : 1.000.000 AP Points, I already SET=point etc, not worked. Restarted server etc... If someone can help me will be useful. I show my USP_GameLogout_R script : USE [PS_UserData]
GO
/****** Object: StoredProcedure [dbo].[usp_Try_GameLogout_R] Script Date: 06/25/2014 23:58:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

/****** Object: Stored Procedure dbo.usp_Try_GameLogout_R Script Date: 2008-6-7 18:34:05 ******/
ALTER Proc [dbo].[usp_Try_GameLogout_R]

/*
Created by humanws, 2005-10-18
???? ?? ??
*/

@UserUID int,
@SessionID bigint,
@LogoutType smallint = 0,
@ErrType int = 0

AS

SET NOCOUNT ON

DECLARE @LogTime datetime
DECLARE @Sql nvarchar(4000)
DECLARE @yyyy varchar(4)
DECLARE @mm varchar(2)
DECLARE @dd varchar(2)
DECLARE @LogType bit -- Login:0, Logout:1

SET @LogType = 1
SET @LogTime = GETDATE()
SET @yyyy = DATEPART(yyyy, @LogTime)
SET @mm = DATEPART(mm, @LogTime)
SET @dd = DATEPART(dd, @LogTime)

IF( LEN(@mm) = 1 )
BEGIN
SET @mm = '0' + @mm
END

IF( LEN(@dd) = 1 )
BEGIN
SET @dd = '0' + @dd
END

SET @Sql = N'
INSERT INTO PS_GameLog.dbo.UserLog
(SessionID, UserUID, LogType, LogTime, LogoutType, ErrType)
VALUES(@SessionID, @UserUID, @LogType, @LogTime, @LogoutType, @ErrType)'

EXEC sp_executesql @Sql,
N'@SessionID bigint, @UserUID int, @LogType bit, @LogTime datetime, @LogoutType smallint, @ErrType int',
@SessionID, @UserUID, @LogType, @LogTime, @LogoutType, @ErrType
update PS_userdata.dbo.UserLoginStatus
set loginstatus=0,LogoutTime=@LogTime,LogoutSession=@S essionID,LastPlayTime=datediff(minute,LoginTime,@L ogTime)
where useruid=@useruid

DECLARE @LoginTime datetime
DECLARE @LastPlayTime int
DECLARE @OldPoint int
DECLARE @LoginSession bigint
SET @LoginSession=(select LoginSession from PS_userdata.dbo.UserLoginStatus where useruid=@useruid)
SET @LastPlayTime=(select LastPlayTime from PS_userdata.dbo.UserLoginStatus where useruid=@useruid)
SET @LoginTime=(select LoginTime from PS_userdata.dbo.UserLoginStatus where useruid=@useruid)
SET @OldPoint=(select Point from PS_userdata.dbo.Users_Master where useruid=@useruid)
IF (@SessionID=@LoginSession)
BEGIN
Update PS_userdata.dbo.Users_Master
SET point=point+@LastPlayTime/0
WHERE useruid=@useruid
INSERT INTO PS_userdata.dbo.UserOnlineTimeLog(UserUid,OldPoint ,Addpoint,LoginTime,LogoutTime,SessionID)
values(@UserUid,@OldPoint,@LastPlayTime,@LoginTime ,@LogTime,@SessionID)
end
SET NOCOUNT OFF

Help plz
white95260 is offline  
Old 07/28/2014, 18:29   #2
 
elite*gold: 0
Join Date: Jul 2010
Posts: 523
Received Thanks: 523
This block of code:
Code:
set loginstatus=0,LogoutTime=@LogTime,LogoutSession=@S essionID,LastPlayTime=datediff(minute,LoginTime,@L ogTime)
where useruid=@useruid

DECLARE @LoginTime datetime
DECLARE @LastPlayTime int
DECLARE @OldPoint int
DECLARE @LoginSession bigint
SET @LoginSession=(select LoginSession from PS_userdata.dbo.UserLoginStatus where useruid=@useruid)
SET @LastPlayTime=(select LastPlayTime from PS_userdata.dbo.UserLoginStatus where useruid=@useruid)
SET @LoginTime=(select LoginTime from PS_userdata.dbo.UserLoginStatus where useruid=@useruid)
SET @OldPoint=(select Point from PS_userdata.dbo.Users_Master where useruid=@useruid)
IF (@SessionID=@LoginSession)
BEGIN
Update PS_userdata.dbo.Users_Master
SET point=point+@LastPlayTime/0
WHERE useruid=@useruid
INSERT INTO PS_userdata.dbo.UserOnlineTimeLog(UserUid,OldPoint ,Addpoint,LoginTime,LogoutTime,SessionID)
values(@UserUid,@OldPoint,@LastPlayTime,@LoginTime ,@LogTime,@SessionID)
end
Belongs to the 'AP per minute' script. You should remove it unless you're using that system.

And the line
Code:
SET point=point+@LastPlayTime/0
isn't that an 'integer divided by zero' ?
sominus is offline  
Old 07/28/2014, 19:01   #3
 
elite*gold: 0
Join Date: Jan 2012
Posts: 428
Received Thanks: 33
or the easiest way

UPDATE PS_UserData.dbo.Users_Master
SET Point = (Point - 0)
Cansas59 is offline  
Reply


Similar Threads Similar Threads
FP Bugged Acc
05/19/2014 - S4 League Trading - 46 Replies
#closed
[S] Bugged Acc [B] 10€ PSC
05/02/2014 - S4 League Trading - 3 Replies
Suche einen gebuggten S4 League Account mit viel Pen oder vielen Fumbi Sachen und gebe dafür 10€ PSC. Ich gebe First falls ihr vertrauenswürdig seit ansonsten Middleman.
WTS BUGGED (YES) BUGGED 200% AMMY ACCOUNT
03/02/2012 - Dekaron Trading - 8 Replies
Siz server - NOT TRANSFERRED - All characters are on the same account. Can't sell just one by itself. Lvl 90 Aloken - Geared but no ammy Lvl 49 Azure Knight - Geared but no ammy Lvl 18 Bagi - Not geared but with BUGGED 200% AMMY Lvl 1 Mage - Not geared but with un-opened 7 day 200% ammy Lvl 1 Seg - Not geared but with un-opened 7 day 200% ammy Lvl 1 Summy - Not geared but with un-opened 7 day 200% ammy Lvl 1 Hunter - Not geared but with un-opened 7 day 200% ammy
Bugged HP
11/13/2010 - CO2 Private Server - 12 Replies
I noticed that the hp of my character is bugged becouse i`m using some necky`s that gimme 14k extra hp. I need to know to to remove the extra hp or simply how to replace the item with another one :) i apreciate all help thank you EPVP. http://img580.imageshack.us/img580/5919/15462453. jpg



All times are GMT +1. The time now is 00:43.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.