NPC LIST... SORRY ATTACHMENT WAS TO BIG TO POST HERE.
http://www.mediafire.com/?jyqu2mvz124
Purpose: To add an NPC and add him a shop.
Difficulty: 6/10 Must know some Java and how to fix some errors if you get some
Tested on: Palidino76's 508 Server
Step 1: If you already have an NPC for this, and just want to add a full shop, skip to Step --
- You have to find the coord's for the NPC to spawn. To do this, go stand where you want the NPC to be and type "::coords". Write these numbers down. If nothing happens when you type it, add this to your commands;
Step 2: Spawning NPC's
Find the NPC ID You want to spawn, from the attached file.
Then in your server files, go to BIN>DATA>NPCS>NPCSPAWN
You should see something like this;
The first code is the NPC ID, the second third and fourth are the X, Y and height. The height is alwasy 0. The last four are also 0's. To add an NPC, find the ID and coords. For example, I want to spawn a hero at 2469,5123. I would add this to the file.
Then save. ALSO, WRITE DOWN THE ID FOR THE SHOP!
Step 3:
Go to src\palidino76\rs2\players. Open players.java
Search for;
You should see something like this;
Go to the last one. It might be 15, it might be 10.. whatever shop(NUMHERE)n is the last one.
Add this below it;
Change the item codes, the amount, and price!!
Step 4: Go to \src\palidino76\rs2\io\packets and open up NPCoption1.java
Add this;
Save.
Step 5: Go to \src\palidino76\rs2\io\packets and open up ItemOption1.java
Search for "else if(itemId == " until you get to the last one. If your last one is 14, add this.
Then in the same packets place, open up ShopBuyConfig.java
Search for "else if (p.shopid ==" till you get to last one. For example if it is 14...
add this;
Save. Compile! Run! HAVE FUN WITH YOUR NEW SHOP!!
80% Credit to Drake/Begonein2min
20% Credit to Soul_Banner
Thanks I worked like 30 minutes on this. TY FOR READING!
http://www.mediafire.com/?jyqu2mvz124
Purpose: To add an NPC and add him a shop.
Difficulty: 6/10 Must know some Java and how to fix some errors if you get some
Tested on: Palidino76's 508 Server
Step 1: If you already have an NPC for this, and just want to add a full shop, skip to Step --
- You have to find the coord's for the NPC to spawn. To do this, go stand where you want the NPC to be and type "::coords". Write these numbers down. If nothing happens when you type it, add this to your commands;
Code:
} else if (cmd[0].equals("coords")) {
p.frames.sendMessage(p, "x: " + p.absX + ", y: " + p.absY);
}
Find the NPC ID You want to spawn, from the attached file.
Then in your server files, go to BIN>DATA>NPCS>NPCSPAWN
You should see something like this;
Code:
spawn = 2745 2392 5154 0 2864 5312 2864 5312 TzTok-Jad
spawn = 21 2469 5123 0 0 0 0 0 Hero
Code:
spawn = 21 2469 5123 0 0 0 0 0 Hero
Step 3:
Go to src\palidino76\rs2\players. Open players.java
Search for;
Code:
public int[] shop
Code:
public int[] shop15 = {9920, 9925, 10612, 10721, 10723, 11282, 13107, 13109, 13111, 13113, 1311***;
public int[] shop15n = {1000000,1000000,1000000,1000000,1000000,1000000,10000000,1000000,10000000,1000000,1000000};
public int[] shop15p = {5000, 5000, 5000};
Add this below it;
Code:
public int[] shop15 = {9920, 9925, 10612, 10721, 10723, 11282, 13107, 13109, 13111, 13113, 1311***; // put items here! and change shop15 to the last one
public int[] shop15n = {1000000,1000000,1000000,1000000,1000000,1000000,10000000,1000000,10000000,1000000,1000000}; //items amount for example it will show them 1m ea in shop!
public int[] shop15p = {5000, 5000, 5000}; //prices here for every and each item!
Step 4: Go to \src\palidino76\rs2\io\packets and open up NPCoption1.java
Add this;
Code:
case (NPC ID HERE):
p.viewings = 1;
p.shopid = 15; //SHOP NUMBER HERE
p.frames.showInterface(p, 278);
p.frames.setItems(p, 278, 89, 94, p.shop15, p.shop15n); //Add the one you put. +1 every time u add new shop
p.frames.setString(p, " SHOP NAME HERE", 278, 88);
break;
Step 5: Go to \src\palidino76\rs2\io\packets and open up ItemOption1.java
Search for "else if(itemId == " until you get to the last one. If your last one is 14, add this.
Code:
else if(itemId == p.shop15[itemSlot])
{
p.frames.sendMessage(p, "This item costs "+p.shop15p[0]);//CHANGE THE 15 TO YOUR SHOP!
}
Search for "else if (p.shopid ==" till you get to last one. For example if it is 14...
add this;
Code:
else if (p.shopid == 15 && pi.haveItem(p, 995, p.shop15p[0]))
{
pi.deleteItem(p, 995, pi.getItemSlot(p, 995), p.shop15p[0]);
pi.addItem(p, p.shop15[itemSlot], 1);
}
80% Credit to Drake/Begonein2min
20% Credit to Soul_Banner
Thanks I worked like 30 minutes on this. TY FOR READING!


