Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - script ItemCount -1,{
- OnWhisperGlobal:
- if( getitemname( atoi( @whispervar0$ ) ) != "null" ){
- set .@item_id,atoi( @whispervar0$ );
- if( .@item_id ){
- query_sql("SELECT SUM(`amount`) FROM `inventory` WHERE `nameid`='"+.@item_id+"'",.@inventory);
- query_sql("SELECT SUM(`amount`) FROM `cart_inventory` WHERE `nameid`='"+.@item_id+"'",.@cart);
- query_sql("SELECT SUM(`amount`) FROM `guild_storage` WHERE `nameid`='"+.@item_id+"'",.@gstore);
- query_sql("SELECT SUM(`amount`) FROM `storage` WHERE `nameid`='"+.@item_id+"'",.@storage);
- query_sql("SELECT SUM(`amount`) FROM `mail` WHERE `nameid`='"+.@item_id+"'",.@mail);
- set .@total,( .@inventory + .@cart + .@gstore + .@storage + .@mail );
- dispbottom "Found "+.@total+" x "+getitemname( .@item_id );
- }
- }else{
- dispbottom "Invalid Item ID";
- }
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment