danburp
Verified Member
- 25
- 2021
- 30
*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.
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.
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.
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!
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.
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.
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.
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 ----->
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"
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"
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 -
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.
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.
- mop_world.battle_pay_entry
- mop_world.battle_pay_group
- mop_world.battle_pay_product
- mop_world.battle_pay_product_items
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.
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!
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.
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.
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?
Part 4. Battle_Pay_Entry.
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 ----->
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"
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"
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 -
- mop_world.battle_pay_entry
- mop_world.battle_pay_group
- mop_world.battle_pay_product
- mop_world.battle_pay_product_items
- item_template
- 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.
Last edited: