Cash Shop Pandaria 5.4.8 WIP

danburp

Verified Member
25
2021
29
*UPDATE*
Okay, I've updated my guide and added a new download link near the bottom. If you're interested in getting gold in to your currency tab I figured a way to do so.
I know there must be other ways but this is the best I could do :)

I'm doing this in my spare time due to me having a new born and he keeps me up all hours so, here we go.
This will be a work in progress, bare with me! First I'm going to post some screens and the example SQL with a few items you see in the pics.
I will do my best to explain in an upcoming quick guide.

Here is the SQL file.
Cash_Shop

This will fill your database with the following.
  1. mop_world.battle_pay_entry
  2. mop_world.battle_pay_group
  3. mop_world.battle_pay_product
  4. mop_world.battle_pay_product_items
Forgot to mention too use the SQL file simply use HeidiSQL and goto mop_world the click>File>Run SQL File select the cash_shop.sql and run it onto mop_world reboot server and the example shop will show up.

if the download doesn't work copy&paste this wall of code into a txt file and rename it to whatever with the extension like this Whatever.sql and save.

SQL:
-- --------------------------------------------------------
-- Host:                         127.0.0.1
-- Server version:               5.5.9-log - MySQL Community Server (GPL)
-- Server OS:                    Win32
-- HeidiSQL Version:             11.3.0.6295
-- --------------------------------------------------------

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

