- Joined
- May 31, 2008
- Messages
- 524
- Reaction score
- 1
This is a guide to make custom shop SQL. This guide may seem lame, but... It'll be good if people knew how to make their own Shop SQL. This should be basic knowledge, but some people might not know! Well, without further ado, I present you a guide to make a Shop SQL!
Description
A Shop SQL is a SQL file that will make a NPC sell stuff.
Update Log
This is pretty useless, but this is for people to see how much i update this.
1st Update - Made this Guide
2nd update - Did a Small Edit
3rd Update - Added Bonus Guide for Notepad++ | Added the Update Log
4th Update - Added New Information by wafles
5th Update - Added FAQ Section
6th Update - Added more Questions to FAQ Section
7th Update - Added Extra! Extra! section | Added 0's as IDs!
Requirements
- Notepad or Notepad++ (I would prefer Notepad for beginners)
- Brain (Duh!)
- Knowledge of Searching MapleTip
(Only use Notepad++ IF you understand how to make a Shop SQL fully! This is because you'll need to understand more to use Notepad++)
Also, it would be helpful if you read this guide to. http://forum.ragezone.com/showthread.php?t=442288
Format
This is the format of Shop SQLs.
You can alway add this,
if you want to add more items to the shop.
New Information!
This is a quote from wafles:
How to Set Up
Description
This is what a fully completed Shop SQL would look like.
Now... An explanation. Look carefully at this one.
Did you notice how all the 1694 are in this color? That is the Shop ID. Shop IDs are unique ID numbers that cannot be the same as any other shop IDs currently in the database.
Now, pay attention to this one!
Notice the numbers in this color? That is the price of how much the item costs.
Now, this one next!
Did you notice that some numbers were in this color? That is the item ID. The item ID is what the NPC will sell in their shop.
Just two more to look at!
1. This one now!
Notice how the numbers at the end are in this color? That is a bit difficult to explain. It shows how the item will appear first. If you already didn't know, the numbers from the top goes "1, 2, 3, 4, 5..."
2. This is the last one!
Notice that? On the number that is this color, that is the NPC ID of what will sell the items. The IDs MUST be correct for the Shop SQL to work. To get some NPC IDs, all you need to do is click
Easier to Understand Description
This will be more understandable if you did not get what I said at the top.
Happy?
If you understand up to this point, good for you! XD
Time to Continue...
How to Make a Shop SQL (Finally! o.o)
If you don't know how to make one by this point, scroll up and start learning again. It should be VERY clear of how to make one IF you read and understand what was above.
So... If you still do not know how to make one by now, scroll up and start reading! If you understand everything, continue...
How to Make a SQL
[Notice] Only read this part if you do not know how to make a Notepad file a SQL.
This part is pretty easy. So... Follow these steps.
By now, you should have completed the followings:
Description
Notepad++ is a tool similar to Notepad, but Notepad++ is made for editing scripts, SQLs, javascripts, etc.
When using Notepad++, some things might go wrong. Take this as a example. (This is a starting one)
There is a really easy way to fix that problem. All you need to do...
Is make this:
Into this:
Now, was that easy or what? So... If you script a Shop SQL using notepad++, make sure you see how you did on Notepad! That's all for the Bonus Guide.
Extra! Extra!
0's as IDs!
You know when you have to put 1, 2, 3, 4... in the Shop SQL to make it work? Now, YOU DON'T HAVE TO! Here is an example of what you can do!
You could do that and it will still work! Hooray for my knowledge! XD
FAQ (Q's & A's)
This is the FAQ section.
Q. When I executed the script, it worked fine. But, when I logged on and tried to click on the NPC, I got an error. Why is this?
A. To solve that, answer these questions;
- Did you put in the Item IDs in correctly?
- Are the Item IDs you put in are correct?
- Is that Shop ID in use already?
- Is your NPC ID in use already?
- Is your NPC ID correct?
Q. I heard that there are different formats of the Shop SQLs. Is that true?
A. Yes. I'm not too sure which is the right one currently.
Q. Is this for Odin or Titan?
A. Well, I used scripts that was for Odin, so I guess that this is for Odin sourced. I'm not too sure about Titan working with these SQLs though...
Q. How to I execute these? (Really nooby question...)
A. Via MySQL. If you don't know how to execute, then you shouldn't even make a pserver...
Endings
Well, that has been my very first guide! Did I do well? But please, since this is my first guide, please don't flame me because this is useless... If I made a mistake on this, feel free to tell me where I made a mistake and how to correct it! Thanks.
Comments Accepted! So, please feel free to reply on how I did!
Credits
RaGEZONE - For the Forum of where I learned how to make SQLs
MesoRanger - For Helping me on some of my Shop SQLs
(Spot for People who Notices Mistakes)
Hope this helps!
-Falzer
Description
A Shop SQL is a SQL file that will make a NPC sell stuff.
Update Log
This is pretty useless, but this is for people to see how much i update this.
1st Update - Made this Guide
2nd update - Did a Small Edit
3rd Update - Added Bonus Guide for Notepad++ | Added the Update Log
4th Update - Added New Information by wafles
5th Update - Added FAQ Section
6th Update - Added more Questions to FAQ Section
7th Update - Added Extra! Extra! section | Added 0's as IDs!
Requirements
- Notepad or Notepad++ (I would prefer Notepad for beginners)
- Brain (Duh!)
- Knowledge of Searching MapleTip
(Only use Notepad++ IF you understand how to make a Shop SQL fully! This is because you'll need to understand more to use Notepad++)
Also, it would be helpful if you read this guide to. http://forum.ragezone.com/showthread.php?t=442288
Format
This is the format of Shop SQLs.
Code:
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shops
(`shopid`, `npcid`)
VALUES
(, );
Code:
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
New Information!
This is a quote from wafles:
If you understand this, please tell me. Because I don't...Proper sql format actually suggests that you put ` on all non commands.
For example:
SELECT * FROM `databasetable` WHERE `field`='value';
This is correct format.
How to Set Up
Description
This is what a fully completed Shop SQL would look like.
Code:
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122007, 10000000, 1);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122001, 10000000, 2);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122003, 10000000, 3);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122004, 25000000, 4);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122006, 25000000, 5);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122002, 40000000, 6);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122005, 40000000, 7);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122000, 40000000, 8);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 2041200, 50000000, 9);
INSERT INTO shops
(`shopid`, `npcid`)
VALUES
(1694, 9201085);
Code:
INSERT INTO shopitems (shopid, itemid, price, position) VALUES ([COLOR=DarkOrange]1694[/COLOR], 1122007, 10000000, 1);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES ([COLOR=DarkOrange]1694[/COLOR], 1122001, 10000000, 2);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES ([COLOR=DarkOrange]1694[/COLOR], 1122003, 10000000, 3);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES ([COLOR=DarkOrange]1694[/COLOR], 1122004, 25000000, 4);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES ([COLOR=DarkOrange]1694[/COLOR], 1122006, 25000000, 5);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES ([COLOR=DarkOrange]1694[/COLOR], 1122002, 40000000, 6);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES ([COLOR=DarkOrange]1694[/COLOR], 1122005, 40000000, 7);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES ([COLOR=DarkOrange]1694[/COLOR], 1122000, 40000000, 8);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES ([COLOR=DarkOrange]1694[/COLOR], 2041200, 50000000, 9);
INSERT INTO shops
(`shopid`, `npcid`)
VALUES
([COLOR=DarkOrange]1694[/COLOR], 9201085);
Now, pay attention to this one!
Code:
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122007, [COLOR=DarkRed]10000000[/COLOR], 1);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122001, [COLOR=DarkRed]10000000[/COLOR], 2);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122003, [COLOR=DarkRed]10000000[/COLOR], 3);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122004, [COLOR=DarkRed]25000000[/COLOR], 4);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122006, [COLOR=DarkRed]25000000[/COLOR], 5);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122002, [COLOR=DarkRed]40000000[/COLOR], 6);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122005, [COLOR=DarkRed]40000000[/COLOR], 7);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122000, [COLOR=DarkRed]40000000[/COLOR], 8);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 2041200, [COLOR=DarkRed]50000000[/COLOR], 9);
INSERT INTO shops
(`shopid`, `npcid`)
VALUES
(1694, 9201085);
Now, this one next!
Code:
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, [COLOR=RoyalBlue]1122007[/COLOR], 10000000, 1);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, [COLOR=RoyalBlue]1122001[/COLOR], 10000000, 2);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, [COLOR=RoyalBlue]1122003[/COLOR], 10000000, 3);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, [COLOR=RoyalBlue]1122004[/COLOR], 25000000, 4);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, [COLOR=RoyalBlue]1122006[/COLOR], 25000000, 5);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, [COLOR=RoyalBlue]1122002[/COLOR], 40000000, 6);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, [COLOR=RoyalBlue]1122005[/COLOR], 40000000, 7);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, [COLOR=RoyalBlue]1122000[/COLOR], 40000000, 8);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, [COLOR=RoyalBlue]2041200[/COLOR], 50000000, 9);
INSERT INTO shops
(`shopid`, `npcid`)
VALUES
(1694, 9201085);
Just two more to look at!
1. This one now!
Code:
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122007, 10000000, [COLOR=SeaGreen]1[/COLOR]);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122001, 10000000, [COLOR=SeaGreen]2[/COLOR]);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122003, 10000000, [COLOR=SeaGreen]3[/COLOR]);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122004, 25000000, [COLOR=SeaGreen]4[/COLOR]);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122006, 25000000, [COLOR=SeaGreen]5[/COLOR]);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122002, 40000000, [COLOR=SeaGreen]6[/COLOR]);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122005, 40000000, [COLOR=SeaGreen]7[/COLOR]);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122000, 40000000, [COLOR=SeaGreen]8[/COLOR]);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 2041200, 50000000, [COLOR=SeaGreen]9[/COLOR]);
INSERT INTO shops
(`shopid`, `npcid`)
VALUES
(1694, 9201085);
2. This is the last one!
Code:
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122007, 10000000, 1);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122001, 10000000, 2);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122003, 10000000, 3);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122004, 25000000, 4);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122006, 25000000, 5);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122002, 40000000, 6);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122005, 40000000, 7);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 1122000, 40000000, 8);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1694, 2041200, 50000000, 9);
INSERT INTO shops
(`shopid`, `npcid`)
VALUES
(1694, [COLOR=Gray]9201085[/COLOR]);
To view the content, you need to sign in or register
. Then, you just search. Happy Searching~ Easier to Understand Description
This will be more understandable if you did not get what I said at the top.
Code:
INSERT INTO shopitems (shopid, itemid, price, position) VALUES ([COLOR=DarkOrange]Shop ID[/COLOR], [COLOR=RoyalBlue]Item ID[/COLOR], [COLOR=DarkRed]Price[/COLOR], [COLOR=SeaGreen]x[/COLOR]);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES ([COLOR=DarkOrange]Shop ID[/COLOR], [COLOR=RoyalBlue]Item ID[/COLOR], [COLOR=DarkRed]Price[/COLOR], [COLOR=SeaGreen]x[/COLOR]);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES ([COLOR=DarkOrange]Shop ID[/COLOR], [COLOR=RoyalBlue]Item ID[/COLOR], [COLOR=DarkRed]Price[/COLOR], [COLOR=SeaGreen]x[/COLOR]);
INSERT INTO shops
(`shopid`, `npcid`)
VALUES
([COLOR=DarkOrange]Shop ID[/COLOR], [COLOR=Gray]NPC ID[/COLOR]);
If you understand up to this point, good for you! XD
Time to Continue...
How to Make a Shop SQL (Finally! o.o)
If you don't know how to make one by this point, scroll up and start learning again. It should be VERY clear of how to make one IF you read and understand what was above.
So... If you still do not know how to make one by now, scroll up and start reading! If you understand everything, continue...
How to Make a SQL
[Notice] Only read this part if you do not know how to make a Notepad file a SQL.
This part is pretty easy. So... Follow these steps.
Code:
1. You must have finished your Shop SQL by now.
1.5. Once you are done, continue reading.
2. Click 'File', then 'Save As'.
3. Then, type in '_________.sql'
3.5. The _________ is where you type in the name for the SQL.
4. Click 'Save' and there you go! You have made a SQL!
Bonus Guide for Using Notepad++1. Learned how to make a Shop SQL
2. Learned how to make a SQL File
3. Learned the ways of making a Shop SQL
Description
Notepad++ is a tool similar to Notepad, but Notepad++ is made for editing scripts, SQLs, javascripts, etc.
When using Notepad++, some things might go wrong. Take this as a example. (This is a starting one)
Code:
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shops
(`shopid`, `npcid`)
VALUES
(, );
Is make this:
Code:
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shops
(`shopid`, `npcid`)
VALUES
(, );
Code:
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (, , , );
INSERT INTO shops
(`shopid`, `npcid`)
VALUES
(, );
Extra! Extra!
0's as IDs!
You know when you have to put 1, 2, 3, 4... in the Shop SQL to make it work? Now, YOU DON'T HAVE TO! Here is an example of what you can do!
Code:
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1112, 4001017, 10000000, 0);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1112, 1002357, 99000000, 0);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1112, 1002390, 99000000, 0);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1112, 1002430, 99000000, 0);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1112, 2070007, 50000000, 0);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1112, 2070006, 10000000, 0);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1112, 2070005, 5000000, 0);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1112, 2070004, 2000000, 0);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1112, 2060004, 5000000, 0);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (1112, 2061004, 5000000, 0);
INSERT INTO shops
(`shopid`, `npcid`)
VALUES
(1112, 2032004);
FAQ (Q's & A's)
This is the FAQ section.
Q. When I executed the script, it worked fine. But, when I logged on and tried to click on the NPC, I got an error. Why is this?
A. To solve that, answer these questions;
- Did you put in the Item IDs in correctly?
- Are the Item IDs you put in are correct?
- Is that Shop ID in use already?
- Is your NPC ID in use already?
- Is your NPC ID correct?
Q. I heard that there are different formats of the Shop SQLs. Is that true?
A. Yes. I'm not too sure which is the right one currently.
Q. Is this for Odin or Titan?
A. Well, I used scripts that was for Odin, so I guess that this is for Odin sourced. I'm not too sure about Titan working with these SQLs though...
Q. How to I execute these? (Really nooby question...)
A. Via MySQL. If you don't know how to execute, then you shouldn't even make a pserver...
Endings
Well, that has been my very first guide! Did I do well? But please, since this is my first guide, please don't flame me because this is useless... If I made a mistake on this, feel free to tell me where I made a mistake and how to correct it! Thanks.
Comments Accepted! So, please feel free to reply on how I did!
Credits
RaGEZONE - For the Forum of where I learned how to make SQLs
MesoRanger - For Helping me on some of my Shop SQLs
(Spot
Hope this helps!
-Falzer
Last edited: