[GUIDE]Build your own NPC (TQ Binarys)

05/11/2009 22:35 E.M.E#1
Ok i will explain it but doesn't mean i will get the querys done to anyone asks..

The tables you will need to work on are
Cq_action
Cq_tasks
Cq_NPC or Cq_dynnpc

First off all open Cq_npc add new ID .. Location .. for the lookface "Copy other NPC's" for task0 put a new ID and make sure the id u put Doesn't have any on cq_action. will require a restart so the npc shows...

when u click the npc it will directly send u to task0 ... which is the new ID u will put

Lets consider the ID as *ID1*

open cq_action
on the ID you put *ID1* id_next the next action script that must comes after the starting query so id_next is *ID2*

if you click the npc it will take u to *ID1* then reads *ID2*... how to make the npc starts a conversation? keep going on the guide..

we got other columns called type .. data and param

To start a conversation when someone clicked the npc you gotta put 101 as type and under param write the text gotta be of 255 letters thats the limit of each column...

note that the space doesn't be readen on TQ binarys you gotta replace each space with ~ for exmple (Welcome~to~E.M.E's~NPC,~You~can~buy~blah~blah~bla h.)

so are first line is
*ID1* *ID2* 0 101 0 Welcome~to~E.M.E's~NPC,~You~can~buy~blah~blah~blah .
then on line 2 comes the options for the NPC
line 2 id is *ID2* gotta be same as Id_next and the type of the options param is 102 so for line 2
*ID2* *ID3* 0 102 0 THE PARAM
the param gotta be the options name like
(Lets~buy) then a space and the action id that must be redirected to so for exmple
(Lets~Buy *ID10*)
and to make an ending option
will be *ID3* it will have to be
*ID3* 15003 0 102 0 THE PARAM
and the param is (END 0) or Nevermind or how ever u wanted to end it...

So we got now
*ID1* *ID2* 0 101 0 Welcome~to~E.M.E's~NPC,~You~can~buy~blah~blah~blah .
*ID2* *ID3* 0 102 0 Lets~Buy *ID10*
*ID3* 15003 0 102 0 END 0

now open cq_tasks
insrt new line
place the following ids as tasks
*ID1*
*ID3*
*ID10*

the cq_tasks has id and id_next
on both add the same ids and the rest copy another line info but make sure the marriage has -1 or else married characters wouldn't be able to get redirected to the actions

the cq_tasks is any request been made by npc tasks this why you have to add your action id on task0 at cq_npc so when u click the npc it do a check on task if the ID exist if it does it redirects you to the actions (id_next)

and for the options on the dialog
*ID2* *ID3* 0 102 0 Lets~Buy *ID10* << when you click Lets~buy it request the *ID10* from tasks to and redirects to ID10 so after u build your dialog u do the rest of action to do w/e u wanted to do with your NPC thats not a full guide this guide made to show you how does the cq_action work for TQ Binarys u can check other npcs for more info to start your own



NPC Changes money into cps.
Requested by: Tarek_ahmed
[Only registered and activated users can see links. Click Here To Register...]
05/11/2009 22:36 E.M.E#2
To Start a shop NPC you will need to work on 3 things
Database side
cq_goods
cq_npc

Client Side
ini/shop.dat

open cq_npc start new line / location make sure u don't add any task
so when ever u click on a npc it starts an empty shop

go to shop.dat add new amount for npcs increase it by 1 on the header
[Header]
Amount=37 << this is my ini amount for adding another npc gotta be 38

scroll down

[Shop38] <<< The shop id if your ini contains 37 shop then gotta be 38 if more increase by 1
ID= <<< Your npc id on cq_npc
Name=<<< Name
Type=1 <<npc type gotta be 1 on cq_npc to
MoneyType=1 <<< Payment fees 1 is CP , 0 is gold
ItemAmount=1 <<< the amount of items u want to show in the npc
Item0= << the first item ID make sure on cq_itemtype it has CP price under emoney if u want your shop based on CPs as well as on itemtype.dat or else your client will drop if they doesn't