-- Dumping structure for table mop_world.battle_pay_entry
CREATE TABLE IF NOT EXISTS `battle_pay_entry` (
  `id` int(10) unsigned NOT NULL DEFAULT '0',
  `productId` int(10) unsigned NOT NULL DEFAULT '0',
  `groupId` int(10) unsigned NOT NULL DEFAULT '0',
  `idx` int(10) NOT NULL DEFAULT '0',
  `title` varchar(50) NOT NULL,
  `description` varchar(500) NOT NULL,
  `icon` int(10) unsigned NOT NULL DEFAULT '0',
  `displayId` int(10) unsigned NOT NULL DEFAULT '0',
  `banner` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `flags` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- Dumping data for table mop_world.battle_pay_entry: 6 rows
DELETE FROM `battle_pay_entry`;
/*!40000 ALTER TABLE `battle_pay_entry` DISABLE KEYS */;
INSERT INTO `battle_pay_entry` (`id`, `productId`, `groupId`, `idx`, `title`, `description`, `icon`, `displayId`, `banner`, `flags`) VALUES
    (44, 44, 2, 0, 'Reins of the Rusted Proto-Drake', 'Flying mount.', 294032, 0, 2, 0),
    (1, 83, 1, 0, 'Level 90 Character Boost', 'There comes a time in every hero\'s quest when they need a little boost to help get them over the hump and back into the action. With a level 90 character boost, you can grant one character a one-time boost to level 90 instantly.', 614740, 0, 2, 0),
    (3, 3, 2, 0, 'Reins of the Ironbound Proto-Drake', 'Flying Mount', 294032, 0, 2, 0),
    (4, 4, 4, 0, 'Traveler\'s Backpack', 'Bag 16 slots', 0, 0, 0, 0),
    (5, 5, 3, 0, 'Mini Diablo', 'Pet', 913566, 0, 2, 0),
    (6, 6, 5, 0, 'Thunderfury, Blessed Blade of the Windseeker', 'Legendary Weapon', 135349, 0, 2, 0);
/*!40000 ALTER TABLE `battle_pay_entry` ENABLE KEYS */;

-- Dumping structure for table mop_world.battle_pay_group
CREATE TABLE IF NOT EXISTS `battle_pay_group` (
  `id` int(10) unsigned NOT NULL DEFAULT '0',
  `idx` int(10) unsigned NOT NULL DEFAULT '0',
  `name` varchar(16) NOT NULL,
  `icon` int(10) unsigned NOT NULL DEFAULT '0',
  `type` tinyint(3) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`idx`,`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- Dumping data for table mop_world.battle_pay_group: 5 rows
DELETE FROM `battle_pay_group`;
/*!40000 ALTER TABLE `battle_pay_group` DISABLE KEYS */;
INSERT INTO `battle_pay_group` (`id`, `idx`, `name`, `icon`, `type`) VALUES
    (1, 1, 'Featured', 939376, 1),
    (2, 2, 'Mounts', 939379, 0),
    (3, 3, 'Pets', 939380, 0),
    (4, 4, 'Bags', 940857, 0),
    (5, 5, 'Weapons', 940868, 0);
/*!40000 ALTER TABLE `battle_pay_group` ENABLE KEYS */;

-- Dumping structure for table mop_world.battle_pay_product
CREATE TABLE IF NOT EXISTS `battle_pay_product` (
  `id` int(10) unsigned NOT NULL DEFAULT '0',
  `title` varchar(50) NOT NULL,
  `description` varchar(500) NOT NULL,
  `icon` int(10) unsigned NOT NULL DEFAULT '0',
  `price` int(10) unsigned NOT NULL DEFAULT '0',
  `discount` int(10) unsigned NOT NULL DEFAULT '0',
  `displayId` int(10) unsigned NOT NULL DEFAULT '0',
  `type` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `choiceType` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `flags` int(10) unsigned NOT NULL DEFAULT '0',
  `flagsInfo` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- Dumping data for table mop_world.battle_pay_product: 6 rows
DELETE FROM `battle_pay_product`;
/*!40000 ALTER TABLE `battle_pay_product` DISABLE KEYS */;
INSERT INTO `battle_pay_product` (`id`, `title`, `description`, `icon`, `price`, `discount`, `displayId`, `type`, `choiceType`, `flags`, `flagsInfo`) VALUES
    (44, 'Reins of the Rusted Proto-Drake', 'Flying Mount', 294032, 1, 0, 28954, 0, 1, 47, 0),
    (83, 'Level 90 Character Boost', 'Boost your character to level 90!', 614740, 1, 0, 0, 2, 1, 975, 0),
    (3, 'Reins of the Ironbound Proto-Drake', 'Flying Mount', 294032, 1, 0, 28953, 0, 1, 47, 0),
    (4, 'Traveler\'s Backpack', 'Bag', 133633, 1, 0, 0, 0, 1, 47, 0),
    (5, 'Mini Diablo', 'Mini Diablo Pet', 913566, 1, 0, 10992, 0, 1, 47, 0),
    (6, 'Thunderfury, Blessed Blade of the Windseeker', 'Legendary Weapon', 135349, 1, 0, 0, 0, 1, 47, 0);
/*!40000 ALTER TABLE `battle_pay_product` ENABLE KEYS */;

-- Dumping structure for table mop_world.battle_pay_product_items
CREATE TABLE IF NOT EXISTS `battle_pay_product_items` (
  `id` int(10) unsigned NOT NULL DEFAULT '0',
  `itemId` int(10) unsigned NOT NULL DEFAULT '0',
  `count` int(10) unsigned NOT NULL DEFAULT '0',
  `productId` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `productId` (`itemId`,`productId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- Dumping data for table mop_world.battle_pay_product_items: 6 rows
DELETE FROM `battle_pay_product_items`;
/*!40000 ALTER TABLE `battle_pay_product_items` DISABLE KEYS */;
INSERT INTO `battle_pay_product_items` (`id`, `itemId`, `count`, `productId`) VALUES
    (83, 17, 1, 83),
    (44, 45802, 1, 44),
    (3, 45801, 1, 3),
    (4, 4500, 1, 4),
    (5, 13584, 1, 5),
    (6, 19019, 1, 6);
/*!40000 ALTER TABLE `battle_pay_product_items` ENABLE KEYS */;

/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */;

PLEASE! Make sure you use this on a test server until you have it the way you want or those tables will be dropped forever.

Here are 3 images showing the in-game cash shop fully working.
Shop_Feature.jpg

Mounts.jpg

Weapons.jpg


Part 1. Battle_Pay_Group.

Was going to wait till the end but lets just get this out of the way right now. For you to be able to use your Cash Shop goto your worldserver.conf and open it with your favorite txt editor, I use Notepadd++; use the search function and type "pay" or "battle pay".
Now goto BattlePay.StoreEnabled = 0 and add a 1 now will look like this
BattlePay.StoreEnabled = 1
If you want to change the currency just change the line below BattlePay.Currency = 16 to whatever you desire, now save and exit!

Lets make a new area in your cash shop and fill it with an item. Make sure just the Mysql server is running, there no need yet for auth or world to be running.
Start by fireing up HeidiSQL and loging with your credentials. Now goto mop_world >battle_pay_group then go to the upper right a bit and you will see a "Data" tab click it!
battle_pay_group.jpg

It is here you will create all your tabs for your store, I believe the limit is either 11 or 12 before you server will crash. But you can add up to 32 pages ber bag/tab up to you. In an empty area of the screen right click "Insert Row" now type in ID 6 and in IDX 6, name Armor, ICON 939381 and type 0 see pic for clarity.

Part 2. Battle_Pay_Product.

This section will be the list of all your items you will have for sale in your shop.
battle_pay_product.jpg

Lets begin by clicking battle_pay_product and just like before right click "Insert Row" Fill in ID 7 Title Enameled Grips of Solemnity and your description of item Item level 502, now over to ICON 608655 Price 1 or whatever you want to sell it for. Now over to Choicetype 1 then flag 47 save it and we'll move on to the next.

Part 3. Battle_Pay_Product_Items.

This area is for your item IDS' to properly show up in the cash shop for sale.
battle_pay_product_item.jpg

If you noticed by now the ID 7 will be just for this area as a list and the ItemID 89942 is the phyical item that will be given to you or your players. its the same id you can summon as a GM or Admin. Now for Count 1 and ProductID 7. Remember back in battle_pay_product? Go back and you will see its ID is 7. See how this is starting to work? :) Count is so the item is active on your shop.

Part 4. Battle_Pay_Entry.
battle_pay_entry.jpg

Just like battle_pay_product do the following, ID 7 ProductID 7 GroupID 6 Title Enameled Grips of Solemnity and your description of item Item level 502, finally Banner 2

Now save and boot up your server! This should be your final result ----->
final.jpg



This part I will explain how to fill your currency tab.
I recently had a power outage and I forgot to backup my file and I lost all my work. So I started from scratch (at least I saved my notes) this is a good time to show you how to add money to your shop! Fire up your MYSQL server, then open up HeidiSQL enter your login credentials now navigate down to mop_world. Scroll down to item_template. In the middle top right small tab you will see Data click on it; also to see the page in whole click "Show all"
prt1.jpg



Now for this to work I had to take an Item from this list and copy it and make it into my own custom item and load it with gold.
Click on the search function up above to the top left area. In the "text to find" field type in "Huge Sack of Coins" :D or you can just copy&paste the entry ID which is 98097. What we'll be doing is taking this item and making it in to our cash shop item containing a large amount of gold.
This is the part where I was originally going to have you export this item out and do some editing; I've decided it would be best to just skip that part. To cut out a lengthy part of this and for simplification I took the liberty of uploading the Cash_Shop_Example.sql for your database. What this will do is add a new row in your item_template. I can explain in depth if you want later on just let me know.

Cash Shop Example Download
*WARNING* Make sure you use this on a test database this sql will replace the following tables -
  1. mop_world.battle_pay_entry
  2. mop_world.battle_pay_group
  3. mop_world.battle_pay_product
  4. mop_world.battle_pay_product_items
  5. item_template
  6. item_template_addon


Now I'm assuming you don't have anything in row 129923. Check and make sure you don't before importing Cash_Shop_Example.sql because that's what were doing right now. We have our item but if you were to claim it in-game and open the bag it is empty.
We will now begin filling this bag with monies! Right below item_template you will see item_template_addon, click it then data tab (Don't forget to click Show all) scroll down to the bottom. Right click in an empty space at the bottom and click "Insert row" in the ID row put the same number as the bag of gold back in item_template "129923" this tells it that this container has gold. You will notice a dead give-away right at the top MinMoneyLoot, MaxMoneyLoot - fill both of those boxes with 10000000.
If you followed the previous guide about how to fill the battle pay cash shop do the same thing with this currency bag. That is everything, your end result should be this right here.
prt2.jpg
 
Last edited:

Blackvision

Mythical User
Super Moderator
Gold Supporter
2,298
2015
272
Location
Denmark
Awesome mate.
Do you know what the different columns do within the tables ? Like flags etc.
 

danburp

Verified Member
25
2021
29
Awesome mate.
Do you know what the different columns do within the tables ? Like flags etc.
Yes, I will explain the best I can in my guide :) I am in the process right now righting it up.
A bit sleepy so I will see how far I can get trying to clear things up and not confuse people while I too am learning.
 

Likon69

Mythical User
Silver Supporter
MoP Premium
Superior Member
1,341
2020
529
Hello, where do I put the file? How does it work exactly?
 

Likon69

Mythical User
Silver Supporter
MoP Premium
Superior Member
1,341
2020
529
Execute the .sql in your server DB using whatever software you use to manage the DB
Everything is working properly! Thanks for the advice.
As josamies had mentioned, use HeidiSQL and goto mop_world the click>File>Run SQL File select the cash_shop.sql and run it onto mop_world reboot server and the example shop will show up.
Thanks for setting up the shop, it's much better with it. More blizzlike, I like it.
 

Blackvision

Mythical User
Super Moderator
Gold Supporter
2,298
2015
272
Location
Denmark
Yes, I will explain the best I can in my guide :) I am in the process right now righting it up.
A bit sleepy so I will see how far I can get trying to clear things up and not confuse people while I too am learning.
Not sure if it's still a work in progress.
But I would like to know what the columns Choicetype, type, flags, flagsinfo & banner are for ? :)
Do you by any chance know that ?

