Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Shaiya > Shaiya Private Server > Shaiya PServer Guides & Releases
You last visited: Today at 04:48

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

Advertisement



[Release]Same Account PVP Stat Transfer SQL Edition

Discussion on [Release]Same Account PVP Stat Transfer SQL Edition within the Shaiya PServer Guides & Releases forum part of the Shaiya Private Server category.

Reply
 
Old   #1
 
BodySalvage's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 56
Received Thanks: 501
[Release]Same Account PVP Stat Transfer SQL Edition

I made this script awhile back and used it a lot. Its been a very useful tool and I decided it was time to share it. This will simply transfer all kills and deaths from 1 character to another on the same account.

1. The Script
Code:
/* ////////////////////////////////////
Same Account PVP Stat Transfer
Created By : [DEV]Lube - Hack and Slash Shaiya
Date : 03/11/2011
//////////////////////////////////// */

/* ////////////////////////////////
        DECLARE VARIABLES 
	       DO NOT EDIT
//////////////////////////////// */
DECLARE @FromChar varchar(30),
		@ToChar varchar(30),
		@FromK1 int,
		@FromK2 int,
		@UserUID1 int,
		@UserUID2 int,
		@ReturnMessage varchar(255),
		@ErrorRet int

/* ////////////////////////////////
 ***   EDIT THE NAMES HERE   ***
//////////////////////////////// */
SET @FromChar='OldChar'
SET @ToChar='NewChar'

/* ////////////////////////////////
    DO NOT EDIT BELOW THIS LINE 
    UNLESS YOU KNOW WHAT YOUR 
	DOING. GO TO THE BOTTOM AND 
	SELECT OUTPUT FORMAT
//////////////////////////////// */
SET @ErrorRet=0
SET @FromChar=LTRIM(RTRIM(@FromChar));
SET @UserUID1=(SELECT UserUID FROM PS_GameData.dbo.Chars WHERE CharName COLLATE Latin1_General_CS_AS =@FromChar AND Del=0)
IF(@@ERROR<>0)
 BEGIN
  SET @ReturnMessage ='From character name is either not alive or spelled wrong. Try again.'
  SET @ErrorRet=1
 END 
SET @ToChar=LTRIM(RTRIM(@ToChar));
SET @UserUID2=(SELECT UserUID FROM PS_GameData.dbo.Chars WHERE CharName COLLATE Latin1_General_CS_AS =@ToChar AND Del=0) 
IF(@@ERROR<>0)
 BEGIN
  SET @ReturnMessage ='To character name is either not alive or spelled wrong. Try again.'
  SET @ErrorRet=2
 END
IF(@UserUID1=@UserUID2)
 BEGIN
  SET @FromK1=(SELECT K1 FROM PS_GameData.dbo.Chars WHERE CharName COLLATE Latin1_General_CS_AS =@FromChar) 
  SET @FromK2=(SELECT K2 FROM PS_GameData.dbo.Chars WHERE CharName COLLATE Latin1_General_CS_AS =@FromChar)
  UPDATE PS_GameData.dbo.Chars SET K1=K1+@FromK1, K2=K2+@FromK2 WHERE CharName COLLATE Latin1_General_CS_AS =@ToChar 
  IF @@ERROR <> 0
   BEGIN
	SET @ReturnMessage= 'Failed to add kills and deaths to ' +@ToChar
	SET @ErrorRet=3
   END
  ELSE
   BEGIN
	UPDATE PS_GameData.dbo.Chars SET K1=0, K2=0 WHERE CharName COLLATE Latin1_General_CS_AS =@FromChar 
	IF @@ERROR <> 0
	 BEGIN
	  SET @ReturnMessage= 'Failed to remove kills and deaths from ' +@FromChar
	  SET @ErrorRet=4
	 END
	ELSE
	 BEGIN
	  SET @ReturnMessage= 'SUCCESS - Kills : ' + CONVERT(varchar,@FromK1) + ' Deaths : ' + CONVERT(varchar,@FromK2) + ' - Has been transfered To : ' + @ToChar + ' From : ' +@FromChar
	  SET @ErrorRet=0
	 END
   END
 END