on cq_goods you gotta add every item id that be added on the npc
first colmun can be any id
2nd is the shop id which is your npc id
3rd is the item id
4th is the money type i already explained upside

so for exmple
1 *NPCID* *ITEMID* 1

and u got a working shop.. everyone gotta have a patch to shop.dat to be able to recieve the data for the new npc... so that calls for a new patch

anyways for more info ask below and if u think this is usefull hit thanks button i will be explaining more stuff soon.
05/11/2009 22:36 suboy#3
nice will try it out soon
05/11/2009 22:44 magnon#4
Cool:)
05/11/2009 23:36 Mr_PoP#5
Quote:
Originally Posted by E.M.E View Post
Ok i will explain it but doesn't mean i will get the querys done to anyone asks..

The tables you will need to work on are
Cq_action
Cq_tasks
Cq_NPC or Cq_dynnpc

First off all open Cq_npc add new ID .. Location .. for the lookface "Copy other NPC's" for task0 put a new ID and make sure the id u put Doesn't have any on cq_action. will require a restart so the npc shows...

when u click the npc it will directly send u to task0 ... which is the new ID u will put

Lets consider the ID as *ID1*

open cq_action
on the ID you put *ID1* id_next the next action script that must comes after the starting query so id_next is *ID2*

if you click the npc it will take u to *ID1* then reads *ID2*... how to make the npc starts a conversation? keep going on the guide..

we got other columns called type .. data and param

To start a conversation when someone clicked the npc you gotta put 101 as type and under param write the text gotta be of 255 letters thats the limit of each column...

note that the space doesn't be readen on TQ binarys you gotta replace each space with ~ for exmple (Welcome~to~E.M.E's~NPC,~You~can~buy~blah~blah~bla h.)

so are first line is
*ID1* *ID2* 0 101 0 Welcome~to~E.M.E's~NPC,~You~can~buy~blah~blah~blah .
then on line 2 comes the options for the NPC
line 2 id is *ID2* gotta be same as Id_next and the type of the options param is 102 so for line 2
*ID2* *ID3* 0 102 0 THE PARAM
the param gotta be the options name like
(Lets~buy) then a space and the action id that must be redirected to so for exmple
(Lets~Buy *ID10*)
and to make an ending option
will be *ID3* it will have to be
*ID3* 150635 0 102 0 THE PARAM
and the param is (END 0) or Nevermind or how ever u wanted to end it...

So we got now
*ID1* *ID2* 0 101 0 Welcome~to~E.M.E's~NPC,~You~can~buy~blah~blah~blah .
*ID2* *ID3* 0 102 0 Lets~Buy *ID10*
*ID3* 150365 0 102 0 END 0

now open cq_tasks
insrt new line
place the following ids as tasks
*ID1*
*ID3*
*ID10*

the cq_tasks has id and id_next
on both add the same ids and the rest copy another line info but make sure the marriage has -1 or else married characters wouldn't be able to get redirected to the actions

the cq_tasks is any request been made by npc tasks this why you have to add your action id on task0 at cq_npc so when u click the npc it do a check on task if the ID exist if it does it redirects you to the actions (id_next)

and for the options on the dialog
*ID2* *ID3* 0 102 0 Lets~Buy *ID10* << when you click Lets~buy it request the *ID10* from tasks to and redirects to ID10 so after u build your dialog u do the rest of action to do w/e u wanted to do with your NPC thats not a full guide this guide made to show you how does the cq_action work for TQ Binarys u can check other npcs for more info to start your own
thnx mate
nice guide but u need to explian more for them as i knw no one will make it right and they guna ask u abot sum picz or vid but really thanks u helped me so much i get spamming abot how to make new npc,wepen,quest,etc.. like a hell
w8ing more +K
05/12/2009 02:16 PeTe Ninja#6
good release +k i wont use it though, since i dont use binaries but finally will stop some questions :D

