/*-----------------------------------
identifyall(<value>)
-------------------------------------
by Mumbles
-------------------------------------
Identifies all unidentified items in
user's inventory and returns the
number of items identified.
-------------------------------------
Must have Hercules commit #24c4d53
tinyurl.com/commit-24c4d53
-----------------------------------*/
function identifyall {
getinventorylist();
// Loop through all inventory items
for(.@i = 0; .@i < getarraysize(@inventorylist_id); .@i++) {
if(!@inventorylist_identify[.@i]) { // If current item is not identified
.@unidentified_id[.@j++] = @inventorylist_id[.@i]; // Add item ID to unidentified list
}
}
// Loop through all unidentified items
for(.@k = 0; .@k < getarraysize(.@unidentified_id); .@k++) {
identify(.@unidentified_id[.@k]); // Identify all unidentified items
}
return .@k; // Return amount of items identified
}
// Example use
message strcharinfo(PC_NAME), identifyall() + " items have been identified.";
/*-----------------------------------
identifyall()
-------------------------------------
by Mumbles
-------------------------------------
Identifies all unidentified items in
user's inventory without returning
any additional values. For quick use.
-------------------------------------
Must have Hercules commit #24c4d53
tinyurl.com/commit-24c4d53
-----------------------------------*/
function identifyall {
getinventorylist();
// Loop through all inventory items
for(.@i = 0; .@i < getarraysize(@inventorylist_id); .@i++) {
if(!@inventorylist_identify[.@i]) { // If current item is not identified
identify(@inventorylist_id[.@i]); // Identify current item
}
}
return;
}