need help with gift silk

01/21/2015 23:16 Bocc1337#1
Hello im trying to use gift silk for currency for some items.. when i add the item into npc for gift silk any one can buy the item with out any gift silk in there account.. can any one give me a direction on where i can fix this problem?
I know silk point would work but i don't know the code.
Example:
Real silk = [CGI_WebPurchaseSilk]
Gift silk = [CGI_WebPurchaseSilk199]
silk point = ?

HELP :handsdown:
01/22/2015 15:54 Aaron*#2
create this procedure.
Quote:
USE [SRO_VT_ACCOUNT]
GO
/****** Object: StoredProcedure [dbo].[_AddSilkCharID] Script Date: 1/22/2015 6:50:16 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[_AddSilkByCharID]
@charid int,
@silk_point int
AS
-------------------------------
declare @Userid int = (SELECT UserJID FROM SRO_VT_SHARD.dbo._User WHERE (CharID = @Charid))
-------------------------------
begin
DECLARE @Silk int
set @Silk = 0

SELECT JID FROM SK_Silk WHERE (JID = @userid)
if (@@error <> 0 or @@rowcount = 0 or @Silk is null)
begin
INSERT INTO SK_Silk (JID, silk_own, silk_gift, silk_point) VALUES (@Userid,0,0,@silk_point)
end
else
begin
UPDATE SRO_VT_ACCOUNT.dbo.SK_Silk SET silk_point += @silk_point WHERE (JID = @userid)
end
end
and to execute it you must have the charid (so easy to get and i'm sure you know how to get it) and specify the silk amount . example;
Quote:
Exec _AddSilkByCharID CharID,Silk point amount
01/22/2015 18:33 Eslam Galull#3
@JOCS
you didnt get what he mean ..
if im right i think he using the Gift silk payment iD ' 16 ' in Payments he replace gold '1' or whatever payment method !!

@topic
i ddint tested it before but simply Check RefPrice from both sides Media & Server
01/22/2015 23:57 Bocc1337#4
yeah im using gift silk for rewards for job but items in the npc for gift silk you get for free.. i did test silk point and it will work for npc but cant find the change for silk point for the job system. to add silk point instead of gift silk

Quote:
Originally Posted by its.soul View Post
@JOCS
you didnt get what he mean ..
if im right i think he using the Gift silk payment iD ' 16 ' in Payments he replace gold '1' or whatever payment method !!

@topic
i ddint tested it before but simply Check RefPrice from both sides Media & Server
Yeah i checked both db and media .. both are set on 16
01/23/2015 13:03 Aaron*#5
I can't understand you. add me on skype and explain your problem.
skype : auroraofficial