BTW 930th POST!
05/12/2009 03:30 superplox#7
gradz pete ninja, but this is a nice release even tho im aginst bina
05/12/2009 13:37 mohamedstarTO#8
Thank you for this cool realase :S
05/13/2009 17:24 Jemy#9
Hmmm 3 Questions

1:- When i follow the guide and my ShopNPC is done i wanted it to make sell DragonBalls and DBScrolls some how he don't wanna display the items inside the shop and i looked in the databases itemtype and there where no DBs and germants and like that to find i am confoused.

2 :- How can i get the full item id of an Super +12 2 Soc 2 SDG -7 item

3 :- An big point by me some how the names of the NPC don't want to change like i want them to be.
05/13/2009 19:06 hosmatrix#10
Awsome Post Thanks.... Really Help.
[Only registered and activated users can see links. Click Here To Register...] <<< awsome private server.

[Only registered and activated users can see links. Click Here To Register...]
05/13/2009 21:47 E.M.E#11
Quote:
Originally Posted by Jemy View Post
Hmmm 3 Questions

1:- When i follow the guide and my ShopNPC is done i wanted it to make sell DragonBalls and DBScrolls some how he don't wanna display the items inside the shop and i looked in the databases itemtype and there where no DBs and germants and like that to find i am confoused.

2 :- How can i get the full item id of an Super +12 2 Soc 2 SDG -7 item

3 :- An big point by me some how the names of the NPC don't want to change like i want them to be.
1- Listen to display them u need to start a shop under ini/shop.dat in your client with the same id as the npc's then add the items u exactly want them to show... and add them aswell in cq_goods with the npc id as owner's id.

2- i will be posting guide soon about how to make an items with status spawns.

3- you can change the name in ini/npc.ini i don't really know how to start new npc sorta compilicated but changing the name is on this ini file
05/13/2009 23:20 Zimbolt#12
EDIT : Stupid error on my part, I fixed it
05/13/2009 23:52 E.M.E#13
ok make sure about the colculated amount in shop.dat also make sure items start with item0 and keeps going.. then make sure the items you adding has values for money / emoney in the itemtype.dat that cause crushing like if an item doesn't show a price and be bought.. this is 1 reason cause crushing, So simply get an encrypter to your itemtype.dat and add prices for cps or gold even if 1 as a price to make it purchase able. then follow the cq_goods part in the guide and double check the cq_itemtype that emoney / money columns for the items has prices.
let me know if u didn't understand a word here iam hurried playing gunz atm :P
05/15/2009 18:49 tarek ahmed#14
hey bro can tell me please how can i add NPC to change money to CPS
05/15/2009 20:56 E.M.E#15
Alright here you go


In cq_action:
*id1* *id2* 0 101 I~Can~Exchange~Money~into~cps,~I~Will~swap~you~1CP ~for~every~1k.
*id2* *id3* 0 102 0 Change~1k~into~cps *id100*
*id3* *id4* 0 102 0 Change~100k~into~cps *id200*
*id4* *id5* 0 102 0 Change~1m~into~cps *id300*
*id5* 15003 0 102 0 Nothing,~thank~you. 0

The actions to option 1 (Change~1k~into~cps)
*id100* 0 *id101* 1001 0 money < 1000
*id101* *id102* 0 1001 0 money += -1000
*id102* 0 0 1001 0 e_money += 1

The actions to option 2 (Change~100k~into~cps)
*id200* 0 *id201* 1001 0 money < 100000
*id201* *id202* 0 1001 0 money += -100000
*id202* 0 0 1001 0 e_money += 100

The actions to option 3 (Change~1m~into~cps)
*id300* 0 *id301* 1001 0 money < 1000000
*id301* *id302* 0 1001 0 money += -1000000
*id302* 0 0 1001 0 e_money += 1000

In cq_tasks:
Like i said b4 this is the redirection links read the first guide to understand them.
*id1*
*id5*
*id100*
*id200*
*id300*