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:45

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

Advertisement



[Release]The marvelous System [Auto Skill Up To a Specific Level]

Discussion on [Release]The marvelous System [Auto Skill Up To a Specific Level] within the SRO PServer Guides & Releases forum part of the SRO Private Server category.

Reply
 
Old   #16
 
Storxy_'s Avatar
 
elite*gold: 0
Join Date: Oct 2014
Posts: 204
Received Thanks: 407
lol what a super sql expert with a dog mind
procedures are identity
you even didn't' add fix for combo skills
what a sql expert again =))
Quote:
Originally Posted by Syloxx View Post
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
Storxy_ is offline  
Old   #17
 
Ɗoc's Avatar
 
elite*gold: 35
Join Date: Mar 2011
Posts: 361
Received Thanks: 220
Whos **** is bigger thread.
Ɗoc is offline  
Thanks
2 Users
Old   #18
 
Emperix's Avatar
 
elite*gold: 0
Join Date: Jul 2017
Posts: 34
Received Thanks: 7
dam nice man , keep it up
Emperix is offline  
Thanks
1 User
Old   #19
 
SwaGy.'s Avatar
 
elite*gold: 0
Join Date: Dec 2016
Posts: 65
Received Thanks: 18
Keep going , ty
SwaGy. is offline  
Thanks
1 User
Old   #20
 
elite*gold: 0
Join Date: Feb 2016
Posts: 652
Received Thanks: 343
uw guys abt haters keep hating XD
i wont lower my level talking to kids around
EdwardTeach+- is offline  
Old   #21
 
Muhab*'s Avatar
 
elite*gold: 0
Join Date: Feb 2014
Posts: 885
Received Thanks: 1,420
Quote:
Originally Posted by Ɗoc View Post
Whos **** is bigger thread.
thread.Length
Muhab* is offline  
Old   #22


 
DeniMM's Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 890
Received Thanks: 156
You want the entire section to hate you, huh?
DeniMM is offline  
Thanks
1 User
Old   #23

 
AceSpace's Avatar
 
elite*gold: 121
Join Date: Mar 2011
Posts: 1,615
Received Thanks: 1,124
Quote:
Originally Posted by EdwardTeach+- View Post
if u take a look at syloxx ones its a bit different i re-coded it,
potassium?
How is it different?

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
Blind much?

What the hell did you do exactly? you just added
Code:
if @eventid = 22 and @data = X level
begin
   exec _procedureofsylox @charname wow
end
AceSpace is offline  
Thanks
1 User
Old   #24
 
Syloxx's Avatar
 
elite*gold: 56
Join Date: Oct 2013
Posts: 1,165
Received Thanks: 775
Hello,

1st of all, looks like you didn't read my original post completely... it says "Don't remove / edit the header!"

If you did any modifications to the query, you would be able to add a 2nd header but removing or editing the original header simply offend the license conditions!

2nd I do not notice any modifications to the logic inside the query, but a rename... it is ok to do that but I wouldn't consider that as a "re-code"

3rd if you use released stuff please use the latest version atlease

4th you also should add a kind of error handler to the parent procedure
something like

Code:
IF @ReturnValue != 0
BEGIN
    INSERT INTO _ERROR_TABLE
    VALUES (PROCEDURE_NAME, RETURN_VALUE, CharID, DATE, ROW, ERROR_CODE ,ERROR_DESCRIPTION)
END
so incase the procedure fail for whatever reason you can debug and fix it if required (thats why I actually added return values to my queries)
Syloxx is offline  
Thanks
1 User
Old   #25
 
elite*gold: 0
Join Date: Feb 2016
Posts: 652
Received Thanks: 343
Quote:
Originally Posted by Syloxx View Post
Hello,

1st of all, looks like you didn't read my original post completely... it says "Don't remove / edit the header!"

If you did any modifications to the query, you would be able to add a 2nd header but removing or editing the original header simply offend the license conditions!

2nd I do not notice any modifications to the logic inside the query, but a rename... it is ok to do that but I wouldn't consider that as a "re-code"

3rd if you use released stuff please use the latest version atlease

4th you also should add a kind of error handler from the parent procedure
something like

Code:
IF @ReturnValue != 0
BEGIN
    INSERT INTO _ERROR_TABLE
    VALUES (PROCEDURE_NAME, RETURN_VALUE, CharID, DATE, ROW, ERROR_CODE ,ERROR_DESCRIPTION)
END
so incase the procedure fail for whatever reason you can debug and fix it if required (thats why I actually added return values to my queries)
Hi, i didn't read the original post carefully, but header back up.
and its like a little modification not a re-coding
cheers
EdwardTeach+- is offline  
Old   #26
 
Snow*'s Avatar
 
elite*gold: 1
Join Date: Nov 2011
Posts: 2,532
Received Thanks: 1,440
copy and paste much? not really helpful
Snow* is offline  
Old   #27
 
elite*gold: 0
Join Date: Feb 2016
Posts: 652
Received Thanks: 343
Quote:
Originally Posted by Snow* View Post
copy and paste much? not really helpful
ur mad cuz i said that ur project araxion is failed? XD
EdwardTeach+- is offline  
Old   #28
 
Snow*'s Avatar
 
elite*gold: 1
Join Date: Nov 2011
Posts: 2,532
Received Thanks: 1,440
Quote:
Originally Posted by EdwardTeach+- View Post
ur mad cuz i said that ur project araxion is failed? XD
What does Araxion have to do with you being a copycat? You're no where near Araxion team and what we achieved so far. When is your next release copycat?
Snow* is offline  
Old   #29
 
B1Q's Avatar
 
elite*gold: 350
Join Date: Aug 2015
Posts: 2,046
Received Thanks: 1,203
Quote:
Originally Posted by Snow* View Post
What does Araxion have to do with you being a copycat? You're no where near Araxion team and what we achieved so far. When is your next release copycat?
we mek neo rec arab rec i mek modals ityms qusts
300 Online Players

B1Q is offline  
Old   #30
 
Snow*'s Avatar
 
elite*gold: 1
Join Date: Nov 2011
Posts: 2,532
Received Thanks: 1,440
Quote:
Originally Posted by B1QB0SS :3 View Post
we mek neo rec arab rec i mek modals ityms qusts
300 Online Players

Hi, I'd like to hear more about your innovative features at Litviar.
Snow* is offline  
Reply


Similar Threads Similar Threads
[Buying] WTB Specific Account - DK / Paladin Account - With specific things on it.
03/04/2016 - World of Warcraft Trading - 0 Replies
SKYPE : cristian.puf21 - SKYPE : mishap87 http://www.eu-accounts.com/resources/static/image s/logo.png Hello, I'm looking for a specific account which must have all of the listed things below: -Plate class: DK/Pala with warrior TIER 3 (BMAH Preffered) -CM 17 with at least one FOS best realm time in WOD



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


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

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