Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Private Server > SRO PServer Guides & Releases
You last visited: Today at 09:08

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

Advertisement



[RELEASE] Automatic Skill Query by Syloxx

Discussion on [RELEASE] Automatic Skill Query by Syloxx within the SRO PServer Guides & Releases forum part of the SRO Private Server category.

Reply
 
Old   #1
 
Syloxx's Avatar
 
elite*gold: 56
Join Date: Oct 2013
Posts: 1,165
Received Thanks: 774
[RELEASE] Automatic Skill Query by Syloxx

Hello Elitepvpers,

Today iŽll release my automatic skill up query. It adds all available skills to your char based on Mastery and MasteryLevel.

Procedure:
Code:
USE [SRO_VT_SHARD]
GO
/****** Object:  StoredProcedure [dbo].[_UPDATE_CHARSKILLS]    Script Date: 06.01.2015 05:06:44 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

/**
version : 2
author : Syloxx
created date: 2015-05-01
description : add all aviable skills to character.
return value :
0 = No Errors
100 = The charname does not exists.
101 = Unknown Error.
**/

CREATE PROCEDURE [dbo].[_UPDATE_CHARSKILLS]
	  @nvcCharName nvarchar(30)
AS
SET NOCOUNT ON
SET XACT_ABORT ON

DECLARE	  @intReturnValue int
		, @intCharID int
		, @intSkillID int

/**_# Rollback and return if inside an uncommittable transaction.*/
IF XACT_STATE() = -1
BEGIN
	SET @intReturnValue = 1
	GOTO ErrorHandler
END

BEGIN TRY
	SELECT	  @intCharID = CharID
	FROM	  _Char WITH (NOLOCK)
	WHERE	  CharName16 = @nvcCharName

	IF (@intCharID IS NULL OR @intCharID = 0)
	BEGIN
		SET @intReturnValue = 100
		GOTO ErrorHandler
	END

	/**_# [_CharSkill] DELETE FROM TABLE*/
	DELETE FROM _CharSkill WHERE CharID = @intCharID AND SkillID NOT IN (SELECT SkillID FROM _RefCharDefault_Skill)

	/**_# [UPDATE_SKILL_CURSOR] CREATE AND EXECUTE*/
	DECLARE UPDATE_SKILL_CURSOR CURSOR FOR
		SELECT	RS.ID
		FROM
			(
			SELECT	  Basic_Group
					, MAX(Basic_Level) AS Basic_Level
			FROM	  _RefSkill RS
			JOIN	  _CharSkillMastery CSM
			ON		  RS.ReqCommon_Mastery1 = CSM.MasteryID
			WHERE	  RS.Service = 1
			AND		  RS.ID NOT IN (SELECT SkillID FROM _RefCharDefault_Skill)
			AND		  RS.ReqCommon_MasteryLevel1 <= CSM.Level
			AND		  CSM.CharID = @intCharID
			GROUP BY  Basic_Group
			) MGS
		JOIN	  _RefSkill RS
		ON		  RS.Basic_Group = MGS.Basic_Group
		AND		  RS.Basic_Level = MGS.Basic_Level
		WHERE	  RS.ReqLearn_SP != 0

	OPEN UPDATE_SKILL_CURSOR
	FETCH NEXT FROM UPDATE_SKILL_CURSOR INTO @intSkillID
	WHILE @@FETCH_STATUS = 0
		BEGIN

			/**_# [_CharSkill] INSERT INTO TABLE*/
			INSERT INTO _CharSkill (CharID, SkillID, Enable)
			VALUES (@intCharID, @intSkillID, 1)

			FETCH NEXT FROM UPDATE_SKILL_CURSOR INTO @intSkillID
		END
	CLOSE UPDATE_SKILL_CURSOR
	DEALLOCATE UPDATE_SKILL_CURSOR
END TRY
BEGIN CATCH
	SET @intReturnValue = 101
	GOTO ErrorHandler
END CATCH

RETURN 0

ErrorHandler:
IF XACT_STATE() <> 0
	ROLLBACK TRANSACTION
	RETURN @intReturnValue
T-SQL:
Code:
USE SRO_VT_SHARD
DECLARE @intReturnValue int

EXEC @intReturnValue = _UPDATE_CHARSKILLS Charname
SELECT @intReturnValue AS ReturnValue
Tutorial:
-Add the Procedure to your Database.
-Insert the T-SQL content to a "New Query".
-Replace Charname with your Charname and click on "Execute"

Download attachment for better formating!
Don't remove / edit the header!
Press thanks if you use this query!

