Jump to content
  • 0

How to Check the Inventory and Storage of the Player


Question

3 answers to this question

Recommended Posts

Posted

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;
}

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...