Index: UberPvPOptimizer.ash
===================================================================
--- UberPvPOptimizer.ash (revision 55)
+++ UberPvPOptimizer.ash (working copy)
@@ -759,7 +759,7 @@
print_html("</ul>");
/*** unequip all slots ***/
- foreach i in $slots[hat, back, shirt, weapon, off-hand, pants, acc1, acc2, acc3]
+ foreach i in $slots[hat, back, shirt, weapon, off-hand, pants, acc1, acc2, acc3, familiar]
equip(i,$item[none]);
print_html("<br/>");
/*******
@@ -792,7 +792,7 @@
}
/*** Top Gear display lists ***/
- foreach i in $slots[hat, back, shirt, weapon, off-hand, pants, acc1] {
+ foreach i in $slots[hat, back, shirt, weapon, off-hand, pants, acc1, familiar] {
int itemCount = count(gear[to_string(i)]);
print_html("<b>Slot <i>" + i + "</i> items considered: " + itemCount + " printing top items in slot:</b>");
@@ -894,6 +894,7 @@
bestGear("acc1", $slot[acc1]);
bestGear("acc1", $slot[acc2]);
bestGear("acc1", $slot[acc3]);
+ bestGear("familiar", $slot[familiar]);
/*******
Snipped familiars
boolean [item] familiar_gear;
foreach it in $items[]
if(it.item_type() == "familiar equipment" && string_modifier(it, "Modifiers").contains_text("Generic"))
familiar_gear[it] = true;
foreach f in $familiars
if(have_familiar(f) && be_good(f))
familiar_gear[ familiar_equipment(f) ] = true;
Or you could use:
Although I'm probably the only one who thinks that is cool.Code:if (char_at(output,i)≈letter) lettersCounted+=1;
On my Mac, ≈ is option-x.Code:[color=green]> ash ( "a" == "A" )[/color] Returned: false [color=green]> ash ( "a" ≈ "A" )[/color] Returned: true
Index: UberPvPOptimizer.ash
===================================================================
--- UberPvPOptimizer.ash (revision 57)
+++ UberPvPOptimizer.ash (working copy)
@@ -545,7 +545,7 @@
break;
}
//this simultaneously checks if a piece can be equipped and tries to do so
- if ((canEquip(g) && gearup(s, g)) || (s == $slot[familiar] && fams[j].use_familiar() && canEquip(g) && gearup(s, g))) {
+ if ((canEquip(g) && gearup(s, g)) || (s == $slot[familiar] && canAcquire(g) && fams[j].use_familiar() && canEquip(g) && gearup(s, g))) {
print_html("<b>Best Available " + s + ":</b> " + gearString(g));
print_html(string_modifier(g,"Modifiers"));
break;
@@ -793,22 +793,23 @@
}
}
- familiar CurrentFam = my_familiar();
- foreach f in $familiars[] {
- string s = $slot[familiar].to_string();
- if (f.have_familiar() && f.use_familiar()){
- foreach it in $items[] {
- int price = npc_price(it);
- if (price == 0)
- price = historical_price(it);
- if ((it.to_slot().to_string() == s && can_equip(it)) && (showAllItems || canAcquire(it))) {
- gear[s][count(gear[s])] = it;
- fams[count(fams)] = f;
- }
- }
+ familiar [item] famItems;
+ foreach f in $familiars[]
+ if(f.have_familiar())
+ famItems[familiar_equipment(f)] = f;
+ string s = $slot[familiar].to_string();
+ foreach it in $items[] {
+ int price = npc_price(it);
+ if (price == 0)
+ price = historical_price(it);
+ if (famItems contains it || (it.to_slot().to_string() == s && string_modifier(it, "Modifiers").contains_text("Generic"))&& (showAllItems || canAcquire(it))) {
+ gear[s][count(gear[s])] = it;
+ if(famItems contains it)
+ fams[count(fams)] = famItems[it];
+ else
+ fams[count(fams)] = my_familiar();
}
}
- CurrentFam.use_familiar();
/*** Top Gear display lists ***/
sort fams by -valuation(gear["familiar"][index]);
familiar CurrentFam = my_familiar();
foreach f in $familiars[] {
string s = $slot[familiar].to_string();
if (f.have_familiar() && f.use_familiar()){
foreach it in $items[] {
int price = npc_price(it);
if (price == 0)
price = historical_price(it);
if ((it.to_slot().to_string() == s && can_equip(it)) && (showAllItems || canAcquire(it))) {
gear[s][count(gear[s])] = it;
fams[count(fams)] = f;
}
}
}
}
CurrentFam.use_familiar();
familiar [item] famItems;
foreach f in $familiars[]
if(f.have_familiar())
famItems[familiar_equipment(f)] = f;
string s = $slot[familiar].to_string();
foreach it in $items[] {
int price = npc_price(it);
if (price == 0)
price = historical_price(it);
if (famItems contains it || (it.to_slot().to_string() == s && string_modifier(it, "Modifiers").contains_text("Generic"))&& (showAllItems || canAcquire(it))) {
gear[s][count(gear[s])] = it;
if(famItems contains it)
fams[count(fams)] = famItems[it];
else
fams[count(fams)] = my_familiar();
}
}
if ((canEquip(g) && gearup(s, g)) || (s == $slot[familiar] && fams[j].use_familiar() && canEquip(g) && gearup(s, g))) {
if ((canEquip(g) && gearup(s, g)) || (s == $slot[familiar] && canAcquire(g) && fams[j].use_familiar() && canEquip(g) && gearup(s, g))) {
For people who have trouble with patch files and want to edit it themselves, ]