Jump to content
  • 0

How to Check the Inventory and Storage of the Player


nikki1200

Question


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  34
  • Reputation:   0
  • Joined:  10/06/13
  • Last Seen:  

Hi All,


 


Seeking for your assistance on how to check the inventory and storage of the player.


 


Please advise,


 


Thanks,


 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


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

how to check the inventory

getinventorylist or countitem

 

storage of the player.

by sql

 

You want to search a specific item or to see all the item of the player?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  34
  • Reputation:   0
  • Joined:  10/06/13
  • Last Seen:  

how in sql??

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Try :

prontera,150,150,0    script    Sample    100,{
    mes "Input player";
    input .@player$;
    next;
    mes .@player$+ " have the following items on his storage :";
    .account_id = getcharid(3, .@player$);
    query_sql "SELECT COUNT(`nameid`) FROM `storage` WHERE `account_id` = '" +.account_id+ "'",.@total;
    while ( .@count < .@total ) {
        query_sql "SELECT `nameid` FROM `storage` WHERE `account_id` = '" +.account_id+ "' LIMIT 128 OFFSET "+.@offset,.@list;
        .@i = 0;
        .@size = getarraysize( .@list );
        while ( .@i < .@size ) {
            mes "- " +getitemname(.@list[.@i]);
            .@count++;
            .@i++;
        }
        .@offset += .@size;
        deletearray .@list, .@size;
    }
    close;
}
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...