Categorized Guild Bank is a vast improvement over the regular bank view, and it has a very nice filtering option, but even searching for something like "leather" in CGB can return a lot of pointless results.
My thought is this - provide a drop-down menu containing each char in roster_players. When that character is selected, filter out all items that they can't use or are more than 10 levels lower than them. (Since we have their skills, this would be feasible.)
Also, sorting by item level and instead of the item name would probably help out most people finding what they need.
I've written an untested PHP function that will do what is needed (attached) for weapons and armor. It would be relatively easy to do for recipes as well. Would the developers be interested in including this with the CGB?
If not, is there other demand for this? Should I work on my own plugin?
- Code: Select all
// Function takes as input the following:
// 1) Player's level (from roster_players)
// 2) Player's skills (from roster_skills, only Weapon Skills and Armor Proficiences, named array in the format such as: $playerSkills['Daggers'] = '300:310'
// 3) current item's level (from roster_items)
// 4) current item's tooltip (from roster_items)
// Will return TRUE if player can use the item, FALSE otherwise
function isUsable($playerLevel, $playerSkills, $itemLevel, $itemTooltip) {
if ($itemLevel > 0 && $itemLevel <= $playerLevel && ($playerLevel - $itemLevel)< 10) {
// level OK, check for skill in tooltip
if ($itemTooltip =~ m/(^\w+)\t(\w+$)/) {
// found a weapon or armor
$itemDetail = $1;
$itemType = $2;
if ($itemType == 'Cloth' || $itemType == 'Leather' || $itemType == 'Mail' || $itemType == 'Plate') {
// item is armor, skill is same as name (e.g. Cloth)
$itemSkillRequired = $itemType;
} else {
// item is a weapon. check if it's two handed or not.
if ($itemDetail == "Two Handed") {
$itemSkillRequired = "Two Handed ".$itemType."s";
} else {
$itemSkillRequired = $itemType."s";
}
}
if ($playerSkills[$itemSkillRequired] =~ /(\d+):(\d+)/) {
// matches something like 300:310. $1 contains actual skill.
if ($1 >= 1)
return true;
}
}
}
return false;
}