Welcome!

Join our community of MMORPG enthusiasts and private server developers! By registering, you'll gain access to in-depth discussions on source codes, binaries, and the latest developments in MMORPG server files. Collaborate with like-minded individuals, explore tutorials, and share insights on building and optimizing private servers. Join us today and unlock the full potential of MMORPG 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:
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:

 
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!
 
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
 
Re: [Tut - A] [317] Creating shops

How do you change the prices of the items in shops? Editing shops.cfg won't work.
 
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>
 
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?
 
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?
 
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