Register for your free account! | Forgot your password?

You last visited: Today at 11:25

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

Advertisement



SilkSystem

Discussion on SilkSystem within the SRO PServer Guides & Releases forum part of the SRO Private Server category.

Reply
 
Old   #1
 
sonzenbi's Avatar
 
elite*gold: 0
Join Date: Feb 2017
Posts: 198
Received Thanks: 120
SilkSystem

I hope it was useful for you
You can add or subtract silk/giftsilk/silkpoint without teleport character .
exec SRO_VT_ACCOUNT.._SilkSystem @charname,@silktype,@SilkAmount,@type -- cong or tru
sonzenbi is offline  
Old 06/16/2019, 09:17   #2
 
Ryotic's Avatar
 
elite*gold: 0
Join Date: Nov 2016
Posts: 461
Received Thanks: 121
By kingdollar?

Sent from my Redmi Note 7 using Tapatalk
Ryotic is offline  
Old 06/16/2019, 09:19   #3
 
sonzenbi's Avatar
 
elite*gold: 0
Join Date: Feb 2017
Posts: 198
Received Thanks: 120
By me
sonzenbi is offline  
Old 06/16/2019, 09:21   #4
 
Ryotic's Avatar
 
elite*gold: 0
Join Date: Nov 2016
Posts: 461
Received Thanks: 121
Quote:
Originally Posted by sonzenbi View Post
By me
I saw this before in king dollar filter

Sent from my Redmi Note 7 using Tapatalk
Ryotic is offline  
Old 06/16/2019, 09:29   #5
 
sonzenbi's Avatar
 
elite*gold: 0
Join Date: Feb 2017
Posts: 198
Received Thanks: 120
I did it 30 minutes ago
sonzenbi is offline  
Old 06/16/2019, 11:10   #6
 
sonzenbi's Avatar
 
elite*gold: 0
Join Date: Feb 2017
Posts: 198
Received Thanks: 120
okay fine ,I'm so nucking foob
but i know it's really working
You can add or subtract silk/giftsilk/silkpoint without teleport character
If you can fix it become perfect,congratulations, you're not a noob like me
sonzenbi is offline  
Old 06/16/2019, 18:05   #7
 
elite*gold: 0
Join Date: Apr 2016
Posts: 289
Received Thanks: 67
Maybe, it help you! Too fast too furious.
btw... Silk_Point useless. It's contain a bug in database. If you don't fixed, you can buy anything sell as silk_point with 0 silk_point. :-)
Silk_Point reduce but it'll back after you reload your character!