Also where did you find the display id ? did you just look them up via the item_template ? :)
 
Last edited:

bdhgm123

Veteran Member
58
2020
52
How to find icon
*UPDATE* I made an ooopsy and did a quick fix and just redone the whole tut lol sorry. But this time I tested it and its all good no more crashes. I was working on multiple projects and the last one seeped its way into this guide. Sorry but all should be good. I'm going to bed now I will check back later tomorrow have fun!
My baby finally went to sleep! YES!!! Just in time.

I'm doing this in my spare time due to me having a new born and he keeps me up all hours so, here we go.
This will be a work in progress, bare with me! First I'm going to post some screens and the example SQL with a few items you see in the pics.
I will do my best to explain in an upcoming quick guide.

Here is the SQL file.
Cash_Shop

This will fill your database with the following.
  1. mop_world.battle_pay_entry
  2. mop_world.battle_pay_group
  3. mop_world.battle_pay_product
  4. mop_world.battle_pay_product_items
Forgot to mention too use the SQL file simply use HeidiSQL and goto mop_world the click>File>Run SQL File select the cash_shop.sql and run it onto mop_world reboot server and the example shop will show up.

if the download doesn't work copy&paste this wall of code into a txt file and rename it to whatever with the extension like this Whatever.sql and save.

SQL:
-- --------------------------------------------------------
-- Host:                         127.0.0.1
-- Server version:               5.5.9-log - MySQL Community Server (GPL)
-- Server OS:                    Win32
-- HeidiSQL Version:             11.3.0.6295
-- --------------------------------------------------------

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

