Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[317] Creating shops

Initiate Mage
Joined
Mar 23, 2008
Messages
2
Reaction score
1
To start off you need an npc i think you get npc's id's best by going on moparscape client and search there.

When you finded your npc that you want to be the shop keeper

Add the npc to autospawn.cfg

So it would be like this:

Code:
spawn = 619    2843    3675    0    0    0    0    0    2    seller
First ### is NPC's id, next ones is coords and you dont have to edit the last numbers.

And to get coords for the npc just go to spot you want the npc to be and type ::mypos (Should be in all sources)

Next you need to add items to the shop

So open shops.cfg

Heres an example:
Code:
shop = ##    Herb Shop                2    2    (itemid)      (amount)       (itemid)       (amount)       (ect)        (ect)

"Herb shop" is the name of the shop wich will see when you open the shop


And last part. Open client.java and search for
Code:
WanneShop = 30;

And if you dont find that, search for
Code:
case 155: //first Click npc

And scroll down for few secs until you see alot of wanneshops.

Then just add
Code:
else if (NPCID == ####) { // Id of Npc
PutNPCCoords = true;
WanneShop = ##; //Id of shop
}

So you put npc's id to NPCID == ####) {
And Shops id to WanneShop = ##; (Put the same number what you putted in shops.cfg to this:
Code:
shop = -->[b]##[/b]<--    Herb Shop                2    2


Please post if i missed some part and i edit.

Comment's would be nice.
And im G0D on runelocus, Godz on rs-server.
My second tut, dont flame/spam pl0x.
 
Last edited:
There's no RL just AFK
Loyal Member
Joined
May 2, 2006
Messages
473
Reaction score
6
Re: Creating shops

Well Jenny, i don't want to flame you, as you so rightfully ask, so do not take this as a flaming (like everyone else seems to do >.<) but you have broken the rules of the section, the rule you have broken:

 
Initiate Mage
Joined
Mar 23, 2008
Messages
2
Reaction score
1
Re: Creating shops

Well Jenny, i don't want to flame you, as you so rightfully ask, so do not take this as a flaming (like everyone else seems to do >.<) but you have broken the rules of the section, the rule you have broken:



Hopefully you can resolve this issue by editing your thread :winky:


Oh, Im sorry, I didn't have readed it yet. :p I edit my title.


EDIT: If i can ;S
EDIT: Mod can you change the title!
 
There's no RL just AFK
Loyal Member
Joined
May 2, 2006
Messages
473
Reaction score
6
Re: Creating shops

Yeah i figured that would be a problem ^^ Think it's 100 posts needed to change the title.
 
Initiate Mage
Joined
Jan 11, 2009
Messages
1
Reaction score
0
Re: [Tut]Creating shops

hello, ive got an question.

how can i delete shops?? cause i get an error if i remove some items from a shop than the server wont start!

greetz didier
 
right + down + X
Loyal Member
Joined
May 25, 2006
Messages
1,688
Reaction score
298
Re: [Tut]Creating shops

faffert said:
hello, ive got an question.

how can i delete shops?? cause i get an error if i remove some items from a shop than the server wont start!

greetz didier

Just delete the line, and make sure that there are no empty lines before [endofspawnlist] (or w/e)
 
Rip Akaruz
Loyal Member
Joined
Dec 18, 2007
Messages
934
Reaction score
12
Re: [Tut - A] [317] Creating shops

fedexer i think its 250 to change title
 
Mythic Archon
Loyal Member
Joined
May 23, 2008
Messages
779
Reaction score
4
Re: [Tut - A] [317] Creating shops

Cool. I like it.
 
Master Summoner
Loyal Member
Joined
Dec 25, 2008
Messages
538
Reaction score
1
Re: [Tut - A] [317] Creating shops

Woah, didn't expect to see you here, Dartz.
 
Newbie Spellweaver
Joined
Jun 14, 2009
Messages
25
Reaction score
2
Re: [Tut - A] [317] Creating shops

Well Explained, Great Tut Overall 8/10

Nothings Perfect!
 
Initiate Mage
Joined
Jul 5, 2009
Messages
3
Reaction score
0
Re: [Tut - A] [317] Creating shops

How do you change the prices of the items in shops? Editing shops.cfg won't work.
 
Initiate Mage
Joined
Jun 3, 2009
Messages
2
Reaction score
0
Re: [Tut - A] [317] Creating shops

Hey i keep getting an error when i do this and i did everything exactly as u did

"exception in thread "main" java.lang.numberformatexception: for input string "41 Santas_rare_shop"
at java.lang.numberformat.exception.forinputstring<numberformatexception.java:48>
at java.lang.integer.parseInt<integer.java:456>
at java.lang.integer.parseInt<integer.java:497>
at shophandler.loadshops<shophandler.java:115>
at shophandler.<init><shophandler.java:30>
at server.main<server.java:28>
 
Newbie Spellweaver
Joined
Jul 19, 2009
Messages
75
Reaction score
2
Re: [Tut - A] [317] Creating shops

Hey i keep getting an error when i do this and i did everything exactly as u did

"exception in thread "main" java.lang.numberformatexception: for input string "41 Santas_rare_shop"
at java.lang.numberformat.exception.forinputstring<numberformatexception.java:48>
at java.lang.integer.parseInt<integer.java:456>
at java.lang.integer.parseInt<integer.java:497>
at shophandler.loadshops<shophandler.java:115>
at shophandler.<init><shophandler.java:30>
at server.main<server.java:28>


did you compile or is this the compile error?
i think this is the compile error?
 
Master Summoner
Joined
Oct 12, 2009
Messages
547
Reaction score
215
Re: [Tut - A] [317] Creating shops

Sorry for the really old topic bump, but this is a helpful topic & should be noticed.

Regardless, the error above was simply because of the shops.cfg was in the wrong order, just copy another shop and then edit it.

Now, my problem.. I am adding in the items in the shop, but I go in-game and there's nothing in the shop.

Any ideas?
 
Newbie Spellweaver
Joined
Dec 2, 2008
Messages
32
Reaction score
1
Re: [Tut - A] [317] Creating shops

Well if you filled this line our correctly.

Code:
shop =	"shopid"	"shopname"	2	2	"itemid"	"amount"	"itemid"	"amount"

Maybe try adding more shop's see if they work.

Dw im sure you'll figure it out :thumbup:
 
Back
Top