PHP Code:
use SRO_VT_ACCOUNT
go
declare @Charname16 varchar(64
declare @
silk int,@gsilk int,@cursilk int
declare @accjid int, @CharID int
declare @AccountID varchar(55)
set @silk 4000 --- Put silk number to add (increase). Negative number if decrease
set 
@gsilk 0
set 
@Charname16 '' --- You need type only Charname16 or AccountID
set 
@AccountID ''
set @CharID = (select CharID from sro_vt_shard.dbo._Char where Charname16 = @Charname16)
begin
if @AccountID =  ''
    
begin
    set 
@accjid = (select UserJID from sro_vt_shard.dbo._user where CharID = @CharID)
    
set @cursilk = (select Silk_Own from SK_Silk where JID = @accjid)
    
set @AccountID = (select StrUserID from SRO_VT_ACCOUNT..TB_User where JID = @accjid)
    if @
accjid and (@silk != or @gsilk != 0)
        
begin
            update SK_Silk set silk_own 
silk_own + @silksilk_gift silk_gift + @gsilk    where JID = @accjid
        end
    
else
        
begin    
            
print 'Error! Cant find CharName or User Account'
        
end
    end
--@@@@@@@@@@@@@@@
else if @
Charname16 ''
    
begin
    set 
@accjid = (select JID from TB_User where StrUserID = @AccountID)
    
set @cursilk = (select Silk_Own from SK_Silk where JID = @accjid)
    if @
accjid and (@silk != or @gsilk != 0)
        
begin
            update SK_Silk set silk_own 
silk_own + @silksilk_gift silk_gift + @gsilk where JID = @accjid
        end
    
else
        
begin    
            
print 'Error! Cant find CharName or User Account'
        
end
    end
end 
hoangphan7 is offline  
Old 06/16/2019, 18:30   #8
 
#HB's Avatar
 
elite*gold: 100
Join Date: Sep 2017
Posts: 1,110
Received Thanks: 907
Quote:
Originally Posted by $WeGs View Post
IF ELSE
IF ELSE
IF ELSE
IF ELSE
IF ELSE
IF ELSE
IF ELSE
......
So, you're telling us if and else are bad conditional operators?
#HB is offline  
Old 06/16/2019, 18:35   #9
 
elite*gold: 135
Join Date: May 2015
Posts: 661
Received Thanks: 776
Quote:
Originally Posted by #HB View Post
So, you're telling us if and else are bad conditional operators?
Have you ever heard about case switch?

Also look at that query lol it's messy

Sent from my JKM-LX1 using Tapatalk
$WeGs is offline  
Old 06/16/2019, 19:23   #10
 
elite*gold: 0
Join Date: Mar 2010
Posts: 568
Received Thanks: 228
good job

PHP Code:
continue 
I edit to you

-- Remove

PHP Code:
BEGIN TRY
BEGIN TRANSACTION

COMMIT TRANSACTION
end 
TRY

BEGIN CATCH 
PHP Code:
COMMIT TRANSACTION
end 
TRY

BEGIN CATCH

IF @@
TRANCOUNT 0
BEGIN
ROLLBACK TRANSACTION
end

END 
CATCH 
PHP Code:
INSERT SRO_VT_ACCOUNT.dbo.SK_SilkChange_BY_Web(JID,silk_r emain,silk_offset,silk_type,reasonVALUES(@UserJID,@Cursilk-@Cursilk,@Cursilk,0,5
Change silk_r emain to silk_remain


Example:-

PHP Code:
USE [SRO_VT_ACCOUNT]
GO
/****** Object: StoredProcedure [dbo].[_SilkSystem] Script Date: 06/16/2019 1:50:26 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE proc 
[dbo].[_SilkSystem]
@
Charname varchar(25),
@
SilkType varchar(20),
@
SilkAmount int
as

DECLARE @
UserJID int = (SELECT JID FROM SRO_VT_ACCOUNT.dbo.TB_User U WITH(NOLOCK)JOIN SRO_VT_SHARD.dbo._User U2 WITH(NOLOCKON U.JID U2.UserJID JOIN SRO_VT_SHARD.dbo._Char C WITH(NOLOCKON U2.CharID C.CharID WHERE C.CharName16 = @Charname or C.NickName16 = @Charname)


IF(@
SilkType 'SILK')
BEGIN
IF not exists(SELECT JID from SRO_VT_ACCOUNT.dbo.SK_Silk WITH(NOLOCKwhere JID = @UserJID)
BEGIN
INSERT SRO_VT_ACCOUNT
.dbo.SK_SilkChange_BY_Web(JIDsilk_remain,silk_offset,silk_type,reasonVALUES(@UserJID,@SilkAmount,@SilkAmount,0,0)
INSERT SRO_VT_ACCOUNT.dbo.SK_Silk(JID,silk_own,silk_giftsilk_Point)VALUES(@UserJID,@SilkAmount,0,0)
end ELSE
INSERT SRO_VT_ACCOUNT.dbo.SK_SilkChange_BY_Web(JIDsilk_remain,silk_offset,silk_type,reasonVALUES(@UserJID,@SilkAmount,@SilkAmount,0,0)
UPDATE SK_Silk SET silk_own += @SilkAmount WHERE JID = @UserJID
END 

IF (@SilkType 'Silk_Gift')
BEGIN
IF not exists(SELECT JID from SRO_VT_ACCOUNT.dbo.SK_Silk WITH(NOLOCKwhere JID = @UserJID)
BEGIN
INSERT SRO_VT_ACCOUNT
.dbo.SK_SilkChange_BY_Web(JIDsilk_remain,silk_offset,silk_type,reasonVALUES(@UserJID,@SilkAmount,@SilkAmount,1,2)
INSERT SRO_VT_ACCOUNT.dbo.SK_Silk(JID,silk_own,silk_giftsilk_Point)VALUES(@UserJID,0,@SilkAmount,0)
end ELSE
INSERT SRO_VT_ACCOUNT.dbo.SK_SilkChange_BY_Web(JIDsilk_remain,silk_offset,silk_type,reasonVALUES(@UserJID,@SilkAmount,@SilkAmount,1,2)
UPDATE SK_Silk SET silk_gift += @SilkAmount WHERE JID = @UserJID
END

IF (@SilkType 'Silk_Point')
BEGIN
IF not exists(SELECT JID from SRO_VT_ACCOUNT.dbo.SK_Silk WITH(NOLOCKwhere JID = @UserJID)
BEGIN
INSERT SRO_VT_ACCOUNT
.dbo.SK_SilkChange_BY_Web(JIDsilk_remain,silk_offset,silk_type,reasonVALUES(@UserJID,@SilkAmount,@SilkAmount,2,2)
INSERT SRO_VT_ACCOUNT.dbo.SK_Silk(JID,silk_own,silk_giftsilk_Point)VALUES(@UserJID,0,0,@SilkAmount)
END ELSE
INSERT SRO_VT_ACCOUNT.dbo.SK_SilkChange_BY_Web(JIDsilk_remain,silk_offset,silk_type,reasonVALUES(@UserJID,@SilkAmount,@SilkAmount,2,2)
UPDATE SK_Silk SET silk_Point += @SilkAmount WHERE JID = @UserJID
END 

Fix if Char use job
PHP Code:
C.CharName16 = @Charname or C.NickName16 = @Charname 
PHP Code:
DECLARE @UserJID int = (SELECT JID FROM SRO_VT_ACCOUNT.dbo.TB_User U WITH(NOLOCK)JOIN SRO_VT_SHARD.dbo._User U2 WITH(NOLOCKON U.JID U2.UserJID JOIN SRO_VT_SHARD.dbo._Char C WITH(NOLOCKON U2.CharID C.CharID WHERE C.CharName16 = @Charname or C.NickName16 = @Charname

exec

PHP Code:
exec SRO_VT_ACCOUNT.._SilkSystem 'CharName','SilkType','SilkNumbers' 
Good Luck
Laag#82 is offline  
Thanks
1 User
Old 06/16/2019, 20:30   #11
 
elite*gold: 0
Join Date: Sep 2018
Posts: 60
Received Thanks: 5
Quote:
Originally Posted by sonzenbi View Post
By me
Hi sonzenbi
Can you help me resolve this?

I used Athena filter. But Reward silk system per hour is not working..


And procedure here


USE [ATHENA]
GO
/****** Object: StoredProcedure [dbo].[_RewardSystem] Script Date: 6/17/2019 1:20:38 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[_RewardSystem]
@struserID varchar(64),
@Cur_level int,
@itemID varchar(64),
@optLevel int
AS

BEGIN
/*
EXAMPLE CODE, FOR REWARD LEVEL RESTRICT
IF @Cur_level < 100)
BEGIN
RETURN;
END
*/


DECLARE @jid bigint = (SELECT JID FROM [SRO_VT_ACCOUNT].[dbo].[TB_User] WITH(NOLOCK) WHERE StrUserID = @struserID);


IF NOT EXISTS(SELECT JID FROM [SRO_VT_ACCOUNT].[dbo].[SK_silk] WITH(NOLOCK) WHERE JID = @jid)
BEGIN
--- INSERT THEIR SHIT
INSERT INTO [SRO_VT_ACCOUNT].[dbo].[SK_silk] (JID, silk_own, silk_gift, silk_point) VALUES @jid, 0, 0, 0);
END

/*
EXAMPLE CODE:
IF @Curlevel BETWEEN 0 AND 50)
BEGIN
-- Higher reward for level 0-50?
SET @optLevel = 32;
END
*/

IF @itemID = 'silk')
BEGIN
UPDATE [SRO_VT_ACCOUNT].[dbo].[SK_silk] SET silk_own = (silk_own + @optLevel) WHERE JID = @jid;
END

ELSE IF @itemID = 'gift')
BEGIN
--- fyll refund oqe?
UPDATE [SRO_VT_ACCOUNT].[dbo].[SK_silk] SET silk_gift = (silk_gift + @optLevel) WHERE JID = @jid;
END