-- Dumping structure for table mop_world.battle_pay_entry
CREATE TABLE IF NOT EXISTS `battle_pay_entry` (
  `id` int(10) unsigned NOT NULL DEFAULT '0',
  `productId` int(10) unsigned NOT NULL DEFAULT '0',
  `groupId` int(10) unsigned NOT NULL DEFAULT '0',
  `idx` int(10) NOT NULL DEFAULT '0',
  `title` varchar(50) NOT NULL,
  `description` varchar(500) NOT NULL,
  `icon` int(10) unsigned NOT NULL DEFAULT '0',
  `displayId` int(10) unsigned NOT NULL DEFAULT '0',
  `banner` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `flags` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- Dumping data for table mop_world.battle_pay_entry: 6 rows
DELETE FROM `battle_pay_entry`;
/*!40000 ALTER TABLE `battle_pay_entry` DISABLE KEYS */;
INSERT INTO `battle_pay_entry` (`id`, `productId`, `groupId`, `idx`, `title`, `description`, `icon`, `displayId`, `banner`, `flags`) VALUES
    (44, 44, 2, 0, 'Reins of the Rusted Proto-Drake', 'Flying mount.', 294032, 0, 2, 0),
    (1, 83, 1, 0, 'Level 90 Character Boost', 'There comes a time in every hero\'s quest when they need a little boost to help get them over the hump and back into the action. With a level 90 character boost, you can grant one character a one-time boost to level 90 instantly.', 614740, 0, 2, 0),
    (3, 3, 2, 0, 'Reins of the Ironbound Proto-Drake', 'Flying Mount', 294032, 0, 2, 0),
    (4, 4, 4, 0, 'Traveler\'s Backpack', 'Bag 16 slots', 0, 0, 0, 0),
    (5, 5, 3, 0, 'Mini Diablo', 'Pet', 913566, 0, 2, 0),
    (6, 6, 5, 0, 'Thunderfury, Blessed Blade of the Windseeker', 'Legendary Weapon', 135349, 0, 2, 0);
/*!40000 ALTER TABLE `battle_pay_entry` ENABLE KEYS */;

-- Dumping structure for table mop_world.battle_pay_group
CREATE TABLE IF NOT EXISTS `battle_pay_group` (
  `id` int(10) unsigned NOT NULL DEFAULT '0',
  `idx` int(10) unsigned NOT NULL DEFAULT '0',
  `name` varchar(16) NOT NULL,
  `icon` int(10) unsigned NOT NULL DEFAULT '0',
  `type` tinyint(3) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`idx`,`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- Dumping data for table mop_world.battle_pay_group: 5 rows
DELETE FROM `battle_pay_group`;
/*!40000 ALTER TABLE `battle_pay_group` DISABLE KEYS */;
INSERT INTO `battle_pay_group` (`id`, `idx`, `name`, `icon`, `type`) VALUES
    (1, 1, 'Featured', 939376, 1),
    (2, 2, 'Mounts', 939379, 0),
    (3, 3, 'Pets', 939380, 0),
    (4, 4, 'Bags', 940857, 0),
    (5, 5, 'Weapons', 940868, 0);
/*!40000 ALTER TABLE `battle_pay_group` ENABLE KEYS */;

-- Dumping structure for table mop_world.battle_pay_product
CREATE TABLE IF NOT EXISTS `battle_pay_product` (
  `id` int(10) unsigned NOT NULL DEFAULT '0',
  `title` varchar(50) NOT NULL,
  `description` varchar(500) NOT NULL,
  `icon` int(10) unsigned NOT NULL DEFAULT '0',
  `price` int(10) unsigned NOT NULL DEFAULT '0',
  `discount` int(10) unsigned NOT NULL DEFAULT '0',
  `displayId` int(10) unsigned NOT NULL DEFAULT '0',
  `type` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `choiceType` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `flags` int(10) unsigned NOT NULL DEFAULT '0',
  `flagsInfo` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- Dumping data for table mop_world.battle_pay_product: 6 rows
DELETE FROM `battle_pay_product`;
/*!40000 ALTER TABLE `battle_pay_product` DISABLE KEYS */;
INSERT INTO `battle_pay_product` (`id`, `title`, `description`, `icon`, `price`, `discount`, `displayId`, `type`, `choiceType`, `flags`, `flagsInfo`) VALUES
    (44, 'Reins of the Rusted Proto-Drake', 'Flying Mount', 294032, 1, 0, 28954, 0, 1, 47, 0),
    (83, 'Level 90 Character Boost', 'Boost your character to level 90!', 614740, 1, 0, 0, 2, 1, 975, 0),
    (3, 'Reins of the Ironbound Proto-Drake', 'Flying Mount', 294032, 1, 0, 28953, 0, 1, 47, 0),
    (4, 'Traveler\'s Backpack', 'Bag', 133633, 1, 0, 0, 0, 1, 47, 0),
    (5, 'Mini Diablo', 'Mini Diablo Pet', 913566, 1, 0, 10992, 0, 1, 47, 0),
    (6, 'Thunderfury, Blessed Blade of the Windseeker', 'Legendary Weapon', 135349, 1, 0, 0, 0, 1, 47, 0);
/*!40000 ALTER TABLE `battle_pay_product` ENABLE KEYS */;

-- Dumping structure for table mop_world.battle_pay_product_items
CREATE TABLE IF NOT EXISTS `battle_pay_product_items` (
  `id` int(10) unsigned NOT NULL DEFAULT '0',
  `itemId` int(10) unsigned NOT NULL DEFAULT '0',
  `count` int(10) unsigned NOT NULL DEFAULT '0',
  `productId` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `productId` (`itemId`,`productId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- Dumping data for table mop_world.battle_pay_product_items: 6 rows
DELETE FROM `battle_pay_product_items`;
/*!40000 ALTER TABLE `battle_pay_product_items` DISABLE KEYS */;
INSERT INTO `battle_pay_product_items` (`id`, `itemId`, `count`, `productId`) VALUES
    (83, 17, 1, 83),
    (44, 45802, 1, 44),
    (3, 45801, 1, 3),
    (4, 4500, 1, 4),
    (5, 13584, 1, 5),
    (6, 19019, 1, 6);
/*!40000 ALTER TABLE `battle_pay_product_items` ENABLE KEYS */;

/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */;

PLEASE! Make sure you use this on a test server until you have it the way you want or those tables will be dropped forever.

Here are 3 images showing the in-game cash shop fully working.
View attachment 1981
View attachment 1982
View attachment 1983

Part 1. Battle_Pay_Group.

Was going to wait till the end but lets just get this out of the way right now. For you to be able to use your Cash Shop goto your worldserver.conf and open it with your favorite txt editor, I use Notepadd++; use the search function and type "pay" or "battle pay".
Now goto BattlePay.StoreEnabled = 0 and add a 1 now will look like this
BattlePay.StoreEnabled = 1
If you want to change the currency just change the line below BattlePay.Currency = 16 to whatever you desire, now save and exit!

Lets make a new area in your cash shop and fill it with an item. Make sure just the Mysql server is running, there no need yet for auth or world to be running.
Start by fireing up HeidiSQL and loging with your credentials. Now goto mop_world >battle_pay_group then go to the upper right a bit and you will see a "Data" tab click it!
View attachment 1991
It is here you will create all your tabs for your store, I believe the limit is either 11 or 12 before you server will crash. But you can add up to 32 pages ber bag/tab up to you. In an empty area of the screen right click "Insert Row" now type in ID 6 and in IDX 6, name Armour, ICON 939381 and type 0 see pic for clarity.

Part 2. Battle_Pay_Product.

This section will be the list of all your items you will have for sale in your shop.
View attachment 1992
Lets begin by clicking battle_pay_product and just like before right click "Insert Row" Fill in ID 7 Title Enameled Grips of Solemnity and your description of item Item level 502, now over to ICON 608655 Price 1 or whatever you want to sell it for. Now over to Choicetype 1 then flag 47 save it and we'll move on to the next.

Part 3. Battle_Pay_Product_Items.

This area is for your item IDS' to properly show up in the cash shop for sale.
View attachment 1993
If you noticed by now the ID 7 will be just for this area as a list and the ItemID 89942 is the phyical item that will be given to you or your players. its the same id you can summon as a GM or Admin. Now for Count 1 and ProductID 7. Remember back in battle_pay_product? Go back and you will see its ID is 7. See how this is starting to work? :) Count is so the item is active on your shop.

Part 4. Battle_Pay_Entry.
View attachment 1994
Just like battle_pay_product do the following, ID 7 ProductID 7 GroupID 6 Title Enameled Grips of Solemnity and your description of item Item level 502, finally Banner 2

Now save and boot up your server! This should be your final result -----> View attachment 1995
First thanks for your guide, and congratulations for your newborn :)
If you permit, I've a few questions about your guide.
- What about flags, choice type and banner ? Can you tell us more, or do you have any documentation about that ?
- Can you tell more about boost to 90, buy professions, change faction or race ? How to manage these since this is not an item.
- How to manage and add the money that will be necessary to buy shop items ?
Thanks in advance !
 

