Jump to content
  • 0

Knowing who owns the item.


Scofield

Question


  • Group:  Members
  • Topic Count:  107
  • Topics Per Day:  0.03
  • Content Count:  265
  • Reputation:   11
  • Joined:  01/11/13
  • Last Seen:  

Hello, I have this script that shows the amount of item that exists in the project at the time just putting the id, it would only show to admin quantiade item beyond the login id or the people who own them.

 

 

prontera,168,179,5    script    Registros ImperialRO    757,{

mes "Digite o ID do item o qual você quer saber a quantidade existente no servidor no momento.";

mes "Exemplo: ^0b85f8Rondel [1] (id: 13017).^000000";

mes "^0b85f8Chifres Místicos de Bafomé (id: 5518).^000000";

input .@item_id;

if( getitemname( .@item_id ) != "null" ){



    if( .@item_id ){

        for( set .@i,0; .@i < .sql_size; set .@i,.@i + 1 ){

            query_sql( "SELECT SUM(`amount`) FROM `"+.sql_table$[.@i]+"` WHERE `nameid`='"+.@item_id+"'",.@amount );

            query_sql( "SELECT COUNT(`card0`) FROM `"+.sql_table$[.@i]+"` WHERE `card0`='"+.@item_id+"'",.@card0 );

            query_sql( "SELECT COUNT(`card1`) FROM `"+.sql_table$[.@i]+"` WHERE `card1`='"+.@item_id+"'",.@card1 );

            query_sql( "SELECT COUNT(`card2`) FROM `"+.sql_table$[.@i]+"` WHERE `card2`='"+.@item_id+"'",.@card2 );

            query_sql( "SELECT COUNT(`card3`) FROM `"+.sql_table$[.@i]+"` WHERE `card3`='"+.@item_id+"'",.@card3 );

            set .@total,.@total + ( .@amount + .@card0 + .@card1 + .@card2 + .@card3 );

        }

            

        mes "Encontrado "+.@total+" x "+getitemname( .@item_id );

    }

}else{

    mes "ID Item inválido";

}

close;



OnInit:

setarray .sql_table$[0],"inventory","cart_inventory","guild_storage","storage","mail";

set .sql_size,getarraysize( .sql_table$ );

end;

}
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  90
  • Reputation:   5
  • Joined:  06/17/12
  • Last Seen:  

You mean to say, only GM are allowed to view who own the specified item (Only if available or someone owned it) either by Character name or Account name?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  107
  • Topics Per Day:  0.03
  • Content Count:  265
  • Reputation:   11
  • Joined:  01/11/13
  • Last Seen:  

Therefore, only those who have in his possession, account name

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...