//useful sub-functions for checking items: yes=green, no=red
string item_report(boolean good, string itname) {
return('<span style="color:' + (good? "green": "red") + '">'+itname+'</span>');
}
string item_report(boolean[item] itlist, string itname) {
foreach it in itlist
if(available_amount(it) > 0)
return item_report(true, itname);
return item_report(false, itname);
}
string item_report(item it) {
return item_report(available_amount(it) > 0, to_string(it));
}
string item_report(item it, int num) {
return item_report(available_amount(it) >= num, to_string(it));
}
string item_report(item it, int num) {
if (available_amount(it) >= num) {
return('<span style="color:green">'+to_string(it)+'</span> ('+available_amount(it)+'/'+to_string(num)+')');
} else {
return('<span style="color:red">'+to_string(it)+'</span> ('+available_amount(it)+'/'+to_string(num)+')');
}
}
Bale, I can live with most of that and your advanced programmery ways, except I just upated this to make it more clean for how many are currently available:
PHP:string item_report(item it, int num) { if (available_amount(it) >= num) { return('<span style="color:green">'+to_string(it)+'</span> ('+available_amount(it)+'/'+to_string(num)+')'); } else { return('<span style="color:red">'+to_string(it)+'</span> ('+available_amount(it)+'/'+to_string(num)+')'); } }
string item_report(item it, int num) {
return item_report(available_amount(it) >= num, to_string(it)) + ' ('+available_amount(it)+'/'+num+')';
}
I really would like to add tracknig for the required wines for the L11 Manor quest, but I have no idea how mafia is tracknig this information. I would like to do it without any additional server hits. If you anyone has keen insights here it is much appreciated.
item wine_id(int wine) {
if(get_property("lastDustyBottleReset" == my_ascensions())
for i from 2271 to 2276
if(get_property("lastDustyBottle"+i) == wine)
return to_item(i);
return $item[none];
}
string[int] blar = split_string(visit_url("manor3.php?place=goblet"),"/otherimages/manor/glyph");
for i from 1 to 3
print("Wine needed: "+ wine_id(substring(blar[i],0,1));
On the subject of moods - has any thought gone in to a mood switcher block? That's something I routinely travel back to the main interface for. I would have no need to add/remove individual buffs, just select from predefined moods.
If chit.quests.hide is set to true then the charpane won't show the quest log, even if there is a quest brick listed in ChIT's preferences. WTF? ChIT will not display the quests brick unless it is explicitly instructed to do so by having "quests" listed in either the wall, ceiling, floor or toolbar. Why is there a preference to disable the other preference? Does anyone use this? Can I get rid of it completely?
Any way we can get pvp fights added to this? I normally have them on the charpane but with this it doesn't actually list them anywhere.\
Edit: Ignore me, it seems I didn't break my stone this run... I'm not sure how I managed not to :/
It's a new pvp season, your stone was repaired because of that.
OH! There's a similar sort of function you could also add if you're going to add that one. Could we also have a function that will return the names of all currently existing outfits, both custom and standard? Outfit switching from the charpane would also be cool.