Blackvision

Mythical User
Super Moderator
Gold Supporter
2,298
2015
272
Location
Denmark
How to find icon

First thanks for your guide, and congratulations for your newborn :)
If you permit, I've a few questions about your guide.
- What about flags, choice type and banner ? Can you tell us more, or do you have any documentation about that ?
- Can you tell more about boost to 90, buy professions, change faction or race ? How to manage these since this is not an item.
- How to manage and add the money that will be necessary to buy shop items ?
Thanks in advance !
You can find the Icon via wowhead, just click on an items image, and a new will appear
 

danburp

Verified Member
25
2021
29
How to find icon

First thanks for your guide, and congratulations for your newborn :)
If you permit, I've a few questions about your guide.
- What about flags, choice type and banner ? Can you tell us more, or do you have any documentation about that ?
- Can you tell more about boost to 90, buy professions, change faction or race ? How to manage these since this is not an item.
- How to manage and add the money that will be necessary to buy shop items ?
Thanks in advance !
I'm currently working on a few more things to further discuss what the flags mean and the ids and such, some tell the shop like the flag is a sql parameter telling it to INSERT or DELETE or UPDATE ect ect. Its a long list so I think it would be best I just take you the place where I learned and its very well layed out.
Trinitycore has a complete list of what everything means :) See example below. Also here is the link ---->sql perameters for item template

Oh and this page is my Work-in-Progress (WIP) page.
I plan on filling the shop to be blizzlike so others don't have to do it themselves, also its helping me get back into editing and doing server custom mods.

Flags

Bitmask field that contains flags that the item has on it. As all other such fields, just add the flags together to combine them. Possible flags are listed below.

10x01ITEM_FLAG_NO_PICKUP
20x02Conjured item
40x04Openable (can be opened by right-click)
80x08Makes green "Heroic" text appear on item
160x010Deprecated Item: Cannot equip or use
320x020Item can not be destroyed, except by using spell (item can be reagent for spell)
640x040ITEM_FLAG_PLAYERCAST
1280x080No default 30 seconds cooldown when equipped
2560x0100ITEM_FLAG_MULTI_LOOT_QUEST
5120x0200Wrapper : Item can wrap other items
10240x0400ITEM_FLAG_USES_RESOURCES
20480x0800Item is party loot and can be looted by all - Looting this item does not remove it from available loot
40960x01000Item is refundable - Item can be returned to vendor for its original cost (extended cost)
81920x02000ITEM_FLAG_PETITION Charter (Arena or Guild)
163840x04000ITEM_FLAG_HAS_TEXT // comment in code : Only readable items have this (but not all)
327680x08000ITEM_FLAG_NO_DISENCHANT
655360x010000ITEM_FLAG_REAL_DURATION
1310720x020000ITEM_FLAG_NO_CREATOR
2621440x040000Item can be prospected
5242880x080000Unique equipped (player can only have one equipped at the same time)
10485760x0100000ITEM_FLAG_IGNORE_FOR_AURAS
20971520x0200000Item can be used during arena match
41943040x0400000ITEM_FLAG_NO_DURABILITY_LOSS
83886080x0800000Item can be used in shapeshift forms
167772160x01000000ITEM_FLAG_HAS_QUEST_GLOW
335544320x02000000Profession recipes: can only be looted if you meet requirements and don't already know it
671088640x04000000Item cannot be used in arena
1342177280x08000000Bind to Account (Also needs Quality = 7 set)
2684354560x010000000Spell is cast ignoring reagents
5368709120x020000000Item can be milled
10737418240x040000000ITEM_FLAG_REPORT_TO_GUILD_CHAT
21474836480x080000000Bind on Pickup tradable ITEM_FLAG_NO_PROGRESSIVE_LOOT

