Jump to content
  • 0

Storage npc


Fresh prince

Question


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  295
  • Reputation:   6
  • Joined:  10/14/12
  • Last Seen:  

Hello rathena,

Requesting a npc that will tell you the account ids that has 400+ items on their storage.

Example is when you click a npc, it will say

Users:

10000

13000

13669

14778

16876

Has more than 400 items on their storage.

Thanks!!

This is for only a game master's use ofcourse. Thanks you!

Little help here please? :(

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 1

  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

Try

SELECT `account_id`,COUNT( `nameid` ) AS `total` FROM `storage` GROUP BY `account_id` HAVING `total` >= 400 ORDER BY `total` DESC
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2346
  • Joined:  10/28/11
  • Last Seen:  

try

query_sql( "SELECT `account_id`,COUNT( `nameid` ) AS `total` FROM `storage` WHERE `total` >= 400 GROUP BY `account_id` ORDER BY `total` DESC",.@aid,.@total );
.@aid_size = getarraysize( .@aid );
for ( .@i = 0; .@i < .@aid_size; .@i++ ) 
	mes .@aid[.@i]+" - "+.@total[.@i]+" items";
close;
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  295
  • Reputation:   6
  • Joined:  10/14/12
  • Last Seen:  

Thanks Master Emistry,

 

it produced an error like this.

 

: DB error - unknown column 'total' in 'where clause'

 

regards

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  295
  • Reputation:   6
  • Joined:  10/14/12
  • Last Seen:  

Thanks very much Sir Capuche and Emistry!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...