Register for your free account! | Forgot your password?

You last visited: Today at 16:14

  • 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
 
elite*gold: 0
Join Date: Feb 2017
Posts: 121
Received Thanks: 52
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


 
elite*gold: 327
Join Date: Nov 2016
Posts: 381
Received Thanks: 97
By kingdollar?

Sent from my Redmi Note 7 using Tapatalk


Ryotic is offline  
Old 06/16/2019, 09:19   #3
 
elite*gold: 0
Join Date: Feb 2017
Posts: 121
Received Thanks: 52
By me
sonzenbi is offline  
Old 06/16/2019, 09:21   #4


 
elite*gold: 327
Join Date: Nov 2016
Posts: 381
Received Thanks: 97
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
 
elite*gold: 0
Join Date: Feb 2017
Posts: 121
Received Thanks: 52
I did it 30 minutes ago
sonzenbi is offline  
Old 06/16/2019, 11:10   #6
 
elite*gold: 0
Join Date: Feb 2017
Posts: 121
Received Thanks: 52
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: 215
Received Thanks: 45
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
[email protected]@@@@@@@@@@@@@@
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
 
elite*gold: 0
Join Date: Sep 2017
Posts: 780
Received Thanks: 366
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: 95
Join Date: May 2015
Posts: 606
Received Thanks: 538
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: 56
Join Date: Mar 2010
Posts: 330
Received Thanks: 58
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[email protected]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
khaleed2010 is offline  
Thanks
1 User
Old 06/16/2019, 20:30   #11
 
elite*gold: 0
Join Date: Sep 2018
Posts: 38
Received Thanks: 0
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..
https://i.imgur.com/VYJHLRM.jpg
https://i.imgur.com/vMLypmn.jpg
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: 56
Join Date: Mar 2010
Posts: 330
Received Thanks: 58
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..
https://i.imgur.com/VYJHLRM.jpg
https://i.imgur.com/vMLypmn.jpg
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
khaleed2010 is offline  
Old 06/18/2019, 05:36   #13
 
elite*gold: 950
Join Date: Aug 2015
Posts: 1,913
Received Thanks: 1,107
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
 
elite*gold: 0
Join Date: Sep 2017
Posts: 780
Received Thanks: 366
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: 95
Join Date: May 2015
Posts: 606
Received Thanks: 538
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
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 +2. The time now is 16:14.


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

BTC: 33E6kMtxYa7dApCFzrS3Jb7U3NrVvo8nsK
ETH: 0xc6ec801B7563A4376751F33b0573308aDa611E05

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