ELSE
 BEGIN
  SET @ReturnMessage='Both characters must be on the same account to transfer kills and deaths.'
  SET @ErrorRet=5
 END
/* ////////////////////////////////
	      SELECT OUTPUT 
       COMMENT THE LINE YOU 
	   DO NOT WANT TO USE
//////////////////////////////// */
PRINT @ReturnMessage
--SELECT @ErrorRet AS ReturnError
2. Usage

A. Character Names

To use this, locate this block of code...

Code:
/* ////////////////////////////////
 ***   EDIT THE NAMES HERE   ***
//////////////////////////////// */
SET @FromChar='OldChar'
SET @ToChar='NewChar'

/* ////////////////////////////////
Change the 2 names to the desired names. @FromChar will have all kills and deaths transferred to the @ToChar

B. Script Reply

Next you need to decide the style of output for this script. It has both text and error code replies.

Find this section at the bottom of the script.
Code:
/* ////////////////////////////////
	      SELECT OUTPUT 
       COMMENT THE LINE YOU 
	   DO NOT WANT TO USE
//////////////////////////////// */
PRINT @ReturnMessage
--SELECT @ErrorRet AS ReturnError
Add -- before the output you wish to NOT have displayed.

Thats it, a really simple but effective tool to transfer pvp stats between characters on the same account. I hope you enjoy.
BodySalvage is offline  
Thanks
16 Users
Old 01/24/2014, 02:04   #2
 
elite*gold: 0
Join Date: Aug 2012
Posts: 11
Received Thanks: 4
Tyvm for sharing, this will be an awesome option to offer other players
epicmyth is offline  
Thanks
1 User
Old 01/24/2014, 08:52   #3
 
elite*gold: 0
Join Date: Nov 2012
Posts: 36
Received Thanks: 4
Thank you . Really Useful
Another Option for Player's
bar2eldad is offline  
Old 01/25/2014, 11:59   #4
 
elite*gold: LOCKED
Join Date: Oct 2013
Posts: 3,414
Received Thanks: 1,844
That's a nice release now, I appreciate you still keep releasing useful stuff. Cheers!
Stureplan is offline  
Thanks
1 User
Old 02/03/2014, 17:52   #5
 
elite*gold: 0
Join Date: May 2010
Posts: 343
Received Thanks: 87
Its interesting, but when you transfert kill you should reset the stat and status of your rank, i means you transfert the kill and death from toon to an other one the oldtoon that is getting rank previoutly and got his point of rank untill he doesnt reset his points he will still get his points and to make new rank more easy ... in fact when you make the transfert 2 things : make reinitialisation of stat + rank status or when you make it delete old char...
so you could in both way add some function to make it.

Regards
_Diavolino_ is offline  
Reply

Tags
pvp stat transfer


Similar Threads Similar Threads
[Release] How to change stat points per level and working stat resets
04/08/2017 - Shaiya PServer Guides & Releases - 20 Replies
A tutorial on how to change Ultimate Mode stat points and make stat resets give the changed stats back Things you will need. ollydbg 2.0 - http://www.ollydbg.de/odbg200.zip ps_game.exe not to be confused with game.exe can be found in server folder SHAIYA_SERVER\SERVER\PSM_Client\Bin Make a back up of your ps_game.exe before you edit it just incase you make a mistake.
[Release] System Icon Stat Str/Sta/Int/Dex
06/06/2012 - Flyff PServer Guides & Releases - 9 Replies
Hi! I propose to you tonight is a small system quite friendly, icon by stats: 1250 example you have strength you have an icon before your nickname. Warning I do not provide the icon (I'm not designer: p) Open file : _Common\MoverRender.cpp Open file : Neuz\VersionCommon.h
[Release]Any P Server Stat Checker
03/30/2009 - CO2 PServer Guides & Releases - 4 Replies
Okay well I have figured out that i suck ass at c# so i gave up on it no point on keep going with it so now I'm wanting to learn how to code like php stuff like server status checkers and full web sites. After about an hr of reading through some tuts i figured out how to do this. I did this cause i like playing p servers not making my own and instead of waiting for them to say hey servers on i like to check my self. This can be used for ur server or other peoples server dosn't matter i guess....



All times are GMT +1. The time now is 04:49.


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.