Thread: Adding a simple shop

Results 1 to 9 of 9
  1. #1 Adding a simple shop 
    ello123
    Guest
    Purpose: Making a simple shop on your server

    Difficulty: 1/10 (could be 2/10 if new)

    Assumed Knowledge: Adding stuff in .cfg files and know how to read

    Server Base: Any

    Classes Modified: client.java, autospawn.cfg and shops.cfg

    Procedure
    Step 1:
    find what ever npc you want to represent the shop, i suggest on the moparscape client and search for any npc's there by clicking help at the top.
    Find where you want to put the npc and shop. You should find these in-game. If not then go on moparscape's clint (if you are not already) and type in: ::coordson or ::mypos..i forget these days


    Step 2:
    go into your files and open up autospawn.cfg and put in something like this:
    Code:
    spawn =npcid TAB x TAB y TAB 0 TAB 0 TAB 0 TAB 0 TAB 0 TAB 1 TAB name of npc
    key:
    npcid=you put in the npc id
    x and y=you put in the x coords and y coords.
    name of npc=the name of it.


    Step 3:
    open up shops.cfg and add something like this:

    shop = next number TAB name_of_shop TAB 1/2 TAB 1/2 TAB itemid TAB amount

    key:
    next number=s the next number down the list
    name_of_shop=is the name of shop with underscores
    1/2= 1=general store 2=you can only buy stuff there. As you can see, there are two places that say "1/2". what ever number you chhose, put it the same for both places.
    itemid=is the item number
    amount=is the cost of that item


    step 4:
    [i]open up client.java and find something like:
    Code:
    WanneShop =
    and under the bracket underneath that add something like this:
    Code:
     else if (NPCID == ####) { // Name of Npc
    PutNPCCoords = true;
    WanneShop = ##; //name of shop
    }
    (NPCID == ####) { // Name of Npc
    the hashes mean to put the npc id there and name of npc is obvious....
    WanneShop = ##; //name of shop
    the two hashes mean the number you added in shops.cfg and again name of shops is obvious...

    SAVE AND COMPILE!

    TADA!

    Credits: [i]50%
    zezimaisme111(me on moparscape) -posting this originally
    50% me for posting here
     

  2. #2  
    Registered Member
    Join Date
    Dec 2007
    Posts
    200
    Thanks given
    2
    Thanks received
    0
    Rep Power
    20
    nice tut
     

  3. #3  
    ello123
    Guest
    thanks for the comment
     

  4. #4  
    genraven
    Guest
    Nice tutorial. Keep up the good work.
     

  5. #5  
    × Zenzie ×
    Guest
    You forgot to explain the Click NPC 1 and Click NPC 2 packets >.<
     

  6. #6  
    ello123
    Guest
    ill update a bit later
     

  7. #7  
    xxx str xxx
    Guest
    i cant open autospawn cfg!!
     

  8. #8  
    ello123
    Guest
    Open it with notepad....................
     

  9. #9  
    Optimist

    Vice's Avatar
    Join Date
    Nov 2007
    Age
    25
    Posts
    3,263
    Thanks given
    3
    Thanks received
    59
    Rep Power
    2536
    meh gj is this your first tutorial? i have only seen u around shoutbox, nice job
    Jack
    Scotland
    Undergraduate - BSc Computing Science
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •