[Help] Friend Exp into pp via npc

08/06/2010 11:56 reaper72004#1
ok so what im trying to do is have it to where people who are lvl 255 can change there friend exp into pp via npc, I've been working on this for awhile and im starting to think it is not possible, none the less i will keep trying lol. If someone could help me with this i would gratefully appreciate it. :)

Here's what i got so far:
Code:
1010000100	1010000101	0	101	0	Hello~%user_name!~Here~you~can~exchange~friend~exp~for~pp!!
1010000101	1010000103	0	101	0	You~must~be~Level~255~to~exchange~for~pp.
1010000103	1010000104	0	102	0	I~want~to~exchange~15000exp~for~10kpp. 1010000105
1010000104	500013	0	102	0	Nevermind 0
1010000105	1010000107	1010000106	1001	0	level > 254
1010000106	1010000109	0	126	0	Sorry~you~are~not~level~255.
1010000107	1010000108	1010000110	1001	0	Friend_share > 89999999
1010000108	1010000109	0	101	0	You~do~not~have~enough~friend~exp!
1010000109	500013	0	102	0	I'm~Sorry 0
1010000110	1010000112	0	1001	0	Friend_share += -90000000
1010000112	1010000113	0	1001	0	e_money2  += 10000
1010000113	1010000114	0	101	0	Congrats~you~exchanged~for~10kpp
1010000114	500013	0	102	0	Thanks 0
I've created the npc and task for it, and when i click on the npc the window with the 2 options show up. Now when i click on to exchange for the pp nothing happens. To see if it would even show if i would get rejected for being a low lvl, i changed my lvl to 253 and still nothing happend aka you are not level 255 like it was supposed to. I also made it to check to see if the user has enough exp balls and nothing happened when i didn't aka was supposed to say not enough friend exp. So if anyone could hep me with this thx in advance. :handsdown:
08/06/2010 12:12 karnyge#2
[Only registered and activated users can see links. Click Here To Register...]

Why not look at this link?
08/06/2010 12:58 javairc#3
Correction try this code..

Code:
delete from cq_npc where id >= 881122 and id <= 881122;

INSERT INTO `cq_npc` VALUES ('881122', '0', '0', 'HitamManis', '0123', '8811220', '0', '0', '-1', '1000', '0324', '0406', '1010000100', '0000', '0000', '0000', '0000', '0000', '0000', '0000', '0', '0', '0', '0', '0', '0000', '00', '00', '0000', '01', '0000', '0000', '0000', '0000', '0000');

DELETE FROM cq_action where id >= 1010000100 and id <= 1010000113;

INSERT INTO `cq_action` VALUES ('1010000100', '1010000101', '0', '101', '0', 'Hello~%user_name!~Here~you~can~exchange~friend~exp~for~pp!!');
INSERT INTO `cq_action` VALUES ('1010000101', '1010000102', '0', '101', '0', 'You~must~be~Level~255~to~exchange~for~pp');
INSERT INTO `cq_action` VALUES ('1010000102', '1010000103', '0', '102', '0', 'I~want~to~exchange~15000exp~for~10kpp 1010000104');
INSERT INTO `cq_action` VALUES ('1010000103', '4000010', '0000', '0102', '0', 'Nevermind 0');
INSERT INTO `cq_action` VALUES ('1010000104', '1010000105', '0', '1001', '0', 'level == 255');
INSERT INTO `cq_action` VALUES ('1010000105', '0', '0', '0101', '0', 'Sorry~you~are~not~level~255.');
INSERT INTO `cq_action` VALUES ('1010000106', '4000010', '0000', '0102', '0', 'Im~Sorry 0');
INSERT INTO `cq_action` VALUES ('1010000107', '1010000110', '1010000108', '1001', '0', 'Friend_share == 90000000');
INSERT INTO `cq_action` VALUES ('1010000108', '0', '0', '0101', '0', 'You~do~not~have~enough~friend~exp!');
INSERT INTO `cq_action` VALUES ('1010000109', '4000010', '0000', '0102', '0', 'Im~Sorry. 0');
INSERT INTO `cq_action` VALUES ('1010000110', '1010000111', '0', '1001', '0', 'Friend_share += -90000000');
INSERT INTO `cq_action` VALUES ('1010000111', '1010000112', '0', '1001', '0', 'e_money2 += 10000');
INSERT INTO `cq_action` VALUES ('1010000112', '1010000113', '0', '0101', '0', 'Congrats~you~exchanged~for~10kpp');
INSERT INTO `cq_action` VALUES ('1010000113', '4000010', '0000', '0102', '0', 'Thanks 0');

DELETE FROM cq_task where id >= 1010000100 and id <= 1010000112;

INSERT INTO `cq_task` VALUES ('1010000100', '1010000100', '0000', '', '', '0', '0', '999', '-100000', '100000', '0999', '0000', '0', '-1', '0');
INSERT INTO `cq_task` VALUES ('1010000101', '1010000101', '0000', '', '', '0', '0', '999', '-100000', '100000', '0999', '0000', '0', '-1', '0');
INSERT INTO `cq_task` VALUES ('1010000102', '1010000102', '0000', '', '', '0', '0', '999', '-100000', '100000', '0999', '0000', '0', '-1', '0');
INSERT INTO `cq_task` VALUES ('1010000104', '1010000104', '0000', '', '', '0', '0', '999', '-100000', '100000', '0999', '0000', '0', '-1', '0');
INSERT INTO `cq_task` VALUES ('1010000105', '1010000105', '0000', '', '', '0', '0', '999', '-100000', '100000', '0999', '0000', '0', '-1', '0');
INSERT INTO `cq_task` VALUES ('1010000106', '1010000106', '0000', '', '', '0', '0', '999', '-100000', '100000', '0999', '0000', '0', '-1', '0');
INSERT INTO `cq_task` VALUES ('1010000108', '1010000108', '0000', '', '', '0', '0', '999', '-100000', '100000', '0999', '0000', '0', '-1', '0');
INSERT INTO `cq_task` VALUES ('1010000110', '1010000110', '0000', '', '', '0', '0', '999', '-100000', '100000', '0999', '0000', '0', '-1', '0');
INSERT INTO `cq_task` VALUES ('1010000111', '1010000111', '0000', '', '', '0', '0', '999', '-100000', '100000', '0999', '0000', '0', '-1', '0');
INSERT INTO `cq_task` VALUES ('1010000112', '1010000112', '0000', '', '', '0', '0', '999', '-100000', '100000', '0999', '0000', '0', '-1', '0');
p/s : Sorry if this query wrong.. just wanna help you but if this correct dont forget to click thanks button.. :D
08/07/2010 08:49 reaper72004#4
@karnyge i did look at that before i even posted

@javairc it didn't work thx though

i think the prob is at the Friend_share cause this is where it is hanging at, also changed e_money2 to token_emoney cause that is what handles the pp on my db.. if anyone has some input on this plz post, would really like to get this going :cool:
08/10/2010 08:23 reaper72004#5
ok so i take it friend_share cannot be used in cq_action but only through a query..