Winterbay
Active member
BCA currently does the following when handling faxes, which is a place where you may want to use a combat filter, but can't directly since by just using the item Mafia runs the fight for you:
1) Request a fax
2) Check that you got the correct fax
3) call visit_url("inv_use.php?pwd=&which=3&whichitem=4873");
4) call bumRunCombat() which takes a string argument for if to use a combat filter or not
bumRunCombat currently looks like this:
This can be adapted for other usages as well I guess, but a runCombat(string filter_function) would make that a lot easier I guess...
1) Request a fax
2) Check that you got the correct fax
3) call visit_url("inv_use.php?pwd=&which=3&whichitem=4873");
4) call bumRunCombat() which takes a string argument for if to use a combat filter or not
bumRunCombat currently looks like this:
Code:
string bumRunCombat(string consult) {
//If we're not in a combat, we don't need to run this
if (!contains_text(visit_url("fight.php"), "Combat")) {
print("BCC: You aren't in a combat (or something to do with Ed which I can't work out), so bumRunCombat() doesn't need to do anything.", "purple");
return to_string(run_combat());
}
if (consult != "") {
print("BCC: This isn't actually adventuring at the noob cave. Don't worry! (Consult Script = "+consult+")", "purple");
adv1($location[noob cave], -1, consult);
}
else if (my_primestat() == $stat[Mysticality] && in_hardcore()) {
print("BCC: This isn't actually adventuring at the noob cave. Don't worry! (Myst)", "purple");
adv1($location[noob cave], -1, "consultMyst");
}
else if (can_interact()) {
print("BCC: This isn't actually adventuring at the noob cave. Don't worry. (Can_Interact() == True)", "purple");
adv1($location[noob cave], -1, "consultCasual");
}
print("BCC: Run_Combat() being used normally.", "purple");
return to_string(run_combat());
}
This can be adapted for other usages as well I guess, but a runCombat(string filter_function) would make that a lot easier I guess...