It is quite easy to do, you just have to care about the ID's
Let's start:
Part I: Database
First we have to create a custom NPC, go into your database and open cq_npc, create a new not used ID, in my example it will be 100004, here i show you the right way to add it.
paste in cq_npc
Code:
[COLOR="Red"]100004[/COLOR] 0 0 Guilda 123 1000040 0 0 -1 1000 192 341 [COLOR="Blue"]900001020[/COLOR] 0 0 0 0 0 0 0 0 1 0 0 ΞžΞ® 0 0 0 0 1 0 0 0 0 0
NPC ID
cq_task ID
type=123 (Green baloon cursor)
Explanation: The NPC ID will be used also to create the shop with Funhacker's Tool shop.dat editor. The cq_task id must be the same as the cq_action id for this npc, don't worry everything will be easy to understand.
once you have pasted the above cq_npc now we are gonna to to make the task for it, so obviously we are going to open cq_task. Again create a non used id, beware that the same id will be used on cq_action so check on there too that the id is not used.
paste in cq_task
Code:
[COLOR="Blue"]900001020[/COLOR] [COLOR="Blue"]900001020[/COLOR] 0 0 0 999 -100000 100000 999 0 0 -1 0
Now we have to create the cq_action for this npc, easy also in here, we will use the same id as cq_task.
paste in cq_action
Code:
[COLOR="Blue"]900001020[/COLOR] 0 0 [COLOR="Red"]1046[/COLOR] 1
Type=1046
Also we have to add those items we are going to sell on cq_goods table, the items are those i use in my example:
paste in cq_goods
Code:
9999995 [COLOR="Red"]100004[/COLOR] [COLOR="Blue"]420084[/COLOR] 9999994 [COLOR="Red"]100004[/COLOR] [COLOR="Blue"]420074[/COLOR] 9999996 [COLOR="Red"]100004[/COLOR] [COLOR="Blue"]420094[/COLOR]
Items to be sell ID's (See the picture bellow Client Edits)
9999994 to 9999996 = custom ids needed for cq_goods
You follow? Now the Database side is done, we have now to make our shop and customize our npc to look better than those ugly blue 100npcs.
Part II: Client Edits
Very easy in here also, in my example i used 100004 as id, so get
and open your shop.dat file.
If you want the shop to be EP set the shop type to 5 as the pic below, for gold shop set type to 2 like the above pic Note: EP Shop is buggy atm, have to see why items cannot be bought!
you can see on the above picture that the shop id is the same as the npc created.
Ok now save your shop.dat
Now we are gonna make our npc custom with a title and a lookface. For the npc to have a lookface we can see in the above cq_npc entry that it uses lookface 1000040, easy here, the id of the npc is 100004, to have a lookface we have to calculate npcid*10 so 100004*10 = 1000040, this is valable for all npcs, so open up your npc.ini file and add this:
Code:
[NpcType100004] Name=Guilda SimpleObjID=745 StandByMotion=0745000100 BlazeMotion=0745000190 BlazeMotion1=0700000190 BlazeMotion2=0700000190 RestMotion=0745000101 Effect=charm03-999 ZoomPercent=100 Note=WeaponsSeller
SimpleObjID=745 (Shopping mall lookface)
Effect=charm03-999 (find more here:
)Name=Name of the NPC
Note=What it sells.
Congratulations your custom shop is ready and its beautifull!:
Hope you like it, as i always say maybe there are better, easier ways, i'm just sharing what i do the way i do it.
The ID's I am using are custom and do not exist on my database, so please, make a backup of yours first, check that the ID's are not used and go on, create as many shops you want, until the ID's are new you don't have to worry!
Guide by cyberghoser1







