Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Shaiya > Shaiya Private Server
You last visited: Today at 12:38

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

Advertisement



Automatic Scoring System (AP)

Discussion on Automatic Scoring System (AP) within the Shaiya Private Server forum part of the Shaiya category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2011
Posts: 61
Received Thanks: 4
Automatic Scoring System (AP)

Hi I have the following point system that automatically committed automated AP system, the same figure is a one-to-
23 hours in the game not to be alone, even committed despite my tsar 1 point
I wonder if I have the following code, I did a mistake or there is missing something you have processed the following code to MySQL mysql my system 2008R2
I want our servers to enable automatic point system
So long as the game points to win clients and
itemmal item scores will buy it.
I found I just committed this code did not work, please help me thank you in advance
Sorry for my english is bad


Quote:
USE [PS_UserData]
GO
/****** Object: StoredProcedure [dbo].[usp_Try_GameLogout_R] Script Date: 02/17/2013 14:50:51 ******/
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
UPDATE Users_Master SET Leave = 0, LeaveDate = GETDATE() WHERE UserUID = @UserUID

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= 1
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
yukolo is offline  
Old 02/17/2013, 22:29   #2
 
JohnHeatz's Avatar
 
elite*gold: 150
Join Date: Apr 2010
Posts: 9,739
Received Thanks: 8,981
I just checked it briefly and I can spot a huge problem with this:

Code:
BEGIN
Update PS_UserData.dbo.Users_Master
SET point= 1
WHERE UserUID=@UserUID
You are not adding + 1 point to the AP of your players, you are always setting it up to 1. I might be mistaken, yet this is what might be giving you issues.
JohnHeatz is offline  
Thanks
1 User
Old 02/17/2013, 22:35   #3
 
elite*gold: 0
Join Date: Sep 2011
Posts: 61
Received Thanks: 4
What I do not understand exactly what you mean to do that
yukolo is offline  
Old 02/17/2013, 23:03   #4
 
elite*gold: 0
Join Date: Jun 2011
Posts: 108
Received Thanks: 269
BEGIN
Update PS_UserData.dbo.Users_Master
SET point= 1
WHERE UserUID=@UserUID


looking at it ta me this line needs to read something to this efect

BEGIN
Update PS_UserData.dbo.Users_Master
SET point= [Point]+1
WHERE UserUID=@UserUID

this will take the curent row point and add 1 as where your previous setup just updated the point to 1 and never added anything
[DEV]xXDASHXx is offline  
Thanks
3 Users
Old 02/17/2013, 23:54   #5
 
JohnHeatz's Avatar
 
elite*gold: 150
Join Date: Apr 2010
Posts: 9,739
Received Thanks: 8,981
Exactly, as I said, you are not adding points but just setting them, whatever amount is there, back to 1 instead of actually adding + 1 to current points.
JohnHeatz is offline  
Thanks
1 User
Old 02/18/2013, 14:34   #6
 
elite*gold: 0
Join Date: Sep 2011
Posts: 61
Received Thanks: 4
Thanks to this too, I figured I would much as you say you set the gerekmiş RESOLVED theothers
yukolo is offline  
Reply


Similar Threads Similar Threads
[Release]Paygol Automatic System
04/18/2013 - Metin2 PServer Guides & Strategies - 26 Replies
Hi epvp, I created a IPN (Instant Payment Notification) system. Creates a file named "teste.php" (example) - this is a IPN system...: <?php //ligação à base de dados $ligacao = mysql_connect("hostname", "user", "pass") ; mysql_select_db("account", $ligacao);
[NEED]Automatic Payment System
01/21/2013 - Metin2 Private Server - 2 Replies
Hello Epvp Are there any automatic payment system for metin2 servers? I wanna use one for my P.Server so when someone donate automatic take the coins and i am taking the money to an account! If Someone knows plzz tell me.!
[Sell]L2J Automatic Donate System
08/19/2012 - Lin2 Exploits, Hacks, Bots, Tools & Macros - 0 Replies
Greetings guys, I would like to sell my L2J Auto Donate System. Features: - It uses telnet(can support database in future, nothing hard to change it) - Supports PayPal - Supports Account Editing - Works for Coins, users buys coins on website, and then they can exchange them for items you set in config(Like Festival Adena, or something, you set in game) - I think it has nice design. - Cheap - Secure
[Sell]L2J Automatic Donate System
08/18/2012 - Lin2 Exploits, Hacks, Bots, Tools & Macros - 0 Replies
Greetings guys, I would like to sell my L2J Auto Donate System. Features: - It uses telnet(can support database in future, nothing hard to change it) - Supports PayPal - Supports Account Editing - Works for Coins, users buys coins on website, and then they can exchange them for items you set in config(Like Festival Adena, or something, you set in game) - I think it has nice design. - Cheap - Secure
Automatic Ban System (Vindictus Eu) Fail
03/04/2012 - Vindictus - 1 Replies
http://forum.nexoneu.com/NXEU.aspx?g=posts&t=6 61697 Quite a big amount of players is still banned because of it :p It might be a good time to write a ticket if you were banned in the past, they might unban you now if you make them believe that you were banned by their bugged system :awesome:



All times are GMT +1. The time now is 12:41.


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.