-Syloxx
Attached Files
File Type: zip _UPDATE_CHARSKILLS v1.0.zip (1.3 KB, 355 views)
File Type: zip _UPDATE_CHARSKILLS v2.0.zip (1.4 KB, 881 views)
Syloxx is offline  
Thanks
35 Users
Old 01/06/2015, 23:28   #2
 
elite*gold: 0
Join Date: Dec 2014
Posts: 435
Received Thanks: 353
Gord job mate
NotEvenMad is offline  
Old 01/06/2015, 23:39   #3
 
Hamza FiGo's Avatar
 
elite*gold: 150
Join Date: Sep 2009
Posts: 987
Received Thanks: 258
Thanks for sharing

But it lvl ed up all skills and worked for euro + chn ?
Hamza FiGo is offline  
Old 01/07/2015, 00:21   #4


 
​Exo's Avatar
 
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,653
Quote:
Originally Posted by hamzafigo View Post
Thanks for sharing

But it lvl ed up all skills and worked for euro + chn ?
If you looked at the query you will see it's not adding entered skillids, it first checks all available skills based on mastery and adds them. so yes it should work for both races
​Exo is offline  
Old 01/07/2015, 02:00   #5
 
Syloxx's Avatar
 
elite*gold: 56
Join Date: Oct 2013
Posts: 1,165
Received Thanks: 774
Fixed Client Crash on combo skills
Syloxx is offline  
Old 01/07/2015, 02:04   #6
 
elite*gold: 0
Join Date: Dec 2014
Posts: 29
Received Thanks: 2
Good Job, nice dude
CrewMember is offline  
Old 01/07/2015, 14:25   #7

 
elite*gold: 27
Join Date: Jan 2015
Posts: 1,340
Received Thanks: 888
Great one syloxx! you are a great sql coder, thanks ^^
Aaron* is offline  
Old 01/07/2015, 15:23   #8
 
elite*gold: 0
Join Date: Aug 2013
Posts: 127
Received Thanks: 32
nicce 1 ^^
Albert Dev is offline  
Thanks
1 User
Old 11/07/2015, 00:58   #9
 
YajiroOfBoe's Avatar
 
elite*gold: 0
Join Date: Mar 2014
Posts: 22
Received Thanks: 2
hmm tryed it, but nothing happens. still no skills
YajiroOfBoe is offline  
Old 11/07/2015, 01:14   #10

 
Bocc1337's Avatar
 
elite*gold: 737
Join Date: Oct 2007
Posts: 730
Received Thanks: 133
nice thx
Bocc1337 is offline  
Thanks
1 User
Old 11/07/2015, 18:45   #11
 
elite*gold: 0
Join Date: Nov 2015
Posts: 18
Received Thanks: 3
Nice
[GM]HeroZ is offline  
Old 11/11/2015, 19:17   #12
 
elite*gold: 0
Join Date: Nov 2015
Posts: 45
Received Thanks: 9
Nice thanks
RedStormOnline is offline  
Old 11/11/2015, 23:25   #13
 
ronz007's Avatar
 
elite*gold: 0
Join Date: Nov 2011
Posts: 300
Received Thanks: 177
fail
ronz007 is offline  
Old 11/16/2015, 05:34   #14
 
[GM] Maximus's Avatar
 
elite*gold: 0
Join Date: Jul 2015
Posts: 88
Received Thanks: 59
Thx your sharing bro.
[GM] Maximus is offline  
Old 08/30/2017, 00:01   #15
 
elite*gold: 0
Join Date: Sep 2016
Posts: 31
Received Thanks: 0
Thanks
MinaThabit is offline  
Reply


Similar Threads Similar Threads
[RELEASE] SiegeFortress Reward by Syloxx
07/02/2023 - SRO PServer Guides & Releases - 10 Replies
just another release. TABLE: CREATE TABLE _RefSiegeFortressReward ( Service INT NOT NULL, FortressID INT NOT NULL, CodeName VARCHAR(129) NOT NULL, Amount INT NOT NULL
[Release] Query To Fix PET2 Skill In DataBase
07/21/2015 - SRO PServer Guides & Releases - 1 Replies
/* Welcome Every One To My Thread ^^ */ Today I Will Going To Release Some Query To Active And Fix PET2 Skills In DataBase Credit : To Me Not Others > King$ < Lets Start .. 1. Query To Active The Skills Update _RefSkill
[Release] Query To Add Skill 120 in Data Base ^^
07/14/2014 - SRO Private Server - 19 Replies
Query To Add Skill 120 in Data Base D11 ^^ ############################################Query By:King$########################################## ################# UPDATE dbo._RefSkill SET Service = 1 WHERE ID BETWEEN 1 AND 273 UPDATE dbo._RefSkill SET Service = 1 WHERE ID BETWEEN 276 AND 3481



All times are GMT +1. The time now is 09:08.


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.