ELSE IF @itemID = 'point')
BEGIN
UPDATE [SRO_VT_ACCOUNT].[dbo].[SK_silk] SET silk_point = (silk_point + @optLevel) WHERE JID = @jid;
END

ELSE
BEGIN
EXEC [SRO_VT_SHARD].[dbo].[_ADD_ITEM_EXTERN_CHEST] @jid, @itemID, 0, @optLevel;
END
END
ntabkpro is offline  
Old 06/16/2019, 20:46   #12
 
elite*gold: 0
Join Date: Mar 2010
Posts: 568
Received Thanks: 228
Quote:
Originally Posted by ntabkpro View Post
Hi sonzenbi
Can you help me resolve this?

I used Athena filter. But Reward silk system per hour is not working..


And procedure here


USE [ATHENA]
GO
/****** Object: StoredProcedure [dbo].[_RewardSystem] Script Date: 6/17/2019 1:20:38 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[_RewardSystem]
@struserID varchar(64),
@Cur_level int,
@itemID varchar(64),
@optLevel int
AS

BEGIN
/*
EXAMPLE CODE, FOR REWARD LEVEL RESTRICT
IF @Cur_level < 100)
BEGIN
RETURN;
END
*/


DECLARE @jid bigint = (SELECT JID FROM [SRO_VT_ACCOUNT].[dbo].[TB_User] WITH(NOLOCK) WHERE StrUserID = @struserID);


