RaGEZONE sponsored advertisment:
| | The free 3D side scrolling MMORPG. | |
06-28-2008
|
#1 (permalink)
| | Jelly murder!
Rank: Member + Join Date: Jun 2008
Posts: 228
Thanked 0 Times in 0 Posts
| [Tut]How to make shops (Odin) How to create a simple shop in OdinMS by using a .sql file
It seemed it was time that somebody made a guide to clarify how to make a simple shop .sql file for you shops. So, I made a guide on how to make one.
Let's start out. 1. Open a text editor, any is fine. I personally just use notepad for these. 2. Copy and paste this into your editor: Code: INSERT INTO `shops` VALUES ('', '');
INSERT INTO `shopitems` (`shopitemid`,`shopid`,`itemid`,`price`,`position`) VALUES
(,,,,),
(,,,,);
That's the basic outline for a shop. 3. The Code: INSERT INTO `shops` VALUES ('', '');
Is where you put in your npc and shop ids. Code: INSERT INTO `shops` VALUES (''Shop id here, This is where you put in your npc id'');
For your shop id, you're picking any number you wish to use. I'd suggest using the next available one in the shop section of your database to be more organized. As for the npc id, you can find them on this thread > Thanks Nuklear
In this guide, we'll be using Fredrick as our npc, and add some elixers to him, along with summoning rocks.
So, we'd set it like this: Code: INSERT INTO `shops` VALUES (''600, 9030000'');
So, the shop id there would be 600 and the npc is Fredrick (9030000)
4. On to the next part. Now we need to add the items to our shop. Code: INSERT INTO `shopitems` (`shopitemid`,`shopid`,`itemid`,`price`,`position`) VALUES
(,,,,),
(,,,,);
This part is pretty simple, the Code: INSERT INTO `shopitems` (`shopitemid`,`shopid`,`itemid`,`price`,`position`) VALUES
Pretty much gives it away.
Here's how it goes: Code: INSERT INTO `shopitems` (`shopitemid`,`shopid`,`itemid`,`price`,`position`) VALUES
(This is another id used by the shopitems, The id of the shop, The id of the item, The price you want, It's position (Will talk about later)),
(This is another id used by the shopitems, The id of the shop, The id of the item, The price you want, It's position (Will talk about later));
Here's what each is: -Shopitemid: Each shop item also requires another id, a number. -Shopid: Remember the shop id you used before? The one I used 600 for? Well that's this. -Itemid: The id of the item you want sold. Try http://www.mapletip.com/ for the id's. -Price: The price of the item. Ex: 1000000 = 1,000,000 mesos. -Position: This is to show where the item you're selling is located at the shop. 1 is the first item, 0 does not work and the item won't show if used. For every item after that one, use the next number. 2, 3, 4, etc.
For these, you can use as many as you want, just that the last one must end with a ; not a ,
Here's an example I've made with fredrick's shop: Code: INSERT INTO `shops` VALUES (''600, 9030000'');
INSERT INTO `shopitems` (`shopitemid`,`shopid`,`itemid`,`price`,`position`) VALUES
(60000, 60, 2000005, 50000, 1),
(60001, 60, 2022179, 50000, 2),
(60002, 60, 4006001, 1, 3);
From that, if you executed it, fredrick would sell those items. 5. Saving your file.
In order to make this work out, you must save the file as a .sql file.
To do this in notepad, you can do the following: File>Save as> Name your file 'Shop.sql' (Anything name that ends with .sql works. > Right below it, click on the bar and click 'All files' > Save. 6. Now, execute your .sql folder in your database.
For navicat, do the following: Open Navicat > Get to your database, and double click it > Right click it > Click 'Execute batch file' > Click the '...' Browse for the .sql file you saved, press 'ok' > Then press start > Done 7. You're now done with your store, it should be in your database. You can now open up your server and test it out. Note : You can make and execute shops while your server is up.
Note #2 : If the npc has a script or quest, the shop will not work.
This is all for now. I plan to add pictures soon. Tell me what you think of it.
|
| |
RaGEZONE sponsored advertisment:
06-28-2008
|
#2 (permalink)
| | SianMS OWNER
Rank: Member + Join Date: Jun 2008
Posts: 218
Thanked 0 Times in 0 Posts
| Re: [Guide]How to make shops (Odin)
nice guide..=) works!
|
| | 
Endorsement
06-29-2008
|
#3 (permalink)
| | The Omega
Rank: Member
Join Date: Jan 2007
Posts: 109
Thanked 1 Time in 1 Post
| Re: [Guide]How to make shops (Odin)
i think this will take longer than the manual way.
|
| | 
Endorsement
07-04-2008
|
#4 (permalink)
| | Average Member
Rank: Hobbit
Join Date: Apr 2008
Posts: 68
Thanked 0 Times in 0 Posts
| Re: [Guide]How to make shops (Odin)
What do you mean by ShopID?
|
| |
07-04-2008
|
#5 (permalink)
| | Newbie
Rank: Hobbit
Join Date: Jun 2008
Posts: 7
Thanked 0 Times in 0 Posts
| Re: [Guide]How to make shops (Odin)
|
Originally Posted by Moofhead | |
What do you mean by ShopID?
| A number you choose yourself.
The ID the shop would be recognised as.
I use 99001 and forward.
TO Jelly:
If there's a NPC with a script, can you remove the script?
I was thinking about making the 3rd job NPC's to item sellers for each Job.
|
| |
07-04-2008
|
#6 (permalink)
| | Jelly murder!
Rank: Member + Join Date: Jun 2008
Posts: 228
Thanked 0 Times in 0 Posts
| Re: [Guide]How to make shops (Odin)
If the npc's script is in the wz files, not that I know of. Otherwise, you can just get rid of the script from your npc folder.
|
| |
07-04-2008
|
#7 (permalink)
| | Newbie
Rank: Hobbit
Join Date: Jun 2008
Posts: 7
Thanked 0 Times in 0 Posts
| Re: [Guide]How to make shops (Odin)
It worked out anyways, i just click the "I have something to tell you." on the 3rd job guy, and the shop opens.
Thanks anyway for the guide.
|
| |
07-04-2008
|
#8 (permalink)
| | Member
Rank: Hobbit
Join Date: Jun 2008
Posts: 41
Thanked 0 Times in 0 Posts
| Re: [Guide]How to make shops (Odin)
good work.
|
| |
07-05-2008
|
#9 (permalink)
| | Member
Rank: Hobbit
Join Date: Apr 2008
Posts: 26
Thanked 0 Times in 0 Posts
| Re: [Guide]How to make shops (Odin)
um this might be a really nooby question buy where do i put my script after i finish coding it? cuz im trying to make a server with my frend but were not sure where we put it in >.<
nvm i found where to put it buy it keeps saying error in line one heres my line one :\\
INSERT INTO `shops` VALUES (''9595001, 9201024'');
wat did i do wrong?
in fact heres the whole script
INSERT INTO `shops` VALUES (''9595001, 9201024'');
INSERT INTO `shopitems` (`shopitemid`,`shopid`,`itemid`,`price`,`position` ) VALUES
(993440, 9595001, 04006001, 5000, 1),
(993441, 9595001, 04006000, 5000, 2);
|
| |
07-05-2008
|
#10 (permalink)
| | Member
Rank: Hobbit
Join Date: Jul 2007 Location: Right behind you
Posts: 45
Thanked 0 Times in 0 Posts
| Re: [Guide]How to make shops (Odin)
Its a great guide,
But its much simpeler if you do it manuall.
but i got 1 question...
How do i edit a shop like elinia wep/armor shop.
I dont get a name of the npc!
__________________ Make a new private server [ ]
Make a nice looking website [ ]
Learn some coding [ ]
code my first npc [ ]
Make a active server [ ] |
| |
07-05-2008
|
#11 (permalink)
| | Member
Rank: Hobbit
Join Date: Jul 2007 Location: Right behind you
Posts: 45
Thanked 0 Times in 0 Posts
| Re: [Guide]How to make shops (Odin)
*woops double post*
__________________ Make a new private server [ ]
Make a nice looking website [ ]
Learn some coding [ ]
code my first npc [ ]
Make a active server [ ]
Last edited by Martyo; 07-05-2008 at 09:58 AM.
Reason: Double post
|
| |
07-05-2008
|
#12 (permalink)
| | Newbie
Rank: Hobbit
Join Date: Jun 2008
Posts: 8
Thanked 0 Times in 0 Posts
| Re: [Guide]How to make shops (Odin)
How do i delete items from NPC shop? Can some one provide a template layout please :)
|
| |
07-09-2008
|
#13 (permalink)
| | Member
Rank: Hobbit
Join Date: Jul 2008 Location: Train Station
Posts: 37
Thanked 0 Times in 0 Posts
| Re: [Guide]How to make shops (Odin)
hey excuse me can i ask can u give me a direct link to put it into im nub at this sorry
|
| |
07-09-2008
|
#14 (permalink)
| | Alpha
Rank: Member
Join Date: Jun 2006 Location: azza
Posts: 136
Thanked 0 Times in 0 Posts
| Re: [Guide]How to make shops (Odin)
This is weird.. I did everything like u said but it doesnt work!!!
|
| |
07-11-2008
|
#15 (permalink)
| | Newbie
Rank: Hobbit
Join Date: Jul 2008
Posts: 8
Thanked 0 Times in 0 Posts
| Re: [Guide]How to make shops (Odin)
Please i did exactly what u said but it keep saying this errors =[ help me please i need it so much btw it was a nice guide but maybe u know what i did wrong can u say me
here is a pic |
| |
07-11-2008
|
#16 (permalink)
| | Eat's candy!
Rank: Member + Join Date: Jun 2008 Location: The Netherlands
Posts: 723
Thanked 0 Times in 0 Posts
| Re: [Guide]How to make shops (Odin)
Ive putted some stuff on Robin, wich gives things away ( putted a 0 as price ).
So this is what i got :
| | Quote: |
INSERT INTO `shops` VALUES (''600,2003 '');
INSERT INTO `shopitems` (`shopitemid`,`shopid`,`itemid`,`price`,`position` ) VALUES
(2040807,600,2040807,0,1),
(2022179 ,600,2022179 ,0,2),
(5071000,600,5071000,0,3),
(5072000,600,5072000,0,4),
(5070000,600,5070000,0,5),
(2022245,600,2022245,0,6);
| EDIT: When i excute it says :
| | Quote: | |
You have an Error in SQL Syntax ; check the manual that corresponds to your MySQL Server version for the right Syntax to use near '600,2003")'At line 1 , Error NR 1064,
| |
| |
07-12-2008
|
#17 (permalink)
| | Average Member
Rank: Hobbit
Join Date: Jul 2008 Location: Pleasantville
Posts: 71
Thanked 1 Time in 1 Post
| Re: [Guide]How to make shops (Odin)
Thank you for the tut :] it's very helpful and noob-friendly
|
Originally Posted by WhiteTigerX |
Ive putted some stuff on Robin, wich gives things away ( putted a 0 as price ).
So this is what i got :
EDIT: When i excute it says :
| Hey. I was getting the same error. You have to take out the '' in (''600,2003 ''); and include a space between the comma and the 2.
so it would look like this: |
| |
07-12-2008
|
#18 (permalink)
| | i like it sliiiiideways.
Rank: Member + Join Date: Jul 2008
Posts: 296
Thanked 0 Times in 0 Posts
| Re: [Guide]How to make shops (Odin)
i accidently executed twice and have double the items in my shops, how do i fix that?
because i wanted to add more items, how can i add more items w/o that happeneing?
|
| |
07-13-2008
|
#19 (permalink)
| | Newbie
Rank: Hobbit
Join Date: Jul 2008
Posts: 19
Thanked 0 Times in 0 Posts
| Re: [Guide]How to make shops (Odin)
|
Originally Posted by FazeLance | |
How do i delete items from NPC shop? Can some one provide a template layout please :)
| yes, i would like to delete items from an NPC shop as well, any help or suggestions appreciated
thanks
|
| |
07-14-2008
|
#20 (permalink)
| | Average Member
Rank: Hobbit
Join Date: Jul 2008 Location: Pleasantville
Posts: 71
Thanked 1 Time in 1 Post
| Re: [Guide]How to make shops (Odin)
How do i keep the shop items from doubling? I was making edits to the GM shop and so i deleted it from the mysql shops and then when i was done editing i re-executed the sql and the items that were in there before are doubled and the ones i just added are fine. How can i get rid of the duplicate shop items?
|
| |
07-14-2008
|
#21 (permalink)
| | Average Member
Rank: Hobbit
Join Date: Jul 2008 Location: Pleasantville
Posts: 71
Thanked 1 Time in 1 Post
| Re: [Guide]How to make shops (Odin)
|
Originally Posted by in3wb |
yes, i would like to delete items from an NPC shop as well, any help or suggestions appreciated
thanks
| basically you get the item code for the item you want to delete, find that item code in the shop sql, and erase the line that goes with it. then you save and execute the sql. It might make a double of your items though. i'm trying to get rid of this problem but idk how.
|
| |
07-14-2008
|
#22 (permalink)
| | Member
Rank: Hobbit
Join Date: Apr 2008
Posts: 34
Thanked 0 Times in 0 Posts
| Re: [Guide]How to make shops (Odin)
Nice guide , and Drummer Dont spam :S
|
| |
07-15-2008
|
#23 (permalink)
| | Newbie
Rank: Hobbit
Join Date: Jun 2008
Posts: 24
Thanked 0 Times in 0 Posts
| Re: [Guide]How to make shops (Odin)
how do i find the check the manual that corresponds to your MySQL Server version for the right Syntax to use ?
|
| |
07-15-2008
|
#24 (permalink)
| | Average Member
Rank: Hobbit
Join Date: Jul 2008 Location: Pleasantville
Posts: 71
Thanked 1 Time in 1 Post
| Re: [Guide]How to make shops (Odin)
|
Originally Posted by NecroX | |
Nice guide , and Drummer Dont spam :S
| i wasnt trying to spam -_-
|
| |
07-15-2008
|
#25 (permalink)
| | Newbie
Rank: Hobbit
Join Date: Apr 2008
Posts: 24
Thanked 0 Times in 0 Posts
| Re: [Guide]How to make shops (Odin)
Everything works but then when i am ingame and i double click on the npc the store opens but i dont see any of the items i put in, i just see empty rows. can somebody help?
|
| |
LinkBacks (?)
LinkBack to this Thread: http://forum.ragezone.com/f428/tut-how-to-make-shops-odin-421827/ | | Posted By | For | Type | Date | | maplestory libary | This thread | Refback | 07-17-2009 01:02 AM | | MapleStory Development Team: February 2009 | This thread | Refback | 06-27-2009 10:23 PM | | MapleStory Development Team: OdinMS Based: Big Ol' List of Things! | This thread | Refback | 04-12-2009 01:58 PM | | MapleStory Development Team | This thread | Refback | 04-01-2009 07:09 AM | | [Release] [Library of Useful OdinMS Stuff] [Fixes] [Guides] [Registration Pages] - GameCheetah | This thread | Refback | 03-29-2009 04:50 AM | | [OdinMS]Releases,Guides,Repacks,Revs,orials,HTML-PHP,Tools,Handbook - Maplestory Releases - ServerFiles.org | This thread | Refback | 03-27-2009 10:39 AM | | How do you make NPC's? - GameCheetah | This thread | Refback | 03-27-2009 12:34 AM | | OdinMS Source Releases,Guides,Repacks,Revs,Tutorials,HTML-PHP,Tools,Handbook - GameCheetah | This thread | Refback | 03-25-2009 02:59 PM | |