You are Unregistered, please register to gain Full access.
    


RaGEZONE sponsored advertisment:

Dragonica Image
The free 3D side scrolling MMORPG.

 
 
LinkBack (8) Thread Tools
Old 06-28-2008   8 links from elsewhere to this Post. Click to view. #1 (permalink)
Jelly murder!
 
Jelly's Avatar
 
Rank: Member +
Join Date: Jun 2008
Posts: 228
Thanked 0 Times in 0 Posts

[Tut]How to make shops (Odin)

Your Ad Here
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
Code:
(,,,,),
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.
Jelly is offline  

RaGEZONE sponsored advertisment:
Old 06-28-2008   #2 (permalink)
SianMS OWNER
 
marcuschai's Avatar
 
Rank: Member +
Join Date: Jun 2008
Posts: 218
Thanked 0 Times in 0 Posts

Re: [Guide]How to make shops (Odin)

nice guide..=) works!
marcuschai is offline  

Endorsement
Old 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.
samuelnice is offline  

Endorsement

Old 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?
Moofhead is offline  
Old 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 View Post
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.
FreshBite is offline  
Old 07-04-2008   #6 (permalink)
Jelly murder!
 
Jelly's Avatar
 
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.
Jelly is offline  
Old 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.
FreshBite is offline  
Old 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.
Ownecl is offline  
Old 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);
cooljo08 is offline  
Old 07-05-2008   #10 (permalink)
Member
 
Martyo's Avatar
 
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 [ ]
Martyo is offline  
Old 07-05-2008   #11 (permalink)
Member
 
Martyo's Avatar
 
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
Martyo is offline  
Old 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 :)
FazeLance is offline  
Old 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
jaytee27 is offline  
Old 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!!!
cablord is offline  
Old 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
BenjaminVD is offline  
Old 07-11-2008   #16 (permalink)
Eat's candy!
 
WhiteTigerX's Avatar
 
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,
WhiteTigerX is offline  
Old 07-12-2008   #17 (permalink)
Average Member
 
Drummerboii's Avatar
 
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 View Post
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:
Quote:
(600, 2003);
Drummerboii is offline  
Old 07-12-2008   #18 (permalink)
i like it sliiiiideways.
 
narvin's Avatar
 
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?
narvin is offline  
Old 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 View Post
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
in3wb is offline  
Old 07-14-2008   #20 (permalink)
Average Member
 
Drummerboii's Avatar
 
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?
Drummerboii is offline  
Old 07-14-2008   #21 (permalink)
Average Member
 
Drummerboii's Avatar
 
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 View Post
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.
Drummerboii is offline  
Old 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
__________________
AoeMS

APPLY FOR BETA TESTER
Recruiting for GM
ATT: cm_evil@huachovip.net
NecroX is offline  
Old 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 ?
NaeShaun is offline  
Old 07-15-2008   #24 (permalink)
Average Member
 
Drummerboii's Avatar
 
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 View Post
Nice guide , and Drummer Dont spam :S
i wasnt trying to spam -_-
Drummerboii is offline  
Old 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?
mistamoronic is offline  
 

Bookmarks

Thread Tools


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



Translated by Google
Albanian Arabic Belarusian Bulgarian Catalan Chinese Croatian Czech Danish Dutch English Estonian Filipino Finnish French Galician German Greek Hebrew Hindi Hungarian Icelandic Indonesian Italian Japanese Korean Latvian Lithuanian Maltese Norwegian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swedish Taiwanese Thai Turkish Ukrainian Vietnamese
no new posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274