FlagsExtra

10x01Horde Only
20x02Alliance Only
40x04When item uses ExtendedCost in npc_vendor, gold is also required
2560x0100Makes need roll for this item disabled
5120x0200NEED_ROLL_DISABLED
163840x04000HAS_NORMAL_PRICE
1310720x020000BNET_ACCOUNT_BOUND
20971520x0200000CANNOT_BE_TRANSMOG
41943040x0400000CANNOT_TRANSMOG
83886080x0800000CAN_TRANSMOG
 

Likon69

Mythical User
Silver Supporter
MoP Premium
Superior Member
1,341
2020
529
I'm currently working on a few more things to further discuss what the flags mean and the ids and such, some tell the shop like the flag is a sql parameter telling it to INSERT or DELETE or UPDATE ect ect. Its a long list so I think it would be best I just take you the place where I learned and its very well layed out.
Trinitycore has a complete list of what everything means :) See example below. Also here is the link ---->sql perameters for item template

Oh and this page is my Work-in-Progress (WIP) page.
I plan on filling the shop to be blizzlike so others don't have to do it themselves, also its helping me get back into editing and doing server custom mods.

Flags

Bitmask field that contains flags that the item has on it. As all other such fields, just add the flags together to combine them. Possible flags are listed below.

10x01ITEM_FLAG_NO_PICKUP
20x02Conjured item
40x04Openable (can be opened by right-click)
80x08Makes green "Heroic" text appear on item
160x010Deprecated Item: Cannot equip or use
320x020Item can not be destroyed, except by using spell (item can be reagent for spell)
640x040ITEM_FLAG_PLAYERCAST
1280x080No default 30 seconds cooldown when equipped
2560x0100ITEM_FLAG_MULTI_LOOT_QUEST
5120x0200Wrapper : Item can wrap other items
10240x0400ITEM_FLAG_USES_RESOURCES
20480x0800Item is party loot and can be looted by all - Looting this item does not remove it from available loot
40960x01000Item is refundable - Item can be returned to vendor for its original cost (extended cost)
81920x02000ITEM_FLAG_PETITION Charter (Arena or Guild)
163840x04000ITEM_FLAG_HAS_TEXT // comment in code : Only readable items have this (but not all)
327680x08000ITEM_FLAG_NO_DISENCHANT
655360x010000ITEM_FLAG_REAL_DURATION
1310720x020000ITEM_FLAG_NO_CREATOR
2621440x040000Item can be prospected
5242880x080000Unique equipped (player can only have one equipped at the same time)
10485760x0100000ITEM_FLAG_IGNORE_FOR_AURAS
20971520x0200000Item can be used during arena match
41943040x0400000ITEM_FLAG_NO_DURABILITY_LOSS
83886080x0800000Item can be used in shapeshift forms
167772160x01000000ITEM_FLAG_HAS_QUEST_GLOW
335544320x02000000Profession recipes: can only be looted if you meet requirements and don't already know it
671088640x04000000Item cannot be used in arena
1342177280x08000000Bind to Account (Also needs Quality = 7 set)
2684354560x010000000Spell is cast ignoring reagents
5368709120x020000000Item can be milled
10737418240x040000000ITEM_FLAG_REPORT_TO_GUILD_CHAT
21474836480x080000000Bind on Pickup tradable ITEM_FLAG_NO_PROGRESSIVE_LOOT

FlagsExtra

10x01Horde Only
20x02Alliance Only
40x04When item uses ExtendedCost in npc_vendor, gold is also required
2560x0100Makes need roll for this item disabled
5120x0200NEED_ROLL_DISABLED
163840x04000HAS_NORMAL_PRICE
1310720x020000BNET_ACCOUNT_BOUND
20971520x0200000CANNOT_BE_TRANSMOG
41943040x0400000CANNOT_TRANSMOG
83886080x0800000CAN_TRANSMOG
Thank you very much danburp!
 

danburp

Verified Member
25
2021
29
Its actually just the display Ids i need.
But i'll try the linked software
Here is a quick walk-through for WDBXEditor. In this we will be looking for Thunderfury's DisplayID. So its Item ID is 19019.

Open WDBXEditor and go to _Server\Data\dbc\ruRU now in the file name box type in Item.db2 and click open.
find.jpg


A little window with all the wow clients will popup, click on MoP 5.4.8.
mop_dbc.jpg


Lets try to find Thunderfury, click EDIT and then FIND, type in 19019. If you noticed this is falling on the wrong item and its not even the correct ID but some other item's DisplayID so be watchful of this. Click Find Next.
false.jpg


YAY there it is, see how its lit up in the left side box under ID? Yes, that is the correct item number for spawning in Thunderfury.
Now you can get its DisplayID which you can see circled in red 30606.
Correct.jpg


That's it for today, I just got my little one to sleep and I'm heading off to bed. Hope this helps. More to come.
 

danburp

Verified Member
25
2021
29
How to find icon

First thanks for your guide, and congratulations for your newborn :)
If you permit, I've a few questions about your guide.
- What about flags, choice type and banner ? Can you tell us more, or do you have any documentation about that ?
- Can you tell more about boost to 90, buy professions, change faction or race ? How to manage these since this is not an item.
- How to manage and add the money that will be necessary to buy shop items ?
Thanks in advance !
Oh I forgot to mention, yes I will be covering those question soon. My brain is scattered atm and I'm jumping around from this to the baby and 3 other projects all the while trying to install a replacement transmission in my dodge charger :D
 

