Experienced Elementalist
- Joined
- Jan 21, 2015
- Messages
- 235
- Reaction score
- 202
hi RageZone
as i saw a lot of people wondering of how to add item to cash shop i decided to create this simple tutorial
NOTE: This Tutorial is not complete yet , and still need updates , and when i have more time i will update it again with correction or new info.
NOTE:It is not necessary that all the information is correct.
lets start
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
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
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
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
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"
before we end i want to mention again about itemID and ProductID of cash shop
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 :junglejane:
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
thanks for reading
as i saw a lot of people wondering of how to add item to cash shop i decided to create this simple tutorial
NOTE: This Tutorial is not complete yet , and still need updates , and when i have more time i will update it again with correction or new info.
NOTE:It is not necessary that all the information is correct.
lets start
first of all there are three tables that controls the cash shop which we will talk about it , here it is :
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
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
[*=1]cBranchId
this column define the id of this shop which later will be used for two things:
[*=3]define the parent tab of sub-tab
[*=3]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.
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.
[*=1]cBranchName
this column will define what is the visible name of this tab in game
[*=1]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}
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}
[*=1]cSortOrder
here you define the order of tabs , so which tabs should be before which
[*=1]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
[*=1]cIsUse
control if tab should be used and visible or not
[*=1]cBranchKey
this coulmn should have unique integer
note this column is auto generated
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
[*=1]cBranchId = shop tap id and usually its for sub-tap
[*=1]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--
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--
[*=1] cProductName = the visible name on the product box which should be the item name
[*=1]cMoneyCode = this column should determine which coin should be used but i dnt know how to use
[*=1]cPrice = the visible price on product box but note when you buy item it will use package price from table ProductDetails not this price
[*=1]cDiscountRate = this column should define the discount rate but how to use i dnt know
[*=1]cRegDate = when the product have been registered
[*=1]cStartDate = havn't tested it yet but maybe it define when should the product be visible to players so they can but it
[*=1]cEndDate= also this column not tested but it related to cStartDate but should define when its end so it will invisible to user
[*=1]cProductDesc= this column define the description of product
[*=1]cGiftYN = define if user can gift this product to other players (0=No, 1 =YES)
[*=1]cDispOrder = order priorty when displaying items in selected taps
[*=1]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)
[*=1]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%]"
[*=1]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)
[*=1]cRefundYN= define if user can refund his payment of this product but how to refund i still dnt know
[*=1]cPageNum = page priority when displaying items
[*=1]cRecommend = is it recomend product , should be displayed in recommed tab
[*=1]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
[*=1]cChildProductId=> define the package id
[*=1]cProductId=> define the product id so this package for which product
[*=1]cPrice=> the price of the package and should be >0 otherwise when u but the package it will say invalid product info
[*=1]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 ALL
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
before we end i want to mention again about itemID and ProductID of cash shop
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 :junglejane:
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
thanks for reading
Attachments
You must be registered for see attachments list
Last edited: