The shop opens but you can't buy/sell?
Try this:
First of all, open your shops.cfg and you should find something like this:
Code:
shop = 29 PvP Points Shop 2 2 10548 10 6570 10 11694 10 11696 10 11700 10 11698 10 11730 10 15001 10 11720 10 11722 10 11718 10 11724 10 11726 10 11283 10 15018 10 15019 10 15020 10 15220 10 13736 10 13734 10 11663 10 11664 10 11665 10 8842 10 8839 10 8840 10
shop = 30 Donator's Shop 2 2 10452 1 10458 1 10464 1 10446 1 10440 1 10456 1 10460 1 10468 1 10450 1 10444 1 10454 1 10462 1 10466 1 10448 1 10442 1 11195 1 20 1 2570 1
shop = 31 Rune Essence 2 2 1437 25000
To add a new shop, simply write:
Code:
shop = ** Name of your shop here 2 2 itemid ammount itemid ammount itemid ammount
The ** is the shopID. Simply look before and enter a number that isn't used already.
It's the name that will appear once you open the shop. Separate each name with a space/underscore if it doesn't work.
DO NOT CHANGE THESE, these are the buy/sell numbers for which a shop is allowed to sell/not to sell items.
After adding the shop to shops.cfg, go to spawn-config.java and spawn the NPC you'd like to be the "owner" of the shop. For example Ellena (a farmer)
Code:
spawn = 2331 2811 3465 0 0 0 0 0 Skilling Supplies (Farmer/Ellena)
That's the NPC ID, you can check that in NPC.cfg
These are the NPC's X and Y coordinates.
Change this to 1 if you want the NPC to walk around randomly
Keep the rest at 0
Now that you've spawned your NPC, save and close spawn-config.java.
Open ActionHandler.java and search:
Code:
public void firstClickNpc(int npcType) {
or if that doesn't work, search for
Which is Bob, should be your skilling shop.
Lots of these cases should appear:
Code:
case 549:
c.getShops().openShop(28);
break;
case 1336:
c.getShops().openShop(4);
break;
case 2538:
c.getShops().openShop(6);
break;
case 519: //Bob
c.getShops().openShop(8);
break;
Under a break;, write:
Code:
case 2331:
c.getShops().openShop(**);
break;
Write the shopID you wrote on shops.cfg
Replace 2331 with the NPCID you wrote on spawn-config.cfg
And that's about it.