Jivani19

Elune Adore (FR)
Gold Supporter
Epic Member
470
2021
350
Location
France
*UPDATE* I made an ooopsy and did a quick fix and just redone the whole tut lol sorry. But this time I tested it and its all good no more crashes. I was working on multiple projects and the last one seeped its way into this guide. Sorry but all should be good. I'm going to bed now I will check back later tomorrow have fun!
My baby finally went to sleep! YES!!! Just in time.

I'm doing this in my spare time due to me having a new born and he keeps me up all hours so, here we go.
This will be a work in progress, bare with me! First I'm going to post some screens and the example SQL with a few items you see in the pics.
I will do my best to explain in an upcoming quick guide.

Here is the SQL file.
Cash_Shop

This will fill your database with the following.
  1. mop_world.battle_pay_entry
  2. mop_world.battle_pay_group
  3. mop_world.battle_pay_product
  4. mop_world.battle_pay_product_items
Forgot to mention too use the SQL file simply use HeidiSQL and goto mop_world the click>File>Run SQL File select the cash_shop.sql and run it onto mop_world reboot server and the example shop will show up.

if the download doesn't work copy&paste this wall of code into a txt file and rename it to whatever with the extension like this Whatever.sql and save.

SQL:
-- --------------------------------------------------------
-- Host:                         127.0.0.1
-- Server version:               5.5.9-log - MySQL Community Server (GPL)
-- Server OS:                    Win32
-- HeidiSQL Version:             11.3.0.6295
-- --------------------------------------------------------

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

