friomixx Posted July 31, 2022 Group: Members Topic Count: 10 Topics Per Day: 0.00 Content Count: 20 Reputation: 0 Joined: 03/02/12 Last Seen: Saturday at 04:22 PM Share Posted July 31, 2022 Hi all, can i request for an npc that can track items that are mostly sold in npc and the count of each items sold. Quote Link to comment Share on other sites More sharing options...
1 Emistry Posted August 20, 2022 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2368 Joined: 10/28/11 Last Seen: Tuesday at 02:49 PM Share Posted August 20, 2022 (edited) conf\log_athena.conf // Enable Logs? (Note 3) ... ... // 0x00000010 - (S) Log NPC transactions (buy/sell) ... ... enable_logs: 0x00000010 load the NPC prontera,155,181,5 script Sample 757,{ .@sql$ = "SELECT `nameid`, SUM(`amount`) AS `total` FROM `picklog` WHERE `type` = 'S' AND `amount` > 0 GROUP BY `nameid` ORDER BY `total` DESC LIMIT 10"; .@count = query_sql(.@sql$, .@nameid, .@total); mes "Items:"; for (.@i = 0; .@i < .@count; .@i++) mes getitemname(.@nameid[.@i])+" - "+F_InsertComma(.@total[.@i]); close; } however there is no way telling how much NPC have earned or lost from the transaction since it's not log. Edited August 20, 2022 by Emistry 1 Quote Link to comment Share on other sites More sharing options...
0 Bisuke Posted August 24, 2022 Group: Members Topic Count: 51 Topics Per Day: 0.01 Content Count: 177 Reputation: 10 Joined: 04/02/12 Last Seen: November 2, 2024 Share Posted August 24, 2022 On 8/20/2022 at 11:19 PM, Emistry said: conf\log_athena.conf // Enable Logs? (Note 3) ... ... // 0x00000010 - (S) Log NPC transactions (buy/sell) ... ... enable_logs: 0x00000010 load the NPC prontera,155,181,5 script Sample 757,{ .@sql$ = "SELECT `nameid`, SUM(`amount`) AS `total` FROM `picklog` WHERE `type` = 'S' AND `amount` > 0 GROUP BY `nameid` ORDER BY `total` DESC LIMIT 10"; .@count = query_sql(.@sql$, .@nameid, .@total); mes "Items:"; for (.@i = 0; .@i < .@count; .@i++) mes getitemname(.@nameid[.@i])+" - "+F_InsertComma(.@total[.@i]); close; } however there is no way telling how much NPC have earned or lost from the transaction since it's not log. How do you make this script only show the top items from the current month only? Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted January 30, 2023 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2368 Joined: 10/28/11 Last Seen: Tuesday at 02:49 PM Share Posted January 30, 2023 try prontera,155,181,5 script Sample 757,{ .@year = gettime(DT_YEAR); .@month = gettime(DT_MONTH); .@sql$ = "SELECT `nameid`, SUM(`amount`) AS `total` FROM `picklog` WHERE `type` = 'S' AND `amount` > 0 AND MONTH(`time`) = "+.@month+" AND YEAR(`time`) = "+.@year+" GROUP BY `nameid` ORDER BY `total` DESC LIMIT 10"; .@count = query_sql(.@sql$, .@nameid, .@total); mes "Items:"; for (.@i = 0; .@i < .@count; .@i++) mes getitemname(.@nameid[.@i])+" - "+F_InsertComma(.@total[.@i]); close; } Quote Link to comment Share on other sites More sharing options...
Question
friomixx
Hi all, can i request for an npc that can track items that are mostly sold in npc and the count of each items sold.
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.