I hope this helps.
disable_items;
set .@Price, 3000;
mes "[Equip Assistant]";
mes "Hello, do you need your help with your equipment?";
switch(select("Repair Equipment","Identify Equipment")){
case 1:
if (Zeny < .@Price) {
dispbottom "It costs "+.@Price+" Zeny to repair your items.";
end;
}else {
if( getbrokenid(1) ){
repairall;
set Zeny, Zeny- .@Price;
dispbottom "Your items have been repaired.";
} else {
message strcharinfo(0),"No broken items detected.";
end;
}
}
break;
case 2:
getinventorylist;
for(set .@i,0; .@i<@inventorylist_count; set .@i,.@i+1) {
if (@inventorylist_identify[.@i])
continue;
if (Zeny < .@Price) {
dispbottom "It costs "+.@Price+" zeny to identify an item.";
}else {
setarray .@Total[0], .@Total[0]+1, .@Total[1]+.@Price;
}
}
if (!.@Total[0]) {
message strcharinfo(0),"No items where identified.";
end;
} else {
set Zeny, Zeny-.@Price;
specialeffect2 154;
atcommand "@identifyall";
message strcharinfo(0),"Identified "+.@Total[0]+" items"+((.@Total[1])?" for "+.@Total[1]+" Zeny":"")+".";
end;
}
break;
}