IF NOT EXISTS(SELECT JID FROM [SRO_VT_ACCOUNT].[dbo].[SK_silk] WITH(NOLOCK) WHERE JID = @jid)
BEGIN
--- INSERT THEIR SHIT
INSERT INTO [SRO_VT_ACCOUNT].[dbo].[SK_silk] (JID, silk_own, silk_gift, silk_point) VALUES @jid, 0, 0, 0);
END

/*
EXAMPLE CODE:
IF @Curlevel BETWEEN 0 AND 50)
BEGIN
-- Higher reward for level 0-50?
SET @optLevel = 32;
END
*/

IF @itemID = 'silk')
BEGIN
UPDATE [SRO_VT_ACCOUNT].[dbo].[SK_silk] SET silk_own = (silk_own + @optLevel) WHERE JID = @jid;
END

ELSE IF @itemID = 'gift')
BEGIN
--- fyll refund oqe?
UPDATE [SRO_VT_ACCOUNT].[dbo].[SK_silk] SET silk_gift = (silk_gift + @optLevel) WHERE JID = @jid;
END

ELSE IF @itemID = 'point')
BEGIN
UPDATE [SRO_VT_ACCOUNT].[dbo].[SK_silk] SET silk_point = (silk_point + @optLevel) WHERE JID = @jid;
END

ELSE
BEGIN
EXEC [SRO_VT_SHARD].[dbo].[_ADD_ITEM_EXTERN_CHEST] @jid, @itemID, 0, @optLevel;
END
END
Hello,

PHP Code:
Reward Delay Specified in Minutes 
Change from 1 to 60

PHP Code:
1 minutes
60 
1 hour 
don't forget reload guard
Laag#82 is offline  
Old 06/18/2019, 05:36   #13
 
B1Q's Avatar
 
elite*gold: 350
Join Date: Aug 2015
Posts: 2,008
Received Thanks: 1,193
Quote:
Originally Posted by $WeGs View Post
Have you ever heard about case switch?

Also look at that query lol it's messy

Sent from my JKM-LX1 using Tapatalk
I could say the same about your code LOL
B1Q is offline  
Old 06/18/2019, 17:07   #14
 
#HB's Avatar
 
elite*gold: 100
Join Date: Sep 2017
Posts: 1,110
Received Thanks: 907
Quote:
Originally Posted by $WeGs View Post
Have you ever heard about case switch?
Switch case in SQL is used to define variables' value, so you cannot use it to do other operations like updating a table or inserting. Hope you realize that.
#HB is offline  
Old 06/18/2019, 17:50   #15
 
elite*gold: 135
Join Date: May 2015
Posts: 661
Received Thanks: 776
Quote:
Originally Posted by #HB View Post
Switch case in SQL is used to define variables' value, so you cannot use it to do other operations like updating a table or inserting. Hope you realize that.
maybe you need to take a look at this




$WeGs is offline  
Reply

Tags
query, silkroad, silksystem


Similar Threads Similar Threads
Kurth Sro | 13D |125 | PVP | CH&EU | 50Silk/Hour | SilkSystem | Daily Events |
08/29/2016 - SRO PServer Advertising - 22 Replies
Kurth Sro
MaxRoad-online| D11 |Cap: 110 | SilkSystem | Isro System | Old School | Play2Win
05/20/2016 - SRO PServer Advertising - 81 Replies
http://i.epvpimg.com/uYw8h.png http://i.epvpimg.com/gAdfg.png http://i.epvpimg.com/jCfqf.png http://i.epvpimg.com/RNNqg.gif
Splendor-online| D11 |Cap: 110 | SilkSystem | vsro System | Play2Win
03/05/2016 - SRO PServer Advertising - 32 Replies
SplendorOnline Opening Date 31-01-2016 After 12 hour from The Post Home Splendor Sro - Silkroad Online Private Server Registration Splendor Sro - Silkroad Online Private Server Download Splendor Sro - Silkroad Online Private Server Main Server Information Cap: 110



All times are GMT +1. The time now is 11:25.


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.