-- Dumping structure for table mop_world.battle_pay_entry
CREATE TABLE IF NOT EXISTS `battle_pay_entry` (
  `id` int(10) unsigned NOT NULL DEFAULT '0',
  `productId` int(10) unsigned NOT NULL DEFAULT '0',
  `groupId` int(10) unsigned NOT NULL DEFAULT '0',
  `idx` int(10) NOT NULL DEFAULT '0',
  `title` varchar(50) NOT NULL,
  `description` varchar(500) NOT NULL,
  `icon` int(10) unsigned NOT NULL DEFAULT '0',
  `displayId` int(10) unsigned NOT NULL DEFAULT '0',
  `banner` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `flags` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- Dumping data for table mop_world.battle_pay_entry: 6 rows
DELETE FROM `battle_pay_entry`;
/*!40000 ALTER TABLE `battle_pay_entry` DISABLE KEYS */;
INSERT INTO `battle_pay_entry` (`id`, `productId`, `groupId`, `idx`, `title`, `description`, `icon`, `displayId`, `banner`, `flags`) VALUES
    (44, 44, 2, 0, 'Reins of the Rusted Proto-Drake', 'Flying mount.', 294032, 0, 2, 0),
    (1, 83, 1, 0, 'Level 90 Character Boost', 'There comes a time in every hero\'s quest when they need a little boost to help get them over the hump and back into the action. With a level 90 character boost, you can grant one character a one-time boost to level 90 instantly.', 614740, 0, 2, 0),
    (3, 3, 2, 0, 'Reins of the Ironbound Proto-Drake', 'Flying Mount', 294032, 0, 2, 0),
    (4, 4, 4, 0, 'Traveler\'s Backpack', 'Bag 16 slots', 0, 0, 0, 0),
    (5, 5, 3, 0, 'Mini Diablo', 'Pet', 913566, 0, 2, 0),
    (6, 6, 5, 0, 'Thunderfury, Blessed Blade of the Windseeker', 'Legendary Weapon', 135349, 0, 2, 0);
/*!40000 ALTER TABLE `battle_pay_entry` ENABLE KEYS */;

-- Dumping structure for table mop_world.battle_pay_group
CREATE TABLE IF NOT EXISTS `battle_pay_group` (
  `id` int(10) unsigned NOT NULL DEFAULT '0',
  `idx` int(10) unsigned NOT NULL DEFAULT '0',
  `name` varchar(16) NOT NULL,
  `icon` int(10) unsigned NOT NULL DEFAULT '0',
  `type` tinyint(3) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`idx`,`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- Dumping data for table mop_world.battle_pay_group: 5 rows
DELETE FROM `battle_pay_group`;
/*!40000 ALTER TABLE `battle_pay_group` DISABLE KEYS */;
INSERT INTO `battle_pay_group` (`id`, `idx`, `name`, `icon`, `type`) VALUES
    (1, 1, 'Featured', 939376, 1),
    (2, 2, 'Mounts', 939379, 0),
    (3, 3, 'Pets', 939380, 0),
    (4, 4, 'Bags', 940857, 0),
    (5, 5, 'Weapons', 940868, 0);
/*!40000 ALTER TABLE `battle_pay_group` ENABLE KEYS */;

-- Dumping structure for table mop_world.battle_pay_product
CREATE TABLE IF NOT EXISTS `battle_pay_product` (
  `id` int(10) unsigned NOT NULL DEFAULT '0',
  `title` varchar(50) NOT NULL,
  `description` varchar(500) NOT NULL,
  `icon` int(10) unsigned NOT NULL DEFAULT '0',
  `price` int(10) unsigned NOT NULL DEFAULT '0',
  `discount` int(10) unsigned NOT NULL DEFAULT '0',
  `displayId` int(10) unsigned NOT NULL DEFAULT '0',
  `type` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `choiceType` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `flags` int(10) unsigned NOT NULL DEFAULT '0',
  `flagsInfo` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- Dumping data for table mop_world.battle_pay_product: 6 rows
DELETE FROM `battle_pay_product`;
/*!40000 ALTER TABLE `battle_pay_product` DISABLE KEYS */;
INSERT INTO `battle_pay_product` (`id`, `title`, `description`, `icon`, `price`, `discount`, `displayId`, `type`, `choiceType`, `flags`, `flagsInfo`) VALUES
    (44, 'Reins of the Rusted Proto-Drake', 'Flying Mount', 294032, 1, 0, 28954, 0, 1, 47, 0),
    (83, 'Level 90 Character Boost', 'Boost your character to level 90!', 614740, 1, 0, 0, 2, 1, 975, 0),
    (3, 'Reins of the Ironbound Proto-Drake', 'Flying Mount', 294032, 1, 0, 28953, 0, 1, 47, 0),
    (4, 'Traveler\'s Backpack', 'Bag', 133633, 1, 0, 0, 0, 1, 47, 0),
    (5, 'Mini Diablo', 'Mini Diablo Pet', 913566, 1, 0, 10992, 0, 1, 47, 0),
    (6, 'Thunderfury, Blessed Blade of the Windseeker', 'Legendary Weapon', 135349, 1, 0, 0, 0, 1, 47, 0);
/*!40000 ALTER TABLE `battle_pay_product` ENABLE KEYS */;

-- Dumping structure for table mop_world.battle_pay_product_items
CREATE TABLE IF NOT EXISTS `battle_pay_product_items` (
  `id` int(10) unsigned NOT NULL DEFAULT '0',
  `itemId` int(10) unsigned NOT NULL DEFAULT '0',
  `count` int(10) unsigned NOT NULL DEFAULT '0',
  `productId` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `productId` (`itemId`,`productId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- Dumping data for table mop_world.battle_pay_product_items: 6 rows
DELETE FROM `battle_pay_product_items`;
/*!40000 ALTER TABLE `battle_pay_product_items` DISABLE KEYS */;
INSERT INTO `battle_pay_product_items` (`id`, `itemId`, `count`, `productId`) VALUES
    (83, 17, 1, 83),
    (44, 45802, 1, 44),
    (3, 45801, 1, 3),
    (4, 4500, 1, 4),
    (5, 13584, 1, 5),
    (6, 19019, 1, 6);
/*!40000 ALTER TABLE `battle_pay_product_items` ENABLE KEYS */;

/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */;

PLEASE! Make sure you use this on a test server until you have it the way you want or those tables will be dropped forever.

Here are 3 images showing the in-game cash shop fully working.
View attachment 1981
View attachment 1982
View attachment 1983

Part 1. Battle_Pay_Group.

Was going to wait till the end but lets just get this out of the way right now. For you to be able to use your Cash Shop goto your worldserver.conf and open it with your favorite txt editor, I use Notepadd++; use the search function and type "pay" or "battle pay".
Now goto BattlePay.StoreEnabled = 0 and add a 1 now will look like this
BattlePay.StoreEnabled = 1
If you want to change the currency just change the line below BattlePay.Currency = 16 to whatever you desire, now save and exit!

Lets make a new area in your cash shop and fill it with an item. Make sure just the Mysql server is running, there no need yet for auth or world to be running.
Start by fireing up HeidiSQL and loging with your credentials. Now goto mop_world >battle_pay_group then go to the upper right a bit and you will see a "Data" tab click it!
View attachment 1991
It is here you will create all your tabs for your store, I believe the limit is either 11 or 12 before you server will crash. But you can add up to 32 pages ber bag/tab up to you. In an empty area of the screen right click "Insert Row" now type in ID 6 and in IDX 6, name Armour, ICON 939381 and type 0 see pic for clarity.

Part 2. Battle_Pay_Product.

This section will be the list of all your items you will have for sale in your shop.
View attachment 1992
Lets begin by clicking battle_pay_product and just like before right click "Insert Row" Fill in ID 7 Title Enameled Grips of Solemnity and your description of item Item level 502, now over to ICON 608655 Price 1 or whatever you want to sell it for. Now over to Choicetype 1 then flag 47 save it and we'll move on to the next.

Part 3. Battle_Pay_Product_Items.

This area is for your item IDS' to properly show up in the cash shop for sale.
View attachment 1993
If you noticed by now the ID 7 will be just for this area as a list and the ItemID 89942 is the phyical item that will be given to you or your players. its the same id you can summon as a GM or Admin. Now for Count 1 and ProductID 7. Remember back in battle_pay_product? Go back and you will see its ID is 7. See how this is starting to work? :) Count is so the item is active on your shop.

Part 4. Battle_Pay_Entry.
View attachment 1994
Just like battle_pay_product do the following, ID 7 ProductID 7 GroupID 6 Title Enameled Grips of Solemnity and your description of item Item level 502, finally Banner 2

Now save and boot up your server! This should be your final result -----> View attachment 1995
Thank you very much for this contribution, I will in return update the mounts I released on cataclysm in this expansion of Mist Of Pandaria 5.4.8, thanks to your transmitted information I will be able to make an update in the in-game store, once again thanks. ;) (y)
 

bdhgm123

Veteran Member
58
2020
52
Oh I forgot to mention, yes I will be covering those question soon. My brain is scattered atm and I'm jumping around from this to the baby and 3 other projects all the while trying to install a replacement transmission in my dodge charger :D
I'm pretty sure you won't forget us :)
Thank again for your contribution !
Don't worry, sometimes brain love adrenaline :p
 
Top