About Instant Silk

05/24/2012 17:13 LegendM#1
Hello everyone I want use insant silk system like isro and myth :D

EXEC [CGI].[CGI_WebPurchaseSilk]
@OrderID = N'SOPanel_$userid-$silkamount-$rand',
@UserID = N'$userid',
@PkgID = 1,
@NumSilk = $silkamount,
@Price = 1

I found this but I cant get it work

OrderID any number
User id > id for example : tester1
PkgID> Dont know
NumSilk >target silk
Price >dont know

Any idea?
05/24/2012 23:04 Chernobyl*#2
Code:
USE [SRO_VT_ACCOUNT]
GO

/****** Object:  Table [dbo].[AddSilkLog]    Script Date: 01/28/2012 00:56:24 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[AddSilkLog](
	[username] [nvarchar](max) NULL,
	[silk_charged] [bigint] NULL,
	[time] [ntext] NULL,
	[status] [nvarchar](max) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
Code:
USE [SRO_VT_ACCOUNT]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[AddSilk]
	@USERNAME varchar(32),
	@SILKS INT
	AS
BEGIN
	SET NOCOUNT ON;
	
	
	
DECLARE @JID INT
DECLARE @EXISTS INT
DECLARE @ACCOUNT_EXISTS INT
DECLARE @SILK_ADD INT
DECLARE @TIME VARCHAR(100) = (SELECT GETDATE())
SET @SILK_ADD = @SILKS
SET @JID = (select JID from TB_User where StrUserID=@USERNAME)
SET @EXISTS = (select COUNT(*) from SK_Silk where JID=@JID)
SET @ACCOUNT_EXISTS = (select count(JID) from TB_User where StrUserID=@USERNAME)

IF @ACCOUNT_EXISTS < 1
BEGIN
insert into AddSilkLog(username,silk_charged,time,status) values(@USERNAME,@SILK_ADD,@TIME,'FAILED [invalid uname]')
END

ELSE

BEGIN -- if account exists [start]

if @EXISTS > 0
BEGIN
update SK_Silk set silk_own = (silk_own + @SILK_ADD) where JID=@JID
insert into AddSilkLog(username,silk_charged,time,status) values(@USERNAME,@SILK_ADD,@TIME,'CHARGED')
END
ELSE
BEGIN
insert into SK_Silk(JID,silk_own,silk_gift,silk_point) values(@JID,@SILK_ADD,0,0)
insert into AddSilkLog(username,silk_charged,time,status) values(@USERNAME,@SILK_ADD,@TIME,'CHARGED')
END



END


END -- if account exists [end]

Uber-old and ingredibly shitty writen, but works

exec AddSilk 'LegendM', 5000
05/25/2012 10:46 LegendM#3
Quote:
Originally Posted by Chernobyl* View Post
Code:
USE [SRO_VT_ACCOUNT]
GO

/****** Object:  Table [dbo].[AddSilkLog]    Script Date: 01/28/2012 00:56:24 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[AddSilkLog](
	[username] [nvarchar](max) NULL,
	[silk_charged] [bigint] NULL,
	[time] [ntext] NULL,
	[status] [nvarchar](max) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
Code:
USE [SRO_VT_ACCOUNT]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[AddSilk]
	@USERNAME varchar(32),
	@SILKS INT
	AS
BEGIN
	SET NOCOUNT ON;
	
	
	
DECLARE @JID INT
DECLARE @EXISTS INT
DECLARE @ACCOUNT_EXISTS INT
DECLARE @SILK_ADD INT
DECLARE @TIME VARCHAR(100) = (SELECT GETDATE())
SET @SILK_ADD = @SILKS
SET @JID = (select JID from TB_User where StrUserID=@USERNAME)
SET @EXISTS = (select COUNT(*) from SK_Silk where JID=@JID)
SET @ACCOUNT_EXISTS = (select count(JID) from TB_User where StrUserID=@USERNAME)

IF @ACCOUNT_EXISTS < 1
BEGIN
insert into AddSilkLog(username,silk_charged,time,status) values(@USERNAME,@SILK_ADD,@TIME,'FAILED [invalid uname]')
END

ELSE

BEGIN -- if account exists [start]

if @EXISTS > 0
BEGIN
update SK_Silk set silk_own = (silk_own + @SILK_ADD) where JID=@JID
insert into AddSilkLog(username,silk_charged,time,status) values(@USERNAME,@SILK_ADD,@TIME,'CHARGED')
END
ELSE
BEGIN
insert into SK_Silk(JID,silk_own,silk_gift,silk_point) values(@JID,@SILK_ADD,0,0)
insert into AddSilkLog(username,silk_charged,time,status) values(@USERNAME,@SILK_ADD,@TIME,'CHARGED')
END



END


END -- if account exists [end]

Uber-old and ingredibly shitty writen, but works

exec AddSilk 'LegendM', 5000
Wow thanks,much helped

Well ,I cant get it work
Invalid object name 'dbo.AddSilk'.
There's no procedure like addsilk
05/25/2012 11:23 IceAmStiel#4
Quote:
ALTER
-->
Quote:
CREATE
I'd like to request a clapping smiley or rather picture one right at this point -> . <- here :)
05/25/2012 11:44 LegendM#5
Quote:
Originally Posted by IceAmStiel View Post
-->

I'd like to request a clapping smiley or rather picture one right at this point -> . <- here :)
Well changed and now this error

Incorrect syntax near 'END'.
05/26/2012 16:57 LegendM#6
bump

Well,I get it work but
I want system like isro,I already have epin system so I just need system like isro.INSTANT Silk add witout teleport,or relog

Bump
05/28/2012 10:31 LegendM#7
up...
05/28/2012 10:47 ubRaDimz#8
Bro LegendM.. add me in skype.. we will talk.. dimzxd
05/28/2012 10:59 Kape7#9
You must get a payment system that offer pingback services, Paymentwall, the one I use, does it, you have to code your own asp script for fit the Paymentwall API, and that's all. To be honest the automatic silk system saves A LOT of time and work, you dont have to care about anything once its done.

A hint: Everything you need to make it work is on the billing scripts.
05/28/2012 13:45 LegendM#10
Quote:
Originally Posted by Synx7 View Post
You must get a payment system that offer pingback services, Paymentwall, the one I use, does it, you have to code your own asp script for fit the Paymentwall API, and that's all. To be honest the automatic silk system saves A LOT of time and work, you dont have to care about anything once its done.

A hint: Everything you need to make it work is on the billing scripts.
Thanks much helped
#close
10/14/2012 21:37 carl0s_#11
Hi, here is code for people who cant create this procedure.

Code:
USE [SRO_VT_ACCOUNT]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[AddSilk]
	@USERNAME varchar(32),
	@SILKS INT
	AS
BEGIN
	SET NOCOUNT ON;

	DECLARE @JID INT
	DECLARE @EXISTS INT
	DECLARE @ACCOUNT_EXISTS INT
	DECLARE @SILK_ADD INT
	DECLARE @TIME VARCHAR(100) 

	SET @TIME = GETDATE()

	SET @SILK_ADD = @SILKS
	SET @JID = (SELECT JID FROM TB_User WHERE StrUserID=@USERNAME)
	SET @EXISTS = (SELECT COUNT(*) FROM SK_Silk WHERE JID=@JID)
	SET @ACCOUNT_EXISTS = (SELECT COUNT(JID) FROM TB_User WHERE StrUserID=@USERNAME)

	IF @ACCOUNT_EXISTS < 1	BEGIN
		INSERT INTO AddSilkLog (
			username,
			silk_charged,
			[time],
			[status]
	) VALUES(
			@USERNAME,
			@SILK_ADD,
			@TIME,
			'FAILED [invalid uname]'
	)
	END
	ELSE BEGIN -- if account exists [start]
		IF @EXISTS > 0	BEGIN

			UPDATE SK_Silk
			   SET silk_own = (silk_own + @SILK_ADD) 
			 WHERE JID=@JID

			INSERT INTO AddSilkLog(
				username,
				silk_charged,
				[time],
				[status]
			) VALUES(
				@USERNAME,
				@SILK_ADD,
				@TIME,
				'CHARGED'
			)
		END
		ELSE	BEGIN
			INSERT INTO SK_Silk(
				JID,
				silk_own,
				silk_gift,
				silk_point
			) VALUES(
				@JID,
				@SILK_ADD,
				0,
				0
			)

			INSERT INTO AddSilkLog(
				username,
				silk_charged,
				[time],
				[status]
			) VALUES(
				@USERNAME,
				@SILK_ADD,
				@TIME,
				'CHARGED'
			)
		END


	END -- if account exists [end]

END -- Principal
02/06/2013 16:57 ahmed4ever2u#12
BUMP
how it works?
02/09/2013 02:33 sarkoplata#13
Quote:
Originally Posted by ahmed4ever2u View Post
BUMP
how it works?
Gameserver looks to records on this table every 5 seconds if i remember right.
SK_SilkChange_BY_Web

So you simply add a record there, and ingame, at F10 Item mall, you will have your silks, without teleporting.