HelloI have thisnpcexatamato seethe amountofequipment on theserverusingtheir id,itwouldput aptiononly foradminto deleteitemsusing onlythe id.In caseif I putthe id680all equipmentwiththis idwilldisappear.
prontera,168,179,5 script Registros 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;
}
Question
Scofield
Hello I have this npc exatama to see the amount of equipment on the server using their id, it would put a ption only for admin to delete items using only the id. In case if I put the id 680 all equipment with this id will disappear.
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.