Anc13nt Scape v2
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Anc13nt Scape v2

a forum of anc13ntscape server
 
HomePortalSearchLatest imagesRegisterLog in

 

 How To Make A Shop -[TUT]

Go down 
AuthorMessage
Anc13ntscapeisthebest
Admin
Admin



Posts : 11
Join date : 2008-02-21
Age : 30
Location : England

How To Make A Shop -[TUT] Empty
PostSubject: How To Make A Shop -[TUT]   How To Make A Shop -[TUT] Icon_minitimeFri Feb 22, 2008 2:00 pm

Knowledge: Being able to read.
Difficulty 1/10
Files used: Client.Java / Shops.Cfg / Autospawn.cfg.

Step 1: - First off go into Shops.Cfg and go to the bottom and at the last shop add:
Code:
shop = NEXTIDINLIST   SHOPNAME               2   2   ITEMID    QUANITYOFITEM

Where it says NEXTIDINLIST put the next number of the list of shops. Where it says SHOPNAME that will be the display name for your shop. Where it says ITEMID put the ID of the item you want to sell and where it says QUANITYOFITEM put the amount of the item you want to sell and if you want to add more stuff to your shop just add more of the ITEMID and the QUANITYOFITEM...

Step 2: - Go into Client.Java and search for:
Code:
} else if (NPCID == 553) { //Aubury rune shop

Below that, add:
} else if (NPCID == NPCIDHERE) { // NAMEOFNPCHERE
PutNPCCoords = true;
WanneShop = IDINLIST; // NAMEOFSHOP

Where it says NPCIDHERE put the id of the npc you want to use for your shop. Where it says NAMEOFNPCHERE put the name of the npc you're using / Where it says IDINLIST use the number you used in Shops.cfg. Where it says NAMEOFSHOP put the name of the shop.

Step 3 - Go into Autospawn.cfg its time to make your npc that will be your shop
Add this under any Npc in Autospawn.cfg

Code:
spawn = NPCIDHERE   XCORD   YCORD   0   0   0   0   0   4   NAMEOFNPC

Where it says NPCIDHERE add the id of the npc you want to become your shop / Where it says XCORD and YCORD put the X and Y coordinates of the location you want your shop to be / where it says NAMEOFNPC put the name of the npc (can be a nickname).

Tip - Don't use a npc is already being used for a shop.

EXTRA - If you want your npc to talk go into Npchandler.Java and search for 'Moo'

Then Look for an npc's speach.. Then Voila.. You can edit others.

And under the last } add:



Code:
if (npcs[i].npcType == NPCIDHERE) {
if (misc.random2(30) <= 6) {
npcs[i].updateRequired = true;
npcs[i].textUpdateRequired = true;
npcs[i].textUpdate = "TEXTOFNPC";
}
}
Back to top Go down
https://anc13ntscape.board-directory.net
 
How To Make A Shop -[TUT]
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Anc13nt Scape v2 :: Server Tutorials-
Jump to: