Register for your free account! | Forgot your password?

You last visited: Today at 15:43

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

Advertisement



SRO Item mall sql proc

Discussion on SRO Item mall sql proc within the SRO Private Server forum part of the Silkroad Online category.

Reply
 
Old   #1
 
ThElitEyeS's Avatar
 
elite*gold: 0
Join Date: Nov 2011
Posts: 333
Received Thanks: 186
SRO Item mall sql proc

Code:
USE [YourDB]
GO


/****** Coded By ThElitEyeS ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROC [dbo].[purchase]
@char varchar(50),
@code varchar(129),
@price int,
@amount int,
@plus int
AS
IF ((SELECT TOP 1 silk_own FROM SRO_VT_ACCOUNT.DBO.SK_Silk WHERE JID = (SELECT JID FROM SRO_VT_ACCOUNT.DBO.TB_User WHERE StrUserID = @char)) >= @price)
BEGIN
    DECLARE @empty int
    SELECT top 1 @empty = Slot FROM SRO_VT_SHARD.DBO._Inventory WHERE CharID = (SELECT CharID FROM SRO_VT_SHARD.DBO._Char WHERE CharName16 = @char) AND Slot >= 13 AND ItemID = 0 order by slot
    IF (@empty >= (SELECT InventorySize FROM SRO_VT_SHARD.DBO._Char WHERE CharName16 = @char))
    BEGIN
        SELECT 'Inventory is full.' AS INFO
    END
    ELSE
    BEGIN
        SELECT 'Item was placed on the selected Character.' AS INFO;
        DECLARE @itemid int
        DECLARE @serial varchar(129)
        DECLARE @newid bigint
        SELECT @itemid = ID FROM SRO_VT_SHARD.DBO._RefObjCommon WHERE CodeName128 = @code
        SELECT @serial = LatestItemSerial FROM SRO_VT_SHARD.DBO._LatestItemSerial
        SELECT @newid = ID64 FROM SRO_VT_SHARD.DBO._Items WHERE Serial64 = @serial
        INSERT INTO SRO_VT_SHARD.DBO._Items (RefItemID, OptLevel, Data, MagParamNum, Serial64) VALUES (@itemid, @plus, @amount, 0, @serial)
        INSERT INTO SRO_VT_SHARD.DBO._ItemPool (ItemID, InUse) VALUES (@newid, 1)
        UPDATE SRO_VT_SHARD.DBO._Inventory SET ItemID = @newid WHERE Slot = @empty AND  CharID = (SELECT CharID FROM SRO_VT_SHARD.DBO._Char WHERE CharName16 = @char)
        UPDATE SRO_VT_ACCOUNT.DBO.SK_Silk SET silk_own = silk_own - @price WHERE JID = (SELECT JID FROM SRO_VT_ACCOUNT.DBO.TB_User WHERE StrUserID = @char)
        INSERT INTO mall_log(character, code, price, amount, plus, date) VALUES (@char, @code, @price, @amount, @plus, GETDATE())
    END
END
ELSE
BEGIN
    SELECT 'Not enough silks' AS INFO
END
GO
Logs table



Code:
USE [YourDB]
GO
SET ANSI_NULLS ON
GO


SET QUOTED_IDENTIFIER ON
GO


SET ANSI_PADDING ON
GO


CREATE TABLE [dbo].[mall_log](
[id] [int] IDENTITY(1,1) NOT NULL,
[character] [varchar](50) NULL,
[code`] [varchar](129) NULL,
    [price] [int] NULL,
    [amount] [int] NULL,
    [plus] [int] NULL,
    [date] [datetime] NULL
) ON [PRIMARY]


GO


SET ANSI_PADDING OFF
GO
remove the ` from [code`]
ThElitEyeS is offline  
Thanks
2 Users
Old 03/31/2012, 00:57   #2
 
ThElitEyeS's Avatar
 
elite*gold: 0
Join Date: Nov 2011
Posts: 333
Received Thanks: 186
hater

useless boy you was crying to me how to make item mall.
ThElitEyeS is offline  
Old 03/31/2012, 00:57   #3
 
LastThief*'s Avatar
 
elite*gold: 60
Join Date: Feb 2012
Posts: 3,942
Received Thanks: 6,475
Why should I hate on you ? Seriously.


People nowadays can't accept criticism !

I cried on you ? hahaha made my day.

You forgot when you was begging me to stop crashing your sql server and deleting your database ?

but well you're kid and you don't know what is criticism.
LastThief* is offline  
Old 03/31/2012, 00:58   #4
Chat Killer In Duty


 
PortalDark's Avatar
 
elite*gold: 5
Join Date: May 2008
Posts: 16,310
Received Thanks: 6,470
Quote:
Originally Posted by LastThief* View Post
Why should I hate on you ? Seriously.


People nowadays can't accept criticism !
thats true(about criticism, not the idea in fact)
even if it is criticism, you two, try not making fuzz of it
but i have to say any share/help is appreciated
PortalDark is offline  
Old 03/31/2012, 01:00   #5
 
ThElitEyeS's Avatar
 
elite*gold: 0
Join Date: Nov 2011
Posts: 333
Received Thanks: 186
Quote:
Originally Posted by LastThief* View Post
Why should I hate on you ? Seriously.


People nowadays can't accept criticism !

I cried on you ? hahaha made my day.

You forgot when you was begging me to stop crashing your sql server and deleting your database ?
no i don't i remember when cherno was crashing it
KIDS

begging -> in your dreams
ThElitEyeS is offline  
Old 03/31/2012, 01:07   #6
Chat Killer In Duty


 
PortalDark's Avatar
 
elite*gold: 5
Join Date: May 2008
Posts: 16,310
Received Thanks: 6,470
guys, seriously, I told you not to make fuzz of it, at least not here
get a room somewhere and settle things there
PortalDark is offline  
Old 03/31/2012, 01:08   #7
 
FoxRayz's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 1,713
Received Thanks: 892
Quote:
Originally Posted by LastThief* View Post
Why should I hate on you ? Seriously.


People nowadays can't accept criticism !

I cried on you ? hahaha made my day.

You forgot when you was begging me to stop crashing your sql server and deleting your database ?

but well you're kid and you don't know what is criticism.
Quote:
Originally Posted by PortalDark View Post
thats true(about criticism, not the idea in fact)
even if it is criticism, you two, try not making fuzz of it
but i have to say any share/help is appreciated
Criticism should be constructive and not based on personal disputes.


Ont: Some people here may find it useful so thanks
FoxRayz is offline  
Thanks
1 User
Old 03/31/2012, 01:09   #8
Chat Killer In Duty


 
PortalDark's Avatar
 
elite*gold: 5
Join Date: May 2008
Posts: 16,310
Received Thanks: 6,470
Quote:
Originally Posted by FoxRayz View Post
Criticism should be constructive and not based on personal disputes.


Ont: Some people here may find it useful so thanks
i said, i like the idea of criticism, not the way he did
PortalDark is offline  
Old 03/31/2012, 01:10   #9
 
LastThief*'s Avatar
 
elite*gold: 60
Join Date: Feb 2012
Posts: 3,942
Received Thanks: 6,475
Quote:
Originally Posted by FoxRayz View Post
Criticism should be constructive and not based on personal disputes.


Ont: Some people here may find it useful so thanks
It's not based on personal disputes infact it's just the truth that it's totally useless.
LastThief* is offline  
Old 03/31/2012, 01:12   #10
 
FoxRayz's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 1,713
Received Thanks: 892
Quote:
Originally Posted by LastThief* View Post
It's not based on personal disputes infact it's just the truth that it's totally useless.
Still if this release wasnt from TheEliteEyes you wouldn't even bother to write in the topic. Maybe it's useless for you because you're already into php. But still there's some people that might need it.
FoxRayz is offline  
Thanks
2 Users
Old 03/31/2012, 01:13   #11
 
ThElitEyeS's Avatar
 
elite*gold: 0
Join Date: Nov 2011
Posts: 333
Received Thanks: 186
Quote:
Originally Posted by FoxRayz View Post
Still if this release wasnt from TheEliteEyes you wouldn't even bother to write in the topic. Maybe it's useless for you because you're already into php. But still there's some people that might need it.
you can call it from php too.
he just crying cuz he couldn't make it.
ThElitEyeS is offline  
Old 03/31/2012, 01:19   #12
 
✗EpicSoul✗'s Avatar
 
elite*gold: 0
Join Date: Jul 2011
Posts: 1,189
Received Thanks: 531
elite you cant say **** bro. u came into our Skype convo crying for help.
@topic why didnt you just send it to the kid that "cryed" at you.
✗EpicSoul✗ is offline  
Old 03/31/2012, 01:23   #13
Chat Killer In Duty


 
PortalDark's Avatar
 
elite*gold: 5
Join Date: May 2008
Posts: 16,310
Received Thanks: 6,470
ok, seems that this will lead to a flamewar
anyone that keeps at it, will get reported
please guys, this is a SHARE, just say thank you and leave without being rude
PortalDark is offline  
Old 03/31/2012, 01:25   #14
 
Keyeight's Avatar
 
elite*gold: 844
Join Date: Oct 2010
Posts: 839
Received Thanks: 192
guys stop this stupid Ware and grow up if you dont like it someone else would like it bro
@topic

thx bro i find it useful for me
Keyeight is offline  
Thanks
1 User
Old 03/31/2012, 01:26   #15
Chat Killer In Duty


 
PortalDark's Avatar
 
elite*gold: 5
Join Date: May 2008
Posts: 16,310
Received Thanks: 6,470
Quote:
Originally Posted by ThElitEyeS View Post
1. i never cried for help.
2. you was doing this in team viewer.
3. you wasn't know how to fix the problem so stfu.
4. you and your friend was trolling me so both of you blocked and deleted .
tell me if you want to know any thing else
why you keep spamming and flaming
#reported
PortalDark is offline  
Reply


Similar Threads Similar Threads
[REQUEST] Item mall item for 0 silk
12/02/2011 - SRO Private Server - 11 Replies
Hello , I am trying to make some item mall items to 0 silk but there is a problem when i put the cost to 0 silk the users can not purchase the items. Only cost to 1 or more is working ... Any idea where is the restriction about this ( maybe a stored procedure ? ) Cordialy,
item mall
07/13/2008 - EO PServer Hosting - 3 Replies
i have a problem, everytime i go to different servers i cant see anything in the mall except the name acme on the top, can someone help me please:):)
Item Mall in CO ?
01/02/2007 - Conquer Online 2 - 10 Replies
In CO forums some ppl are posting about a 'Item Mall' working in CO Chinesse version. There you can buy mets, Db's, ND... and some other stuff. I think it'll be greate more even if DB's price go down like 1kk or something :D -Did u hear something about it? -What do u think about? text2schild.php?smilienummer=1&text=I hope i can buy there full 2 sock stuff!!' border='0' alt='I hope i can buy there full 2 sock stuff!!' />
item mall
01/02/2007 - Conquer Online 2 - 30 Replies
Well I got some xmas allowance and have been waiting to get something good from tq website (after 4331 i've been really poor, no more selling met scrolls and getting super gems) didn't buy db cause i think the new item mall will make dbs worthless... but now i'm growing impatient :D So any1 have any ideas on the item mall?



All times are GMT +2. The time now is 15:43.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

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