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
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
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
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
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.
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.
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
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
[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?