[Only registered and activated users can see links. Click Here To Register...]
Today im gonna make tutorial how to create exchange store like pic above
1. Creating NPC exchange store
i. create npc in cq_npc
2. Adding item in the store
Note 1: You can just make directly open store from npc by skip all the word 101 type (all bla bla word)
Note 2: Create cq_task by yourself lol
How many item i can put in this store?
-as many as you want , but i prefer maximum 4 pages is enough
How many exchange item i can put (needitem) per store?
-dont to much maximun i prefer just 3 item per store..but its up to you lol.
Today im gonna make tutorial how to create exchange store like pic above
1. Creating NPC exchange store
i. create npc in cq_npc
ii. create script for npcQuote:
INSERT INTO `cq_npc` VALUES
(72850, 0, 0, 'Exchange~Store', 0006, 728506, 0, 0, -1, 1000, 0321, 0462, 50001, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0, 0, 0, 0, 'None', 0000, 00, 00, 0000, 01, 0000, 0000, 0000, 0000, 0000, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0);
Quote:
INSERT INTO `cq_action` (`id`, `id_next`, `id_nextfail`, `type`, `data`, `param`) VALUES
(50001, 50002, 0000, 0101, 0, 'Open Store hanat');
(50002, 50003, 0000, 0102, 0, 'Exchange~Store 50006');
(50003, 50004, 0000, 0102, 0, 'Close 0');
(50004, 50005, 0000, 0104, 0, '0 0 264');
(50005, 0000, 0000, 0120, 0, '');
(50006, 0000, 0000, 0250, 601, '');
Type = 250 - Opening exchange store interface
Data = 601 - Dialog box number. (ignore this)
2. Adding item in the store
Reminder: If there is a quantity of items, it will be restocked at 24 o'clock every day (or when MSG is restarted).Quote:
[Only registered and activated users can see links. Click Here To Register...]
INSERT INTO `cq_exchangegoods` VALUES
(001, 72850, 1020414, 3, 1020370, -1, 0);
Cq_exchangegoods table description:
ID = 001 - dont duplicate this id just put any number
ownerid = 72850 - this refers to the NPC ID. (cq_npc)
itemtype=Itemtype id you want to sell/exchange (cq_itemtype)
price = number of item needed to exchange/redeem (price)
needitem= item requirement (cq_itemtype)
maxcount=(Maximum 999) indicates how many items can be redeemed per day. When this value is -1, it means unlimited redemption.
RetainField=Meaningless. just put 0. (just ignore)
Note 1: You can just make directly open store from npc by skip all the word 101 type (all bla bla word)
Note 2: Create cq_task by yourself lol
How many item i can put in this store?
-as many as you want , but i prefer maximum 4 pages is enough
How many exchange item i can put (needitem) per store?
-dont to much maximun i prefer just 3 item per store..but its up to you lol.