Begonein2min Guide #2: Adding shops to a 508 private server

Discussion in 'Archives' started by Begonein2min, May 10, 2010.

Begonein2min Guide #2: Adding shops to a 508 private server
  1. Unread #1 - May 10, 2010 at 10:08 PM
  2. Begonein2min
    Joined:
    Apr 19, 2009
    Posts:
    570
    Referrals:
    2
    Sythe Gold:
    0

    Begonein2min Forum Addict
    Banned

    Begonein2min Guide #2: Adding shops to a 508 private server

    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;
    Code:
     } else if (cmd[0].equals("coords")) {
                        p.frames.sendMessage(p, "x: " + p.absX + ", y: " + p.absY);
                    }
    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;
    Code:
    spawn    =    2745    2392    5154    0    2864    5312    2864    5312    TzTok-Jad
    spawn    =    21    2469    5123    0    0    0    0    0    Hero
    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.
    Code:
    spawn    =    21    2469    5123    0    0    0    0    0    Hero
    Then save. ALSO, WRITE DOWN THE ID FOR THE SHOP!
    Step 3:
    Go to src\palidino76\rs2\players. Open players.java
    Search for;
    Code:
    public int[] shop
    You should see something like this;
    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};
    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;
    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!
    Change the item codes, the amount, and price!!

    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;
    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.
    Code:
    else if(itemId == p.shop15[itemSlot])
    {
        p.frames.sendMessage(p, "This item costs "+p.shop15p[0]);//CHANGE THE 15 TO YOUR SHOP!
    }
    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;
    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);
    }
    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!
     
  3. Unread #2 - Jul 27, 2010 at 4:52 PM
  4. jamesodell
    Joined:
    Jul 22, 2010
    Posts:
    258
    Referrals:
    0
    Sythe Gold:
    0

    jamesodell Forum Addict
    Banned

    Begonein2min Guide #2: Adding shops to a 508 private server

    thanks this will be usefull :)
     
  5. Unread #3 - Jul 27, 2010 at 5:02 PM
  6. Begonein2min
    Joined:
    Apr 19, 2009
    Posts:
    570
    Referrals:
    2
    Sythe Gold:
    0

    Begonein2min Forum Addict
    Banned

    Begonein2min Guide #2: Adding shops to a 508 private server

    Sure glad I could help:)
     
< Forum Glitch? | Sell Nice main - 99 wc*5.5m* (For auths) (swap) >

Users viewing this thread
1 guest


 
 
Adblock breaks this site