Items & cash shop
first of all there are three tables that controls the cash shop which we will talk about it , here it is :
1. C9Services.Server.TblShopMenuInfo
this table as its name show , it's control the menu tabs of the shop
note that there are two types of tabs here, the main tabs like fashions for example
and sub-tabs like Fashion Set which is sub tab of fashions .
lets have some info about columns :)
cBranchId
this column define the id of this shop which later will be used for two things:
define the parent tab of sub-tab
or connect the product to some tab
but as we see in table (as in image too)
there are a convention way of how they are written
if you take a deeper look you'll find that the main tabs are defined as shop0X
and the sub tabs like shop_0X_tap_0Y , you are not obliged to follow this convention,but it just will make it clear when use.
dnt put ItemID in product but SaleProduct id from attached list
cuz here in query we used id =>9273 but cash shop show item -> misty jerian set
but when use this command /itemkey 92731
its character rename ticket
also item id 13002 in gm command get nothing but in cashshop its some of hunter chestpiece
here an image for adding character rename ticket
BTW, i think they have a stupid cash shop system
i want to note when you change any thing in cash shop you dnt need to restart the all servers but just restart world server without even logout from your character just close cash shop and reopen it and every thing will be updated :)
hemaprince
Ragezone
Read more ...
first of all there are three tables that controls the cash shop which we will talk about it , here it is :
1. C9Services.Server.TblShopMenuInfo
this table as its name show , it's control the menu tabs of the shop
note that there are two types of tabs here, the main tabs like fashions for example
and sub-tabs like Fashion Set which is sub tab of fashions .
lets have some info about columns :)
cBranchId
this column define the id of this shop which later will be used for two things:
define the parent tab of sub-tab
or connect the product to some tab
but as we see in table (as in image too)
there are a convention way of how they are written
if you take a deeper look you'll find that the main tabs are defined as shop0X
and the sub tabs like shop_0X_tap_0Y , you are not obliged to follow this convention,but it just will make it clear when use.
cBranchName
this column will define what is the visible name of this tab in game
cSuperBranchId & cBranchDepth
these two columns seems to be connected to each other
the first one define which tabs is the parent of this tab if it child
and the second define its depth so if it main tap then depth=1
and if sub then depth=2
also if depth= 1 -> SuperBranchId = BranchID
but if depth=2 -> SuperBranchId = {the parent tab id for example shop01}
cSortOrder
here you define the order of tabs , so which tabs should be before which
cProductCount
this column from its name is supposed to have the count of product in this section but i dnt know what is the benefits of it , also in all rows i found its value equal to zero
cIsUse
control if tab should be used and visible or not
cBranchKey
this coulmn should have unique integer
note this column is auto generated
Thats all the columns in this table , uou can check and compare by yourself but before we moveing to another table here is a custom tab i created:
note for the sort effect.
now lets move to another table which is
2. C9Services.Server.TblShopMenuInfo
this table will define the product box , and when i say product box i mean this :
ok now lets explain some of columns - note that i dnt know the functionalty of all columns and some columns its value is unkown so maybe you can help me to make this tutorial better
cBranchId = shop tap id and usually its for sub-tap
cProductId = this column contains two parts "K_C9_" which is fixed text i think
and the other part is the string id of item you want to add which should be of length of 8 digits so for example if you have item of id 1234 then the product id will be K_C9_00001234
also if id is 123456 then product id will be K_C9_00123456
--update--
you can write the id directly like 123456 without "K_C9_" and the same result will be
Note: the ProductID is not the same as ItemID and the id here should be the SaleProduct ID (in attachment a list of saleProduct i extracted from c9t file
--update--
cProductName = the visible name on the product box which should be the item name
cMoneyCode = this column should determine which coin should be used but i dnt know how to use
cPrice = the visible price on product box but note when you buy item it will use package price from table ProductDetails not this price
cDiscountRate = this column should define the discount rate but how to use i dnt know
cRegDate = when the product have been registered
cStartDate = havn't tested it yet but maybe it define when should the product be visible to players so they can but it
cEndDate= also this column not tested but it related to cStartDate but should define when its end so it will invisible to user
cProductDesc= this column define the description of product
cGiftYN = define if user can gift this product to other players (0=No, 1 =YES)
cDispOrder = order priorty when displaying items in selected taps
cProductType = this is the text written in the (red | blue) label of product box which contain two parts separated by "," the first is the text and second is the color (R=Red,G=Blue)
cDiscountInfo = simple description about discount this visible beside the price like in above image in last product box "WareHouse Expantion" its defined here as "[50%]"
ClassName/ClassKey => determine which class can buy this item the classname define the visible text class key define the class id [0=fighter, 1=hunter, 3=shaman, 4 =witchblade, 255=common(all classes)
cRefundYN= define if user can refund his payment of this product but how to refund i still dnt know
cPageNum = page priority when displaying items
cRecommend = is it recomend product , should be displayed in recommed tab
cLevelMin/cLevelMax = min and max level should display or use this item
note that i left some column that i dnt know its usage
phew , lets take a break , im little tired hehe
ok , now to last table which define the packages of product
3. C9Services.Server.TblShopProductDetailInfo
lets take a look at columns
cChildProductId=> define the package id
cProductId=> define the product id so this package for which product
cPrice=> the price of the package and should be >0 otherwise when u but the package it will say invalid product info
cUnitName=> package name which will be visible when you choose packages menu
in fact other column i dnt know for what is it used so i hope someone discover it and share with us
now lets talk about insert qeury , before you excute the insert query you have to turn off the consntraint check for ProductDetials table otherwise query will not excute
here is a query for add an item with package of name "unlimited" :)
ALTER TABLE [C9Service].[Server].[TblShopProductDetailInfo] NOCHECK CONSTRAINT ALLbefore we end i want to mention again about itemID and ProductID of cash shop
INSERT [C9Service].[Server].[TblShopProductInfo] ([cBranchId], [cProductId], [cProductName], [cMoneyCode], [cPrice], [cDiscountRate], [cRegDate], [cStartDate], [cEndDate], [cProductDesc], [cGiftYN], [cSellTotalCount], [cDuplicateSell], [cUnitName], [cProductType], [cDispOrder], [cDiscountInfo], [cClassName], [cClassKey], [cRefundYN], [cPageNum], [cRecommend], [cLevelMin], [cLevelMax]) VALUES (N'shop02_tap01', N'K_C9_00009273', N'Simple picture frame', N'GP_P_COIN', 50,10, N'2.01111e+013', N'2.01111e+013', N'2.01111e+013', N'guild house wall decoration , a simple picture frame for nice wall', 1, 0, 1, N'5个', N'NEW,R', 3, '[10%]', N'Common', 255, 1, 1, 1, 0, 0)
INSERT [C9Service].[Server].[TblShopProductDetailInfo] ([cChildProductId], [cProductId], [cPrice], [cUnitName], [cValidTerm], [cPossibleLevel], [cUseCount], [cPeriod], [cCoinPrice], [cGameMoneyPrice], [cClassName]) VALUES (N'K_C9_00009273', N'K_C9_00009273', 50, N'Unlimited', 0, 0, 1, 0, 0, 0, N'All occupations')
ALTER TABLE [C9Service].[Server].[TblShopProductDetailInfo] CHECK CONSTRAINT ALL
dnt put ItemID in product but SaleProduct id from attached list
cuz here in query we used id =>9273 but cash shop show item -> misty jerian set
but when use this command /itemkey 92731
its character rename ticket
also item id 13002 in gm command get nothing but in cashshop its some of hunter chestpiece
here an image for adding character rename ticket
BTW, i think they have a stupid cash shop system
i want to note when you change any thing in cash shop you dnt need to restart the all servers but just restart world server without even logout from your character just close cash shop and reopen it and every thing will be updated :)
hemaprince
Ragezone